Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: "Michał Górny" <mgorny@g.o>
Subject: [gentoo-dev] [PATCH 7/7] distutils-r1.eclass: Enable EAPI 7 support
Date: Thu, 03 May 2018 14:16:00
Message-Id: 20180503141248.26762-8-mgorny@gentoo.org
In Reply to: [gentoo-dev] [PATCH 0/7] Initial support for EAPI 7 for python-r1 suite by "Michał Górny"
1 Support EAPI 7. Move PYTHON_DEPS from DEPEND to BDEPEND. Fix trailing
2 slash uses for D/ED.
3 ---
4 eclass/distutils-r1.eclass | 14 +++++++++-----
5 1 file changed, 9 insertions(+), 5 deletions(-)
6
7 diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
8 index 26fa0069a73d..975383acc09b 100644
9 --- a/eclass/distutils-r1.eclass
10 +++ b/eclass/distutils-r1.eclass
11 @@ -46,7 +46,7 @@ case "${EAPI:-0}" in
12 0|1|2|3|4)
13 die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}"
14 ;;
15 - 5|6)
16 + 5|6|7)
17 ;;
18 *)
19 die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
20 @@ -98,7 +98,11 @@ if [[ ! ${_DISTUTILS_R1} ]]; then
21
22 if [[ ! ${DISTUTILS_OPTIONAL} ]]; then
23 RDEPEND=${PYTHON_DEPS}
24 - DEPEND=${PYTHON_DEPS}
25 + if [[ ${EAPI} != [56] ]]; then
26 + BDEPEND=${PYTHON_DEPS}
27 + else
28 + DEPEND=${PYTHON_DEPS}
29 + fi
30 REQUIRED_USE=${PYTHON_REQUIRED_USE}
31 fi
32
33 @@ -413,7 +417,7 @@ _distutils-r1_create_setup_cfg() {
34 [install]
35 compile = True
36 optimize = 2
37 - root = ${D}
38 + root = ${D%/}
39 _EOF_
40
41 if [[ ! ${DISTUTILS_SINGLE_IMPL} ]]; then
42 @@ -583,7 +587,7 @@ distutils-r1_python_install() {
43
44 if [[ ! ${DISTUTILS_SINGLE_IMPL} ]]; then
45 _distutils-r1_wrap_scripts "${root}" "${scriptdir}"
46 - multibuild_merge_root "${root}" "${D}"
47 + multibuild_merge_root "${root}" "${D%/}"
48 fi
49 }
50
51 @@ -798,7 +802,7 @@ _distutils-r1_check_namespace_pth() {
52
53 while IFS= read -r -d '' f; do
54 pth+=( "${f}" )
55 - done < <(find "${ED}" -name '*-nspkg.pth' -print0)
56 + done < <(find "${ED%/}" -name '*-nspkg.pth' -print0)
57
58 if [[ ${pth[@]} ]]; then
59 ewarn "The following *-nspkg.pth files were found installed:"
60 --
61 2.17.0