-
Notifications
You must be signed in to change notification settings - Fork 20
Allow package-data for stubs packages #248
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
base: main
Are you sure you want to change the base?
Conversation
|
/CC @abravalheri |
|
Sorry for the delay. I think that this is very reasonable. Can we somehow re-use the existing definition?
Sure, it may take a little bit however, I want to wait for the situation to stabilise. |
|
Sorry for the late reply. I somehow lost track of it.
Unless I'm missing something, it isn't really possible unfortunately. While the package name itself is normalized by setuptools, I don't think the name in the |
|
@abravalheri Did you had a chance to look at this again? |
|
Hi @cdce8p, sorry for the delay in getting back to this.
I am not sure I follow. I tested the following snippet for "anyOf": [
{ "$ref": "#/definitions/package-name" },
{ "const": "*" }
]Note that As for the Personally, I’d prefer keeping this logic in the JSON Schema itself rather than introducing another format function. If you’re okay with that, I can push my local copy with these changes. Footnotes
|
Not quite, the point I'm worried about is that the package name itself is normalized by setuptools, however the [project]
name = "some-project"
[tool.setuptools.package-data]
"some-project" = ["*.yaml"]Files stored in |
|
Any update? |
I'm currently working on moving the
stubs_uploaderfromsetup.pytopyproject.toml. It's used to build and upload the typeshed stubs packages automatically. While doing so I noticed thatsetuptoolsrejects stub package names likerequests-stubsforpackage-data. I know that.pyiandpy.typedfiles are auto-included. Each stubs package also contains aMETADATA.tomlfile which should be included in the distribution. Do to the nature of the project, it would be desirable to useinclude-package-data = falseand instead specify the wanted files directly.This PR slightly modifies the schema to allow for that. If accepted, it would be great if a new version could be released so I include these changes in setuptools.
https://github.com/typeshed-internal/stub_uploader/blob/cbdc0b85972e476b4dedbd626cd12dadf7dd60a9/stub_uploader/build_wheel.py#L51-L84