Skip to content

Commit

Permalink
Add back the namespace_packages arg in setup.py.
Browse files Browse the repository at this point in the history
Improves protocolbuffers#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 protocolbuffers#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.
  • Loading branch information
craigcitro committed Mar 5, 2016
1 parent e70f925 commit 0e7c0c2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ def run(self):
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
],
namespace_packages=['google'],
packages=find_packages(
exclude=[
'import_test_package',
Expand Down

0 comments on commit 0e7c0c2

Please sign in to comment.