Fix for hardcoded to scons rules python abi flags and wrong behavior
of python bundling on systems where python is installed to /usr/lib64 Now ABI flags are automatically detecting (by checking all available flags and checking if there's include directory exists for flag). Also, automatically set PYTHON_LIBPATH to /usr/lib64 if python scripts are stored in this folder. Bundling python on *nix platforms is now checks if python is installed to lib64 directory and if it is, python will be bundled to lib64 folder instead of lib. This will make building on openSUSE a bit less annoying
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
# find library directory
|
||||
import platform
|
||||
import os
|
||||
from Modules.FindPython import FindPython
|
||||
|
||||
bitness = platform.architecture()[0]
|
||||
if bitness == '64bit':
|
||||
LCGDIR = '../lib/linux64'
|
||||
@@ -8,10 +10,12 @@ else:
|
||||
LCGDIR = '../lib/linux'
|
||||
LIBDIR = "#${LCGDIR}"
|
||||
|
||||
BF_PYTHON_ABI_FLAGS = 'm' # Most common for linux distros
|
||||
BF_PYTHON = '/usr'
|
||||
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
|
||||
BF_PYTHON_VERSION = '3.2'
|
||||
py = FindPython()
|
||||
|
||||
BF_PYTHON_ABI_FLAGS = py['ABI_FLAGS']
|
||||
BF_PYTHON = py['PYTHON']
|
||||
BF_PYTHON_LIBPATH = py['LIBPATH']
|
||||
BF_PYTHON_VERSION = py['VERSION']
|
||||
WITH_BF_STATICPYTHON = False
|
||||
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}${BF_PYTHON_ABI_FLAGS}'
|
||||
BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}'
|
||||
|
Reference in New Issue
Block a user