From 582eb42b2fd5ed689777c2c539124e61d17da3ae Mon Sep 17 00:00:00 2001 From: band-a-prend Date: Thu, 25 Jul 2019 23:55:21 +0300 Subject: [PATCH] cantera: Fix passing 'python_prefix' variable into installation path The '${python_prefix}' substring for installation prefix path was accepted as mapping key for '.format()' function resulting in a 'KeyError' failure of 'cantera/interfaces/cython/SConscript' script in case of `env[libdirname] == 'lib64'`. Moreover the early applied pull request[1] didn't take into account the additional setting of installation prefix path in the cases when 'libdirname' takes values different from 'lib64'. This patch resolves both those issues. [1]: https://github.com/Cantera/cantera/pull/661 --- interfaces/cython/SConscript | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/interfaces/cython/SConscript b/interfaces/cython/SConscript index 67b684136..83628d76c 100644 --- a/interfaces/cython/SConscript +++ b/interfaces/cython/SConscript @@ -101,11 +101,11 @@ elif localenv['python_prefix']: extra = '' elif localenv['OS'] == 'Darwin': extra = localenv.subst(' --prefix=${python_prefix}') - elif localenv['libdirname'] == 'lib64': - # 64-bit RHEL / Fedora + elif localenv['libdirname'] != 'lib': + # 64-bit RHEL / Fedora etc. or e.g. x32 Gentoo profile extra = localenv.subst( ' --prefix=${python_prefix}' - ' --install-lib=${python_prefix}/lib64/python{}/site-packages'.format(py_version)) + ' --install-lib=${{python_prefix}}/${{libdirname}}/python{}/site-packages'.format(py_version)) else: extra = '--user' localenv.AppendENVPath(