Skip to content

Commit 106f714

Browse files
authored
Remove unnecessary mypyc files from wheel (#18416)
Remove mypyc docs and some testing files from wheels. They aren't included for mypy itself as well. The sdist content will stay the same, so it's possible for distributors to continue to run the tests. Files which will no longer be included ``` mypyc/README.md mypyc/doc/** mypyc/external/googletest/** mypyc/lib-rt/setup.py mypyc/lib-rt/test_capi.cc mypyc/test-data/** ```
1 parent ccf05db commit 106f714

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

MANIFEST.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,10 @@ prune docs/source/_build
2626
# assorted mypyc requirements
2727
graft mypyc/external
2828
graft mypyc/lib-rt
29+
graft mypyc/test
2930
graft mypyc/test-data
3031
graft mypyc/doc
32+
prune mypyc/doc/build
3133

3234
# files necessary for testing sdist
3335
include mypy-requirements.txt
@@ -37,6 +39,7 @@ include test-requirements.txt
3739
include mypy_self_check.ini
3840
prune misc
3941
graft test-data
42+
graft mypy/test
4043
include conftest.py
4144
include runtests.py
4245
include pytest.ini

pyproject.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ mypyc = "mypyc.__main__:main"
7777

7878
[tool.setuptools.packages.find]
7979
include = ["mypy*", "mypyc*", "*__mypyc*"]
80+
exclude = ["mypyc.test-data*"]
8081
namespaces = false
8182

8283
[tool.setuptools.package-data]
@@ -89,6 +90,15 @@ mypy = [
8990
"xml/*.xslt",
9091
"xml/*.css",
9192
]
93+
[tool.setuptools.exclude-package-data]
94+
mypyc = [
95+
"README.md",
96+
"doc/**",
97+
"external/**",
98+
"lib-rt/test_capi.cc",
99+
"lib-rt/setup.py",
100+
"test-data/**",
101+
]
92102

93103
[tool.black]
94104
line-length = 99

0 commit comments

Comments
 (0)