aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYu Shan <shanyu@google.com>2018-07-28 06:21:30 +0000
committerYu Shan <shanyu@google.com>2018-08-01 17:42:20 +0000
commit69365cb5ab109ed2305e46de9400ac04efac8435 (patch)
tree9e807d59e5e8717e5a94399cdc9315ba1067ffbd
parentc31a0b32ffe7748c64527e9b030d0358ad114bf7 (diff)
downloadnanopb-c-69365cb5ab109ed2305e46de9400ac04efac8435.tar.gz
Remove namespace package init script.
Remove namespace package init script so that other version of python-protobuf on host would not be included. Test: None Bug: 111798740 Change-Id: Id7ac3ac7926f2ecdeaa034b62bc99bd545814c91
-rw-r--r--generator/google/protobuf/__init__.py5
-rw-r--r--patches/__init__.py.patch16
2 files changed, 16 insertions, 5 deletions
diff --git a/generator/google/protobuf/__init__.py b/generator/google/protobuf/__init__.py
index 6210a40..82be65c 100644
--- a/generator/google/protobuf/__init__.py
+++ b/generator/google/protobuf/__init__.py
@@ -32,8 +32,3 @@
__version__ = '3.0.0'
-if __name__ != '__main__':
- try:
- __import__('pkg_resources').declare_namespace(__name__)
- except ImportError:
- __path__ = __import__('pkgutil').extend_path(__path__, __name__)
diff --git a/patches/__init__.py.patch b/patches/__init__.py.patch
new file mode 100644
index 0000000..a49b52b
--- /dev/null
+++ b/patches/__init__.py.patch
@@ -0,0 +1,16 @@
+diff --git a/generator/google/protobuf/__init__.py b/generator/google/protobuf/__init__.py
+index 6210a40..82be65c 100644
+--- a/generator/google/protobuf/__init__.py
++++ b/generator/google/protobuf/__init__.py
+@@ -32,8 +32,3 @@
+
+ __version__ = '3.0.0'
+
+-if __name__ != '__main__':
+- try:
+- __import__('pkg_resources').declare_namespace(__name__)
+- except ImportError:
+- __path__ = __import__('pkgutil').extend_path(__path__, __name__)
+--
+2.18.0.345.g5c9ce644c3-goog
+