Skip to content

Commit 77e252e

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 c57ebd7 commit 77e252e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

setup.py

+1-1
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)