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

version 0.45.0: convert command generates file name not supported by pip #644

Closed
madmac2501 opened this issue Nov 11, 2024 · 9 comments
Closed

Comments

@madmac2501
Copy link

Hi,

with wheel 0.45.0 when executing the convert command I get a wheel file named myproject-1.0.0-py39-cp39-any.whl
with wheel 0.44.0 the file generated was named myproject-1.0.0-py39-none-any.whl

I had to rollback to wheel 0.44.0 because with wheel 0.45.0 pip complained with the error message "myproject-1.0.0-py39-cp39-any.whl is not a supported wheel on this platform"

Regards

@dan-blanchard
Copy link

dan-blanchard commented Nov 22, 2024

I am also running into this problem.

@agronholm
Copy link
Contributor

How can I reproduce this problem?

@dan-blanchard
Copy link

We have a dummy egg package we use for testing some things that we've hit this issue on, so maybe that would be useful for reproducing this.

Folder structure:

egg_package
  - setup.py
  - egg_package
    - __init__.py

setup.py

from setuptools import find_packages, setup

setup(name="egg-package", version="0.1.3", packages=find_packages())

egg_package/init.py

__version__ = "0.1.3"
name = "egg_package"

If you install the dummy package using python setup.py install and then run python -m wheel convert --dest-dir . /path/to/venv/lib/python3.10/site-packages/egg_package-0.1.3-py3.10.egg, you'll get egg_package-0.1.3-py310-cp310-any.whl.

If you then try to install that wheel via pip install, you'll get:

pip install egg_package-0.1.3-py310-cp310-any.whl
ERROR: egg_package-0.1.3-py310-cp310-any.whl is not a supported wheel on this platform.

If you rename the file to egg_package-0.1.3-py310-none-any.whl it will install.

@dan-blanchard
Copy link

dan-blanchard commented Nov 22, 2024

I will say I'm having trouble reproducing this consistently. I was able to get a 3.10 egg converted to a wheel with the filename like in my example once, but it seems to happen more consistently with Python 3.8 and 3.9.

Disregard this. It is consistent. The environment where I could no longer reproduce was because I downgraded wheel to 0.44.0 in it.

@agronholm
Copy link
Contributor

I can only blame this on the lack of real-world eggs to test against (maybe I should've built my own). But I never thought so many people would still be converting eggs in this day and age.

@dan-blanchard
Copy link

I hear ya on that. That's why we have that dummy egg package for testing I shared above. At @coiled we replicate people's local Python environments on a cluster, and it is surprising how often people still have things installed with eggs even now.

@agronholm
Copy link
Contributor

The problem line is: self.abi = self.pyver.replace("py", "cp") in EggFileSource which simply uses the Python version to deduce the ABI version. Perhaps it should only do this if there is an architecture component to the egg name too?

@agronholm
Copy link
Contributor

I think this branch will fix your problem: https://github.com/pypa/wheel/tree/fix-644

@dan-blanchard
Copy link

Yup! Just tested locally and that does the trick. Thanks for the quick fix!

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

3 participants