scons: don't run parseconfig if uninstalling

This commit is contained in:
Dane Springmeyer 2012-08-16 10:00:05 -07:00
parent 02e07f9c9c
commit ecb72d6cbc

View file

@ -143,8 +143,14 @@ try:
os.chmod('mapnik/paths.py',0666) os.chmod('mapnik/paths.py',0666)
except: pass 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: if 'install' in COMMAND_LINE_TARGETS:
# install the core mapnik python files, including '__init__.py'
init_files = glob.glob('mapnik/*.py') init_files = glob.glob('mapnik/*.py')
if 'mapnik/paths.py' in init_files: if 'mapnik/paths.py' in init_files:
init_files.remove('mapnik/paths.py') 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') init_mapnik2 = env.Install(target_path_deprecated, 'mapnik2/__init__.py')
env.Alias(target='install', source=init_mapnik2) env.Alias(target='install', source=init_mapnik2)
# fix perms and install the custom generated 'paths.py' # fix perms and install the custom generated 'paths.py'
if 'install' in COMMAND_LINE_TARGETS:
targetp = os.path.join(target_path,'paths.py') targetp = os.path.join(target_path,'paths.py')
env.Alias("install", targetp) env.Alias("install", targetp)
# use env.Command rather than env.Install # use env.Command rather than env.Install
@ -166,22 +171,16 @@ if 'install' in COMMAND_LINE_TARGETS:
Chmod("$TARGET", 0644), 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 if env['HAS_PYCAIRO']:
sources = glob.glob('*.cpp') py_env.ParseConfig('pkg-config --cflags pycairo')
py_env.Append(CXXFLAGS = '-DHAVE_PYCAIRO')
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')
libraries.append('boost_thread%s' % env['BOOST_APPEND']) libraries.append('boost_thread%s' % env['BOOST_APPEND'])
_mapnik = py_env.LoadableModule('mapnik/_mapnik', sources, LIBS=libraries, LDMODULEPREFIX='', LDMODULESUFFIX='.so',LINKFLAGS=linkflags) _mapnik = py_env.LoadableModule('mapnik/_mapnik', sources, LIBS=libraries, LDMODULEPREFIX='', LDMODULESUFFIX='.so',LINKFLAGS=linkflags)