scons: don't run parseconfig if uninstalling
This commit is contained in:
parent
02e07f9c9c
commit
ecb72d6cbc
1 changed files with 18 additions and 19 deletions
|
@ -143,8 +143,14 @@ try:
|
|||
os.chmod('mapnik/paths.py',0666)
|
||||
except: pass
|
||||
|
||||
# install the core mapnik python files, including '__init__.py'
|
||||
# install the shared object beside the module directory
|
||||
sources = glob.glob('*.cpp')
|
||||
|
||||
py_env = env.Clone()
|
||||
py_env.Append(CPPPATH = env['PYTHON_INCLUDES'])
|
||||
|
||||
if 'install' in COMMAND_LINE_TARGETS:
|
||||
# install the core mapnik python files, including '__init__.py'
|
||||
init_files = glob.glob('mapnik/*.py')
|
||||
if 'mapnik/paths.py' in init_files:
|
||||
init_files.remove('mapnik/paths.py')
|
||||
|
@ -154,8 +160,7 @@ if 'install' in COMMAND_LINE_TARGETS:
|
|||
init_mapnik2 = env.Install(target_path_deprecated, 'mapnik2/__init__.py')
|
||||
env.Alias(target='install', source=init_mapnik2)
|
||||
|
||||
# fix perms and install the custom generated 'paths.py'
|
||||
if 'install' in COMMAND_LINE_TARGETS:
|
||||
# fix perms and install the custom generated 'paths.py'
|
||||
targetp = os.path.join(target_path,'paths.py')
|
||||
env.Alias("install", targetp)
|
||||
# use env.Command rather than env.Install
|
||||
|
@ -166,22 +171,16 @@ if 'install' in COMMAND_LINE_TARGETS:
|
|||
Chmod("$TARGET", 0644),
|
||||
])
|
||||
|
||||
if 'uninstall' not in COMMAND_LINE_TARGETS:
|
||||
if env['HAS_CAIRO']:
|
||||
py_env.Append(CPPPATH = env['CAIROMM_CPPPATHS'])
|
||||
py_env.Append(CXXFLAGS = '-DHAVE_CAIRO')
|
||||
if env['PLATFORM'] == 'Darwin':
|
||||
py_env.Append(LIBS=env['CAIROMM_LINKFLAGS'])
|
||||
|
||||
# install the shared object beside the module directory
|
||||
sources = glob.glob('*.cpp')
|
||||
|
||||
py_env = env.Clone()
|
||||
py_env.Append(CPPPATH = env['PYTHON_INCLUDES'])
|
||||
|
||||
if env['HAS_CAIRO']:
|
||||
py_env.Append(CPPPATH = env['CAIROMM_CPPPATHS'])
|
||||
py_env.Append(CXXFLAGS = '-DHAVE_CAIRO')
|
||||
if env['PLATFORM'] == 'Darwin':
|
||||
py_env.Append(LIBS=env['CAIROMM_LINKFLAGS'])
|
||||
|
||||
if env['HAS_PYCAIRO']:
|
||||
py_env.ParseConfig('pkg-config --cflags pycairo')
|
||||
py_env.Append(CXXFLAGS = '-DHAVE_PYCAIRO')
|
||||
if env['HAS_PYCAIRO']:
|
||||
py_env.ParseConfig('pkg-config --cflags pycairo')
|
||||
py_env.Append(CXXFLAGS = '-DHAVE_PYCAIRO')
|
||||
|
||||
libraries.append('boost_thread%s' % env['BOOST_APPEND'])
|
||||
_mapnik = py_env.LoadableModule('mapnik/_mapnik', sources, LIBS=libraries, LDMODULEPREFIX='', LDMODULESUFFIX='.so',LINKFLAGS=linkflags)
|
||||
|
|
Loading…
Reference in a new issue