<commit_before>Anaconda distribution of GRASS
==============================

Get a minimal anaconda installation
-----------------------------------

If you don't already have an Anaconda distribution on your machine,
you will need to install one.

    $ curl https://repo.continuum.io/miniconda/Miniconda2-latest-MacOSX-x86_64.sh > miniconda.sh # You can substitute Linux of MacOSX
    $ bash ./miniconda.sh -b -f -p $(pwd)/conda # You can install it wherever you like
    $ export PATH=$(pwd)/conda/bin:$PATH

Install GRASS dependencies
--------------------------

It's probably best to build GRASS within a new environment. This will
ensure that they dependencies are what they should be and won't mess
with your current Python distribution.

    $ conda create -n grass python=2.7
    $ source activate grass

Install the dependencies. Note that the `default` channel comes
before `conda-forge`. This is important.

    $ conda install --yes --file=requirements.txt -c defaults -c conda-forge

Get the GRASS source and compile
--------------------------------

    $ curl -O https://grass.osgeo.org/grass72/source/grass-7.2.0.tar.gz
    $ tar xvfz grass-7.2.0.tar.gz

Apply patches for Anaconda build on Mac
---------------------------------------

The following patches are necessary to get GRASS to build with
Anaconda on a Mac.
*  `platform.make.in.patch`: Add Mac-specific compile and link options
   to use `rpath` with dynamic libraries.
*  `rules.make.patch`: Run commands with `LD_RUN_PATH` instead of
   `DYLD_LIBRARY_PATH`. This is probably only necessary when dynamically
   loading libraries using `load_library` from the Python module
   `grass.lib.ctypes_loader`
*  `loader.py.patch`: On Mac, additionally use `LD_RUN_PATH` for
   folders to check for libraries to load.

    $ patch -p0 < platform.make.in.patch
    $ patch -p0 < loader.py.patch
    $ patch -p0 < rules.make.patch
    $ cd grass-7.2.0
    $ bash ../configure.sh
    $ make -j4 GDAL_DYNAMIC=<commit_msg>Fix formatting of list.<commit_after>Anaconda distribution of GRASS
==============================

Get a minimal anaconda installation
-----------------------------------

If you don't already have an Anaconda distribution on your machine,
you will need to install one.

    $ curl https://repo.continuum.io/miniconda/Miniconda2-latest-MacOSX-x86_64.sh > miniconda.sh
    $ bash ./miniconda.sh -b -f -p $(pwd)/conda # You can install it wherever you like
    $ export PATH=$(pwd)/conda/bin:$PATH

Install GRASS dependencies
--------------------------

It's probably best to build GRASS within a new environment. This will
ensure that they dependencies are what they should be and won't mess
with your current Python distribution.

    $ conda create -n grass python=2.7
    $ source activate grass

Install the dependencies. Note that the `default` channel comes
before `conda-forge`. This is important.

    $ conda install --yes --file=requirements.txt -c defaults -c conda-forge

Get the GRASS source and compile
--------------------------------

    $ curl -O https://grass.osgeo.org/grass72/source/grass-7.2.0.tar.gz
    $ tar xvfz grass-7.2.0.tar.gz

Apply patches for Anaconda build on Mac
---------------------------------------

The following patches are necessary to get GRASS to build with
Anaconda on a Mac.
*  `platform.make.in.patch`: Add Mac-specific compile and link options
   to use `rpath` with dynamic libraries.
*  `rules.make.patch`: Run commands with `LD_RUN_PATH` instead of
   `DYLD_LIBRARY_PATH`. This is probably only necessary when dynamically
   loading libraries using `load_library` from the Python module
   `grass.lib.ctypes_loader`
*  `loader.py.patch`: On Mac, additionally use `LD_RUN_PATH` for
   folders to check for libraries to load.

Almost certainly these patches will break things on non-Mac non-Anaconda
builds.

    $ patch -p0 < platform.make.in.patch
    $ patch -p0 < loader.py.patch
    $ patch -p0 < rules.make.patch
    $ cd grass-7.2.0
    $ bash ../configure.sh
    $ make -j4 GDAL_DYNAMIC=
{'fraction_non_alphanumeric': 0.1589387552690305, 'fraction_numerical': 0.010909992561368709, 'mean_word_length': 2.650678733031674, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 5, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '277672', 'n_tokens_mistral': 1209, 'n_tokens_neox': 1146, 'n_words': 433}