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 improper binary filename normalization for packages with hyphens in the names #67

Closed

Conversation

dan-blanchard
Copy link

As you can see at https://pypi.python.org/simple/msgpack-python/, if a package name has hyphens in it, the binary filenames should have them replaced with underscores.

For msgpack-python that would be:

  • msgpack_python-0.2.0-py2.7-win-amd64.egg
  • msgpack_python-0.4.7-cp27-none-win32.whl
  • msgpack-python-0.4.7.tar.gz

Note that the tarball still is expected to have hyphens that match the package name.

Without this fix, wheel cannot properly interpret the filenames of packages downloaded from pip2pi servers, because it uses the following regex to parse it:

WHEEL_INFO_RE = re.compile(
    r"""^(?P<namever>(?P<name>.+?)(-(?P<ver>\d.+?))?)
    ((-(?P<build>\d.*?))?-(?P<pyver>.+?)-(?P<abi>.+?)-(?P<plat>.+?)
    \.whl|\.dist-info)$""",
    re.VERBOSE).match

@dan-blanchard
Copy link
Author

The test failures appear to be Travis issues and not at all related to my change.

@yjjnls
Copy link

yjjnls commented Dec 6, 2018

#85 has fixed this problem, but the PR hasn't been merged.

@safiyat
Copy link
Collaborator

safiyat commented Jul 15, 2019

Closed in #85.

@safiyat safiyat closed this Jul 15, 2019
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

Successfully merging this pull request may close these issues.

3 participants