Find a good way to import python protobuf |
||||
Issue descriptionPython chrome device policy protobuf imports libraries which has no location when you call: from chrome_device_policy_pb2 import ChromeDeviceSettingsProto We add this locations to put library paths to sys.path. But libraries might be already loaded (i.e. due to Google App Engine) and we have to reload this libraries. Probably, it's possible to find better solution to do it. Some links from Maxim (emaxx) which could help: 1. GoogleProtobufModuleImporter from binary_proto_generator.py - which probably does the trick, but seems that we can't reuse it without copy-pasting or refactoring its code [https://cs.chromium.org/chromium/src/chrome/browser/resources/protobufs/binary_proto_generator.py?l=21&rcl=69b2a240b29809604dc859c8a41eb4f920deccfa]; 2. env.py - which contains another way of doing the magic [https://cs.chromium.org/chromium/infra/recipes-py/recipe_engine/env.py?l=47&rcl=91b41ae8cc30cc42880f60e169a854954c78493e]; 3. Discussion between the Chromium and Protobuf authors (probably with essentially the same as #2, but still interesting to read) [https://github.com/google/protobuf/issues/1484]; 4. run_slave.py - with another hack [https://cs.chromium.org/chromium/build/slave/run_slave.py?l=453&rcl=8545c35fe412d5154dacb7ab068ba1d3d2eb8cbf]; 5. even more [https://cs.chromium.org/chromium/infra/luci/appengine/components/components/utils.py?l=652&rcl=8b90cdd97f8f088bcba2fa376ce49d9863b48902].
,
Oct 20 2017
The assigned owner "yakovleva@google.com" is not able to receive e-mails, please re-triage. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Oct 20 2017
,
Oct 23 2017
,
Nov 29 2017
Issue 764774 is similar. |
||||
►
Sign in to add a comment |
||||
Comment 1 by bugdroid1@chromium.org
, Sep 12 2017