summaryrefslogtreecommitdiff
path: root/eclass/distutils-r1.eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-05-08 14:01:34 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-05-08 14:01:34 +0100
commit4645b6f17f0da81e9fe84081fb126a37102ba153 (patch)
treee6c48cf3db2213af38cf528a5364fffd5c74c6d6 /eclass/distutils-r1.eclass
parentebce8994fe3cc4ca9fbc96ca837cb4c4e98adcbd (diff)
gentoo resync : 08.05.2018
Diffstat (limited to 'eclass/distutils-r1.eclass')
-rw-r--r--eclass/distutils-r1.eclass25
1 files changed, 15 insertions, 10 deletions
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index dd0c429d50fc..975383acc09b 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: distutils-r1.eclass
@@ -46,7 +46,7 @@ case "${EAPI:-0}" in
0|1|2|3|4)
die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}"
;;
- 5|6)
+ 5|6|7)
;;
*)
die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
@@ -79,7 +79,8 @@ esac
if [[ ! ${_DISTUTILS_R1} ]]; then
[[ ${EAPI} == [45] ]] && inherit eutils
-inherit toolchain-funcs xdg-utils
+[[ ${EAPI} == [56] ]] && inherit xdg-utils
+inherit toolchain-funcs
if [[ ! ${DISTUTILS_SINGLE_IMPL} ]]; then
inherit multiprocessing python-r1
@@ -97,7 +98,11 @@ if [[ ! ${_DISTUTILS_R1} ]]; then
if [[ ! ${DISTUTILS_OPTIONAL} ]]; then
RDEPEND=${PYTHON_DEPS}
- DEPEND=${PYTHON_DEPS}
+ if [[ ${EAPI} != [56] ]]; then
+ BDEPEND=${PYTHON_DEPS}
+ else
+ DEPEND=${PYTHON_DEPS}
+ fi
REQUIRED_USE=${PYTHON_REQUIRED_USE}
fi
@@ -230,7 +235,7 @@ fi
# @USAGE: [<args>...]
# @DESCRIPTION:
# Run setup.py using currently selected Python interpreter
-# (if ${PYTHON} is set; fallback 'python' otherwise).
+# (if ${EPYTHON} is set; fallback 'python' otherwise).
#
# setup.py will be passed the following, in order:
# 1. ${mydistutilsargs[@]}
@@ -249,7 +254,7 @@ esetup.py() {
[[ ${BUILD_DIR} ]] && _distutils-r1_create_setup_cfg
- set -- "${PYTHON:-python}" setup.py "${mydistutilsargs[@]}" "${@}"
+ set -- "${EPYTHON:-python}" setup.py "${mydistutilsargs[@]}" "${@}"
echo "${@}" >&2
"${@}" || die "${die_args[@]}"
@@ -412,7 +417,7 @@ _distutils-r1_create_setup_cfg() {
[install]
compile = True
optimize = 2
- root = ${D}
+ root = ${D%/}
_EOF_
if [[ ! ${DISTUTILS_SINGLE_IMPL} ]]; then
@@ -582,7 +587,7 @@ distutils-r1_python_install() {
if [[ ! ${DISTUTILS_SINGLE_IMPL} ]]; then
_distutils-r1_wrap_scripts "${root}" "${scriptdir}"
- multibuild_merge_root "${root}" "${D}"
+ multibuild_merge_root "${root}" "${D%/}"
fi
}
@@ -739,7 +744,7 @@ distutils-r1_src_prepare() {
distutils-r1_src_configure() {
python_export_utf8_locale
- xdg_environment_reset # Bug 577704
+ [[ ${EAPI} == [56] ]] && xdg_environment_reset # Bug 577704
if declare -f python_configure >/dev/null; then
_distutils-r1_run_foreach_impl python_configure
@@ -797,7 +802,7 @@ _distutils-r1_check_namespace_pth() {
while IFS= read -r -d '' f; do
pth+=( "${f}" )
- done < <(find "${ED}" -name '*-nspkg.pth' -print0)
+ done < <(find "${ED%/}" -name '*-nspkg.pth' -print0)
if [[ ${pth[@]} ]]; then
ewarn "The following *-nspkg.pth files were found installed:"