| Index: third_party/dom_distiller_js/protoc_plugins/util/plugin_protos.py
|
| diff --git a/third_party/dom_distiller_js/protoc_plugins/util/plugin_protos.py b/third_party/dom_distiller_js/protoc_plugins/util/plugin_protos.py
|
| index 009987dfd18b1a5d0357847a45ca308b4b381be4..e60cba19618783049cb7d6d15956021f5dddfb32 100644
|
| --- a/third_party/dom_distiller_js/protoc_plugins/util/plugin_protos.py
|
| +++ b/third_party/dom_distiller_js/protoc_plugins/util/plugin_protos.py
|
| @@ -12,22 +12,22 @@ and https://developers.google.com/protocol-buffers/docs/reference/cpp/google.pro
|
| import os
|
| import sys
|
|
|
| -SCRIPT_DIR = os.path.dirname(__file__)
|
| -SRC_DIR = os.path.abspath(os.path.join(SCRIPT_DIR, '..', '..', '..', '..'))
|
| -
|
| -sys.path.insert(
|
| - 1, os.path.join(SRC_DIR, 'third_party', 'protobuf', 'python'))
|
| -sys.path.insert(
|
| - 1, os.path.join(SRC_DIR, 'third_party', 'protobuf', 'third_party', 'six'))
|
| +PYPROTO_DIR = os.path.abspath('pyproto')
|
| +sys.path.insert(0, PYPROTO_DIR)
|
| +import google.protobuf
|
| +
|
| +FOO = os.path.abspath( \
|
| + os.path.join(os.path.dirname(google.protobuf.__file__), '..', '..'))
|
| +if PYPROTO_DIR != FOO:
|
| + print >> sys.stderr, 'PYPROTO_DIR = ' + PYPROTO_DIR
|
| + print >> sys.stderr, 'FOO = ' + FOO
|
| + assert False
|
| +
|
| +from google.protobuf.compiler import plugin_pb2
|
| from google.protobuf.descriptor_pb2 import FieldDescriptorProto
|
|
|
| from . import types
|
|
|
| -sys.path.insert(
|
| - 1, os.path.join(SRC_DIR,
|
| - 'third_party', 'dom_distiller_js', 'dist', 'python'))
|
| -import plugin_pb2
|
| -
|
|
|
| class PluginRequest(object):
|
| def __init__(self, proto):
|
|
|