Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail on invalid pyproject.toml dependencies sections? #358

Open
Nour-Mws opened this issue Aug 28, 2023 · 0 comments
Open

Fail on invalid pyproject.toml dependencies sections? #358

Nour-Mws opened this issue Aug 28, 2023 · 0 comments
Labels
P3 minor: not priorized

Comments

@Nour-Mws
Copy link
Collaborator

This a follow-up to PR #351.
We currently support pyproject.toml files having both dynamic and static dependencies, including some states that are not valid. This is the case in the following example where optional-dependencies is flagged as dynamic then defined both in [tool.setuptools.dynamic] and in [project]. Attempting to pass this through setuptools will result in an error as soon as the line with the static definition of optional-dependencies is parsed.

We're not a pyproject.toml linter, but I feel uneasy making analysis on the basis of an invalid pyproject.toml.

I'm wondering if there's an easy way to source out this validation the way we've done with pip-requirements-parser?

[project]
name = "MyLib"
dynamic = ["optional-dependencies"]
dependencies = ["django"]
optional-dependencies = {"dev" = ["black"]}
[tool.setuptools.dynamic]
dependencies = { file = [".subdir/requirements.txt"] }
optional-dependencies.test = { file = [".subdir/requirements-test.txt"]
@jherland jherland added the P3 minor: not priorized label Aug 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 minor: not priorized
Projects
None yet
Development

No branches or pull requests

2 participants