pypa / hatch

Modern, extensible Python project management
https://hatch.pypa.io/latest/
MIT License
6.07k stars 306 forks source link

env.requires does not support context formatting #1756

Open soulmerge opened 1 month ago

soulmerge commented 1 month ago

I want to install an environment plugin from the local file system. My pyproject.toml contains the following:

[tool.hatch.metadata]
allow-direct-references = true

[tool.hatch.env]
requires = [
  "my-hatch-plugin @ {root:uri}/tools/my-hatch-plugin",
]

But it seems the env.requires value does not support context formatting.

soulmerge commented 1 month ago

I have also seen this other issue #1199 related to context formatting, which also has an open pull request #1472. I would be willing to contribute a PR for this issue here, using the changes in the other PR as reference.