Skip to content

Commit

Permalink
Remove unnecessary mypyc files from wheel (#18416)
Browse files Browse the repository at this point in the history
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/**
```
  • Loading branch information
cdce8p authored Jan 10, 2025
1 parent ccf05db commit 106f714
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ prune docs/source/_build
# assorted mypyc requirements
graft mypyc/external
graft mypyc/lib-rt
graft mypyc/test
graft mypyc/test-data
graft mypyc/doc
prune mypyc/doc/build

# files necessary for testing sdist
include mypy-requirements.txt
Expand All @@ -37,6 +39,7 @@ include test-requirements.txt
include mypy_self_check.ini
prune misc
graft test-data
graft mypy/test
include conftest.py
include runtests.py
include pytest.ini
Expand Down
10 changes: 10 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ mypyc = "mypyc.__main__:main"

[tool.setuptools.packages.find]
include = ["mypy*", "mypyc*", "*__mypyc*"]
exclude = ["mypyc.test-data*"]
namespaces = false

[tool.setuptools.package-data]
Expand All @@ -89,6 +90,15 @@ mypy = [
"xml/*.xslt",
"xml/*.css",
]
[tool.setuptools.exclude-package-data]
mypyc = [
"README.md",
"doc/**",
"external/**",
"lib-rt/test_capi.cc",
"lib-rt/setup.py",
"test-data/**",
]

[tool.black]
line-length = 99
Expand Down

0 comments on commit 106f714

Please sign in to comment.