public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:python-soabi-cleanup commit in: eclass/, eclass/tests/
@ 2015-11-07 19:44 Michał Górny
  0 siblings, 0 replies; 9+ messages in thread
From: Michał Górny @ 2015-11-07 19:44 UTC (permalink / raw
  To: gentoo-commits

commit:     52da3f4bf2ef0c95cf8496544f6d889ab75bde92
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Nov  6 22:41:52 2015 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Nov  7 18:35:31 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=52da3f4b

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+.

 eclass/python-utils-r1.eclass   | 21 +++++++--------------
 eclass/tests/python-utils-r1.sh |  4 ++--
 2 files changed, 9 insertions(+), 16 deletions(-)

diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index 467d83f..b8d093a 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -151,7 +151,8 @@ _python_impl_supported() {
 # The path to Python library.
 #
 # Set and exported on request using python_export().
-# Valid only for CPython.
+# Valid only for CPython. Requires a proper build-time dependency
+# on the Python implementation.
 #
 # Example value:
 # @CODE
@@ -289,20 +290,12 @@ python_export() {
 				fi
 				;;
 			PYTHON_LIBPATH)
-				local libname
-				case "${impl}" in
-					python*)
-						libname=lib${impl}
-						;;
-					*)
-						die "${impl} lacks a dynamic library"
-						;;
-				esac
-
-				local path=${EPREFIX}/usr/$(get_libdir)
-
-				export PYTHON_LIBPATH=${path}/${libname}$(get_libname)
+				export PYTHON_LIBPATH=$("${PYTHON}" -c 'import os.path, sysconfig; print(os.path.join(sysconfig.get_config_var("LIBDIR"), sysconfig.get_config_var("LDLIBRARY")) if sysconfig.get_config_var("LDLIBRARY") else "")')
 				debug-print "${FUNCNAME}: PYTHON_LIBPATH = ${PYTHON_LIBPATH}"
+
+				if [[ ! ${PYTHON_LIBPATH} ]]; then
+					die "${impl} lacks a (usable) dynamic library"
+				fi
 				;;
 			PYTHON_CFLAGS)
 				local val

diff --git a/eclass/tests/python-utils-r1.sh b/eclass/tests/python-utils-r1.sh
index 5bc3744..913cd7d 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
 
@@ -76,8 +76,8 @@ test_var PYTHON python3_3 /usr/bin/python3.3
 test_var PYTHON_SITEDIR python3_3 /usr/lib/python3.3/site-packages
 if [[ -x /usr/bin/python3.3 ]]; then
 	test_var PYTHON_INCLUDEDIR python3_3 "/usr/include/python3.3*"
+	test_var PYTHON_LIBPATH python3_3 "/usr/lib*/libpython3.3*$(get_libname)"
 fi
-test_var PYTHON_LIBPATH python3_3 /usr/lib/libpython3.3$(get_libname)
 test_var PYTHON_PKG_DEP python3_3 '*dev-lang/python*:3.3'
 test_var PYTHON_SCRIPTDIR python3_3 /usr/lib/python-exec/python3.3
 


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] repo/gentoo:python-soabi-cleanup commit in: eclass/, eclass/tests/
@ 2015-11-07 19:58 Michał Górny
  0 siblings, 0 replies; 9+ messages in thread
From: Michał Górny @ 2015-11-07 19:58 UTC (permalink / raw
  To: gentoo-commits

commit:     12bf890457997737b4908c32482d21dc48b4298b
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Nov  6 22:41:52 2015 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Nov  7 19:54:41 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=12bf8904

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+.

 eclass/python-utils-r1.eclass   | 21 +++++++--------------
 eclass/tests/python-utils-r1.sh |  4 ++--
 2 files changed, 9 insertions(+), 16 deletions(-)

diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index a0274f6..ec85d8a 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -151,7 +151,8 @@ _python_impl_supported() {
 # The path to Python library.
 #
 # Set and exported on request using python_export().
-# Valid only for CPython.
+# Valid only for CPython. Requires a proper build-time dependency
+# on the Python implementation.
 #
 # Example value:
 # @CODE
@@ -289,20 +290,12 @@ python_export() {
 				fi
 				;;
 			PYTHON_LIBPATH)
-				local libname
-				case "${impl}" in
-					python*)
-						libname=lib${impl}
-						;;
-					*)
-						die "${impl} lacks a dynamic library"
-						;;
-				esac
-
-				local path=${EPREFIX}/usr/$(get_libdir)
-
-				export PYTHON_LIBPATH=${path}/${libname}$(get_libname)
+				export PYTHON_LIBPATH=$("${PYTHON}" -c 'import os.path, sysconfig; print(os.path.join(sysconfig.get_config_var("LIBDIR"), sysconfig.get_config_var("LDLIBRARY")) if sysconfig.get_config_var("LDLIBRARY") else "")')
 				debug-print "${FUNCNAME}: PYTHON_LIBPATH = ${PYTHON_LIBPATH}"
+
+				if [[ ! ${PYTHON_LIBPATH} ]]; then
+					die "${impl} lacks a (usable) dynamic library"
+				fi
 				;;
 			PYTHON_CFLAGS)
 				local val

diff --git a/eclass/tests/python-utils-r1.sh b/eclass/tests/python-utils-r1.sh
index 5bc3744..913cd7d 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
 
@@ -76,8 +76,8 @@ test_var PYTHON python3_3 /usr/bin/python3.3
 test_var PYTHON_SITEDIR python3_3 /usr/lib/python3.3/site-packages
 if [[ -x /usr/bin/python3.3 ]]; then
 	test_var PYTHON_INCLUDEDIR python3_3 "/usr/include/python3.3*"
+	test_var PYTHON_LIBPATH python3_3 "/usr/lib*/libpython3.3*$(get_libname)"
 fi
-test_var PYTHON_LIBPATH python3_3 /usr/lib/libpython3.3$(get_libname)
 test_var PYTHON_PKG_DEP python3_3 '*dev-lang/python*:3.3'
 test_var PYTHON_SCRIPTDIR python3_3 /usr/lib/python-exec/python3.3
 


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] repo/gentoo:python-soabi-cleanup commit in: eclass/, eclass/tests/
@ 2015-11-07 19:58 Michał Górny
  0 siblings, 0 replies; 9+ messages in thread
From: Michał Górny @ 2015-11-07 19:58 UTC (permalink / raw
  To: gentoo-commits

commit:     d5bbbe96110d1400e5a7a557739e55dc080fc0ef
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Nov  6 22:21:37 2015 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Nov  7 19:53:58 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d5bbbe96

python-utils-r1.eclass: Obtain include directory from the interpreter

Obtain the Python include directory using the distutils.config module of
the Python interpreter rather than hardcoding values for it. This makes
the code more maintainable, and clears the way for re-enabling ABIFLAGS
on new Python versions.

 eclass/python-utils-r1.eclass   | 21 +++++++--------------
 eclass/tests/python-utils-r1.sh | 16 ++++++++++++----
 2 files changed, 19 insertions(+), 18 deletions(-)

diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index 69166cf..a0274f6 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -138,6 +138,7 @@ _python_impl_supported() {
 # The path to Python include directory.
 #
 # Set and exported on request using python_export().
+# Requires a proper build-time dependency on the Python implementation.
 #
 # Example value:
 # @CODE
@@ -279,21 +280,13 @@ python_export() {
 				debug-print "${FUNCNAME}: PYTHON_SITEDIR = ${PYTHON_SITEDIR}"
 				;;
 			PYTHON_INCLUDEDIR)
-				local dir
-				case "${impl}" in
-					python*)
-						dir=/usr/include/${impl}
-						;;
-					pypy|pypy3)
-						dir=/usr/$(get_libdir)/${impl}/include
-						;;
-					*)
-						die "${impl} lacks header files"
-						;;
-				esac
-
-				export PYTHON_INCLUDEDIR=${EPREFIX}${dir}
+				export PYTHON_INCLUDEDIR=$("${PYTHON}" -c 'import distutils.sysconfig; print(distutils.sysconfig.get_python_inc())')
 				debug-print "${FUNCNAME}: PYTHON_INCLUDEDIR = ${PYTHON_INCLUDEDIR}"
+
+				# Jython gives a non-existing directory
+				if [[ ! -d ${PYTHON_INCLUDEDIR} ]]; then
+					die "${impl} does not install any header files!"
+				fi
 				;;
 			PYTHON_LIBPATH)
 				local libname

diff --git a/eclass/tests/python-utils-r1.sh b/eclass/tests/python-utils-r1.sh
index e49636a..5bc3744 100755
--- a/eclass/tests/python-utils-r1.sh
+++ b/eclass/tests/python-utils-r1.sh
@@ -64,7 +64,9 @@ inherit python-utils-r1
 test_var EPYTHON python2_7 python2.7
 test_var PYTHON python2_7 /usr/bin/python2.7
 test_var PYTHON_SITEDIR python2_7 /usr/lib/python2.7/site-packages
-test_var PYTHON_INCLUDEDIR python2_7 /usr/include/python2.7
+if [[ -x /usr/bin/python2.7 ]]; then
+	test_var PYTHON_INCLUDEDIR python2_7 /usr/include/python2.7
+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
@@ -72,7 +74,9 @@ test_var PYTHON_SCRIPTDIR python2_7 /usr/lib/python-exec/python2.7
 test_var EPYTHON python3_3 python3.3
 test_var PYTHON python3_3 /usr/bin/python3.3
 test_var PYTHON_SITEDIR python3_3 /usr/lib/python3.3/site-packages
-test_var PYTHON_INCLUDEDIR python3_3 /usr/include/python3.3
+if [[ -x /usr/bin/python3.3 ]]; then
+	test_var PYTHON_INCLUDEDIR python3_3 "/usr/include/python3.3*"
+fi
 test_var PYTHON_LIBPATH python3_3 /usr/lib/libpython3.3$(get_libname)
 test_var PYTHON_PKG_DEP python3_3 '*dev-lang/python*:3.3'
 test_var PYTHON_SCRIPTDIR python3_3 /usr/lib/python-exec/python3.3
@@ -86,14 +90,18 @@ test_var PYTHON_SCRIPTDIR jython2_7 /usr/lib/python-exec/jython2.7
 test_var EPYTHON pypy pypy
 test_var PYTHON pypy /usr/bin/pypy
 test_var PYTHON_SITEDIR pypy /usr/lib/pypy/site-packages
-test_var PYTHON_INCLUDEDIR pypy /usr/lib/pypy/include
+if [[ -x /usr/bin/pypy ]]; then
+	test_var PYTHON_INCLUDEDIR pypy "/usr/lib*/pypy/include"
+fi
 test_var PYTHON_PKG_DEP pypy '*virtual/pypy*:0='
 test_var PYTHON_SCRIPTDIR pypy /usr/lib/python-exec/pypy
 
 test_var EPYTHON pypy3 pypy3
 test_var PYTHON pypy3 /usr/bin/pypy3
 test_var PYTHON_SITEDIR pypy3 /usr/lib/pypy3/site-packages
-test_var PYTHON_INCLUDEDIR pypy3 /usr/lib/pypy3/include
+if [[ -x /usr/bin/pypy3 ]]; then
+	test_var PYTHON_INCLUDEDIR pypy3 /usr/lib/pypy3/include
+fi
 test_var PYTHON_PKG_DEP pypy3 '*virtual/pypy3*:0='
 test_var PYTHON_SCRIPTDIR pypy3 /usr/lib/python-exec/pypy3
 


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] repo/gentoo:python-soabi-cleanup commit in: eclass/, eclass/tests/
@ 2015-11-07 20:00 Michał Górny
  0 siblings, 0 replies; 9+ messages in thread
From: Michał Górny @ 2015-11-07 20:00 UTC (permalink / raw
  To: gentoo-commits

commit:     1e3233020cfe3e7309daf70f2a60617dfb559996
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Nov  6 22:21:37 2015 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Nov  7 19:59:37 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1e323302

python-utils-r1.eclass: Obtain include directory from the interpreter

Obtain the Python include directory using the distutils.sysconfig module
of the Python interpreter rather than hardcoding values for it. This
makes the code more maintainable, and clears the way for re-enabling
ABIFLAGS on new Python versions.

 eclass/python-utils-r1.eclass   | 21 +++++++--------------
 eclass/tests/python-utils-r1.sh | 16 ++++++++++++----
 2 files changed, 19 insertions(+), 18 deletions(-)

diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index 69166cf..a0274f6 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -138,6 +138,7 @@ _python_impl_supported() {
 # The path to Python include directory.
 #
 # Set and exported on request using python_export().
+# Requires a proper build-time dependency on the Python implementation.
 #
 # Example value:
 # @CODE
@@ -279,21 +280,13 @@ python_export() {
 				debug-print "${FUNCNAME}: PYTHON_SITEDIR = ${PYTHON_SITEDIR}"
 				;;
 			PYTHON_INCLUDEDIR)
-				local dir
-				case "${impl}" in
-					python*)
-						dir=/usr/include/${impl}
-						;;
-					pypy|pypy3)
-						dir=/usr/$(get_libdir)/${impl}/include
-						;;
-					*)
-						die "${impl} lacks header files"
-						;;
-				esac
-
-				export PYTHON_INCLUDEDIR=${EPREFIX}${dir}
+				export PYTHON_INCLUDEDIR=$("${PYTHON}" -c 'import distutils.sysconfig; print(distutils.sysconfig.get_python_inc())')
 				debug-print "${FUNCNAME}: PYTHON_INCLUDEDIR = ${PYTHON_INCLUDEDIR}"
+
+				# Jython gives a non-existing directory
+				if [[ ! -d ${PYTHON_INCLUDEDIR} ]]; then
+					die "${impl} does not install any header files!"
+				fi
 				;;
 			PYTHON_LIBPATH)
 				local libname

diff --git a/eclass/tests/python-utils-r1.sh b/eclass/tests/python-utils-r1.sh
index e49636a..5bc3744 100755
--- a/eclass/tests/python-utils-r1.sh
+++ b/eclass/tests/python-utils-r1.sh
@@ -64,7 +64,9 @@ inherit python-utils-r1
 test_var EPYTHON python2_7 python2.7
 test_var PYTHON python2_7 /usr/bin/python2.7
 test_var PYTHON_SITEDIR python2_7 /usr/lib/python2.7/site-packages
-test_var PYTHON_INCLUDEDIR python2_7 /usr/include/python2.7
+if [[ -x /usr/bin/python2.7 ]]; then
+	test_var PYTHON_INCLUDEDIR python2_7 /usr/include/python2.7
+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
@@ -72,7 +74,9 @@ test_var PYTHON_SCRIPTDIR python2_7 /usr/lib/python-exec/python2.7
 test_var EPYTHON python3_3 python3.3
 test_var PYTHON python3_3 /usr/bin/python3.3
 test_var PYTHON_SITEDIR python3_3 /usr/lib/python3.3/site-packages
-test_var PYTHON_INCLUDEDIR python3_3 /usr/include/python3.3
+if [[ -x /usr/bin/python3.3 ]]; then
+	test_var PYTHON_INCLUDEDIR python3_3 "/usr/include/python3.3*"
+fi
 test_var PYTHON_LIBPATH python3_3 /usr/lib/libpython3.3$(get_libname)
 test_var PYTHON_PKG_DEP python3_3 '*dev-lang/python*:3.3'
 test_var PYTHON_SCRIPTDIR python3_3 /usr/lib/python-exec/python3.3
@@ -86,14 +90,18 @@ test_var PYTHON_SCRIPTDIR jython2_7 /usr/lib/python-exec/jython2.7
 test_var EPYTHON pypy pypy
 test_var PYTHON pypy /usr/bin/pypy
 test_var PYTHON_SITEDIR pypy /usr/lib/pypy/site-packages
-test_var PYTHON_INCLUDEDIR pypy /usr/lib/pypy/include
+if [[ -x /usr/bin/pypy ]]; then
+	test_var PYTHON_INCLUDEDIR pypy "/usr/lib*/pypy/include"
+fi
 test_var PYTHON_PKG_DEP pypy '*virtual/pypy*:0='
 test_var PYTHON_SCRIPTDIR pypy /usr/lib/python-exec/pypy
 
 test_var EPYTHON pypy3 pypy3
 test_var PYTHON pypy3 /usr/bin/pypy3
 test_var PYTHON_SITEDIR pypy3 /usr/lib/pypy3/site-packages
-test_var PYTHON_INCLUDEDIR pypy3 /usr/lib/pypy3/include
+if [[ -x /usr/bin/pypy3 ]]; then
+	test_var PYTHON_INCLUDEDIR pypy3 /usr/lib/pypy3/include
+fi
 test_var PYTHON_PKG_DEP pypy3 '*virtual/pypy3*:0='
 test_var PYTHON_SCRIPTDIR pypy3 /usr/lib/python-exec/pypy3
 


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] repo/gentoo:python-soabi-cleanup commit in: eclass/, eclass/tests/
@ 2015-11-08  8:42 Michał Górny
  0 siblings, 0 replies; 9+ messages in thread
From: Michał Górny @ 2015-11-08  8:42 UTC (permalink / raw
  To: gentoo-commits

commit:     d0d5a5a6eefccb6485afdc204707064508311cba
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Nov  8 08:27:50 2015 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Nov  8 08:42:17 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d0d5a5a6

python-utils-r1.eclass: Support getting PYTHON_CONFIG path

 eclass/python-utils-r1.eclass   | 47 +++++++++++++++++++++++++++++++++++++++++
 eclass/tests/python-utils-r1.sh |  2 ++
 2 files changed, 49 insertions(+)

diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index e8de6b9..68926ab 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -190,6 +190,20 @@ _python_impl_supported() {
 # -lpython2.7
 # @CODE
 
+# @ECLASS-VARIABLE: PYTHON_CONFIG
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Path to the python-config executable.
+#
+# Set and exported on request using python_export().
+# Valid only for CPython. Requires a proper build-time dependency
+# on the Python implementation and on pkg-config.
+#
+# Example value:
+# @CODE
+# /usr/bin/python2.7-config
+# @CODE
+
 # @ECLASS-VARIABLE: PYTHON_PKG_DEP
 # @DEFAULT_UNSET
 # @DESCRIPTION:
@@ -323,6 +337,22 @@ python_export() {
 				export PYTHON_LIBS=${val}
 				debug-print "${FUNCNAME}: PYTHON_LIBS = ${PYTHON_LIBS}"
 				;;
+			PYTHON_CONFIG)
+				local flags val
+
+				case "${impl}" in
+					python*)
+						flags=$("${PYTHON}" -c 'import sysconfig; print(sysconfig.get_config_var("ABIFLAGS") or "")')
+						val=${PYTHON}${flags}-config
+						;;
+					*)
+						die "${impl}: obtaining ${var} not supported"
+						;;
+				esac
+
+				export PYTHON_CONFIG=${val}
+				debug-print "${FUNCNAME}: PYTHON_CONFIG = ${PYTHON_CONFIG}"
+				;;
 			PYTHON_PKG_DEP)
 				local d
 				case ${impl} in
@@ -443,6 +473,23 @@ python_get_LIBS() {
 	echo "${PYTHON_LIBS}"
 }
 
+# @FUNCTION: python_get_PYTHON_CONFIG
+# @USAGE: [<impl>]
+# @DESCRIPTION:
+# Obtain and print the PYTHON_CONFIG location for the given
+# implementation. If no implementation is provided, ${EPYTHON} will be
+# used.
+#
+# Please note that this function can be used with CPython only.
+# It requires Python installed, and therefore proper build-time
+# dependencies need be added to the ebuild.
+python_get_PYTHON_CONFIG() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	python_export "${@}" PYTHON_CONFIG
+	echo "${PYTHON_CONFIG}"
+}
+
 # @FUNCTION: python_get_scriptdir
 # @USAGE: [<impl>]
 # @DESCRIPTION:

diff --git a/eclass/tests/python-utils-r1.sh b/eclass/tests/python-utils-r1.sh
index 457756d..b683c51 100755
--- a/eclass/tests/python-utils-r1.sh
+++ b/eclass/tests/python-utils-r1.sh
@@ -67,6 +67,7 @@ if [[ -x /usr/bin/python2.7 ]]; then
 	test_var PYTHON_SITEDIR python2_7 "/usr/lib*/python2.7/site-packages"
 	test_var PYTHON_INCLUDEDIR python2_7 /usr/include/python2.7
 	test_var PYTHON_LIBPATH python2_7 "/usr/lib*/libpython2.7$(get_libname)"
+	test_var PYTHON_CONFIG python2_7 /usr/bin/python2.7-config
 fi
 test_var PYTHON_PKG_DEP python2_7 '*dev-lang/python*:2.7'
 test_var PYTHON_SCRIPTDIR python2_7 /usr/lib/python-exec/python2.7
@@ -78,6 +79,7 @@ if [[ -x /usr/bin/python3.4 ]]; then
 	test_var PYTHON_SITEDIR python3_4 "/usr/lib*/python3.4/site-packages"
 	test_var PYTHON_INCLUDEDIR python3_4 "/usr/include/python3.4${abiflags}"
 	test_var PYTHON_LIBPATH python3_4 "/usr/lib*/libpython3.4${abiflags}$(get_libname)"
+	test_var PYTHON_CONFIG python3_4 "/usr/bin/python3.4${abiflags}-config"
 fi
 test_var PYTHON_PKG_DEP python3_4 '*dev-lang/python*:3.4'
 test_var PYTHON_SCRIPTDIR python3_4 /usr/lib/python-exec/python3.4


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] repo/gentoo:python-soabi-cleanup commit in: eclass/, eclass/tests/
@ 2015-11-10 17:53 Michał Górny
  0 siblings, 0 replies; 9+ messages in thread
From: Michał Górny @ 2015-11-10 17:53 UTC (permalink / raw
  To: gentoo-commits

commit:     60b8e22ae5df552e093f3b5b6f2cd18231d67c98
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Nov  6 22:21:37 2015 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Nov 10 17:40:49 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=60b8e22a

python-utils-r1.eclass: Obtain include directory from the interpreter

Obtain the Python include directory using the distutils.sysconfig module
of the Python interpreter rather than hardcoding values for it. This
makes the code more maintainable, and clears the way for re-enabling
ABIFLAGS on new Python versions.

 eclass/python-utils-r1.eclass   | 21 +++++++--------------
 eclass/tests/python-utils-r1.sh | 17 +++++++++++++----
 2 files changed, 20 insertions(+), 18 deletions(-)

diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index 69166cf..a0274f6 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -138,6 +138,7 @@ _python_impl_supported() {
 # The path to Python include directory.
 #
 # Set and exported on request using python_export().
+# Requires a proper build-time dependency on the Python implementation.
 #
 # Example value:
 # @CODE
@@ -279,21 +280,13 @@ python_export() {
 				debug-print "${FUNCNAME}: PYTHON_SITEDIR = ${PYTHON_SITEDIR}"
 				;;
 			PYTHON_INCLUDEDIR)
-				local dir
-				case "${impl}" in
-					python*)
-						dir=/usr/include/${impl}
-						;;
-					pypy|pypy3)
-						dir=/usr/$(get_libdir)/${impl}/include
-						;;
-					*)
-						die "${impl} lacks header files"
-						;;
-				esac
-
-				export PYTHON_INCLUDEDIR=${EPREFIX}${dir}
+				export PYTHON_INCLUDEDIR=$("${PYTHON}" -c 'import distutils.sysconfig; print(distutils.sysconfig.get_python_inc())')
 				debug-print "${FUNCNAME}: PYTHON_INCLUDEDIR = ${PYTHON_INCLUDEDIR}"
+
+				# Jython gives a non-existing directory
+				if [[ ! -d ${PYTHON_INCLUDEDIR} ]]; then
+					die "${impl} does not install any header files!"
+				fi
 				;;
 			PYTHON_LIBPATH)
 				local libname

diff --git a/eclass/tests/python-utils-r1.sh b/eclass/tests/python-utils-r1.sh
index bd05e9e..dc6676b 100755
--- a/eclass/tests/python-utils-r1.sh
+++ b/eclass/tests/python-utils-r1.sh
@@ -64,7 +64,9 @@ inherit python-utils-r1
 test_var EPYTHON python2_7 python2.7
 test_var PYTHON python2_7 /usr/bin/python2.7
 test_var PYTHON_SITEDIR python2_7 /usr/lib/python2.7/site-packages
-test_var PYTHON_INCLUDEDIR python2_7 /usr/include/python2.7
+if [[ -x /usr/bin/python2.7 ]]; then
+	test_var PYTHON_INCLUDEDIR python2_7 /usr/include/python2.7
+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
@@ -72,7 +74,10 @@ test_var PYTHON_SCRIPTDIR python2_7 /usr/lib/python-exec/python2.7
 test_var EPYTHON python3_4 python3.4
 test_var PYTHON python3_4 /usr/bin/python3.4
 test_var PYTHON_SITEDIR python3_4 /usr/lib/python3.4/site-packages
-test_var PYTHON_INCLUDEDIR python3_4 /usr/include/python3.4
+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}"
+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
@@ -86,14 +91,18 @@ test_var PYTHON_SCRIPTDIR jython2_7 /usr/lib/python-exec/jython2.7
 test_var EPYTHON pypy pypy
 test_var PYTHON pypy /usr/bin/pypy
 test_var PYTHON_SITEDIR pypy /usr/lib/pypy/site-packages
-test_var PYTHON_INCLUDEDIR pypy /usr/lib/pypy/include
+if [[ -x /usr/bin/pypy ]]; then
+	test_var PYTHON_INCLUDEDIR pypy "/usr/lib*/pypy/include"
+fi
 test_var PYTHON_PKG_DEP pypy '*virtual/pypy*:0='
 test_var PYTHON_SCRIPTDIR pypy /usr/lib/python-exec/pypy
 
 test_var EPYTHON pypy3 pypy3
 test_var PYTHON pypy3 /usr/bin/pypy3
 test_var PYTHON_SITEDIR pypy3 /usr/lib/pypy3/site-packages
-test_var PYTHON_INCLUDEDIR pypy3 /usr/lib/pypy3/include
+if [[ -x /usr/bin/pypy3 ]]; then
+	test_var PYTHON_INCLUDEDIR pypy3 /usr/lib/pypy3/include
+fi
 test_var PYTHON_PKG_DEP pypy3 '*virtual/pypy3*:0='
 test_var PYTHON_SCRIPTDIR pypy3 /usr/lib/python-exec/pypy3
 


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] repo/gentoo:python-soabi-cleanup commit in: eclass/, eclass/tests/
@ 2015-11-10 17:53 Michał Górny
  0 siblings, 0 replies; 9+ messages in thread
From: Michał Górny @ 2015-11-10 17:53 UTC (permalink / raw
  To: gentoo-commits

commit:     20fe2ea87c7ccbcb1c50443e35d3019e7b35ce2b
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Nov  6 22:41:52 2015 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Nov 10 17:40:49 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=20fe2ea8

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+.

 eclass/python-utils-r1.eclass   | 21 +++++++--------------
 eclass/tests/python-utils-r1.sh |  4 ++--
 2 files changed, 9 insertions(+), 16 deletions(-)

diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index a0274f6..ec85d8a 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -151,7 +151,8 @@ _python_impl_supported() {
 # The path to Python library.
 #
 # Set and exported on request using python_export().
-# Valid only for CPython.
+# Valid only for CPython. Requires a proper build-time dependency
+# on the Python implementation.
 #
 # Example value:
 # @CODE
@@ -289,20 +290,12 @@ python_export() {
 				fi
 				;;
 			PYTHON_LIBPATH)
-				local libname
-				case "${impl}" in
-					python*)
-						libname=lib${impl}
-						;;
-					*)
-						die "${impl} lacks a dynamic library"
-						;;
-				esac
-
-				local path=${EPREFIX}/usr/$(get_libdir)
-
-				export PYTHON_LIBPATH=${path}/${libname}$(get_libname)
+				export PYTHON_LIBPATH=$("${PYTHON}" -c 'import os.path, sysconfig; print(os.path.join(sysconfig.get_config_var("LIBDIR"), sysconfig.get_config_var("LDLIBRARY")) if sysconfig.get_config_var("LDLIBRARY") else "")')
 				debug-print "${FUNCNAME}: PYTHON_LIBPATH = ${PYTHON_LIBPATH}"
+
+				if [[ ! ${PYTHON_LIBPATH} ]]; then
+					die "${impl} lacks a (usable) dynamic library"
+				fi
 				;;
 			PYTHON_CFLAGS)
 				local val

diff --git a/eclass/tests/python-utils-r1.sh b/eclass/tests/python-utils-r1.sh
index dc6676b..e54550d 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
 


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] repo/gentoo:python-soabi-cleanup commit in: eclass/, eclass/tests/
@ 2015-11-10 17:53 Michał Górny
  0 siblings, 0 replies; 9+ messages in thread
From: Michał Górny @ 2015-11-10 17:53 UTC (permalink / raw
  To: gentoo-commits

commit:     544ee4b6eae6d98f5bc6143927daf6c4ef92f0dc
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Nov  8 08:27:50 2015 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Nov 10 17:40:49 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=544ee4b6

python-utils-r1.eclass: Support getting PYTHON_CONFIG path

 eclass/python-utils-r1.eclass   | 47 +++++++++++++++++++++++++++++++++++++++++
 eclass/tests/python-utils-r1.sh |  2 ++
 2 files changed, 49 insertions(+)

diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index e8de6b9..68926ab 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -190,6 +190,20 @@ _python_impl_supported() {
 # -lpython2.7
 # @CODE
 
+# @ECLASS-VARIABLE: PYTHON_CONFIG
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Path to the python-config executable.
+#
+# Set and exported on request using python_export().
+# Valid only for CPython. Requires a proper build-time dependency
+# on the Python implementation and on pkg-config.
+#
+# Example value:
+# @CODE
+# /usr/bin/python2.7-config
+# @CODE
+
 # @ECLASS-VARIABLE: PYTHON_PKG_DEP
 # @DEFAULT_UNSET
 # @DESCRIPTION:
@@ -323,6 +337,22 @@ python_export() {
 				export PYTHON_LIBS=${val}
 				debug-print "${FUNCNAME}: PYTHON_LIBS = ${PYTHON_LIBS}"
 				;;
+			PYTHON_CONFIG)
+				local flags val
+
+				case "${impl}" in
+					python*)
+						flags=$("${PYTHON}" -c 'import sysconfig; print(sysconfig.get_config_var("ABIFLAGS") or "")')
+						val=${PYTHON}${flags}-config
+						;;
+					*)
+						die "${impl}: obtaining ${var} not supported"
+						;;
+				esac
+
+				export PYTHON_CONFIG=${val}
+				debug-print "${FUNCNAME}: PYTHON_CONFIG = ${PYTHON_CONFIG}"
+				;;
 			PYTHON_PKG_DEP)
 				local d
 				case ${impl} in
@@ -443,6 +473,23 @@ python_get_LIBS() {
 	echo "${PYTHON_LIBS}"
 }
 
+# @FUNCTION: python_get_PYTHON_CONFIG
+# @USAGE: [<impl>]
+# @DESCRIPTION:
+# Obtain and print the PYTHON_CONFIG location for the given
+# implementation. If no implementation is provided, ${EPYTHON} will be
+# used.
+#
+# Please note that this function can be used with CPython only.
+# It requires Python installed, and therefore proper build-time
+# dependencies need be added to the ebuild.
+python_get_PYTHON_CONFIG() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	python_export "${@}" PYTHON_CONFIG
+	echo "${PYTHON_CONFIG}"
+}
+
 # @FUNCTION: python_get_scriptdir
 # @USAGE: [<impl>]
 # @DESCRIPTION:

diff --git a/eclass/tests/python-utils-r1.sh b/eclass/tests/python-utils-r1.sh
index 457756d..b683c51 100755
--- a/eclass/tests/python-utils-r1.sh
+++ b/eclass/tests/python-utils-r1.sh
@@ -67,6 +67,7 @@ if [[ -x /usr/bin/python2.7 ]]; then
 	test_var PYTHON_SITEDIR python2_7 "/usr/lib*/python2.7/site-packages"
 	test_var PYTHON_INCLUDEDIR python2_7 /usr/include/python2.7
 	test_var PYTHON_LIBPATH python2_7 "/usr/lib*/libpython2.7$(get_libname)"
+	test_var PYTHON_CONFIG python2_7 /usr/bin/python2.7-config
 fi
 test_var PYTHON_PKG_DEP python2_7 '*dev-lang/python*:2.7'
 test_var PYTHON_SCRIPTDIR python2_7 /usr/lib/python-exec/python2.7
@@ -78,6 +79,7 @@ if [[ -x /usr/bin/python3.4 ]]; then
 	test_var PYTHON_SITEDIR python3_4 "/usr/lib*/python3.4/site-packages"
 	test_var PYTHON_INCLUDEDIR python3_4 "/usr/include/python3.4${abiflags}"
 	test_var PYTHON_LIBPATH python3_4 "/usr/lib*/libpython3.4${abiflags}$(get_libname)"
+	test_var PYTHON_CONFIG python3_4 "/usr/bin/python3.4${abiflags}-config"
 fi
 test_var PYTHON_PKG_DEP python3_4 '*dev-lang/python*:3.4'
 test_var PYTHON_SCRIPTDIR python3_4 /usr/lib/python-exec/python3.4


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] repo/gentoo:python-soabi-cleanup commit in: eclass/, eclass/tests/
@ 2015-11-10 17:53 Michał Górny
  0 siblings, 0 replies; 9+ messages in thread
From: Michał Górny @ 2015-11-10 17:53 UTC (permalink / raw
  To: gentoo-commits

commit:     58c9699b7bfdf72b6d67b3c73c0684d76754279b
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Nov  7 19:30:24 2015 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Nov 10 17:40:49 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=58c9699b

python-utils-r1.eclass: Obtain PYTHON_SITEDIR from the interpreter

Obtain the Python site-packages directory path using
the distutils.sysconfig module, rather than hardcoding it.

 eclass/python-utils-r1.eclass   | 16 +++++-----------
 eclass/tests/python-utils-r1.sh | 12 +++++++-----
 2 files changed, 12 insertions(+), 16 deletions(-)

diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index ec85d8a..e8de6b9 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -126,6 +126,7 @@ _python_impl_supported() {
 # The path to Python site-packages directory.
 #
 # Set and exported on request using python_export().
+# Requires a proper build-time dependency on the Python implementation.
 #
 # Example value:
 # @CODE
@@ -267,17 +268,10 @@ python_export() {
 				debug-print "${FUNCNAME}: PYTHON = ${PYTHON}"
 				;;
 			PYTHON_SITEDIR)
-				local dir
-				case "${impl}" in
-					python*|pypy|pypy3)
-						dir=/usr/$(get_libdir)/${impl}
-						;;
-					jython*)
-						dir=/usr/share/${impl/n/n-}/Lib
-						;;
-				esac
-
-				export PYTHON_SITEDIR=${EPREFIX}${dir}/site-packages
+				# sysconfig can't be used because:
+				# 1) pypy doesn't give site-packages but stdlib
+				# 2) jython gives paths with wrong case
+				export PYTHON_SITEDIR=$("${PYTHON}" -c 'import distutils.sysconfig; print(distutils.sysconfig.get_python_lib())')
 				debug-print "${FUNCNAME}: PYTHON_SITEDIR = ${PYTHON_SITEDIR}"
 				;;
 			PYTHON_INCLUDEDIR)

diff --git a/eclass/tests/python-utils-r1.sh b/eclass/tests/python-utils-r1.sh
index e54550d..457756d 100755
--- a/eclass/tests/python-utils-r1.sh
+++ b/eclass/tests/python-utils-r1.sh
@@ -63,8 +63,8 @@ inherit python-utils-r1
 
 test_var EPYTHON python2_7 python2.7
 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_SITEDIR python2_7 "/usr/lib*/python2.7/site-packages"
 	test_var PYTHON_INCLUDEDIR python2_7 /usr/include/python2.7
 	test_var PYTHON_LIBPATH python2_7 "/usr/lib*/libpython2.7$(get_libname)"
 fi
@@ -73,9 +73,9 @@ test_var PYTHON_SCRIPTDIR python2_7 /usr/lib/python-exec/python2.7
 
 test_var EPYTHON python3_4 python3.4
 test_var PYTHON python3_4 /usr/bin/python3.4
-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_SITEDIR python3_4 "/usr/lib*/python3.4/site-packages"
 	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
@@ -84,14 +84,16 @@ test_var PYTHON_SCRIPTDIR python3_4 /usr/lib/python-exec/python3.4
 
 test_var EPYTHON jython2_7 jython2.7
 test_var PYTHON jython2_7 /usr/bin/jython2.7
-test_var PYTHON_SITEDIR jython2_7 /usr/share/jython-2.7/Lib/site-packages
+if [[ -x /usr/bin/jython2.7 ]]; then
+	test_var PYTHON_SITEDIR jython2_7 /usr/share/jython-2.7/Lib/site-packages
+fi
 test_var PYTHON_PKG_DEP jython2_7 '*dev-java/jython*:2.7'
 test_var PYTHON_SCRIPTDIR jython2_7 /usr/lib/python-exec/jython2.7
 
 test_var EPYTHON pypy pypy
 test_var PYTHON pypy /usr/bin/pypy
-test_var PYTHON_SITEDIR pypy /usr/lib/pypy/site-packages
 if [[ -x /usr/bin/pypy ]]; then
+	test_var PYTHON_SITEDIR pypy "/usr/lib*/pypy/site-packages"
 	test_var PYTHON_INCLUDEDIR pypy "/usr/lib*/pypy/include"
 fi
 test_var PYTHON_PKG_DEP pypy '*virtual/pypy*:0='
@@ -99,8 +101,8 @@ test_var PYTHON_SCRIPTDIR pypy /usr/lib/python-exec/pypy
 
 test_var EPYTHON pypy3 pypy3
 test_var PYTHON pypy3 /usr/bin/pypy3
-test_var PYTHON_SITEDIR pypy3 /usr/lib/pypy3/site-packages
 if [[ -x /usr/bin/pypy3 ]]; then
+	test_var PYTHON_SITEDIR pypy3 "/usr/lib*/pypy3/site-packages"
 	test_var PYTHON_INCLUDEDIR pypy3 /usr/lib/pypy3/include
 fi
 test_var PYTHON_PKG_DEP pypy3 '*virtual/pypy3*:0='


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-11-10 17:53 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-07 20:00 [gentoo-commits] repo/gentoo:python-soabi-cleanup commit in: eclass/, eclass/tests/ Michał Górny
  -- strict thread matches above, loose matches on Subject: below --
2015-11-10 17:53 Michał Górny
2015-11-10 17:53 Michał Górny
2015-11-10 17:53 Michał Górny
2015-11-10 17:53 Michał Górny
2015-11-08  8:42 Michał Górny
2015-11-07 19:58 Michał Górny
2015-11-07 19:58 Michał Górny
2015-11-07 19:44 Michał Górny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox