From 674c37ce3cbfd867179d8ab6c9af605b5d56eb6c Mon Sep 17 00:00:00 2001 From: band-a-prend Date: Thu, 27 Jun 2019 01:33:17 +0300 Subject: [PATCH] cantera: Sconstruct 'libdirname' env PathVariable 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: https://github.com/Cantera/cantera/issues/318 --- SConstruct | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/SConstruct b/SConstruct index 3788535db9..206d09c6cd 100644 --- a/SConstruct +++ b/SConstruct @@ -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 @@ -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)