Support release-testing packages with dashes in their names. (#12654)

This commit is contained in:
Predrag Gruevski 2023-10-31 12:40:34 -04:00 committed by GitHub
parent 912ace18e9
commit 94f018f1ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -131,7 +131,11 @@ jobs:
--extra-index-url https://pypi.org/simple/ \
"$PKG_NAME==$VERSION"
python -c "import $PKG_NAME; print(dir($PKG_NAME))"
# Replace all dashes in the package name with underscores,
# since that's how Python imports packages with dashes in the name.
IMPORT_NAME="$(echo "$PKG_NAME" | sed s/-/_/g)"
python -c "import $IMPORT_NAME; print(dir($IMPORT_NAME))"
publish:
needs: