Skip to content

Commit 43f3f3b

Browse files
smoserparthea
andauthored
fix: Use include rather than exclude to find_namespace_packages in setup.py (#502)
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 <smoser@brickies.net> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
1 parent 9f548fb commit 43f3f3b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/proto-plus/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
author="Google LLC",
3838
author_email="googleapis-packages@google.com",
3939
url="https://github.com/googleapis/proto-plus-python.git",
40-
packages=find_namespace_packages(exclude=["docs", "tests"]),
40+
packages=find_namespace_packages(include=["proto", "proto.*"]),
4141
description="Beautiful, Pythonic protocol buffers.",
4242
long_description=README,
4343
platforms="Posix; MacOS X",

0 commit comments

Comments
 (0)