Skip to content

uv tool install -e . does not interact correctly with dynamic field of pyproject.toml #19541

@murdock-grewar

Description

@murdock-grewar

Summary

Sorry I don't know how to produce a minimum working example for this.

Running uv tool install . works as expected. However, running uv tool install -e . installs an older version of the package. This misses executables, which I have set up in the following way:

My setup.py fetches the scripts dynamically like so:

# pyproject.toml
...
dynamic = ['scripts', 'version']
...
# setup.py
...
setup(
    version=version,
    entry_points={
            'console_scripts': [
                    my_module_name + '-' + f'{filename_to_command_name(script_name):s}' + ' = ' + my_module_name + 
                        f'.scripts.{remove_extension_from_filename(script_name):s}:main'
                    for script_name in my_scripts
            ]
        },
)

It seems that uv is caching the package or something, since it adds all the executables except the most recently added one.

Running uv tool install . followed by uv tool install -e . shows that the version of the package is downgraded to one which is below the current version in the index... it must either be reading from a cache or from the git repository history.

Installed 1 package in 18ms
 - my-module-name==0.22.2.dev4 (from file:///home/user/my-module-name)
 + my-module-name==0.22.0 (from file:///home/user/my-module-name)

I've noticed that changing the contents of setup.py causes uv to invalidate whatever cache is being used, and resolves the issue. This is the second time I've observed this issue, so I guess that uv is making a false assumption that if setup.py is not changed, then the version and list of executables must also not be changed. This is not the case.

Platform

Linux 7.0.3-arch1-2 x86_64 GNU/Linux

Version

uv 0.11.11 (ed7b060 2026-05-06 x86_64-unknown-linux-gnu)

Python version

Python 3.12.12

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions