From 0e7c0c2fb8bcf1f50dd01f7620c47a268329bde4 Mon Sep 17 00:00:00 2001 From: Craig Citro Date: Fri, 4 Mar 2016 20:40:24 -0800 Subject: Add back the namespace_packages arg in setup.py. Improves #1296. The problem: in the previous patch, we tweaked the __init__.py files to use namespaces, but no longer declared ourselves as a namespace package. The second half was unwise. Note that this only comes up when installing protobuf alongside another package that also installs into the google namespace; as of right now, the only PyPI package that does is googleapis-common-protos, though the GAE SDK also uses google.appengine. Installing either or both of those alongside this package now works. The case that still remains is the upgrade path, which is also what worried me in #713. It seems that if protobuf 2.6.1 is installed, there's no way to safely upgrade that to work with a newer protobuf. However, `pip uninstall` && `pip install` does the trick. --- python/setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/python/setup.py b/python/setup.py index 24ac53db..6ea3bad7 100755 --- a/python/setup.py +++ b/python/setup.py @@ -210,6 +210,7 @@ if __name__ == '__main__': "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", ], + namespace_packages=['google'], packages=find_packages( exclude=[ 'import_test_package', -- cgit v1.2.3