diff options
author | Michał Górny <mgorny@gentoo.org> | 2023-06-12 21:23:41 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2023-06-15 14:19:21 +0200 |
commit | 87807b72eb990e9f9dd8b768c1b9ea0d054a0118 (patch) | |
tree | 4417fc3e5a4e5cb89cb6107ed3c34a2235fe51ed /eclass/pypi.eclass | |
parent | app-containers/lxd: add new optfeature for rsync (diff) | |
download | gentoo-87807b72eb990e9f9dd8b768c1b9ea0d054a0118.tar.gz gentoo-87807b72eb990e9f9dd8b768c1b9ea0d054a0118.tar.bz2 gentoo-87807b72eb990e9f9dd8b768c1b9ea0d054a0118.zip |
pypi.eclass: Move setting globals to a function
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'eclass/pypi.eclass')
-rw-r--r-- | eclass/pypi.eclass | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/eclass/pypi.eclass b/eclass/pypi.eclass index 13dd56fa4fec..732b0c6184ef 100644 --- a/eclass/pypi.eclass +++ b/eclass/pypi.eclass @@ -221,12 +221,20 @@ pypi_wheel_url() { fi } -if [[ ${PYPI_NO_NORMALIZE} ]]; then - SRC_URI="$(pypi_sdist_url --no-normalize)" - S="${WORKDIR}/${PYPI_PN}-$(pypi_translate_version "${PV}")" -else - SRC_URI="$(pypi_sdist_url)" - S="${WORKDIR}/$(pypi_normalize_name "${PYPI_PN}")-$(pypi_translate_version "${PV}")" -fi +# @FUNCTION: _pypi_set_globals +# @INTERNAL +# @DESCRIPTION: +# Set global variables, SRC_URI and S. +_pypi_set_globals() { + if [[ ${PYPI_NO_NORMALIZE} ]]; then + SRC_URI="$(pypi_sdist_url --no-normalize)" + S="${WORKDIR}/${PYPI_PN}-$(pypi_translate_version "${PV}")" + else + SRC_URI="$(pypi_sdist_url)" + S="${WORKDIR}/$(pypi_normalize_name "${PYPI_PN}")-$(pypi_translate_version "${PV}")" + fi +} + +_pypi_set_globals fi |