Skip to content

Commit

Permalink
Ensure optional-dependencies use PEP 508 identifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
abravalheri authored and akx committed Apr 8, 2022
1 parent 6f47a41 commit 61b668f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/validate_pyproject/plugins/setuptools.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,8 @@
"entry-points": {"$ref": "#/definitions/file-directive"},
"optional-dependencies": {
"type": "object",
"propertyNames": {"format": "pep508-identifier"},
"additionalProperties": false,
"patternProperties": {".+": {"$ref": "#/definitions/file-directive"}}
},
"readme": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
`tool.setuptools.dynamic.optional-dependencies` keys must be named by:

{format: 'pep508-identifier'}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[project]
name = "myproj"
version = "42"
dynamic = ["optional-dependencies"]

[tool.setuptools.dynamic.optional-dependencies."non pep508 compliant"]
file = "extra.txt"

0 comments on commit 61b668f

Please sign in to comment.