diff --git a/tests/test_metadata.py b/tests/test_metadata.py index 34214302..78fe40db 100644 --- a/tests/test_metadata.py +++ b/tests/test_metadata.py @@ -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'"), @@ -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 diff --git a/wheel/metadata.py b/wheel/metadata.py index 4fa17cde..c6a37364 100644 --- a/wheel/metadata.py +++ b/wheel/metadata.py @@ -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)