Skip to content

Commit

Permalink
Don't wrap version specifiers in parens in Requires-Dist
Browse files Browse the repository at this point in the history
Fixes #551.
  • Loading branch information
agronholm committed Aug 5, 2023
1 parent fbd385c commit d29c8a6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions docs/news.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Release Notes

- Fixed naming of the ``data_dir`` directory in the presence of local version segment
given via ``egg_info.tag_build`` (PR by Anderson Bravalheri)
- Fixed version specifiers in ``Requires-Dist`` being wrapped in parentheses

**0.41.0 (2023-07-22)**

Expand Down
2 changes: 1 addition & 1 deletion src/wheel/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def requires_to_requires_dist(requirement: Requirement) -> str:
requires_dist.append(spec.operator + spec.version)

if requires_dist:
return " (" + ",".join(sorted(requires_dist)) + ")"
return " " + ",".join(sorted(requires_dist))
else:
return ""

Expand Down
4 changes: 2 additions & 2 deletions tests/test_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ def test_pkginfo_to_metadata(tmp_path):
("Provides-Extra", "faster-signatures"),
("Requires-Dist", "ed25519ll ; extra == 'faster-signatures'"),
("Provides-Extra", "rest"),
("Requires-Dist", "docutils (>=0.8) ; extra == 'rest'"),
("Requires-Dist", "docutils >=0.8 ; extra == 'rest'"),
("Requires-Dist", "keyring ; extra == 'signatures'"),
("Requires-Dist", "keyrings.alt ; extra == 'signatures'"),
("Provides-Extra", "test"),
("Requires-Dist", "pytest (>=3.0.0) ; extra == 'test'"),
("Requires-Dist", "pytest >=3.0.0 ; extra == 'test'"),
("Requires-Dist", "pytest-cov ; extra == 'test'"),
]

Expand Down

0 comments on commit d29c8a6

Please sign in to comment.