From 098f9de2aa8b5c8b8f1406fb1e7cca5965ae7eee Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Wed, 6 Mar 2013 14:02:38 -0800 Subject: [PATCH] fix linking of python.input to python lib on linux --- plugins/input/python/build.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/input/python/build.py b/plugins/input/python/build.py index f0f776f2f..b3580d307 100644 --- a/plugins/input/python/build.py +++ b/plugins/input/python/build.py @@ -26,12 +26,7 @@ libraries = ['mapnik',env['BOOST_PYTHON_LIB'],boost_system,env['ICU_LIB_NAME']] # python plugin is used by a app in python using mapnik's python bindings # we explicitly link to libpython here so that this plugin # can be used from a pure C++ calling application or a different binding language -python_link_flag = '-lpython%s' % env['PYTHON_VERSION'] - -if env['PLATFORM'] == 'Darwin': - if env['PYTHON_DYNAMIC_LOOKUP']: - python_link_flag = '-undefined dynamic_lookup' - elif env['FRAMEWORK_PYTHON']: +if env['PLATFORM'] == 'Darwin' and env['FRAMEWORK_PYTHON']: if env['FRAMEWORK_SEARCH_PATH']: python_link_flag = '-F%s -framework Python -Z' % env['FRAMEWORK_SEARCH_PATH'] else: @@ -42,6 +37,11 @@ if env['PLATFORM'] == 'Darwin': python_link_flag = '-F/System/Library/Frameworks/ -framework Python -Z' else: python_link_flag = '-F/ -framework Python' +else: + # on linux the linkflags end up to early in the compile flags to work correctly + python_link_flag = '' + # so instead add to libraries + libraries.append('python%s' % env['PYTHON_VERSION']) if env['CUSTOM_LDFLAGS']: linkflags = '%s %s' % (env['CUSTOM_LDFLAGS'], python_link_flag)