Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Sat, 28 Nov 2015 19:09:58
Message-Id: 1448737746.a2c3f26426b435b090b19057d52ceec5364b19ed.mgorny@gentoo
1 commit: a2c3f26426b435b090b19057d52ceec5364b19ed
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Wed Nov 18 19:41:29 2015 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sat Nov 28 19:09:06 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a2c3f264
7
8 python-utils-r1.eclass: Ban installation helpers in EAPIs < 5
9
10 Ban python_do* and python_new* helpers in EAPIs older than 5. We should
11 ban them in python-any-r1 uses, actually but that would break
12 dev-python/pypy* ebuilds as they are written now.
13
14 eclass/python-utils-r1.eclass | 9 +++++++++
15 1 file changed, 9 insertions(+)
16
17 diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
18 index f27fdf0..236df89 100644
19 --- a/eclass/python-utils-r1.eclass
20 +++ b/eclass/python-utils-r1.eclass
21 @@ -665,6 +665,9 @@ python_newexe() {
22
23 [[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).'
24 [[ ${#} -eq 2 ]] || die "Usage: ${FUNCNAME} <path> <new-name>"
25 + if [[ ${EAPI:-0} == [01234] ]]; then
26 + die "python_do* and python_new* helpers are banned in EAPIs older than 5."
27 + fi
28
29 local wrapd=${python_scriptroot:-${DESTTREE}/bin}
30
31 @@ -792,6 +795,9 @@ python_domodule() {
32 debug-print-function ${FUNCNAME} "${@}"
33
34 [[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).'
35 + if [[ ${EAPI:-0} == [01234] ]]; then
36 + die "python_do* and python_new* helpers are banned in EAPIs older than 5."
37 + fi
38
39 local d
40 if [[ ${python_moduleroot} == /* ]]; then
41 @@ -830,6 +836,9 @@ python_doheader() {
42 debug-print-function ${FUNCNAME} "${@}"
43
44 [[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).'
45 + if [[ ${EAPI:-0} == [01234] ]]; then
46 + die "python_do* and python_new* helpers are banned in EAPIs older than 5."
47 + fi
48
49 local d PYTHON_INCLUDEDIR=${PYTHON_INCLUDEDIR}
50 [[ ${PYTHON_INCLUDEDIR} ]] || python_export PYTHON_INCLUDEDIR