Package: mapnik2
ContentsMAPNIK2 NotesCreditsCompaniesAuthorsContributorsInstallationPrerequisitesBuildoutRunning this package buildoutEasy_install with or without virtualenvBOOST NOTESMinitageChangelog for mapnik22.2.0 (2013-07-23)2.1.0.5 (2012-11-01)2.1.0 (2012-09-02)2.0.1.1 (2012-08-05)2.0.2 (2012-08-04)2.0.1 (2012-05-06)Official mapnik bindings repackaged in the distutils way to facilitate deployments.This depends of those libraries to be installed on you environment:mapnik2 (the c++ library)BOOST c++:boost pythonboost threadboost regexOptionnal but heavily recommended python librariespycairoPIL / PillowIf you are a buildout user, you can look at this package
buildout which integrates pycairo & pil installationSeegithubMAPNIK2 NotesThe python bindings are tied to the mapnik2 library version.To use with:mapnik2 library - 2.0.1:== mapnik2 2.0.1.3easy_install -U mapnik2==2.0.1.3mapnik2 library - 2.1.0:== mapnik2 2.1.0easy_install -U mapnik2==2.1.0mapnik2 library - 2.2.0:== mapnik2 2.2.0easy_install -U mapnik2==2.2.0CreditsCompaniesPlanet Makina CorpusContact usAuthorsContributorskiorky <kiorky@cryptelium.net>dodobas <dodobas@geoinfo.geof.hr>InstallationPrerequisitesDon’t forget that you can play with LDFLAGS/CFLAGS/LD_LIBRARY_PATH dto indicate non standart locations for the following requirements if it applies.You will have to have the includes and libraries forThe mapnik-config utility to be in your $PATHBoost_python linked to your python interpreter
If it is not installed in standart envionments, you ll have to handle the CFLAGS/LDFLAGS to find it, or use minitage ;)cairo / cairomm (optionnal but enabled if you compiled mapnik with cairo support)mapnik2The current python interpreterpycairo / PIL in the PYTHONPATH somehowBuildoutSome developers usebuildoutto ease deployments.
* Say where to find mapnik-config by settings correctly your PATH environment variable
* Addmapnikto the list of eggs to install, e.g.[buildout]
parts = somepart

[somepart]
recipe = minitage.recipe.scripts # or zc.recipe.egg ...
eggs = mapnik2Re-run buildout, e.g. with:$ ./bin/buildoutYou can read the buildout installation shipped with this egg for inspiration of how integrate mapnik in a buildout.
The magic is using buildout.minitagificator to feed PKG_CONFIG_PATH and PYTHONPATH with pycairoRunning this package buildoutFirst you need to install pycairo locally:bin/buildout -vvvvvNc cairo.cfgThen run buildout:bin/buildout -vvvvvNEasy_install with or without virtualenvvirtualenv --no-site-packages test
source test/bin/activate
easy_install mapnik2Say where to find mapnik-config by settings correctly your PATH environment variableWhen you’re reading this you have probably already runeasy_install mapnik2. Find out how to install setuptools
(and EasyInstall) here:http://peak.telecommunity.com/DevCenter/EasyInstallBOOST NOTESTo specify which boostpython lib to link against, you can use, you can use the following:export MAPNIK2_BOOST_PYTHON="libboost_python.so.1:libboost_thread.so.1"Where you have on your filesystem:/usr/lib/libboost_python.so.1
/usr/lib/libboost_thread.so.1For ubuntu users, please refer tothis docto install the prerequisites of this egg.MinitageSome developers useminitageto ease deployments (a layer upon buildout).
Indeed, it takes care a lot of things like those boring compilation flags.
As an example, to work on this egg in development mode, you can boostrap it by doing this::easy_install -U virtualenv
virtualenv --no-site-packages --distribute ~/minitage
mkdir ~/minitage/othersInstall minitage, if you haven’t yetsource ~/minitage/bin/activate
easy_install -U minitage.coreInitialize it (mandatory)source ~/minitage/bin/activate
minimerge -sTo install the minilay for the mapnik2 egg development you can docd  ~/minitage/others
git clone https://github.com/mapnik/pymapnik2.git mapnik-egg-(py26 or py27)
ln -fs ~/minitage/others/mapnik-egg*/minilays/mapnik-egg/  ~/minitage/minilays/mapnik-egg
#for python-2.6
minimerge -av mapnik-egg-py26
#for python-2.7
minimerge -av mapnik-egg-py27Enjoy your installationcd ~/minitage/others/mapnik-egg-py26
or cd ~/minitage/others/mapnik-egg-py27
./bin/mypy
>>> import mapnik2For using mapnik2 inside your minitagified application:Inside the eggs parts of you buildout add:[part]
eggs += mapnik2In your minibuild, merge the mapnik2 dependencies that you can find here:for python2.6:https://github.com/mapnik/pymapnik2/blob/master/minilays/mapnik-egg/mapnik-egg-py26for python2.7:https://github.com/mapnik/pymapnik2/blob/master/minilays/mapnik-egg/mapnik-egg-py27Reminimerge your project to build the mapnik2 eggThen add mapnik2 to your setup.py or buildout for it to be grabbed in your pythonpath.Rerun buildout, you’re doneChangelog for mapnik22.2.0 (2013-07-23)refresh 2.2.0 [dodobas]2.1.0.5 (2012-11-01)freebsd port2.1.0 (2012-09-02)refresh 2.1.02.0.1.1 (2012-08-05)renaming release2.0.2 (2012-08-04)Multi Arch Support, thx to  noirbizarre. [kiorky]
Seehttps://github.com/mapnik/pymapnik2/pull/42.0.1 (2012-05-06)First public release of mapnik2 eggified python bindings