-
Notifications
You must be signed in to change notification settings - Fork 891
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
Error adding dependency that uses setup.py & distutils when on Python 3.10 #8373
Comments
I can confirm this is still an issue as of |
Thanks for the clear repro -- it's much appreciated. Candidly I'm not sure that this is a uv problem. I see the same behavior with pip when ❯ pip install --use-pep517 ../dependency
Processing /Users/crmarsh/workspace/uv/uv-repro/dependency
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [17 lines of output]
Traceback (most recent call last):
File "/Users/crmarsh/.local/share/rtx/installs/python/3.10.14/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/Users/crmarsh/.local/share/rtx/installs/python/3.10.14/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/Users/crmarsh/.local/share/rtx/installs/python/3.10.14/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
File "/private/var/folders/nt/6gf2v7_s3k13zq_t3944rwz40000gn/T/pip-build-env-ep1ise0j/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 334, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=[])
File "/private/var/folders/nt/6gf2v7_s3k13zq_t3944rwz40000gn/T/pip-build-env-ep1ise0j/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 304, in _get_build_requires
self.run_setup()
File "/private/var/folders/nt/6gf2v7_s3k13zq_t3944rwz40000gn/T/pip-build-env-ep1ise0j/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 522, in run_setup
super().run_setup(setup_script=setup_script)
File "/private/var/folders/nt/6gf2v7_s3k13zq_t3944rwz40000gn/T/pip-build-env-ep1ise0j/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 320, in run_setup
exec(code, locals())
File "<string>", line 2, in <module>
ModuleNotFoundError: No module named 'distutils.command.upload'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip. |
Weird. Thanks for confirming outside of uv, I wasn't able to (probably because I wasn't aware of the pep517 flag). |
No problem. Sorry for the hassle :( |
I'm going to close this issue since it appears unlikely to be uv's fault. I'll update this thread if I learn anything more. |
I'm not sure if this is an issue with uv specifically or if it's some deadly combination of python versions, but I haven't found anything useful in my searches.
I have a repository pinned at 3.10.14, and I have a dependency that is using setuptools/distutils. When trying to install the dependency, Python is failing to find the distutils package. This is confusing to me for two reasons:
The other issues I've found are along these lines: #7183, but I'm not using Python >=3.12 so this feels like a different issue.
I'm in the process of porting the project repository from
pipenv
touv
. Pipenv installs the dependency without an issue, which leads me to believe it's something to do with uv. This error happens whether installing the dependency locally or from an index.I'm using uv 0.4.24 via Homebrew on Apple Silicon.
Steps to reproduce:
cd project
uv add ../dependency --verbose
Command output:
The text was updated successfully, but these errors were encountered: