Avoid including stray packages in wheel#20
Conversation
In some environments, using `exclude` can result in stray packages ending up in the wheel; for example in a Debian package build that built for each of Python 3.13 and 3.14 in succession, I found that the 3.14 build ended up containing a duplicate `build` directory. Using `include` is safer.
|
Hi Colin, thanks for your contribution. I think you are right, explicit include should be safer. I understand that the bug was that "build" was not in excludes (probably it was undefined and worked previously). |
|
Are you sure it makes what it says? Because after that patch I still got a package with a dist subdirectory. And now I still have tests in my new .tar.gz archive (that is not written in include). |
Odd, that doesn't happen for me. What are you running to build the wheel? (I'm using
The |
|
I use
python3 -m build --sdist
python3 -m build --wheel
Ok, I suggest it was a temporary bug. Please check the new version -
hopefully it should work flawlessly.
Thank you for the links!
Am Di., 13. Jan. 2026 um 23:21 Uhr schrieb Colin Watson <
***@***.***>:
… *cjwatson* left a comment (ynikitenko/yarsync#20)
<#20 (comment)>
Because after that patch I still got a package with a *dist* subdirectory.
Odd, that doesn't happen for me. What are you running to build the wheel?
(I'm using pyproject-build (a.k.a. python3 -m build.)
And now I still have *tests* in my new *.tar.gz* archive (that is not
written in *include*).
The .tar.gz is the sdist, whose contents are controlled separately. See
https://setuptools.pypa.io/en/latest/userguide/miscellaneous.html. My
patch was just about the wheel - see
https://setuptools.pypa.io/en/latest/userguide/package_discovery.html.
—
Reply to this email directly, view it on GitHub
<#20 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJGF4R4Q3P6UTFH7LO7F7T4GVVVLAVCNFSM6AAAAACQ3GYZS2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTONBWHAZDOMBSGI>
.
You are receiving this because you modified the open/close state.Message
ID: ***@***.***>
--
Best regards,
Yaroslav Nikitenko
|
In some environments, using
excludecan result in stray packages ending up in the wheel; for example in a Debian package build that built for each of Python 3.13 and 3.14 in succession, I found that the 3.14 build ended up containing a duplicatebuilddirectory. Usingincludeis safer.