pip2pi
pip2pi copied to clipboard
Wheels with 5 dashes not split correctly in file_to_package
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')
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!
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
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.
You can also use my patcher tool to create a patched pip2pi wheel.