[SCons] Add 'python_compiler' option for Cython module compilation
This commit is contained in:
parent
335e8fcd07
commit
f871dd8cf0
2 changed files with 10 additions and 1 deletions
|
|
@ -339,6 +339,12 @@ config_options = [
|
|||
default 'site-packages' directory. To install to the current user's
|
||||
site-packages directory, use 'python3_prefix=USER'.""",
|
||||
defaults.python_prefix, PathVariable.PathAccept),
|
||||
PathVariable(
|
||||
'python_compiler',
|
||||
""" Compiler to use while building the Python extension module. By default,
|
||||
the compiler will be selected by distutils. Applies to both Python 2
|
||||
and Python 3.""",
|
||||
'', PathVariable.PathAccept),
|
||||
EnumVariable(
|
||||
'matlab_toolbox',
|
||||
"""This variable controls whether the Matlab toolbox will be built. If
|
||||
|
|
|
|||
|
|
@ -110,7 +110,8 @@ libDirs = ('../../build/lib', localenv['sundials_libdir'],
|
|||
localenv['py_cantera_libs'] = repr(localenv['cantera_libs'])
|
||||
localenv['py_libdirs'] = repr([x for x in libDirs if x])
|
||||
|
||||
# Compile the Python module with the same compiler as the rest of Cantera
|
||||
# Compile the Python module with the same compiler as the rest of Cantera,
|
||||
# unless otherwise specified
|
||||
localenv['py_extra_compiler_args'] = repr([])
|
||||
localenv['py_extra_link_args'] = repr([])
|
||||
if localenv['OS'] == 'Windows':
|
||||
|
|
@ -129,6 +130,8 @@ else:
|
|||
if '-fprofile-arcs' in localenv['CCFLAGS']:
|
||||
localenv['py_extra_compiler_args'] = repr(['-fprofile-arcs', '-ftest-coverage'])
|
||||
localenv['py_extra_link_args'] = repr(['-fprofile-arcs', '-ftest-coverage'])
|
||||
if env['python_compiler']:
|
||||
localenv['ENV']['CC'] = env['python_compiler']
|
||||
|
||||
if 'LDFLAGS' not in localenv['ENV']:
|
||||
localenv['ENV']['LDFLAGS'] = ''
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue