summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dev-python/msgpack/Manifest3
-rw-r--r--dev-python/msgpack/msgpack-0.4.8.ebuild36
-rw-r--r--dev-python/msgpack/msgpack-0.5.1.ebuild36
-rw-r--r--dev-python/msgpack/msgpack-0.6.1.ebuild44
-rw-r--r--eclass/distutils-r1.eclass8
-rw-r--r--eclass/python-any-r1.eclass20
-rw-r--r--eclass/python-r1.eclass16
-rw-r--r--eclass/python-single-r1.eclass12
-rw-r--r--eclass/python-utils-r1.eclass184
-rwxr-xr-xeclass/tests/python-utils-r1.sh2
-rw-r--r--metadata/install-qa-check.d/60python-pyc2
11 files changed, 77 insertions, 286 deletions
diff --git a/dev-python/msgpack/Manifest b/dev-python/msgpack/Manifest
index d408b5bb72b2..b7aedd2bb422 100644
--- a/dev-python/msgpack/Manifest
+++ b/dev-python/msgpack/Manifest
@@ -1,5 +1,2 @@
DIST msgpack-0.5.6.tar.gz 138292 BLAKE2B 6a3b8472b785d77e142d21464b9e52c55166a8eff56009f63df5daa8cd5b6dbce4406a06ffa8d478cb44dfbdfab2f3b4b29cd11279ea82f67906b97d507f7eda SHA512 bdbd193bd3bd02e78d9c6e8d9d8fa687d13583dff2813bc77c5e6cbbe0d180765da3c9a80d176f9993589e35f548ad04973e3d523d0b6d41ef7916ecd86195aa
-DIST msgpack-0.6.1.tar.gz 118812 BLAKE2B 9f5522ae7dc89e286a338bfdd91bd4cacefdf7d075136a2ce5e28896db9a9c6a9ed1fe71fff45aab09f8dd32878fcd996366346daa88d47a31a253dec06e2353 SHA512 1a60da428f4b69df817660f4c4f60b1744de17d2b72352286fb41c6703de1d100853f8701b947fb11fc38f2180a50be4a9d577550fcfb9da6a05fe30ed2af07c
DIST msgpack-0.6.2.tar.gz 119062 BLAKE2B 6b20a0d31b811ae66e66dbfaacec6f0cf2152b2937423b78f3e6244bfa49c87767788c5ee1db41b9020801b8777a4c15b1fe1853182718adf622bc7e1bff858e SHA512 95b92e3d35e0500dd4256d18bf76e586e57cc66319b4459ac5daef599277a5049177a89ad86e291dbdc4c7a918901a89d9218353ddc4a7d0b399e8a98afef363
-DIST msgpack-python-0.4.8.tar.gz 113641 BLAKE2B d22efe13302e28d0701b95b2dc4cf4792f9e045efdf77b31ac5c6170b503c885c265ff63387fe76a1aa67b1624963aa26d76dffb15fc2cb10cfe672b59e71b99 SHA512 59e9c43be6b92e6d10f40999e0902c350137e67a83c43bb15b273eca856a6eb39f24b625b02b40188a9365ce3101f03bfa9aa3dfff56c5c3b551533942183481
-DIST msgpack-python-0.5.1.tar.gz 138953 BLAKE2B 1fb7e5be33992808319e1444ff7f84cc13f034e60ce0ef2f72161bd4ccd0cd1ede27382bc1f365f268557c8ffe503fd12de66eb5840e79760d818e7e2f67fdcd SHA512 e5172e20bb25d2e12ba34ad2805ba4ea0776397986e8bf8e26d21353f57a2dba59a9c6669c817e4e91d5801558a50f95d81e02343f8f0292a01ec5d822fba61c
diff --git a/dev-python/msgpack/msgpack-0.4.8.ebuild b/dev-python/msgpack/msgpack-0.4.8.ebuild
deleted file mode 100644
index 3c1a96612ca0..000000000000
--- a/dev-python/msgpack/msgpack-0.4.8.ebuild
+++ /dev/null
@@ -1,36 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-PYTHON_COMPAT=( python3_6 )
-
-inherit distutils-r1
-
-MY_PN="${PN}-python"
-MY_P="${MY_PN}-${PV}"
-
-DESCRIPTION="MessagePack (de)serializer for Python"
-HOMEPAGE="https://msgpack.org
- https://github.com/msgpack/msgpack-python/
- https://pypi.org/project/msgpack-python/"
-SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-KEYWORDS="amd64 arm ~arm64 ppc x86"
-IUSE="test"
-RESTRICT="!test? ( test )"
-
-DEPEND="
- dev-python/setuptools[${PYTHON_USEDEP}]
- test? (
- dev-python/six[${PYTHON_USEDEP}]
- dev-python/pytest[${PYTHON_USEDEP}]
- )
-"
-
-S=${WORKDIR}/${MY_P}
-
-python_test() {
- py.test test || die "Tests fail with ${EPYTHON}"
-}
diff --git a/dev-python/msgpack/msgpack-0.5.1.ebuild b/dev-python/msgpack/msgpack-0.5.1.ebuild
deleted file mode 100644
index 134f67eb7359..000000000000
--- a/dev-python/msgpack/msgpack-0.5.1.ebuild
+++ /dev/null
@@ -1,36 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-PYTHON_COMPAT=( python3_{6,7} )
-
-inherit distutils-r1
-
-MY_PN="${PN}-python"
-MY_P="${MY_PN}-${PV}"
-
-DESCRIPTION="MessagePack (de)serializer for Python"
-HOMEPAGE="https://msgpack.org
- https://github.com/msgpack/msgpack-python/
- https://pypi.org/project/msgpack-python/"
-SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-KEYWORDS="amd64 arm ~arm64 ppc x86"
-IUSE="test"
-RESTRICT="!test? ( test )"
-
-DEPEND="
- dev-python/setuptools[${PYTHON_USEDEP}]
- dev-python/cython[${PYTHON_USEDEP}]
- test? (
- dev-python/pytest[${PYTHON_USEDEP}]
- )
-"
-
-S=${WORKDIR}/${MY_P}
-
-python_test() {
- py.test test || die "Tests fail with ${EPYTHON}"
-}
diff --git a/dev-python/msgpack/msgpack-0.6.1.ebuild b/dev-python/msgpack/msgpack-0.6.1.ebuild
deleted file mode 100644
index 443083566d5f..000000000000
--- a/dev-python/msgpack/msgpack-0.6.1.ebuild
+++ /dev/null
@@ -1,44 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-PYTHON_COMPAT=( python3_{6,7} )
-
-inherit distutils-r1
-
-DESCRIPTION="MessagePack (de)serializer for Python"
-HOMEPAGE="https://msgpack.org
- https://github.com/msgpack/msgpack-python/
- https://pypi.org/project/msgpack/"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-KEYWORDS="amd64 arm ~arm64 ppc x86"
-IUSE="+native-extensions test"
-RESTRICT="!test? ( test )"
-
-DEPEND="
- dev-python/setuptools[${PYTHON_USEDEP}]
- native-extensions? (
- $(python_gen_cond_dep '>=dev-python/cython-0.16[${PYTHON_USEDEP}]' 'python*')
- )
- test? (
- dev-python/six[${PYTHON_USEDEP}]
- dev-python/pytest[${PYTHON_USEDEP}]
- )
-"
-
-python_prepare_all() {
- # Remove pre-generated cython files
- rm msgpack/{_packer,_unpacker,_cmsgpack}.pyx || die
-
- if ! use native-extensions ; then
- sed -i -e "/have_cython/s:True:False:" ./setup.py || die
- fi
- distutils-r1_python_prepare_all
-}
-
-python_test() {
- py.test -v test || die "Tests fail with ${EPYTHON}"
-}
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 114ccc8041cc..fd6c0193d12e 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -771,13 +771,11 @@ _distutils-r1_wrap_scripts() {
local path=${1}
local bindir=${2}
- local PYTHON_SCRIPTDIR
- python_export PYTHON_SCRIPTDIR
-
+ local scriptdir=$(python_get_scriptdir)
local f python_files=() non_python_files=()
- if [[ -d ${path}${PYTHON_SCRIPTDIR} ]]; then
- for f in "${path}${PYTHON_SCRIPTDIR}"/*; do
+ if [[ -d ${path}${scriptdir} ]]; then
+ for f in "${path}${scriptdir}"/*; do
[[ -d ${f} ]] && die "Unexpected directory: ${f}"
debug-print "${FUNCNAME}: found executable at ${f#${path}/}"
diff --git a/eclass/python-any-r1.eclass b/eclass/python-any-r1.eclass
index 66c6965c04ea..eef4c57b7e25 100644
--- a/eclass/python-any-r1.eclass
+++ b/eclass/python-any-r1.eclass
@@ -151,7 +151,7 @@ _python_any_set_globals() {
_python_set_impls
for i in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do
- python_export "${i}" PYTHON_PKG_DEP
+ _python_export "${i}" PYTHON_PKG_DEP
# note: need to strip '=' slot operator for || deps
deps="${PYTHON_PKG_DEP/:0=/:0} ${deps}"
@@ -232,7 +232,7 @@ python_gen_any_dep() {
local i PYTHON_PKG_DEP out=
for i in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do
local PYTHON_USEDEP="python_targets_${i}(-),python_single_target_${i}(+)"
- python_export "${i}" PYTHON_PKG_DEP
+ _python_export "${i}" PYTHON_PKG_DEP
local i_depstr=${depstr//\$\{PYTHON_USEDEP\}/${PYTHON_USEDEP}}
# note: need to strip '=' slot operator for || deps
@@ -299,8 +299,8 @@ python_setup() {
ewarn
ewarn "Dependencies won't be satisfied, and EPYTHON/eselect-python will be ignored."
- python_export "${impls[0]}" EPYTHON PYTHON
- python_wrapper_setup
+ _python_export "${impls[0]}" EPYTHON PYTHON
+ _python_wrapper_setup
einfo "Using ${EPYTHON} to build"
return
fi
@@ -308,8 +308,8 @@ python_setup() {
# first, try ${EPYTHON}... maybe it's good enough for us.
if [[ ${EPYTHON} ]]; then
if _python_EPYTHON_supported "${EPYTHON}"; then
- python_export EPYTHON PYTHON
- python_wrapper_setup
+ _python_export EPYTHON PYTHON
+ _python_wrapper_setup
einfo "Using ${EPYTHON} to build"
return
fi
@@ -324,8 +324,8 @@ python_setup() {
# no eselect-python?
break
elif _python_EPYTHON_supported "${i}"; then
- python_export "${i}" EPYTHON PYTHON
- python_wrapper_setup
+ _python_export "${i}" EPYTHON PYTHON
+ _python_wrapper_setup
einfo "Using ${EPYTHON} to build"
return
fi
@@ -334,9 +334,9 @@ python_setup() {
# fallback to best installed impl.
# (reverse iteration over _PYTHON_SUPPORTED_IMPLS)
for (( i = ${#_PYTHON_SUPPORTED_IMPLS[@]} - 1; i >= 0; i-- )); do
- python_export "${_PYTHON_SUPPORTED_IMPLS[i]}" EPYTHON PYTHON
+ _python_export "${_PYTHON_SUPPORTED_IMPLS[i]}" EPYTHON PYTHON
if _python_EPYTHON_supported "${EPYTHON}"; then
- python_wrapper_setup
+ _python_wrapper_setup
einfo "Using ${EPYTHON} to build"
return
fi
diff --git a/eclass/python-r1.eclass b/eclass/python-r1.eclass
index 960fed8c451a..8687b595123a 100644
--- a/eclass/python-r1.eclass
+++ b/eclass/python-r1.eclass
@@ -173,7 +173,7 @@ _python_set_globals() {
_python_set_impls
for i in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do
- python_export "${i}" PYTHON_PKG_DEP
+ _python_export "${i}" PYTHON_PKG_DEP
deps+="python_targets_${i}? ( ${PYTHON_PKG_DEP} ) "
done
@@ -485,7 +485,7 @@ python_gen_impl_dep() {
for impl in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do
if _python_impl_matches "${impl}" "${@}"; then
local PYTHON_PKG_DEP
- python_export "${impl}" PYTHON_PKG_DEP
+ _python_export "${impl}" PYTHON_PKG_DEP
matches+=( "python_targets_${impl}? ( ${PYTHON_PKG_DEP} )" )
fi
done
@@ -563,7 +563,7 @@ python_gen_any_dep() {
for i in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do
if _python_impl_matches "${i}" "${@}"; then
local PYTHON_USEDEP="python_targets_${i}(-),python_single_target_${i}(+)"
- python_export "${i}" PYTHON_PKG_DEP
+ _python_export "${i}" PYTHON_PKG_DEP
local i_depstr=${depstr//\$\{PYTHON_USEDEP\}/${PYTHON_USEDEP}}
# note: need to strip '=' slot operator for || deps
@@ -637,8 +637,8 @@ _python_multibuild_wrapper() {
local -x EPYTHON PYTHON
local -x PATH=${PATH} PKG_CONFIG_PATH=${PKG_CONFIG_PATH}
- python_export "${MULTIBUILD_VARIANT}" EPYTHON PYTHON
- python_wrapper_setup
+ _python_export "${MULTIBUILD_VARIANT}" EPYTHON PYTHON
+ _python_wrapper_setup
"${@}"
}
@@ -760,7 +760,7 @@ python_setup() {
# check patterns
_python_impl_matches "${impl}" "${@}" || continue
- python_export "${impl}" EPYTHON PYTHON
+ _python_export "${impl}" EPYTHON PYTHON
# if python_check_deps() is declared, switch into any-of mode
if [[ ${has_check_deps} ]]; then
@@ -784,7 +784,7 @@ python_setup() {
die "${FUNCNAME}: no enabled implementation satisfy requirements"
fi
- python_wrapper_setup
+ _python_wrapper_setup
einfo "Using ${EPYTHON} in global scope"
}
@@ -803,7 +803,7 @@ python_replicate_script() {
local _PYTHON_FIX_SHEBANG_QUIET=1
local PYTHON_SCRIPTDIR
- python_export PYTHON_SCRIPTDIR
+ _python_export PYTHON_SCRIPTDIR
(
exeopts -m 0755
diff --git a/eclass/python-single-r1.eclass b/eclass/python-single-r1.eclass
index f9e26e7c334f..ab3df94dcf11 100644
--- a/eclass/python-single-r1.eclass
+++ b/eclass/python-single-r1.eclass
@@ -213,7 +213,7 @@ _python_single_set_globals() {
local deps= i PYTHON_PKG_DEP
for i in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do
- python_export "${i}" PYTHON_PKG_DEP
+ _python_export "${i}" PYTHON_PKG_DEP
# 1) well, python-exec would suffice as an RDEP
# but no point in making this overcomplex, BDEP doesn't hurt anyone
# 2) python-exec should be built with all targets forced anyway
@@ -436,7 +436,7 @@ python_gen_impl_dep() {
for impl in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do
if _python_impl_matches "${impl}" "${@}"; then
local PYTHON_PKG_DEP
- python_export "${impl}" PYTHON_PKG_DEP
+ _python_export "${impl}" PYTHON_PKG_DEP
matches+=( "python_single_target_${impl}? ( ${PYTHON_PKG_DEP} )" )
fi
done
@@ -465,8 +465,8 @@ python_setup() {
ewarn
ewarn "Dependencies won't be satisfied, and PYTHON_SINGLE_TARGET flags will be ignored."
- python_export "${impls[0]}" EPYTHON PYTHON
- python_wrapper_setup
+ _python_export "${impls[0]}" EPYTHON PYTHON
+ _python_wrapper_setup
einfo "Using ${EPYTHON} to build"
return
fi
@@ -483,8 +483,8 @@ python_setup() {
die "More than one implementation in PYTHON_SINGLE_TARGET."
fi
- python_export "${impl}" EPYTHON PYTHON
- python_wrapper_setup
+ _python_export "${impl}" EPYTHON PYTHON
+ _python_wrapper_setup
einfo "Using ${EPYTHON} to build"
fi
done
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index f144cbbb1279..aacee5ac35a0 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -228,116 +228,24 @@ _python_impl_matches() {
# python2.7
# @CODE
-# @ECLASS-VARIABLE: PYTHON_SITEDIR
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# 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
-# /usr/lib64/python2.7/site-packages
-# @CODE
-
-# @ECLASS-VARIABLE: PYTHON_INCLUDEDIR
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# 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
-# /usr/include/python2.7
-# @CODE
-
-# @ECLASS-VARIABLE: PYTHON_LIBPATH
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# The path to Python library.
-#
-# Set and exported on request using python_export().
-# Valid only for CPython. Requires a proper build-time dependency
-# on the Python implementation.
-#
-# Example value:
-# @CODE
-# /usr/lib64/libpython2.7.so
-# @CODE
-
-# @ECLASS-VARIABLE: PYTHON_CFLAGS
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# Proper C compiler flags for building against Python. Obtained from
-# pkg-config or python-config.
-#
-# 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
-# -I/usr/include/python2.7
-# @CODE
-
-# @ECLASS-VARIABLE: PYTHON_LIBS
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# Proper C compiler flags for linking against Python. Obtained from
-# pkg-config or python-config.
-#
-# 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
-# -lpython2.7
-# @CODE
-
-# @ECLASS-VARIABLE: PYTHON_CONFIG
-# @DEFAULT_UNSET
+# @FUNCTION: python_export
+# @USAGE: [<impl>] <variables>...
+# @INTERNAL
# @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
+# Backwards compatibility function. The relevant API is now considered
+# private, please use python_get* instead.
+python_export() {
+ debug-print-function ${FUNCNAME} "${@}"
-# @ECLASS-VARIABLE: PYTHON_PKG_DEP
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# The complete dependency on a particular Python package as a string.
-#
-# Set and exported on request using python_export().
-#
-# Example value:
-# @CODE
-# dev-lang/python:2.7[xml]
-# @CODE
+ eqawarn "python_export() is part of private eclass API."
+ eqawarn "Please call python_get*() instead."
-# @ECLASS-VARIABLE: PYTHON_SCRIPTDIR
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# The location where Python scripts must be installed for current impl.
-#
-# Set and exported on request using python_export().
-#
-# Example value:
-# @CODE
-# /usr/lib/python-exec/python2.7
-# @CODE
+ _python_export "${@}"
+}
-# @FUNCTION: python_export
+# @FUNCTION: _python_export
# @USAGE: [<impl>] <variables>...
+# @INTERNAL
# @DESCRIPTION:
# Set and export the Python implementation-relevant variables passed
# as parameters.
@@ -350,7 +258,7 @@ _python_impl_matches() {
# The variables which can be exported are: PYTHON, EPYTHON,
# PYTHON_SITEDIR. They are described more completely in the eclass
# variable documentation.
-python_export() {
+_python_export() {
debug-print-function ${FUNCNAME} "${@}"
local impl var
@@ -367,7 +275,7 @@ python_export() {
*)
impl=${EPYTHON}
if [[ -z ${impl} ]]; then
- die "python_export called without a python implementation and EPYTHON is unset"
+ die "_python_export called without a python implementation and EPYTHON is unset"
fi
;;
esac
@@ -495,7 +403,7 @@ python_export() {
debug-print "${FUNCNAME}: PYTHON_SCRIPTDIR = ${PYTHON_SCRIPTDIR}"
;;
*)
- die "python_export: unknown variable ${var}"
+ die "_python_export: unknown variable ${var}"
esac
done
}
@@ -506,13 +414,10 @@ python_export() {
# Obtain and print the 'site-packages' path for the given
# implementation. If no implementation is provided, ${EPYTHON} will
# be used.
-#
-# If you just need to have PYTHON_SITEDIR set (and exported), then it is
-# better to use python_export() directly instead.
python_get_sitedir() {
debug-print-function ${FUNCNAME} "${@}"
- python_export "${@}" PYTHON_SITEDIR
+ _python_export "${@}" PYTHON_SITEDIR
echo "${PYTHON_SITEDIR}"
}
@@ -521,13 +426,10 @@ python_get_sitedir() {
# @DESCRIPTION:
# Obtain and print the include path for the given implementation. If no
# implementation is provided, ${EPYTHON} will be used.
-#
-# If you just need to have PYTHON_INCLUDEDIR set (and exported), then it
-# is better to use python_export() directly instead.
python_get_includedir() {
debug-print-function ${FUNCNAME} "${@}"
- python_export "${@}" PYTHON_INCLUDEDIR
+ _python_export "${@}" PYTHON_INCLUDEDIR
echo "${PYTHON_INCLUDEDIR}"
}
@@ -542,7 +444,7 @@ python_get_includedir() {
python_get_library_path() {
debug-print-function ${FUNCNAME} "${@}"
- python_export "${@}" PYTHON_LIBPATH
+ _python_export "${@}" PYTHON_LIBPATH
echo "${PYTHON_LIBPATH}"
}
@@ -559,7 +461,7 @@ python_get_library_path() {
python_get_CFLAGS() {
debug-print-function ${FUNCNAME} "${@}"
- python_export "${@}" PYTHON_CFLAGS
+ _python_export "${@}" PYTHON_CFLAGS
echo "${PYTHON_CFLAGS}"
}
@@ -576,7 +478,7 @@ python_get_CFLAGS() {
python_get_LIBS() {
debug-print-function ${FUNCNAME} "${@}"
- python_export "${@}" PYTHON_LIBS
+ _python_export "${@}" PYTHON_LIBS
echo "${PYTHON_LIBS}"
}
@@ -593,7 +495,7 @@ python_get_LIBS() {
python_get_PYTHON_CONFIG() {
debug-print-function ${FUNCNAME} "${@}"
- python_export "${@}" PYTHON_CONFIG
+ _python_export "${@}" PYTHON_CONFIG
echo "${PYTHON_CONFIG}"
}
@@ -606,7 +508,7 @@ python_get_PYTHON_CONFIG() {
python_get_scriptdir() {
debug-print-function ${FUNCNAME} "${@}"
- python_export "${@}" PYTHON_SCRIPTDIR
+ _python_export "${@}" PYTHON_SCRIPTDIR
echo "${PYTHON_SCRIPTDIR}"
}
@@ -671,7 +573,7 @@ python_optimize() {
[[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).'
local PYTHON=${PYTHON}
- [[ ${PYTHON} ]] || python_export PYTHON
+ [[ ${PYTHON} ]] || _python_export PYTHON
# default to sys.path
if [[ ${#} -eq 0 ]]; then
@@ -774,9 +676,8 @@ python_newexe() {
local f=${1}
local newfn=${2}
- local PYTHON_SCRIPTDIR d
- python_export PYTHON_SCRIPTDIR
- d=${PYTHON_SCRIPTDIR#${EPREFIX}}
+ local scriptdir=$(python_get_scriptdir)
+ local d=${scriptdir#${EPREFIX}}
(
dodir "${wrapd}"
@@ -902,10 +803,8 @@ python_domodule() {
d=${python_moduleroot}
else
# relative to site-packages
- local PYTHON_SITEDIR=${PYTHON_SITEDIR}
- [[ ${PYTHON_SITEDIR} ]] || python_export PYTHON_SITEDIR
-
- d=${PYTHON_SITEDIR#${EPREFIX}}/${python_moduleroot//.//}
+ local sitedir=$(python_get_sitedir)
+ d=${sitedir#${EPREFIX}}/${python_moduleroot//.//}
fi
(
@@ -935,10 +834,8 @@ python_doheader() {
[[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).'
- local d PYTHON_INCLUDEDIR=${PYTHON_INCLUDEDIR}
- [[ ${PYTHON_INCLUDEDIR} ]] || python_export PYTHON_INCLUDEDIR
-
- d=${PYTHON_INCLUDEDIR#${EPREFIX}}
+ local includedir=$(python_get_includedir)
+ local d=${includedir#${EPREFIX}}
(
insopts -m 0644
@@ -950,6 +847,21 @@ python_doheader() {
# @FUNCTION: python_wrapper_setup
# @USAGE: [<path> [<impl>]]
# @DESCRIPTION:
+# Backwards compatibility function. The relevant API is now considered
+# private, please use python_setup instead.
+python_wrapper_setup() {
+ debug-print-function ${FUNCNAME} "${@}"
+
+ eqawarn "python_wrapper_setup() is part of private eclass API."
+ eqawarn "Please call python_setup() instead."
+
+ _python_wrapper_setup "${@}"
+}
+
+# @FUNCTION: _python_wrapper_setup
+# @USAGE: [<path> [<impl>]]
+# @INTERNAL
+# @DESCRIPTION:
# Create proper 'python' executable and pkg-config wrappers
# (if available) in the directory named by <path>. Set up PATH
# and PKG_CONFIG_PATH appropriately. <path> defaults to ${T}/${EPYTHON}.
@@ -961,7 +873,7 @@ python_doheader() {
# be assumed to contain proper wrappers already and only environment
# setup will be done. If wrapper update is requested, the directory
# shall be removed first.
-python_wrapper_setup() {
+_python_wrapper_setup() {
debug-print-function ${FUNCNAME} "${@}"
local workdir=${1:-${T}/${EPYTHON}}
@@ -981,7 +893,7 @@ python_wrapper_setup() {
rm -f "${workdir}"/pkgconfig/python{2,3}{,-embed}.pc || die
local EPYTHON PYTHON
- python_export "${impl}" EPYTHON PYTHON
+ _python_export "${impl}" EPYTHON PYTHON
local pyver pyother
if python_is_python3; then
@@ -1091,7 +1003,7 @@ python_is_installed() {
esac
local PYTHON_PKG_DEP
- python_export "${impl}" PYTHON_PKG_DEP
+ _python_export "${impl}" PYTHON_PKG_DEP
has_version "${hasv_args[@]}" "${PYTHON_PKG_DEP}"
}
diff --git a/eclass/tests/python-utils-r1.sh b/eclass/tests/python-utils-r1.sh
index 4367890a08a1..2ce425be15e6 100755
--- a/eclass/tests/python-utils-r1.sh
+++ b/eclass/tests/python-utils-r1.sh
@@ -13,7 +13,7 @@ test_var() {
tbegin "${var} for ${impl}"
local ${var}
- python_export ${impl} PYTHON ${var}
+ _python_export ${impl} PYTHON ${var}
[[ ${!var} == ${expect} ]] || eerror "(${impl}: ${var}: ${!var} != ${expect}"
tend ${?}
diff --git a/metadata/install-qa-check.d/60python-pyc b/metadata/install-qa-check.d/60python-pyc
index 644c27243cd2..b2af142fc491 100644
--- a/metadata/install-qa-check.d/60python-pyc
+++ b/metadata/install-qa-check.d/60python-pyc
@@ -10,7 +10,7 @@ if [[ ${EAPI} == [5-7] ]]; then
python_pyc_check() {
local impl missing=() outdated=()
for impl in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do
- python_export "${impl}" EPYTHON PYTHON
+ _python_export "${impl}" EPYTHON PYTHON
[[ -x ${PYTHON} ]] || continue
local sitedir=$(python_get_sitedir "${impl}")