Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix handling of direct URL specifiers in requirements #250

Merged
merged 2 commits into from
Sep 23, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions tests/test_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ def test_pkginfo_to_metadata(tmpdir):
('Provides-Extra', 'test'),
('Provides-Extra', 'signatures'),
('Provides-Extra', 'faster-signatures'),
('Requires-Dist', "pip @ https://github.com/pypa/pip/archive/1.3.1.zip"),
('Requires-Dist', "ed25519ll; extra == 'faster-signatures'"),
('Requires-Dist', "keyring; extra == 'signatures'"),
('Requires-Dist', "keyrings.alt; extra == 'signatures'"),
Expand All @@ -28,6 +29,8 @@ def test_pkginfo_to_metadata(tmpdir):

egg_info_dir = tmpdir.ensure_dir('test.egg-info')
egg_info_dir.join('requires.txt').write("""\
pip@https://github.com/pypa/pip/archive/1.3.1.zip

[faster-signatures]
ed25519ll

Expand Down
5 changes: 4 additions & 1 deletion wheel/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@


def requires_to_requires_dist(requirement):
"""Compose the version predicates for requirement in PEP 345 fashion."""
"""Return the version specifier for a requirement in PEP 345/566 fashion."""
if requirement.url:
return " @ " + requirement.url

requires_dist = []
for op, ver in requirement.specs:
requires_dist.append(op + ver)
Expand Down