Open zmeir opened 1 month ago
Interesting. Thanks for sharing. I guess we could add something like [tool.uv.source-definitions]
then allow tool.uv.sources.<package> = { definition = ... }
It certainly adds some complexity though, so I'm hesitant to pursue it without more requests.
I'll start by saying this is probably not a very common use-case, but I wanted to ask this in case there is some better way of doing what I'm doing that I couldn't find in the documentation.
I have a project with some internal packages as dependencies. These packages are published to a private index, which is then mirrored to 2 different locations. One of these locations is on the same network segment as our development environments, so for development purposes is it faster to download packages from this index. The second one is faster for our ci/automation/production environments. I can differentiate between the environments with the
sys_platform
marker (we develop on mac and windows, but deploy on linux).I thought about setting up the
[tool.uv.sources]
table inpyproject.toml
like this:The same 2 lines for
private-index-dev
andprivate-index-prd
are repeated for each internal package.Is there any way to prevent this duplication?
As far as I know TOML doesn't support variable substitution, so I can't do something like this: