{"id":20072253,"url":"https://github.com/mapnik/pymapnik2","last_synced_at":"2025-10-05T00:55:47.037Z","repository":{"id":137916643,"uuid":"1407751","full_name":"mapnik/pymapnik2","owner":"mapnik","description":null,"archived":false,"fork":false,"pushed_at":"2013-07-23T08:00:30.000Z","size":12352,"stargazers_count":12,"open_issues_count":1,"forks_count":9,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-08-10T11:29:07.998Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mapnik.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES.rst","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-02-24T18:42:41.000Z","updated_at":"2021-02-24T06:46:26.000Z","dependencies_parsed_at":"2023-03-13T10:55:36.664Z","dependency_job_id":null,"html_url":"https://github.com/mapnik/pymapnik2","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mapnik%2Fpymapnik2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mapnik%2Fpymapnik2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mapnik%2Fpymapnik2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mapnik%2Fpymapnik2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mapnik","download_url":"https://codeload.github.com/mapnik/pymapnik2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224468204,"owners_count":17316331,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T14:39:12.634Z","updated_at":"2025-10-05T00:55:42.017Z","avatar_url":"https://github.com/mapnik.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"==========================\nIntroduction\n==========================\n\n.. contents::\n\nOfficial mapnik bindings repackaged in the distutils way to facilitate deployments.\n\nThis depends of those libraries to be installed on you environment:\n\n    - mapnik2 (the c++ library)\n    - BOOST c++:\n\n        - boost python\n        - boost thread\n        - boost regex\n\nOptionnal but heavily recommended python libraries\n\n    - pycairo\n    - PIL / Pillow\n\nIf you are a buildout user, you can look at this package\nbuildout which integrates pycairo \u0026 pil installation\n\nSee `github \u003chttps://github.com/mapnik/pymapnik2\u003e`_\n\n\nMAPNIK2 Notes\n===============\n\nThe python bindings are tied to the mapnik2 library version.\n\nTo use with:\n\n    - :mapnik2 library - 2.0.1: == mapnik2 2.0.1.3\n       ::\n\n        easy_install -U mapnik2==2.0.1.3\n\n\n    - :mapnik2 library - 2.1.0: == mapnik2 2.1.0\n       ::\n\n        easy_install -U mapnik2==2.1.0\n\n\n    - :mapnik2 library - 2.2.0: == mapnik2 2.2.0\n       ::\n\n        easy_install -U mapnik2==2.2.0\n\nCredits\n=========\n\nCompanies\n----------------\n|makinacom|_\n\n* `Planet Makina Corpus \u003chttp://www.makina-corpus.org\u003e`_\n* `Contact us \u003cmailto:python@makina-corpus.org\u003e`_\n\n.. |makinacom| image:: http://depot.makina-corpus.org/public/logo.gif\n.. _makinacom:  http://www.makina-corpus.com\n\nAuthors\n---------------\n\nContributors\n---------------\n\n    - kiorky \u003ckiorky@cryptelium.net\u003e\n    - dodobas \u003cdodobas@geoinfo.geof.hr\u003e\n\nInstallation\n======================================\nPrerequisites\n-------------------\nDon't forget that you can play with LDFLAGS/CFLAGS/LD_LIBRARY_PATH dto indicate non standart locations for the following requirements if it applies.\n\nYou will have to have the includes and libraries for\n\n    - The mapnik-config utility to be in your $PATH\n    - Boost_python linked to your python interpreter\n      If it is not installed in standart envionments, you ll have to handle the CFLAGS/LDFLAGS to find it, or use minitage ;)\n    - cairo / cairomm (optionnal but enabled if you compiled mapnik with cairo support)\n    - mapnik2\n    - The current python interpreter\n    - pycairo / PIL in the PYTHONPATH somehow\n\nBuildout\n----------\nSome developers use buildout_ to ease deployments.\n* Say where to find mapnik-config by settings correctly your PATH environment variable\n* Add ``mapnik`` to the list of eggs to install, e.g.\n::\n\n    [buildout]\n    parts = somepart\n\n    [somepart]\n    recipe = minitage.recipe.scripts # or zc.recipe.egg ...\n    eggs = mapnik2\n\n* Re-run buildout, e.g. with::\n\n    $ ./bin/buildout\n\nYou can read the buildout installation shipped with this egg for inspiration of how integrate mapnik in a buildout.\nThe magic is using buildout.minitagificator to feed PKG_CONFIG_PATH and PYTHONPATH with pycairo\n\n\nRunning this package buildout\n--------------------------------\nFirst you need to install pycairo locally::\n\n    bin/buildout -vvvvvNc cairo.cfg\n\nThen run buildout::\n\n    bin/buildout -vvvvvN\n\nEasy_install with or without virtualenv\n---------------------------------------------\n::\n\n    virtualenv --no-site-packages test\n    source test/bin/activate\n    easy_install mapnik2\n\n* Say where to find mapnik-config by settings correctly your PATH environment variable\n* When you're reading this you have probably already run\n  ``easy_install mapnik2``. Find out how to install setuptools\n  (and EasyInstall) here:\n  http://peak.telecommunity.com/DevCenter/EasyInstall\n\n\nBOOST NOTES\n--------------\n\nTo specify which boostpython lib to link against, you can use, you can use the following::\n\n    export MAPNIK2_BOOST_PYTHON=\"libboost_python.so.1:libboost_thread.so.1\"\n\nWhere you have on your filesystem::\n\n    /usr/lib/libboost_python.so.1\n    /usr/lib/libboost_thread.so.1\n\nFor ubuntu users, please refer to `this doc \u003chttps://github.com/mapnik/mapnik/wiki/UbuntuInstallation\u003e`_ to install the prerequisites of this egg.\n\nMinitage\n--------------\nSome developers use minitage_ to ease deployments (a layer upon buildout).\nIndeed, it takes care a lot of things like those boring compilation flags.\nAs an example, to work on this egg in development mode, you can boostrap it by doing this::\n::\n\n    easy_install -U virtualenv\n    virtualenv --no-site-packages --distribute ~/minitage\n    mkdir ~/minitage/others\n\nInstall minitage, if you haven't yet ::\n\n    source ~/minitage/bin/activate\n    easy_install -U minitage.core\n\nInitialize it (**mandatory**) ::\n\n    source ~/minitage/bin/activate\n    minimerge -s\n\nTo install the minilay for the mapnik2 egg development you can do\n::\n\n    cd  ~/minitage/others\n    git clone https://github.com/mapnik/pymapnik2.git mapnik-egg-(py26 or py27)\n    ln -fs ~/minitage/others/mapnik-egg*/minilays/mapnik-egg/  ~/minitage/minilays/mapnik-egg\n    #for python-2.6\n    minimerge -av mapnik-egg-py26\n    #for python-2.7\n    minimerge -av mapnik-egg-py27\n\n\nEnjoy your installation\n::\n\n    cd ~/minitage/others/mapnik-egg-py26\n    or cd ~/minitage/others/mapnik-egg-py27\n    ./bin/mypy\n    \u003e\u003e\u003e import mapnik2\n\nFor using mapnik2 inside your minitagified application:\n\n    - Inside the eggs parts of you buildout add::\n\n        [part]\n        eggs += mapnik2\n\n    - In your minibuild, merge the mapnik2 dependencies that you can find here:\n\n        - for python2.6: https://github.com/mapnik/pymapnik2/blob/master/minilays/mapnik-egg/mapnik-egg-py26\n        - for python2.7: https://github.com/mapnik/pymapnik2/blob/master/minilays/mapnik-egg/mapnik-egg-py27\n\n    - Reminimerge your project to build the mapnik2 egg\n    - Then add mapnik2 to your setup.py or buildout for it to be grabbed in your pythonpath.\n    - Rerun buildout, you're done\n\n\n.. _minitage: http://www.minitage.org\n.. _buildout: http://buildout.org\n.. _pythonproducts: http://plone.org/products/pythonproducts\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmapnik%2Fpymapnik2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmapnik%2Fpymapnik2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmapnik%2Fpymapnik2/lists"}