mapnik / mapnik-gyp

GYP build system for Mapnik 3.x
8 stars 7 forks source link

Put ICU_DATA, PROJ_LIB, and GDAL_DATA in mapnik_settings.py #7

Closed springmeyer closed 8 years ago

springmeyer commented 10 years ago

To allow the python bindings to be easy to set up we need to generate a mapnik_settings.py and have these environment variables set in it, using relative paths.

The mapnik v2.2.0 SDK used something like:

from os import path 
mapnik_data_dir = path.normpath(path.join(__file__,'../../../../../share/')) 
env = { 
    'GDAL_DATA': path.join(mapnik_data_dir, 'gdal'), 
    'PROJ_LIB': path.join(mapnik_data_dir, 'proj') 
} 
__all__ = [env] 
wilhelmberg commented 8 years ago

Environment variables get written into set-env-vars.bat.