setuptools
setuptools copied to clipboard
[FR] Allowing some extras in `requirements.txt`, some in `pyproject.toml`
What's the problem this feature will solve?
I have something like this:
# pyproject.toml
[build-system]
build-backend = "setuptools.build_meta"
requires = ["setuptools >= 62.6"]
[project]
dynamic = ["optional-dependencies"]
[tool.setuptools.dynamic.optional-dependencies.dev]
file = ["dev-requirements.txt"]
Now, if I try to add a non-external-file-based extra, something like :
[tool.setuptools.dynamic.optional-dependencies.ipython]
ipython = ["ipython"]
I get this error:
configuration error: `tool.setuptools.dynamic.optional-dependencies.ipython` must contain ['file'] properties
Describe the solution you'd like
I would like to have:
- Some extras with dependencies externally specified in
requirements.txtfiles - Other extras with dependencies directly specified in
pyproject.toml
Are we able to accommodate this?
Alternative Solutions
n/a
Additional context
n/a
Code of Conduct
- [X] I agree to follow the PSF Code of Conduct
PRs are welcome!
Pointers for implementation:
- Needs to update the validation in validate-pyproject (requires a new release of
validate-pyproject, then bumping the dependency in tox.ini, then "re-compiling" the files) - Needs changes in config.pyprojecttoml, maybe other places too...