From 94f018f1ba948d64d271509eb46ee316fb502c00 Mon Sep 17 00:00:00 2001 From: Predrag Gruevski <2348618+obi1kenobi@users.noreply.github.com> Date: Tue, 31 Oct 2023 12:40:34 -0400 Subject: [PATCH] Support release-testing packages with dashes in their names. (#12654) --- .github/workflows/_release.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/_release.yml b/.github/workflows/_release.yml index 35377b3db07..793081ae405 100644 --- a/.github/workflows/_release.yml +++ b/.github/workflows/_release.yml @@ -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: