#```
1 messages · Page 1 of 1 (latest)
❯ type pyproject.toml
[[tool.hatch.envs.hatch-test.matrix]]
python = ["3.13", "3.12", "3.11", "3.10", "3.9", "3.8"]
[[tool.hatch.envs.hatch-test.matrix]]
python = ["3.13"]
gil = ["freethreaded"]
[tool.hatch.envs.hatch-test.overrides]
matrix.gil.env-vars = [
{ key = "HATCH_PYTHON_VARIANT_GIL", value = "freethreaded", if = [
"freethreaded",
] },
]
[tool.hatch.envs.main.overrides]
matrix.nuitka.dependencies = [
{ value = "nuitka", if = [
"standard",
] },
# {value = "nuitka @ https://github.com/Nuitka/Nuitka/archive/factory.zip", if = ["factory"]},
{ value = "nuitka @ git+https://github.com/Nuitka/Nuitka.git@91d5ba82b7c20e908ebd60fb1eea05880d779e9b", if = [
"factory",
] },
]
[tool.hatch.envs.main]
dev-mode = false
skip-install = true
python-sources = ["external"]
dependencies = ["rich", "setuptools"]
[tool.hatch.envs.main.scripts]
hello = "python -m pip install --upgrade pip && python main.py {matrix:python} {matrix:nuitka}"
[tool.ruff]
exclude = ["benchmarks*/"]
you're getting that because main doesn't define a matrix and therefore there is no python variable to insert, same for {matrix:nuitka}
okay, could you show me how i'd fix it? thank you
you have to define a matrix, you haven't defined a matrix for the main environment
got it working, thanks!
[[tool.hatch.envs.main.matrix]]
python = ["3.13", "3.12", "3.11", "3.10", "3.9", "3.8"]
nuitka = ["standard", "factory"]
[[tool.hatch.envs.main.matrix]]
python = ["3.13"]
gil = ["freethreaded"]
nuitka = ["standard", "factory"]
[tool.hatch.envs.main.overrides]
matrix.gil.env-vars = [
{ key = "HATCH_PYTHON_VARIANT_GIL", value = "freethreaded", if = [
"freethreaded",
] },
]
matrix.nuitka.dependencies = [
{ value = "nuitka", if = [
"standard",
] },
# {value = "nuitka @ https://github.com/Nuitka/Nuitka/archive/factory.zip", if = ["factory"]},
{ value = "nuitka @ git+https://github.com/Nuitka/Nuitka.git@91d5ba82b7c20e908ebd60fb1eea05880d779e9b", if = [
"factory",
] },
]
[tool.hatch.envs.main]
dev-mode = false
skip-install = true
python-sources = ["external"]
dependencies = ["rich", "setuptools"]
[tool.hatch.envs.main.scripts]
hello = "python -m pip install --upgrade pip && python main.py {matrix:python} {matrix:nuitka}"
[tool.ruff]
exclude = ["benchmarks*/"]
though i do find it weird that it was working without the main matrix already