-
-
Notifications
You must be signed in to change notification settings - Fork 531
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
tox {[section]name} substitution does not work in general #97
Comments
Original comment by @e3krisztian Sure, I have a working version, will request a review soon. |
Original comment by @hpk42 yes, the config parsing needs to be generalized. Do you feel like giving it a stab? |
I'm not sure if this improvement was completed or not, however in case anyone is interested I found a simple workaround to this limitation - at least for the limited use case described here. Consider the following snippet:
By defining your desired parameters as environment variables, taking care to name them such that they don't conflict with any other vars in your build environment, you can then use the TOX environment variable substitution to refer to the values. This might not work for the general case but should be workable for those simple cases like this one. |
This should be kept open until configuration parsing is generalized (or we decide to leave it that way and then document the limitations). |
I think we fixed this now. |
I am trying to reuse
tox.ini
with minimal changes between projects/packages - the only variation is indeps
and the project/package name (seepackage
section below). I wantcommands
to be the same, so I tried to define an ini variable for package name and reference it fromcommands
without success:I get
tox.ConfigError: ConfigError: substitution key '[package]name' not found
with this config.It looks like the ini reading is restricted to known keys only (
{[package]deps}
in[testenv]deps
works!), so it is currently not possible to introduce & reference new, unknown-to-tox, keys.A potentially related issue is #38 {[section]name} subsitution does not work for commands
The text was updated successfully, but these errors were encountered: