From bb3948813cd3329218a2487ae295800ad2997716 Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Thu, 9 Jun 2016 21:14:33 -0700 Subject: [PATCH] Fix namespace package usage Turns out that Python namespace packages may be asymmetrical. The contents of a particular package that was installed first (here grpcio) appears to retain its contents in the installation directory when all other distributions declare that package as a namespace package (here grpcio-tools). --- setup.py | 1 - src/python/grpcio/grpc/__init__.py | 2 -- 2 files changed, 3 deletions(-) diff --git a/setup.py b/setup.py index e2de96de358..f73501b8b35 100644 --- a/setup.py +++ b/setup.py @@ -246,7 +246,6 @@ setuptools.setup( ext_modules=CYTHON_EXTENSION_MODULES, packages=list(PACKAGES), package_dir=PACKAGE_DIRECTORIES, - namespace_packages=['grpc'], package_data=PACKAGE_DATA, install_requires=INSTALL_REQUIRES, setup_requires=SETUP_REQUIRES, diff --git a/src/python/grpcio/grpc/__init__.py b/src/python/grpcio/grpc/__init__.py index 5ba5a4e1fdd..cf6eb1d25cd 100644 --- a/src/python/grpcio/grpc/__init__.py +++ b/src/python/grpcio/grpc/__init__.py @@ -29,8 +29,6 @@ """gRPC's Python API.""" -__import__('pkg_resources').declare_namespace(__name__) - import abc import enum