Skip to content

Commit

Permalink
cantera: Sconstruct 'libdirname' env PathVariable
Browse files Browse the repository at this point in the history
Some distributions (e.g. Fedora/RHEL) use 'lib64' instead of 'lib'
on 64-bit systems or could use some other library directory name
instead of 'lib' depends on architecture and profile
(e.g. Gentoo 'libx32' on x32 profile).
If user didn't set 'libdirname' configuration variable then
set it to default value 'lib'

This commit is related to early closed issue:
#318
  • Loading branch information
band-a-prend authored and speth committed Jun 28, 2019
1 parent c840142 commit 674c37c
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,14 @@ config_options = [
'prefix',
'Set this to the directory where Cantera should be installed.',
defaults.prefix, PathVariable.PathAccept),
PathVariable(
'libdirname',
"""Set this to the directory where Cantera libraries should be installed.
Some distributions (e.g. Fedora/RHEL) use 'lib64' instead of 'lib' on 64-bit systems
or could use some other library directory name instead of 'lib' depends
on architecture and profile (e.g. Gentoo 'libx32' on x32 profile).
If user didn't set 'libdirname' configuration variable set it to default value 'lib'""",
'lib', PathVariable.PathAccept),
EnumVariable(
'python_package',
"""If you plan to work in Python, then you need the ``full`` Cantera Python
Expand Down Expand Up @@ -1346,12 +1354,6 @@ if env['matlab_toolbox'] == 'y':
# *** Set additional configuration variables ***
# **********************************************

# Some distributions (e.g. Fedora/RHEL) use 'lib64' instead of 'lib' on 64-bit systems
if any(name.startswith('/usr/lib64/python') for name in sys.path):
env['libdirname'] = 'lib64'
else:
env['libdirname'] = 'lib'

# On Debian-based systems, need to special-case installation to
# /usr/local because of dist-packages vs site-packages
env['debian'] = any(name.endswith('dist-packages') for name in sys.path)
Expand Down

0 comments on commit 674c37c

Please sign in to comment.