-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
When a package uses setuptools-scm, the version is not correctly retrieved if reinstalling in editable mode after new release.
uv 0.4.3 (Homebrew 2024-09-02) on macOS
Example
Let's take the PyPSA package for example.
Works fine initially and retrieves correct version (0.30.0.post1.dev2+g191bea7c currently):
git clone https://github.com/PyPSA/PyPSA.git
cd PyPSA
uv venv
uv pip install -e .But when coming back to the repo at a later stage after a new release (let's say 0.30.1 as an example)
git pull --tags
> From https://github.com/PyPSA/PyPSA
> * [new tag] v0.30.1 -> v0.30.1uv will not retrieve the new version (v0.30.1) but will just add a new dev version to the previous one (e.g. v0.30.0.post1.devx+x).
You have to remove the env and install without cache to retrieve the correct version again. Just deleting the env or just ignoring the cache will not work.
rm -r .venv
uv venv
uv pip install -e . -nWhile pip installs the correct version immediately, without ignoring the cache or creating a new environment.
This is a made up case. To reproduce you need a cloned repo with the package installed and wait for a new release to see the behavior.