From cb06758728e2ffd4444c81e7e0dc5f1110c5c6bf Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Fri, 1 Nov 2024 14:34:06 -0400 Subject: [PATCH] chore: include rather than exclude in setup.py https://setuptools.pypa.io/en/latest/userguide/package_discovery.html has a warning: > Please have in mind that find_namespace: (setup.cfg), > find_namespace_packages() (setup.py) and find (pyproject.toml) > will scan all folders that you have in your project directory > if you use a flat-layout. That applies here. Without this change, if you run: 'python3 setup.py bdist_wheel' then you may end up with build/ in your wheel, and in some cases even docs/ and testing/ . The fix is to only include proto and proto.*. Signed-off-by: Scott Moser --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index d8a430f2..6f8d8970 100644 --- a/setup.py +++ b/setup.py @@ -37,7 +37,7 @@ author="Google LLC", author_email="googleapis-packages@google.com", url="https://github.com/googleapis/proto-plus-python.git", - packages=find_namespace_packages(exclude=["docs", "tests"]), + packages=find_namespace_packages(include=["proto", "proto.*"]), description="Beautiful, Pythonic protocol buffers.", long_description=README, platforms="Posix; MacOS X",