Skip to content

Commit e787e1b

Browse files
jagapioucopybara-github
authored andcommitted
Ensure distribution name is normalized when sent to PyPI.
PiperOrigin-RevId: 700378288 Change-Id: Ia1b7f8c0a0109afe8e130bef499ee7e850a090ef
1 parent 663653f commit e787e1b

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/workflows/pypi-publish.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,14 @@ jobs:
3636
python --version
3737
pip list
3838
- name: Build distribution
39-
run: python setup.py sdist
39+
run: |
40+
python setup.py sdist
41+
# Workaround old setuptools not normalizing name in sdist.
42+
for OLD in ./dist/dm-meltingpot-*; do
43+
NEW="$(echo "$OLD" | sed s/dm-meltingpot/dm_meltingpot/)"
44+
mv "$OLD" "$NEW"
45+
done
46+
ls dist/*
4047
- name: Save artifact
4148
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874
4249
with:

0 commit comments

Comments
 (0)