From 7ebe50d9de1be8e7fd07a13491c7fb849efcc7c8 Mon Sep 17 00:00:00 2001 From: Artem Pavlenko Date: Mon, 29 Jun 2009 14:04:44 +0000 Subject: [PATCH] + Cleaner builds - don't import everything from ENV! + Add FRAMEWORK_SEARCH_PATH option for Max OS X --- SConstruct | 3 ++- bindings/python/SConscript | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/SConstruct b/SConstruct index 0958fd506..1316ac893 100644 --- a/SConstruct +++ b/SConstruct @@ -35,7 +35,7 @@ except: HAS_DISTUTILS = False #### SCons build options and initial setup #### -env = Environment(ENV=os.environ) +env = Environment() def color_print(color,text,newline=True): # 1 - red @@ -160,6 +160,7 @@ opts.AddVariables( ('LIB_DIR_NAME','Name to use for the "lib" folder where fonts and plugins are installed','/mapnik/'), PathVariable('PYTHON','Full path to Python executable used to build bindings', sys.executable), BoolVariable('FRAMEWORK_PYTHON', 'Link against Framework Python on Mac OS X', 'True'), + PathVariable('FRAMEWORK_SEARCH_PATH','Top framework search path on Mac OS X', '/'), BoolVariable('FULL_LIB_PATH', 'Use the full path for the libmapnik.dylib "install_name" when linking on Mac OS X', 'False'), ListVariable('BINDINGS','Language bindings to build','all',['python']), EnumVariable('THREADING','Set threading support','multi', ['multi','single']), diff --git a/bindings/python/SConscript b/bindings/python/SConscript index e41ce9f72..dfca6b268 100644 --- a/bindings/python/SConscript +++ b/bindings/python/SConscript @@ -41,7 +41,7 @@ if env['PLATFORM'] == 'Darwin': if '-DHAVE_PYCAIRO' in env['CXXFLAGS']: libraries.append([lib for lib in env['LIBS'] if lib.startswith('cairo')]) if env['FRAMEWORK_PYTHON']: - linkflags = '-F/ -framework Python' + linkflags = '-F%s -framework Python' % env['FRAMEWORK_SEARCH_PATH'] else: linkflags = '-lpython%s' % env['PYTHON_VERSION'] @@ -89,4 +89,4 @@ env.Alias(target='install', source=ogcserver_module) # install the shared object beside the module directory _mapnik = env.LoadableModule('_mapnik', glob.glob('*.cpp'), LIBS=libraries, LDMODULEPREFIX='', LDMODULESUFFIX='.so', CPPPATH=headers,LINKFLAGS=linkflags) pymapniklib = env.Install(env['PYTHON_INSTALL_LOCATION'] + '/mapnik',_mapnik) -env.Alias(target='install',source=pymapniklib) \ No newline at end of file +env.Alias(target='install',source=pymapniklib)