Skip to content
Discussion options

You must be logged in to vote

I found a simple workaround for anyone who finds their way here. I defined a special environment called base where I put the python version to be shared.

[tool.hatch.envs.base]
template = "base"
python = "3.11"

[tool.hatch.envs.default]
template = "base"
# ...

[tool.hatch.envs.deploy]
template = "base"
# ...

[tool.hatch.envs.training]
template = "base"
# ...

This does not provide general variables for other uses, but this solved my original problem.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@ofek
Comment options

ofek May 7, 2024
Maintainer Sponsor

@elafonta
Comment options

Answer selected by ofek
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants