Skip to content

Commit 20162b5

Browse files
committed
workflows: upload source archive to PyPI as openslide_bin-*
PyPI now rejects a non-normalized package name in the source filename: Uploading openslide-bin-4.0.0.9.tar.gz WARNING Error during upload. Retry with the --verbose option for more details. ERROR HTTPError: 400 Bad Request from https://upload.pypi.org/legacy/ Filename 'openslide-bin-4.0.0.9.tar.gz' is invalid, should be 'openslide_bin-4.0.0.9.tar.gz'. Rename the source tarball for PyPI but not for the GitHub release. The only reason we put source code on PyPI is for license compliance, since source builds through meson-python are designed to fail. The Source Distribution Format spec suggests that the top-level directory name should be similarly normalized, but this isn't enforced (yet) so ignore it for now. We'd have to repack the output of `meson dist`, either for PyPI or for everyone, and accept additional inconsistency in the layout of the source archive. Signed-off-by: Benjamin Gilbert <bgilbert@cs.cmu.edu>
1 parent 2f99b18 commit 20162b5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ jobs:
7575
mkdir pypi
7676
cp -a \
7777
"upload/openslide-bin-${{ needs.stable.outputs.version }}.tar.gz" \
78-
upload/*.whl pypi/
78+
"pypi/openslide_bin-${{ needs.stable.outputs.version }}.tar.gz"
79+
cp -a upload/*.whl pypi/
7980
- name: Release to PyPI
8081
uses: pypa/gh-action-pypi-publish@release/v1
8182
with:

0 commit comments

Comments
 (0)