Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: python@g.o, "Michał Górny" <mgorny@g.o>
Subject: [gentoo-dev] [PATCH 2/3] python-utils-r1.eclass: Replace python_export with getters
Date: Fri, 20 Mar 2020 08:22:46
Message-Id: 20200320082202.86763-2-mgorny@gentoo.org
In Reply to: [gentoo-dev] [PATCH 1/3] distutils-r1.eclass: Replace python_export with getter by "Michał Górny"
1 Signed-off-by: Michał Górny <mgorny@g.o>
2 ---
3 eclass/python-utils-r1.eclass | 17 ++++++-----------
4 1 file changed, 6 insertions(+), 11 deletions(-)
5
6 diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
7 index e6c6ac1155f2..064114b4faa3 100644
8 --- a/eclass/python-utils-r1.eclass
9 +++ b/eclass/python-utils-r1.eclass
10 @@ -774,9 +774,8 @@ python_newexe() {
11 local f=${1}
12 local newfn=${2}
13
14 - local PYTHON_SCRIPTDIR d
15 - python_export PYTHON_SCRIPTDIR
16 - d=${PYTHON_SCRIPTDIR#${EPREFIX}}
17 + local scriptdir=$(python_get_scriptdir)
18 + local d=${scriptdir#${EPREFIX}}
19
20 (
21 dodir "${wrapd}"
22 @@ -902,10 +901,8 @@ python_domodule() {
23 d=${python_moduleroot}
24 else
25 # relative to site-packages
26 - local PYTHON_SITEDIR=${PYTHON_SITEDIR}
27 - [[ ${PYTHON_SITEDIR} ]] || python_export PYTHON_SITEDIR
28 -
29 - d=${PYTHON_SITEDIR#${EPREFIX}}/${python_moduleroot//.//}
30 + local sitedir=$(python_get_sitedir)
31 + d=${sitedir#${EPREFIX}}/${python_moduleroot//.//}
32 fi
33
34 (
35 @@ -935,10 +932,8 @@ python_doheader() {
36
37 [[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).'
38
39 - local d PYTHON_INCLUDEDIR=${PYTHON_INCLUDEDIR}
40 - [[ ${PYTHON_INCLUDEDIR} ]] || python_export PYTHON_INCLUDEDIR
41 -
42 - d=${PYTHON_INCLUDEDIR#${EPREFIX}}
43 + local includedir=$(python_get_includedir)
44 + local d=${includedir#${EPREFIX}}
45
46 (
47 insopts -m 0644
48 --
49 2.25.2