- Add an ignore.
- load Projection class and DEGREES constant into mapnik module namespace so that one can "from mapnik import Projection, DEGREES" - Clean up the build/install of the python module.
This commit is contained in:
parent
04dc62160e
commit
7e05522b52
2 changed files with 14 additions and 10 deletions
|
@ -29,17 +29,16 @@ headers = [env['PYTHON_PREFIX'] + '/include/python' + env['PYTHON_VERSION']] + e
|
||||||
_mapnik = env.SharedLibrary('_mapnik', glob.glob('*.cpp'), LIBS=libraries, SHLIBPREFIX='', CPPPATH=headers)
|
_mapnik = env.SharedLibrary('_mapnik', glob.glob('*.cpp'), LIBS=libraries, SHLIBPREFIX='', CPPPATH=headers)
|
||||||
|
|
||||||
paths = """
|
paths = """
|
||||||
pluginsrootpath = '%s'
|
mapniklibpath = '%s'
|
||||||
inputpluginspath = pluginsrootpath + '/input'
|
inputpluginspath = mapniklibpath + '/input'
|
||||||
|
fontscollectionpath = mapniklibpath + '/fonts'
|
||||||
"""
|
"""
|
||||||
|
|
||||||
file('mapnik/paths.py','w').write(paths % (env['PREFIX'] + '/lib/mapnik',))
|
file('mapnik/paths.py','w').write(paths % (env['PREFIX'] + '/lib/mapnik',))
|
||||||
|
|
||||||
__init__ = env.Install(prefix+'/mapnik','mapnik/__init__.py')
|
pymapnik = glob.glob('mapnik/*.py')
|
||||||
pathspy = env.Install(prefix+'/mapnik','mapnik/paths.py')
|
env.Alias(target='install', source=env.Install(prefix+'/mapnik', pymapnik))
|
||||||
_source=env.Install(prefix+'/mapnik',_mapnik)
|
pymapnik2 = glob.glob('mapnik/ogcserver/*.py')
|
||||||
_source.append(__init__)
|
env.Alias(target='install', source=env.Install(prefix+'/mapnik/ogcserver', pymapnik2))
|
||||||
_source.append(pathspy)
|
pymapniklib = env.Install(prefix+'/mapnik',_mapnik)
|
||||||
|
env.Alias(target="install",source=pymapniklib)
|
||||||
env.Alias(target="install",source=_source)
|
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,11 @@ setdlopenflags(RTLD_NOW | RTLD_GLOBAL)
|
||||||
from _mapnik import *
|
from _mapnik import *
|
||||||
from paths import inputpluginspath, fontscollectionpath
|
from paths import inputpluginspath, fontscollectionpath
|
||||||
|
|
||||||
|
try:
|
||||||
|
from mapnik.Projection import Projection, DEGREES
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
# The base Boost.Python class
|
# The base Boost.Python class
|
||||||
BoostPythonMetaclass = Coord.__class__
|
BoostPythonMetaclass = Coord.__class__
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue