<commit_before># Mapnik Installation

Mapnik is cross platform and runs on Linux, Mac OSX, Solaris, *BSD, and Windows.

To configure and build Mapnik do:

```bash
    $ ./configure
    $ make
```

To trigger parallel compilation you can pass a JOBS value to make:

```bash
    $ JOBS=4 make
```

(Note that compiling Mapnik needs several GBytes of RAM. If you use parallel compiliation it needs more.)

To use a Python interpreter that is not named `python` for your build, do
something like the following instead:

```bash
    $ PYTHON=python2 ./configure
    $ make PYTHON=python2
```

NOTE: the above will not work on windows, rather see https://github.com/mapnik/mapnik/wiki/WindowsInstallation

Then to run the tests locally (without needing to install):

    make test-local

Install like:

    sudo make install

If you need to uninstall do:

    sudo make uninstall

For more details see the `Building` Section below.

Platform specific install guides at https://github.com/mapnik/mapnik/wiki/Mapnik-Installation

For troubleshooting help see https://github.com/mapnik/mapnik/wiki/InstallationTroubleshooting


## Depends

Build system dependencies are:

 * C++ compiler (like g++ or clang++)
 * >= 2 GB RAM (> 5 GB for g++)
 * Python 2.4-2.7 
 * Scons (a copy is bundled)

Mapnik Core depends on:

 * Boost
    - >= 1.47 is required.
    - These libraries are used:
      - filesystem
      - system
      - thread (if mapnik threadsafe support is required, default on)
      - regex (optionally built with icu regex support)
      - program_options (optionally for mapnik command line programs)
 * libicuuc >= 4.0 (ideally >= 4.2) - International Components for Unicode
 * libz - Zlib compression
 * libfreetype - Freetype2 for font support (Install requires freetype-config)
 * libxml2 - XML parsing (Install requires xml2-config)
 * libharfbuzz - an OpenType text shaping engine

Mapnik Core optionally depends on:

 * libpng >= 1.2.x - PNG graphics (Default enabled, if found)
 * libjpeg - JPEG graphics (Default enabled, if found)
 * libtiff - TIFF graphics (Default enabled, if found)
 * libwebp - WEBP graphics  (Default enabled, if found)
 * libproj - PROJ.4 projection library (Default enabled, if found)

Mapnik Python bindings depend on:

 * Python 2.5-2.7 or >= 3.2 
 * Boost python
 * simplejson module if using <= 2.5

Note: Python 3.x is supported, see: https://github.com/mapnik/mapnik/wiki/Python3k

Additional optional dependencies:

 * Cairo >= 1.6.0 - Graphics library for output formats like PDF, PS, and SVG
    - pkg-config - Required for building with cairo support
    - pycairo - Python bindings for cairo
 * PostgreSQL (for PostGIS plugin support)
    - libpq - PostreSQL libraries<commit_msg>install doc: note minimum harfbuzz version for font-feature-settings - refs #2456<commit_after># Mapnik Installation

Mapnik is cross platform and runs on Linux, Mac OSX, Solaris, *BSD, and Windows.

To configure and build Mapnik do:

```bash
    $ ./configure
    $ make
```

To trigger parallel compilation you can pass a JOBS value to make:

```bash
    $ JOBS=4 make
```

(Note that compiling Mapnik needs several GBytes of RAM. If you use parallel compiliation it needs more.)

To use a Python interpreter that is not named `python` for your build, do
something like the following instead:

```bash
    $ PYTHON=python2 ./configure
    $ make PYTHON=python2
```

NOTE: the above will not work on windows, rather see https://github.com/mapnik/mapnik/wiki/WindowsInstallation

Then to run the tests locally (without needing to install):

    make test-local

Install like:

    sudo make install

If you need to uninstall do:

    sudo make uninstall

For more details see the `Building` Section below.

Platform specific install guides at https://github.com/mapnik/mapnik/wiki/Mapnik-Installation

For troubleshooting help see https://github.com/mapnik/mapnik/wiki/InstallationTroubleshooting


## Depends

Build system dependencies are:

 * C++ compiler (like g++ or clang++)
 * >= 2 GB RAM (> 5 GB for g++)
 * Python 2.4-2.7 
 * Scons (a copy is bundled)

Mapnik Core depends on:

 * Boost
    - >= 1.47 is required.
    - These libraries are used:
      - filesystem
      - system
      - thread (if mapnik threadsafe support is required, default on)
      - regex (optionally built with icu regex support)
      - program_options (optionally for mapnik command line programs)
 * libicuuc >= 4.0 (ideally >= 4.2) - International Components for Unicode
 * libz - Zlib compression
 * libfreetype - Freetype2 for font support (Install requires freetype-config)
 * libxml2 - XML parsing (Install requires xml2-config)
 * libharfbuzz - an OpenType text shaping engine (>=0.9.34 needed for CSS font-feature-settings support)

Mapnik Core optionally depends on:

 * libpng >= 1.2.x - PNG graphics (Default enabled, if found)
 * libjpeg - JPEG graphics (Default enabled, if found)
 * libtiff - TIFF graphics (Default enabled, if found)
 * libwebp - WEBP graphics  (Default enabled, if found)
 * libproj - PROJ.4 projection library (Default enabled, if found)

Mapnik Python bindings depend on:

 * Python 2.5-2.7 or >= 3.2 
 * Boost python
 * simplejson module if using <= 2.5

Note: Python 3.x is supported, see: https://github.com/mapnik/mapnik/wiki/Python3k

Additional optional dependencies:

 * Cairo >= 1.6.0 - Graphics library for output formats like PDF, PS, and SVG
    - pkg-config - Required for building with cairo support
    - pycairo - Python bindings for cairo
 * PostgreSQL (for PostGIS plugin support)
    - libpq - PostreSQL libraries
{'fraction_non_alphanumeric': 0.08581153708348262, 'fraction_numerical': 0.013973486205661053, 'mean_word_length': 3.480738362760835, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 20, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '2669656', 'n_tokens_mistral': 1741, 'n_tokens_neox': 1608, 'n_words': 676}