Mailing List Archive

[PATCH 04/28] python-utils-r1.eclass: Rename *into vars to use underscores
Rename helper variables used by *into to mark them private with
underscores. The old names are leftovers from deprecated API that
permitted setting them directly. It was last used in ::gentoo in 2016.

Signed-off-by: Micha? Górny <mgorny@gentoo.org>
---
eclass/python-utils-r1.eclass | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index ad8d368e27c7..464e8c19b8ac 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -659,7 +659,7 @@ python_optimize() {
python_scriptinto() {
debug-print-function ${FUNCNAME} "${@}"

- python_scriptroot=${1}
+ _PYTHON_SCRIPTROOT=${1}
}

# @FUNCTION: python_doexe
@@ -694,7 +694,7 @@ python_newexe() {
[[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).'
[[ ${#} -eq 2 ]] || die "Usage: ${FUNCNAME} <path> <new-name>"

- local wrapd=${python_scriptroot:-/usr/bin}
+ local wrapd=${_PYTHON_SCRIPTROOT:-/usr/bin}

local f=${1}
local newfn=${2}
@@ -802,7 +802,7 @@ python_newscript() {
python_moduleinto() {
debug-print-function ${FUNCNAME} "${@}"

- python_moduleroot=${1}
+ _PYTHON_MODULEROOT=${1}
}

# @FUNCTION: python_domodule
@@ -826,13 +826,13 @@ python_domodule() {
[[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).'

local d
- if [[ ${python_moduleroot} == /* ]]; then
+ if [[ ${_PYTHON_MODULEROOT} == /* ]]; then
# absolute path
- d=${python_moduleroot}
+ d=${_PYTHON_MODULEROOT}
else
# relative to site-packages
local sitedir=$(python_get_sitedir)
- d=${sitedir#${EPREFIX}}/${python_moduleroot//.//}
+ d=${sitedir#${EPREFIX}}/${_PYTHON_MODULEROOT//.//}
fi

(
--
2.32.0