Make BF_PYTHON_ABI_FLAGS a scons option. Default flags are empty.
authorSergey Sharybin <sergey.vfx@gmail.com>
Sun, 13 Mar 2011 09:29:47 +0000 (09:29 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Sun, 13 Mar 2011 09:29:47 +0000 (09:29 +0000)
Made changed to linux2-config and freebsd*-config. Windows/MacOS are kept
unchanged.

I'm not sure which flags should be used for freebsd systems, so flags for
them also kept empty. Maintainers of this platform, please check which
flags should be used and make changes to rules.

build_files/scons/config/freebsd7-config.py
build_files/scons/config/freebsd8-config.py
build_files/scons/config/freebsd9-config.py
build_files/scons/config/linux2-config.py
build_files/scons/tools/btools.py

index fed23db33ee2210ec3115b521eb69002852e30a7..a73574abf675155332bd7ebbaa33d9e29cc7b9c3 100644 (file)
@@ -4,14 +4,15 @@ CXX = 'g++44'
 LCGDIR = '../lib/freebsd7'
 LIBDIR = "${LCGDIR}"
 
+BF_PYTHON_ABI_FLAGS = ''
 BF_PYTHON = '/usr/local'
 BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
 BF_PYTHON_VERSION = '3.2'
 WITH_BF_STATICPYTHON = False
-BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
+BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}${BF_PYTHON_ABI_FLAGS}'
 BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}'
-BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION}'
-BF_PYTHON_LIB_STATIC = '${BF_PYTHON}/lib/libpython${BF_PYTHON_VERSION}.a'
+BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION}${BF_PYTHON_ABI_FLAGS}'
+BF_PYTHON_LIB_STATIC = '${BF_PYTHON}/lib/libpython${BF_PYTHON_VERSION}${BF_PYTHON_ABI_FLAGS}.a'
 
 WITH_BF_OPENAL = True
 WITH_BF_STATICOPENAL = False
index b15d3ea54d9e8b4d56555b8d4a920be499dab019..dd7ab5f9ab9781c6074ec35712a56282834c6f75 100644 (file)
@@ -4,14 +4,15 @@ CXX = 'g++44'
 LCGDIR = '../lib/freebsd8'
 LIBDIR = "${LCGDIR}"
 
+BF_PYTHON_ABI_FLAGS = ''
 BF_PYTHON = '/usr/local'
 BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
 BF_PYTHON_VERSION = '3.2'
 WITH_BF_STATICPYTHON = False
-BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
+BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}${BF_PYTHON_ABI_FLAGS}'
 BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}'
-BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION}'
-BF_PYTHON_LIB_STATIC = '${BF_PYTHON}/lib/libpython${BF_PYTHON_VERSION}.a'
+BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION}${BF_PYTHON_ABI_FLAGS}'
+BF_PYTHON_LIB_STATIC = '${BF_PYTHON}/lib/libpython${BF_PYTHON_VERSION}${BF_PYTHON_ABI_FLAGS}.a'
 
 WITH_BF_OPENAL = True
 WITH_BF_STATICOPENAL = False
index 2e96dd3120e1205c8298822f6bb1cd36d5a0d6a5..9c53d52ce714a3da2a423e8c1871bf0ca73ad92c 100644 (file)
@@ -4,14 +4,15 @@ CXX = 'g++44'
 LCGDIR = '../lib/freebsd9'
 LIBDIR = "${LCGDIR}"
 
+BF_PYTHON_ABI_FLAGS = ''
 BF_PYTHON = '/usr/local'
 BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
 BF_PYTHON_VERSION = '3.2'
 WITH_BF_STATICPYTHON = False
-BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
+BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}${BF_PYTHON_ABI_FLAGS}'
 BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}'
-BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION}'
-BF_PYTHON_LIB_STATIC = '${BF_PYTHON}/lib/libpython${BF_PYTHON_VERSION}.a'
+BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION}${BF_PYTHON_ABI_FLAGS}'
+BF_PYTHON_LIB_STATIC = '${BF_PYTHON}/lib/libpython${BF_PYTHON_VERSION}${BF_PYTHON_ABI_FLAGS}.a'
 
 WITH_BF_OPENAL = True
 WITH_BF_STATICOPENAL = False
index 9f4671a8ddda583aa4de797f7fecad29ebef025b..d4e97c78c3843d09f9aef4791425adb58f2895aa 100644 (file)
@@ -1,16 +1,16 @@
 LCGDIR = '../lib/linux2'
 LIBDIR = "${LCGDIR}"
 
-BF_PYTHON_ABI_FLAGS = "m"  # not a scons option
+BF_PYTHON_ABI_FLAGS = 'm'  # Most common for linux distros
 BF_PYTHON = '/usr'
 BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
 BF_PYTHON_VERSION = '3.2'
 WITH_BF_STATICPYTHON = False
-BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}' + BF_PYTHON_ABI_FLAGS
+BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}${BF_PYTHON_ABI_FLAGS}'
 BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}'
-BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION}' + BF_PYTHON_ABI_FLAGS  # BF_PYTHON+'/lib/python'+BF_PYTHON_VERSION+'/config/libpython'+BF_PYTHON_VERSION+'.a'
+BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION}${BF_PYTHON_ABI_FLAGS}'  # BF_PYTHON+'/lib/python'+BF_PYTHON_VERSION+'/config/libpython'+BF_PYTHON_VERSION+'.a'
 BF_PYTHON_LINKFLAGS = ['-Xlinker', '-export-dynamic']
-BF_PYTHON_LIB_STATIC = '${BF_PYTHON}/lib/libpython${BF_PYTHON_VERSION}' + BF_PYTHON_ABI_FLAGS + '.a'
+BF_PYTHON_LIB_STATIC = '${BF_PYTHON}/lib/libpython${BF_PYTHON_VERSION}${BF_PYTHON_ABI_FLAGS}.a'
 
 WITH_BF_OPENAL = True
 WITH_BF_STATICOPENAL = False
index d589079a0d414e4cfe330190260bde2580cbc9e1..c03dfb3011a2adaf59d4c930c3b437457cb40dca 100644 (file)
@@ -222,6 +222,7 @@ def read_opts(env, cfg, args):
         ('BF_PYTHON_LIBPATH', 'Library path', ''),
         ('BF_PYTHON_LINKFLAGS', 'Python link flags', ''),
         (BoolVariable('WITH_BF_STATICPYTHON', 'Staticly link to python', False)),
+        ('BF_PYTHON_ABI_FLAGS', 'Python ABI flags (suffix in library version: m, mu, etc)', ''),
 
         (BoolVariable('BF_NO_ELBEEM', 'Disable Fluid Sim', False)),
         ('BF_PROFILE_FLAGS', 'Profiling compiler flags', ''),