summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2015-11-06 23:41:52 +0100
committerMichał Górny <mgorny@gentoo.org>2015-11-11 11:21:17 +0100
commite0d0c114862a731d3a10cab621e1070728b8ec5f (patch)
tree1e5e4a94371105095a593e76636729fc3a5932c8 /eclass/tests
parentpython-utils-r1.eclass: Obtain include directory from the interpreter (diff)
downloadgentoo-e0d0c114862a731d3a10cab621e1070728b8ec5f.tar.gz
gentoo-e0d0c114862a731d3a10cab621e1070728b8ec5f.tar.bz2
gentoo-e0d0c114862a731d3a10cab621e1070728b8ec5f.zip
python-utils-r1.eclass: Obtain library path from the interpreter
Obtain library path as concatenation of LIBDIR and LDLIBRARY config variables (from sysconfig module) rather than hardcoding it in the eclass. This improves maintainability and fixes compatibility with ABIFLAGS-enabled Python 3.3+.
Diffstat (limited to 'eclass/tests')
-rwxr-xr-xeclass/tests/python-utils-r1.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/eclass/tests/python-utils-r1.sh b/eclass/tests/python-utils-r1.sh
index dc6676b6ca37..e54550debac1 100755
--- a/eclass/tests/python-utils-r1.sh
+++ b/eclass/tests/python-utils-r1.sh
@@ -66,8 +66,8 @@ test_var PYTHON python2_7 /usr/bin/python2.7
test_var PYTHON_SITEDIR python2_7 /usr/lib/python2.7/site-packages
if [[ -x /usr/bin/python2.7 ]]; then
test_var PYTHON_INCLUDEDIR python2_7 /usr/include/python2.7
+ test_var PYTHON_LIBPATH python2_7 "/usr/lib*/libpython2.7$(get_libname)"
fi
-test_var PYTHON_LIBPATH python2_7 /usr/lib/libpython2.7$(get_libname)
test_var PYTHON_PKG_DEP python2_7 '*dev-lang/python*:2.7'
test_var PYTHON_SCRIPTDIR python2_7 /usr/lib/python-exec/python2.7
@@ -77,8 +77,8 @@ test_var PYTHON_SITEDIR python3_4 /usr/lib/python3.4/site-packages
if [[ -x /usr/bin/python3.4 ]]; then
abiflags=$(/usr/bin/python3.4 -c 'import sysconfig; print(sysconfig.get_config_var("ABIFLAGS"))')
test_var PYTHON_INCLUDEDIR python3_4 "/usr/include/python3.4${abiflags}"
+ test_var PYTHON_LIBPATH python3_4 "/usr/lib*/libpython3.4${abiflags}$(get_libname)"
fi
-test_var PYTHON_LIBPATH python3_4 /usr/lib/libpython3.4$(get_libname)
test_var PYTHON_PKG_DEP python3_4 '*dev-lang/python*:3.4'
test_var PYTHON_SCRIPTDIR python3_4 /usr/lib/python-exec/python3.4