pip2pi icon indicating copy to clipboard operation
pip2pi copied to clipboard

Wheels with 5 dashes not split correctly in file_to_package

Open callumnoble opened this issue 6 years ago • 4 comments

pep-0427 allows for an optional build tag introducing a fifth dash: https://www.python.org/dev/peps/pep-0427/#file-name-convention

>>> file_to_package("PySide2-5.12.3-5.12.3-cp35.cp36.cp37-abi3-manylinux1_x86_64.whl")
('PySide2-5.12.3', '5.12.3-cp35.cp36.cp37-abi3-manylinux1_x86_64.whl')

should be

>>> file_to_package("PySide2-5.12.3-5.12.3-cp35.cp36.cp37-abi3-manylinux1_x86_64.whl")
('PySide2', '5.12.3-5.12.3-cp35.cp36.cp37-abi3-manylinux1_x86_64.whl')

callumnoble avatar May 13 '19 19:05 callumnoble

Also affected by this, with this exact package as well as with the shiboken2 package.

Finding your fork got me a working fix. Thank you!

ttf-brians avatar Apr 13 '23 01:04 ttf-brians

Similarly, triton-2.1.0-0-cp38-cp38-manylinux2014_x86_64.manylinux_2_17_x86_64.whl created a directory named simple/triton-2-1-0

georgevreilly avatar Jan 11 '24 11:01 georgevreilly

You should probably be using a regex like https://github.com/pypa/wheel/blob/main/src/wheel/wheelfile.py#L15-L21 to extract information from the wheel filename.

georgevreilly avatar Jan 11 '24 12:01 georgevreilly

You can also use my patcher tool to create a patched pip2pi wheel.

georgevreilly avatar Apr 12 '24 19:04 georgevreilly