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 06/29] python-utils-r1.eclass: Ban installation helpers in EAPIs < 5
Date: Sun, 22 Nov 2015 19:54:35
Message-Id: 1448221870-17269-7-git-send-email-mgorny@gentoo.org
In Reply to: [gentoo-dev] [PATCHES] Clean-up & EAPI 6 support for python-r1 suite by "Michał Górny"
1 Ban python_do* and python_new* helpers in EAPIs older than 5. We should
2 ban them in python-any-r1 uses, actually but that would break
3 dev-python/pypy* ebuilds as they are written now.
4 ---
5 eclass/python-utils-r1.eclass | 9 +++++++++
6 1 file changed, 9 insertions(+)
7
8 diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
9 index e690e09..99ee58b 100644
10 --- a/eclass/python-utils-r1.eclass
11 +++ b/eclass/python-utils-r1.eclass
12 @@ -662,6 +662,9 @@ python_newexe() {
13
14 [[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).'
15 [[ ${#} -eq 2 ]] || die "Usage: ${FUNCNAME} <path> <new-name>"
16 + if [[ ${EAPI:-0} == [01234] ]]; then
17 + die "python_do* and python_new* helpers are banned in EAPIs older than 5."
18 + fi
19
20 local wrapd=${python_scriptroot:-${DESTTREE}/bin}
21
22 @@ -789,6 +792,9 @@ python_domodule() {
23 debug-print-function ${FUNCNAME} "${@}"
24
25 [[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).'
26 + if [[ ${EAPI:-0} == [01234] ]]; then
27 + die "python_do* and python_new* helpers are banned in EAPIs older than 5."
28 + fi
29
30 local d
31 if [[ ${python_moduleroot} == /* ]]; then
32 @@ -827,6 +833,9 @@ python_doheader() {
33 debug-print-function ${FUNCNAME} "${@}"
34
35 [[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).'
36 + if [[ ${EAPI:-0} == [01234] ]]; then
37 + die "python_do* and python_new* helpers are banned in EAPIs older than 5."
38 + fi
39
40 local d PYTHON_INCLUDEDIR=${PYTHON_INCLUDEDIR}
41 [[ ${PYTHON_INCLUDEDIR} ]] || python_export PYTHON_INCLUDEDIR
42 --
43 2.6.3