[CRIU] [PATCH 1/5] crit: make crit python2/python3 compatible

Adrian Reber areber at redhat.com
Mon May 14 16:35:22 MSK 2018


On Mon, May 14, 2018 at 04:33:13PM +0300, Mike Rapoport wrote:
> On Mon, May 14, 2018 at 01:07:07PM +0000, Adrian Reber wrote:
> > From: Adrian Reber <areber at redhat.com>
> > 
> > Signed-off-by: Adrian Reber <areber at redhat.com>
> > ---
> >  crit/crit                 | 33 +++++++++++++++++----------------
> >  criu/Makefile.packages    |  1 +
> >  lib/py/__init__.py        |  6 +++---
> >  lib/py/criu.py            |  2 +-
> >  lib/py/images/Makefile    |  2 +-
> >  lib/py/images/__init__.py |  8 +++++---
> >  lib/py/images/images.py   |  8 ++++----
> >  lib/py/images/pb2dict.py  | 35 +++++++++++++++++++----------------
> >  scripts/magic-gen.py      |  2 +-
> >  9 files changed, 52 insertions(+), 45 deletions(-)
> > 
> 
> [ ... ]
> 
> > diff --git a/criu/Makefile.packages b/criu/Makefile.packages
> > index 886394f..b04d6a7 100644
> > --- a/criu/Makefile.packages
> > +++ b/criu/Makefile.packages
> > @@ -6,6 +6,7 @@ REQ-RPM-PKG-NAMES	+= protobuf-devel
> >  REQ-RPM-PKG-NAMES	+= protobuf-python
> >  REQ-RPM-PKG-NAMES	+= libnl3-devel
> >  REQ-RPM-PKG-NAMES	+= libcap-devel
> > +REQ-RPM-PKG-NAMES	+= $(CRIU_PYTHON)-future
> 
> Can you please also update REQ-DEB-PKG-NAMES? 

Thanks for the reminder. I was planning to update it, but forgot.

> >  REQ-RPM-PKG-TEST-NAMES  += libaio-devel
> 
> And while you are on it, I think the PKG-TEST is missing python-yaml.

I will add it after the first round of reviews.

		Adrian

> > diff --git a/lib/py/__init__.py b/lib/py/__init__.py
> > index 8e17499..96b3e95 100644
> > --- a/lib/py/__init__.py
> > +++ b/lib/py/__init__.py
> > @@ -1,3 +1,3 @@
> > -import rpc_pb2 as rpc
> > -import images
> > -from criu import *
> > +from . import rpc_pb2 as rpc
> > +from . import images
> > +from .criu import *
> > diff --git a/lib/py/criu.py b/lib/py/criu.py
> > index e4e46b5..85c7c07 100644
> > --- a/lib/py/criu.py
> > +++ b/lib/py/criu.py
> 
> [ ... ]
> 
> -- 
> Sincerely yours,
> Mike.
> 


More information about the CRIU mailing list