-
Notifications
You must be signed in to change notification settings - Fork 988
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow environment variables expansion in pyproject.toml
#10096
Comments
I would reference a local symlink src/my-lib --> /absolute/path/to/my-lib |
@woutervh I don’t think a symbolic link should be uploaded to git. The contents of the link won’t be portable. |
Similar (but not identical) to #5734. |
would love to be able to do something like this: [tool.uv.sources]
foo = { git = "https://${GITHUB_TOKEN}@github.com/fooco/foo.git" } edit: just saw the other discussion - perhaps more relevant than here |
I would also find this useful. Context: I have a CMake projects that generates Python Protobuf bindings in an out-of-source build tree, copies over a templated Separately, several other Python projects needs to consume the bindings package, but there is no reliable way to use relative paths as the build tree is not under the source tree (typical for CMake projects). My current options are:
|
A feature I'd really like to see implemented is the ability to expand environment variables in the
pyproject.toml
file. My use-case is as follows: I am working on a library to simplify my work on other projects. In the future, I'd like to publish the library to PyPi. When I work on my projects, however, I want to use my library as a local editable dependency so I can quickly make changes and see them applied. So I have an example project with the followingpyproject.toml
:The problem is I am using an absolute path for my library, so I need to modify it if I work on multiple computers, and it's not something I'd want to push to GitHub. A better solution would be to have an environment variable that defines the location of the library on my local machine:
MY_LIB_PATH="/path/to/my/library/my-lib"
. That way, I can define the environment variable as necessary on different machines and mypyproject.toml
file will simply use this variable:This isn't possible at the moment, and I think expanding environment variables in the
pyproject.toml
file could solve my use case and other similar use cases.The text was updated successfully, but these errors were encountered: