Repository: mesos Updated Branches: refs/heads/master 63ed98634 -> f57a1756c
Fixed python egg proto imports. Fixes defective import introduced by the flat folder hierachy of the mesos.interface Python egg generation. Review: https://reviews.apache.org/r/25334 Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/f57a1756 Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/f57a1756 Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/f57a1756 Branch: refs/heads/master Commit: f57a1756c962c51133467527a761c3080ea0ba18 Parents: 63ed986 Author: Till Toenshoff <[email protected]> Authored: Tue Sep 9 11:56:11 2014 +0200 Committer: Till Toenshoff <[email protected]> Committed: Tue Sep 9 11:56:11 2014 +0200 ---------------------------------------------------------------------- src/Makefile.am | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/f57a1756/src/Makefile.am ---------------------------------------------------------------------- diff --git a/src/Makefile.am b/src/Makefile.am index 5526189..37b4370 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -216,15 +216,24 @@ python/interface/src/mesos/interface/mesos_pb2.py: $(MESOS_PROTO) $(PROTOC) -I$(top_srcdir)/include/mesos \ $(PROTOCFLAGS) --python_out=python/interface/src/mesos/interface $^ -python/interface/src/mesos/interface/containerizer_pb2.py: $(CONTAINERIZER_PROTO) +# All python protocol buffer code that imports from mesos.proto has +# to get patched using sed, removing the leading 'mesos.' namespace +# qualifier due to the flat hierachy in the resulting mesos.interface +# egg. See MESOS-1750 for more. +python/interface/src/mesos/interface/containerizer_pb2.py: \ + $(CONTAINERIZER_PROTO) $(MKDIR_P) $(@D) $(PROTOC) -I$(top_srcdir)/include/mesos/containerizer \ - $(PROTOCFLAGS) --python_out=python/interface/src/mesos/interface $^ + $(PROTOCFLAGS) \ + --python_out=python/interface/src/mesos/interface $^ + sed -e 's/mesos\.mesos_pb2/mesos_pb2/' <$@ >$@ python/interface/src/mesos/interface/scheduler_pb2.py: $(SCHEDULER_PROTO) $(MKDIR_P) $(@D) $(PROTOC) -I$(top_srcdir)/include/mesos/scheduler \ - $(PROTOCFLAGS) --python_out=python/interface/src/mesos/interface $^ + $(PROTOCFLAGS) \ + --python_out=python/interface/src/mesos/interface $^ + sed -e 's/mesos\.mesos_pb2/mesos_pb2/' <$@ >$@ # We even use a convenience library for most of Mesos so that we can # exclude third party libraries so setuptools/distribute can build a
