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 fails when extras are combined with --no-deps #3184

Closed
danielhollas opened this issue Apr 22, 2024 · 2 comments · Fixed by #3188
Closed

uv pip install fails when extras are combined with --no-deps #3184

danielhollas opened this issue Apr 22, 2024 · 2 comments · Fixed by #3188
Assignees
Labels
bug Something isn't working

Comments

@danielhollas
Copy link
Contributor

danielhollas commented Apr 22, 2024

uv seems to choke on a (arguably weird) combination of --no-deps together with extras, such as (using aiida-core package as an example):

$ git clone https://github.com/aiidateam/aiida-core && cd aiida-core
$ uv venv --seed
$ uv pip install --no-deps -e .[pre-commit]
   Built file:///home/hollas/atmospec/aiida-core                                                                                           Built 1 editable in 112ms
error: Attempted to wait on an unregistered task

Note that the error itself is the same as in #2941, but I'd assume the root cause is different?

The same command with pip succeeds, pip simply ignores the extras requirement (I guess that makes sense)

$ source .venv/bin/activate
$ python -m pip install --no-deps -e .[pre-commit]
Obtaining file:///home/hollas/atmospec/aiida-core
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build editable ... done
  Preparing editable metadata (pyproject.toml) ... done
Checking if build backend supports build_editable ... done
Building wheels for collected packages: aiida-core
  Building editable for aiida-core (pyproject.toml) ... done
  Created wheel for aiida-core: filename=aiida_core-2.5.1.post0-py3-none-any.whl size=7307 sha256=eff52e947083c32c441e74146f11f57874e1f3994949db8f2c74532d294e38aa
  Stored in directory: /tmp/pip-ephem-wheel-cache-fvl5b5bp/wheels/45/ad/9e/2a9235e41bf1c7f0a56f7fb7c8f986c771f1ed56f8dc5de33b
Successfully built aiida-core
Installing collected packages: aiida-core
  Attempting uninstall: aiida-core
    Found existing installation: aiida-core 2.5.1.post0
    Uninstalling aiida-core-2.5.1.post0:
      Successfully uninstalled aiida-core-2.5.1.post0
Successfully installed aiida-core-2.5.1.post0

uv version: 0.1.35
OS: Linux

(obligatory thanks for uv as always: aiida-core installation drops from 1m 30s to 10s! 😍 )

@charliermarsh
Copy link
Member

Thanks, will take a look -- this happened once before and I thought I fixed it hah.

@charliermarsh charliermarsh self-assigned this Apr 22, 2024
@charliermarsh charliermarsh added the bug Something isn't working label Apr 22, 2024
charliermarsh added a commit that referenced this issue Apr 22, 2024
## Summary

We don't emit a request for this, so we shouldn't wait for it either --
we already have the metadata!

Closes #3184.
@danielhollas
Copy link
Contributor Author

Just tested with 0.1.36, works now as expected. Thanks so much for a super quick fix! 💟

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