summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2020-03-20 09:10:44 +0100
committerMichał Górny <mgorny@gentoo.org>2020-03-22 06:36:57 +0100
commita2c4b916fbfe397183e1e163888a30d367d4980a (patch)
tree1ded157758921dd4673caaef410eefbdc0d62080 /eclass/python-utils-r1.eclass
parentdistutils-r1.eclass: Replace python_export with getter (diff)
downloadgentoo-a2c4b916fbfe397183e1e163888a30d367d4980a.tar.gz
gentoo-a2c4b916fbfe397183e1e163888a30d367d4980a.tar.bz2
gentoo-a2c4b916fbfe397183e1e163888a30d367d4980a.zip
python-utils-r1.eclass: Replace python_export with getters
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'eclass/python-utils-r1.eclass')
-rw-r--r--eclass/python-utils-r1.eclass17
1 files changed, 6 insertions, 11 deletions
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index e6c6ac1155f2..064114b4faa3 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -774,9 +774,8 @@ python_newexe() {
local f=${1}
local newfn=${2}
- local PYTHON_SCRIPTDIR d
- python_export PYTHON_SCRIPTDIR
- d=${PYTHON_SCRIPTDIR#${EPREFIX}}
+ local scriptdir=$(python_get_scriptdir)
+ local d=${scriptdir#${EPREFIX}}
(
dodir "${wrapd}"
@@ -902,10 +901,8 @@ python_domodule() {
d=${python_moduleroot}
else
# relative to site-packages
- local PYTHON_SITEDIR=${PYTHON_SITEDIR}
- [[ ${PYTHON_SITEDIR} ]] || python_export PYTHON_SITEDIR
-
- d=${PYTHON_SITEDIR#${EPREFIX}}/${python_moduleroot//.//}
+ local sitedir=$(python_get_sitedir)
+ d=${sitedir#${EPREFIX}}/${python_moduleroot//.//}
fi
(
@@ -935,10 +932,8 @@ python_doheader() {
[[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).'
- local d PYTHON_INCLUDEDIR=${PYTHON_INCLUDEDIR}
- [[ ${PYTHON_INCLUDEDIR} ]] || python_export PYTHON_INCLUDEDIR
-
- d=${PYTHON_INCLUDEDIR#${EPREFIX}}
+ local includedir=$(python_get_includedir)
+ local d=${includedir#${EPREFIX}}
(
insopts -m 0644