setuptools icon indicating copy to clipboard operation
setuptools copied to clipboard

[FR] Allowing some extras in `requirements.txt`, some in `pyproject.toml`

Open jamesbraza opened this issue 1 year ago • 1 comments

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.txt files
  • 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

jamesbraza avatar Apr 30 '24 00:04 jamesbraza

PRs are welcome!

Pointers for implementation:

abravalheri avatar Apr 30 '24 16:04 abravalheri