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

Spurious "Provides-Extra:" generated in metadata #1292

Closed
wimglenn opened this issue Mar 16, 2018 · 0 comments
Closed

Spurious "Provides-Extra:" generated in metadata #1292

wimglenn opened this issue Mar 16, 2018 · 0 comments

Comments

@wimglenn
Copy link
Contributor

wimglenn commented Mar 16, 2018

In the recently released version of setuptools, when installing my distribution copyingmock, it claims that it provides the extras=['']. Of course, I don't provide the empty-string extra, and the correct metadata should be extras=[]. This seems to be related to using the conditional deps feature, somehow:

install_requires=["mock ; python_version<'3.3'"],

To reproduce the issue, you can get the sdist:

$ pip download copyingmock==0.2 --no-binary copyingmock

Then use git bisect with this script:

#!/usr/bin/env python
# check.py
import json
import subprocess
import sys
from zipfile import ZipFile

if __name__ == '__main__':
    subprocess.check_call(['pip', 'wheel', '--no-deps', '--no-index', './copyingmock-0.2.tar.gz'])
    whl = ZipFile('copyingmock-0.2-py2.py3-none-any.whl')
    metadata = json.loads(whl.read('copyingmock-0.2.dist-info/metadata.json'))
    print(metadata['extras'])

    if metadata['extras']:
        sys.exit(1)
    else:
        sys.exit(0)

I did bisect and found

$ git bisect start
$ git bisect bad tags/v38.6.0
$ git bisect good tags/v28.8.0
Bisecting: 375 revisions left to test after this (roughly 9 steps)
[2cd7f22eb62b413d65fe4208d66f7e2738f71a56] Correctly honor exist_ok. Ref #1083.
$ git bisect run ./check.py
...

b2ea3c4 is the first bad commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant