-
-
Notifications
You must be signed in to change notification settings - Fork 218
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
Use of dynamic versioning with setuptools-scm causes MANIFEST.in to be ignored #1115
Comments
Setuptools always includes everything a file finder reports So manifest must exclude such items Setuptools lacks sane configuration for file finders do this had been a sore spot since more than a decade now |
Ronny, you are my hero today! And thanks for responding on a sunday! I thought I had also tested it with exclude directives, but it turns out I must have done something wrong. I just tested it again, and with the following
So the issue can be closed as far as I'm concerned. The only little thing that could be done is to document the behavior that the default when MANIFEST.in is used changes between dynamic and static versioning: With static versioning, files are not included by default. With dynamic versioning based on setuptools-scm, the default changes to include all files by default. (At least according to what I found so far, maybe the situation is more complex than that). |
I'll close this support ticket once I create a documentation issue |
When a
pyproject.toml
file is used with "build" as the build frontend and "setuptools" as the build backend, and when dynamic versioning is used with "setuptools-scm", then the specifications inMANIFEST.in
are ignored. When using static versioning (i.e. not using "setuptools-scm" at all), the specifications inMANIFEST.in
are obeyed.Note that https://setuptools.pypa.io/en/latest/userguide/miscellaneous.html states that
MANIFEST.in
is used when present.I am attaching a
test_manifest.zip
file with a stripped-down project that allows reproducing the issue:test_manifest.zip
To reproduce:
test_manifest.zip
filetest_manifest.zip
file into the current directorydist
:It should contain the following files:
and the marked files should not have been included as per the specifications in
MANIFEST.in
, which are:The
pyproject.toml.static_versioning
file is a version with static versioning, as a comparison. When renaming that topyproject.toml
and re-running thebuild.sh
script, the generated source archive does not contain the marked files, i.e. it obeys the specifications inMANIFEST.in
.I used the following package versions on Python 3.12 on macOS:
See also the discussion in https://discuss.python.org/t/can-i-exclude-files-in-sdist-when-using-build-frontend-with-setuptools-backend/82717/1
The text was updated successfully, but these errors were encountered: