+ Cleaner builds - don't import everything from ENV!
+ Add FRAMEWORK_SEARCH_PATH option for Max OS X
This commit is contained in:
parent
e59f8ec4f4
commit
7ebe50d9de
2 changed files with 4 additions and 3 deletions
|
@ -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']),
|
||||
|
|
|
@ -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)
|
||||
env.Alias(target='install',source=pymapniklib)
|
||||
|
|
Loading…
Reference in a new issue