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 04/28] python-utils-r1.eclass: Rename *into vars to use underscores
Date: Sun, 20 Jun 2021 09:57:34
Message-Id: 20210620095552.625633-5-mgorny@gentoo.org
In Reply to: [gentoo-dev] [PATCH 00/28] python-r1 suite EAPI 8 support/cleanup by "Michał Górny"
1 Rename helper variables used by *into to mark them private with
2 underscores. The old names are leftovers from deprecated API that
3 permitted setting them directly. It was last used in ::gentoo in 2016.
4
5 Signed-off-by: Michał Górny <mgorny@g.o>
6 ---
7 eclass/python-utils-r1.eclass | 12 ++++++------
8 1 file changed, 6 insertions(+), 6 deletions(-)
9
10 diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
11 index ad8d368e27c7..464e8c19b8ac 100644
12 --- a/eclass/python-utils-r1.eclass
13 +++ b/eclass/python-utils-r1.eclass
14 @@ -659,7 +659,7 @@ python_optimize() {
15 python_scriptinto() {
16 debug-print-function ${FUNCNAME} "${@}"
17
18 - python_scriptroot=${1}
19 + _PYTHON_SCRIPTROOT=${1}
20 }
21
22 # @FUNCTION: python_doexe
23 @@ -694,7 +694,7 @@ python_newexe() {
24 [[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).'
25 [[ ${#} -eq 2 ]] || die "Usage: ${FUNCNAME} <path> <new-name>"
26
27 - local wrapd=${python_scriptroot:-/usr/bin}
28 + local wrapd=${_PYTHON_SCRIPTROOT:-/usr/bin}
29
30 local f=${1}
31 local newfn=${2}
32 @@ -802,7 +802,7 @@ python_newscript() {
33 python_moduleinto() {
34 debug-print-function ${FUNCNAME} "${@}"
35
36 - python_moduleroot=${1}
37 + _PYTHON_MODULEROOT=${1}
38 }
39
40 # @FUNCTION: python_domodule
41 @@ -826,13 +826,13 @@ python_domodule() {
42 [[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).'
43
44 local d
45 - if [[ ${python_moduleroot} == /* ]]; then
46 + if [[ ${_PYTHON_MODULEROOT} == /* ]]; then
47 # absolute path
48 - d=${python_moduleroot}
49 + d=${_PYTHON_MODULEROOT}
50 else
51 # relative to site-packages
52 local sitedir=$(python_get_sitedir)
53 - d=${sitedir#${EPREFIX}}/${python_moduleroot//.//}
54 + d=${sitedir#${EPREFIX}}/${_PYTHON_MODULEROOT//.//}
55 fi
56
57 (
58 --
59 2.32.0