From 197f0639ca0a63b397552e059e2a992d39e09e55 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 17 Jun 2023 13:44:44 +0100 Subject: gentoo auto-resync : 17:06:2023 - 13:44:44 --- eclass/pypi.eclass | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'eclass/pypi.eclass') diff --git a/eclass/pypi.eclass b/eclass/pypi.eclass index 8a842c450ebc..594216a7fd96 100644 --- a/eclass/pypi.eclass +++ b/eclass/pypi.eclass @@ -70,14 +70,12 @@ _PYPI_ECLASS=1 # Internal normalization function, returns the result # via _PYPI_NORMALIZED_NAME variable. _pypi_normalize_name() { - local name=${1} - if shopt -p -q extglob; then - name=${name//+([._-])/_} - else - shopt -s extglob - name=${name//+([._-])/_} - shopt -u extglob - fi + # NB: it's fine to alter it unconditionally since this function is + # always called from a subshell or in global scope + # (via _pypi_set_globals) + shopt -s extglob + local name=${1//+([._-])/_} + shopt -u extglob _PYPI_NORMALIZED_NAME="${name,,}" } -- cgit v1.2.3