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

Wheel 0.30.0 is not compatible with latest setuptools #29467

Open
bebound opened this issue Jul 25, 2024 · 5 comments
Open

Wheel 0.30.0 is not compatible with latest setuptools #29467

bebound opened this issue Jul 25, 2024 · 5 comments
Assignees
Labels
Azure CLI Team The command of the issue is owned by Azure CLI team feature-request Packaging
Milestone

Comments

@bebound
Copy link
Contributor

bebound commented Jul 25, 2024

After 71.0.0, in pypa/setuptools#4457
run python setup.py bdist_wheel: Use installed wheel or vendored wheel
Install package from source code: Use installed wheel or vendored wheel

Setuptools calls wheels 0.30.0 we installed, which does not provide wheel.wheelfile. see - #29421 (comment)

If the package does not provide wheel and must compile from source code, you'll see this error:

# install cffi 1.15.1 in Python 3.12
2024-07-25T03:43:04.0552476Z Building wheels for collected packages: cffi
2024-07-25T03:43:04.0552668Z   Building wheel for cffi (setup.py): started
2024-07-25T03:43:04.0552985Z   Building wheel for cffi (setup.py): finished with status 'error'
2024-07-25T03:43:04.0553397Z   error: subprocess-exited-with-error
2024-07-25T03:43:04.0553554Z   
2024-07-25T03:43:04.0553792Z   × python setup.py bdist_wheel did not run successfully.
2024-07-25T03:43:04.0554013Z   │ exit code: 1
2024-07-25T03:43:04.0554207Z   ╰─> [25 lines of output]
2024-07-25T03:43:04.0554371Z       Traceback (most recent call last):
2024-07-25T03:43:04.0554525Z         File "<string>", line 2, in <module>
2024-07-25T03:43:04.0554796Z         File "<pip-setuptools-caller>", line 34, in <module>
2024-07-25T03:43:04.0555161Z         File "/tmp/pip-install-7jczthn1/cffi_1b5c114d59cc470d96d4d51c40a16d1f/setup.py", line 179, in <module>
2024-07-25T03:43:04.0555433Z           setup(
2024-07-25T03:43:04.0555800Z         File "/mnt/vss/_work/1/s/env/lib/python3.12/site-packages/setuptools/__init__.py", line 108, in setup
2024-07-25T03:43:04.0556032Z           return distutils.core.setup(**attrs)
2024-07-25T03:43:04.0556194Z                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-07-25T03:43:04.0556572Z         File "/mnt/vss/_work/1/s/env/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 171, in setup
2024-07-25T03:43:04.0556824Z           ok = dist.parse_command_line()
2024-07-25T03:43:04.0556969Z                ^^^^^^^^^^^^^^^^^^^^^^^^^
2024-07-25T03:43:04.0557375Z         File "/mnt/vss/_work/1/s/env/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 478, in parse_command_line
2024-07-25T03:43:04.0557637Z           args = self._parse_command_opts(parser, args)
2024-07-25T03:43:04.0557809Z                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-07-25T03:43:04.0558199Z         File "/mnt/vss/_work/1/s/env/lib/python3.12/site-packages/setuptools/dist.py", line 858, in _parse_command_opts
2024-07-25T03:43:04.0558478Z           nargs = _Distribution._parse_command_opts(self, parser, args)
2024-07-25T03:43:04.0558656Z                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-07-25T03:43:04.0559069Z         File "/mnt/vss/_work/1/s/env/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 537, in _parse_command_opts
2024-07-25T03:43:04.0559333Z           cmd_class = self.get_command_class(command)
2024-07-25T03:43:04.0559500Z                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-07-25T03:43:04.0559869Z         File "/mnt/vss/_work/1/s/env/lib/python3.12/site-packages/setuptools/dist.py", line 697, in get_command_class
2024-07-25T03:43:04.0560127Z           from .command.bdist_wheel import bdist_wheel
2024-07-25T03:43:04.0560547Z         File "/mnt/vss/_work/1/s/env/lib/python3.12/site-packages/setuptools/command/bdist_wheel.py", line 29, in <module>
2024-07-25T03:43:04.0560801Z           from wheel.wheelfile import WheelFile
2024-07-25T03:43:04.0561094Z       ModuleNotFoundError: No module named 'wheel.wheelfile'
2024-07-25T03:43:04.0561275Z       [end of output]
2024-07-25T03:43:04.0561395Z   
2024-07-25T03:43:04.0561577Z   note: This error originates from a subprocess, and is likely not a problem with pip.
2024-07-25T03:43:04.0561805Z   ERROR: Failed building wheel for cffi
2024-07-25T03:43:04.0561973Z   Running setup.py clean for cffi
2024-07-25T03:43:04.0562141Z Failed to build cffi
2024-07-25T03:43:04.0562350Z ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (cffi)

Ref:

@yonzhan
Copy link
Collaborator

yonzhan commented Jul 25, 2024

Thank you for opening this issue, we will look into it.

@wangzelin007
Copy link
Member

I just encountered this issue, the actual test result is: setuptools>72.1.0 not compatible with old version of wheel, we may need to pin the setuptools version at 72.1.0 in azdev.
Upgrading setuptools and wheel is not an easy task and cannot be done in the short term, we have no choice.

image
image

image
image

@vilit1
Copy link
Contributor

vilit1 commented Sep 9, 2024

I am also seeing the same issue:
image

@Elsie4ever
Copy link

I'm also getting the same issue in github runner
image

@bebound
Copy link
Contributor Author

bebound commented Sep 10, 2024

For now, we have to pin setuptools to 70.0.0 like Azure/azure-cli-extensions#7739

I hope the extension can stop using wheel 0.30.0 someday.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Azure CLI Team The command of the issue is owned by Azure CLI team feature-request Packaging
Projects
None yet
Development

No branches or pull requests

5 participants