fix(packaging): prevent unwanted files and tests from being installed#3911
Conversation
|
What do you mean exactly by "installed as top-level packages"? I'm afraid I fail to understand which exact issue this PR solves. |
DimitriPapadopoulos
left a comment
There was a problem hiding this comment.
Also, codespell_lib/tests should be removed from the wheel.
| "dist", | ||
| "snap", | ||
| "tools", | ||
| "example", |
There was a problem hiding this comment.
But then example is not currently included in the sdist or wheel. Why is that?
41b85ae to
92cb89f
Compare
|
I changed the approach:
|
|
Changes in wheels look good to me: As for sdists, would it be possible to get rid of the following items?
|
92cb89f to
1c9bf89
Compare
|
I've amended the commit to include the sdist cleanup. |
1c9bf89 to
8e44f6b
Compare
|
The contents of the sdist look rather good to me after the latest change to Perhaps add I believe the following files/directories are correctly ignored: |
|
As for the wheel, it looks perfect: |
8e44f6b to
077c6fb
Compare
|
Added |
|
I'm sorry, I wasn't clear at all. I meant including |
077c6fb to
32dd9c7
Compare
|
Yeah, now I understand what you meant. |
DimitriPapadopoulos
left a comment
There was a problem hiding this comment.
Perhaps one last change for .pre-commit-config.yaml.
Refine package discovery and manifest exclusions to clean up both wheels and source distributions (sdists): - Dev-only paths like `tools/` and `example/` are not installed in wheels. - The `codespell_lib.tests` subpackage is excluded from the wheel. - Only files explicitly listed in `package-data` are bundled in wheels. - Dev metadata (.github, .devcontainer, .gitignore, .mailmap) is pruned from sdists. Signed-off-by: Mikel Olasagasti Uranga <mikel@olasagasti.info>
32dd9c7 to
25a3a81
Compare
|
Thank you @mikelolasagasti. |
Disable implicit namespace discovery and exclude those dirs so dev-only paths like
tools/gen_OX.share not installed as top-level packages.