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

uv pip install --target seems to fail when there is no wheel available on pypi.org #3349

Closed
gotcha opened this issue May 3, 2024 · 1 comment · Fixed by #3362
Closed
Assignees
Labels
bug Something isn't working

Comments

@gotcha
Copy link
Contributor

gotcha commented May 3, 2024

Thanks a lot for adding the --target option to uv pip install.

I am using 0.1.39

$ uv venv
$ uv pip install --target bla --no-deps install zope.component
Resolved 1 package in 393ms
Downloaded 1 package in 61ms
Installed 1 package in 2ms
 + zope-component==6.0
$ ls bla
zope  zope.component-6.0-py3.9-nspkg.pth  zope.component-6.0.dist-info
$ #success :-)

$ uv pip install --target bla --no-deps install zope.component==4.1.0
error: Failed to download and build `zope-component==4.1.0`
  Caused by: Failed to build: `zope-component==4.1.0`
  Caused by: Build backend failed to determine extra requires with `build_wheel()` with exit status: 1
--- stdout:

--- stderr:
Traceback (most recent call last):
  File "<string>", line 8, in <module>
ModuleNotFoundError: No module named 'setuptools'
---
$ ls bla
_distutils_hack  distutils-precedence.pth  pkg_resources  setuptools  setuptools-69.5.1.dist-info

My shallow knowledge makes me think that the process to produce a wheel locally is failing.

$ uv pip install --target bla install zope.component==4.1.0
error: Failed to download and build `zope-component==4.1.0`
  Caused by: Failed to build: `zope-component==4.1.0`
  Caused by: Build backend failed to determine extra requires with `build_wheel()` with exit status: 1
--- stdout:

--- stderr:
Traceback (most recent call last):
  File "<string>", line 8, in <module>
ModuleNotFoundError: No module named 'setuptools'
---
$ ls bla
_distutils_hack  distutils-precedence.pth  pkg_resources  setuptools  setuptools-69.5.1.dist-info

The problem is the same with or without the --no-deps flag.

Same issue when installing zest.releaser which does not have any released wheel.
Even though installing ipdb works fine : there is a wheel on pypi.org.

@charliermarsh charliermarsh self-assigned this May 3, 2024
@charliermarsh charliermarsh added the bug Something isn't working label May 3, 2024
@charliermarsh
Copy link
Member

Thanks, I think this is a real bug in --target.

charliermarsh added a commit that referenced this issue May 3, 2024
## Summary

We were writing the build dependencies into the `--target` directory,
which both made builds fail and led to them leaking into the user's
directory.

Closes #3349.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants