[CRIU] [PATCH 4/9] pycriu: add python package

Cyrill Gorcunov gorcunov at gmail.com
Thu Oct 9 12:03:57 PDT 2014


On Wed, Oct 08, 2014 at 08:04:45PM +0400, Pavel Emelyanov wrote:
> 
> > --- /dev/null
> > +++ b/pycriu/images/Makefile
> > @@ -0,0 +1,17 @@
> > +all: protobuf magic.py
> > +
> > +.PHONY: all protobuf clean
> > +
> > +# We don't need rpc_pb2.py here, as it is not related to the
> > +# images.
> > +# Unfortunately, we can't drop ugly _pb2 suffixes here, because
> > +# some _pb2 files depend on others _pb2 files.
> > +protobuf:
> > +	$(Q) cp $(SRC_DIR)/protobuf/*_pb2.py ./ ; rm rpc_pb2.py
> 
> Wow... Cyrill, can we do it in a nicer way?

Hard to say. Either one need to do deps analysis manually (just like
we've been doing for protobuf files itself) and provide proper targets.
I fear I can't do that right now BUT I suggest to add

[cyrill at moon criu] git diff pycriu/Makefile
diff --git a/pycriu/Makefile b/pycriu/Makefile
index 81750b38a34f..aaa417b91f95 100644
--- a/pycriu/Makefile
+++ b/pycriu/Makefile
@@ -7,6 +7,7 @@ images:
 
 # rpc_pb2.py doesn't depend on any other file, so
 # it is safe to rename it, dropping ugly _pb2 suffix.
+$(warning "FIXME: Generate pre-deps for python instead of full copying")
 rpc.py:
        $(Q) cp $(SRC_DIR)/protobuf/$(@:.py=_pb2.py) $@


somewhere into this file, so that everytime we run it would nag us ;)


More information about the CRIU mailing list