-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
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?