From 106f714ad5967b82dcacd965c46fe6bbff38c05d Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Fri, 10 Jan 2025 16:22:10 +0100 Subject: [PATCH] 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/** ``` --- MANIFEST.in | 3 +++ pyproject.toml | 10 ++++++++++ 2 files changed, 13 insertions(+) diff --git a/MANIFEST.in b/MANIFEST.in index f9992d44e7ff..80d73ab5f48e 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -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 @@ -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 diff --git a/pyproject.toml b/pyproject.toml index 5edbc8a75224..157c26385e4e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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] @@ -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