forked from mapnik/mapnik
-
Notifications
You must be signed in to change notification settings - Fork 0
MacInstallationPorts
ThomasG77 edited this page Dec 27, 2011
·
2 revisions
This page describes how to build/install Mapnik from source on Mac OS X >= 10.5, using Macports.
Unlike the MacInstallation guide, this page assumes you grok the command-line.
- Install MacPorts: http://www.macports.org/install.php (requires XCode. Version 1.6 may not set up a .profile, see ProblemHotlist to fix)
Run
$ sudo port install proj libpng jpeg tiff icu jam
$ sudo port install boost +python25 +icu
For optional dependencies (such as Cairo or PostGIS), see MacInstallation/Optional (MacInstallation_Optional)
Grab source:
$ git clone https://github.com/mapnik/mapnik.git
Patch SConstruct (get SConstruct.osx.patch, download here)
$ patch -p1 < SConstruct.osx.patch
Compile/Install
$ cd mapnik
$ python scons/scons.py DEBUG=y
$ sudo python scons/scons.py install DEBUG=y
Add the following line to your ~/.profile
export PYTHONPATH="/usr/lib/python2.5/site-packages"
$ python
>>> import mapnik
registered datasource : gdal
registered datasource : postgis
registered datasource : raster
registered datasource : shape
>>> dir(mapnik) # This gets you a list of symbols
['BoostPythonMetaclass', 'Color', 'Coord', 'CreateDatasource', ...]
>>> help(mapnik)
- The Official Mapnik installation guide
- Conventional MacInstallation guide
- http://www.codingadventures.com/2008/04/howto-building-mapnik-on-osx-leopard/