Skip to content

Commit c55827b

Browse files
authored
Allow package-data for stubs packages (#248)
2 parents cea7fcc + 92d8511 commit c55827b

3 files changed

Lines changed: 8 additions & 2 deletions

File tree

CHANGELOG.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ Changelog
66
Development Version
77
====================
88
9+
* Added support for specifying package-data for stub packages, #248.
10+
911

1012
Version 0.24.1
1113
==============

src/validate_pyproject/plugins/setuptools.schema.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116
"type": "object",
117117
"additionalProperties": false,
118118
"propertyNames": {
119-
"anyOf": [{"type": "string", "format": "python-module-name"}, {"const": "*"}]
119+
"anyOf": [{"$ref": "#/definitions/package-name"}, {"const": "*"}]
120120
},
121121
"patternProperties": {
122122
"^.*$": {"type": "array", "items": {"type": "string"}}
@@ -140,7 +140,7 @@
140140
"type": "object",
141141
"additionalProperties": false,
142142
"propertyNames": {
143-
"anyOf": [{"type": "string", "format": "python-module-name"}, {"const": "*"}]
143+
"anyOf": [{"$ref": "#/definitions/package-name"}, {"const": "*"}]
144144
},
145145
"patternProperties": {
146146
"^.*$": {"type": "array", "items": {"type": "string"}}

tests/examples/setuptools/08-pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,7 @@ packages = ["mypkg-stubs"]
1616

1717
[tool.setuptools.package-data]
1818
"*" = ["*.pyi"]
19+
"mypkg-stubs" = ["METADATA.toml"]
20+
21+
[tool.setuptools.exclude-package-data]
22+
"mypkg-stubs" = ["*.rst"]

0 commit comments

Comments
 (0)