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

add wheel tag for py2-none-[arch] / py3-none-[arch] #2561

Merged
merged 2 commits into from Apr 7, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions pip/pep425tags.py
Expand Up @@ -113,6 +113,9 @@ def get_supported(versions=None, noarch=False):
for arch in arches:
supported.append(('%s%s' % (impl, versions[0]), abi, arch))

# Has binaries, does not use the Python API:
supported.append(('py%s' % (versions[0][0]), 'none', arch))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this code depends on the versions[0][0] input and on the arch... whats the right behaviour when noarch is false? A test for it might be to assert that
get_supported([['2']], False) results in ('py2', 'none', local_arch) in the output, and for get_support([['2]], True) to do ??? [whats the right thing here?].

We could make this more meaningfully testable by pushing all the calculation to pure functions, and having get_supported just do the querying and then call those functions

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've noticed that this might go in the 'for arch in arches' loop that helps OSX folks out.

If noarch is True, this line won't run and the tag won't be in the list.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like thats worth capturing as intent somewhere. Either docs / comments or tests. IMNSHO.


# No abi / arch, but requires our implementation:
for i, version in enumerate(versions):
supported.append(('%s%s' % (impl, version), 'none', 'any'))
Expand Down