Skip to content

Caching and --config-settings #10575

@suomela

Description

@suomela

I am here using leanblueprint as a random example of a tool I can run like uvx leanblueprint, which also depends on a package (pygraphviz) that requires magic command line switches to compile correctly.

On macOS, this typically fails with a compilation error in pygraphviz:

uv cache clean
uvx leanblueprint

I can fix it like this:

uvx --config-settings="--global-option=build_ext" --config-settings="--global-option=-I$(brew --prefix graphviz)/include/" --config-settings="--global-option=-L$(brew --prefix graphviz)/lib/" leanblueprint

After running the above command once, pygraphviz is compiled correctly and cached and I can simply use this:

uvx leanblueprint

However, if I ever clean the cache with e.g. uv cache clean, I can no longer run uvx leanblueprint until I do the magic thing with all the right --config-settings switches.

Somehow this does not feel right. The cache should be there just to speed things up, right? Cleaning the cache should only mean that next time things will take more time to download & build, but it shouldn't break anything? I would expect e.g. uvx leanblueprint behave in the same way before and after cleaning the cache (other than speed), but that is not the case.

Is this intentional? Or am I just doing something wrong by using --config-settings like this?

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingexternalThe problem is with another package or dependency (not uv)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions