Skip to content

Commit 6dfd9c0

Browse files
committed
Force CI to not use broken twine 5.1.0 distribution.
pypa/twine#1125
1 parent 490ce8b commit 6dfd9c0

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

.github/workflows/release_build.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,8 +365,20 @@ jobs:
365365
python -m pytest
366366
367367
- name: Build A Python Distribution
368+
# Note: We are explicitly using twine 5.0.0 here. There is a bug in twine 5.1.0 (released 5/16/2024) where they
369+
# are not populating the Home-page field in their distribution's wheel metadata file, which causes the twine
370+
# library it to fail on import with the following error:
371+
# Traceback (most recent call last):
372+
# File ".../twine", line 5, in <module>
373+
# from twine.__main__ import main
374+
# File ".../site-packages/twine/__init__.py", line 40, in <module>
375+
# __uri__ = metadata["home-page"]
376+
# ~~~~~~~~^^^^^^^^^^^^^
377+
# File ".../site-packages/importlib_metadata/_adapters.py", line 54, in __getitem__
378+
# raise KeyError(item)
379+
# KeyError: 'home-page'
368380
run: |
369-
pip install build twine
381+
pip install build==1.2.1 twine==5.0.0
370382
python -m build
371383
twine check dist/*
372384

0 commit comments

Comments
 (0)