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 doesn't reinstall editable package when non-editable package is requested #3200

Closed
danielhollas opened this issue Apr 22, 2024 · 3 comments · Fixed by #3219
Closed

uv doesn't reinstall editable package when non-editable package is requested #3200

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

Comments

@danielhollas
Copy link

Consider the following sequence

$ git clone https://github.com/aiidateam/aiida-core && cd aiida-core
$ uv venv --seed
$ uv pip install --no-deps -e .
   Built file:///home/hollas/atmospec/aiida-core                                                                                                                                                                   Built 1 editable in 170ms
Resolved 1 package in 0.71ms
Installed 1 package in 1ms
 + aiida-core==2.5.1.post0 (from file:///home/hollas/atmospec/aiida-core)

Running editable install for the second time re-installs the package, which is nice:

$ uv pip install --no-deps -e .
Built 1 editable in 183ms
Resolved 1 package in 0.93ms
Installed 1 package in 4ms
 - aiida-core==2.5.1.post0 (from file:///home/hollas/atmospec/aiida-core)
 + aiida-core==2.5.1.post0 (from file:///home/hollas/atmospec/aiida-core)

However, trying to install the package in non-editable mode does not re-install it

$ uv pip install --no-deps .
Resolved 1 package in 1ms
Audited 1 package in 0.04ms

uv version 0.1.36

@charliermarsh
Copy link
Member

Hmm interesting. Makes sense to force a reinstall here I suppose.

@charliermarsh charliermarsh added the enhancement New feature or improvement to existing functionality label Apr 23, 2024
@danielhollas
Copy link
Author

My understanding was that while the editable mode generally tries to emulate the actual installation, it is not guaranteed to be perfect so I think reinstalling is the only correct option here. Citing from PEP 660

Depending on the way build backends implement this specification, some minor differences may be visible such as the presence of additional files that are in the source tree and would not be part of a regular install. Build backends are encouraged to document such potential differences.

@charliermarsh charliermarsh added bug Something isn't working and removed enhancement New feature or improvement to existing functionality labels Apr 23, 2024
@charliermarsh
Copy link
Member

I'll label it as a bug.

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