2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-22 01:51:51 +00:00

crit: drop python 2 support

This patch reverts changes introduced with the following commits:

4feb07020dedbf845fc00268d8ca02f4645641cd
crit: enable python2 or python3 based crit

b78c4e071a42ebe34aac82fa0711df07ed375e2b
test: fix crit test and extend it

Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
This commit is contained in:
Radostin Stoyanov 2023-06-20 08:43:34 +01:00 committed by Andrei Vagin
parent 7825f4ebfa
commit f5d06571c5
8 changed files with 8 additions and 44 deletions

1
.gitignore vendored
View File

@ -25,7 +25,6 @@ images/google/protobuf/*.h
.gitid
criu/criu
criu/unittest/unittest
crit/crit
criu/arch/*/sys-exec-tbl*.c
# x86 syscalls-table is not generated
!criu/arch/x86/sys-exec-tbl.c

View File

@ -156,7 +156,7 @@ HOSTCFLAGS += $(WARNINGS) $(DEFINES) -iquote include/
export AFLAGS CFLAGS USERCLFAGS HOSTCFLAGS
# Default target
all: criu lib crit
all: criu lib
.PHONY: all
#
@ -259,26 +259,19 @@ criu: $(criu-deps)
$(Q) $(MAKE) $(build)=criu all
.PHONY: criu
crit/Makefile: ;
crit/%: criu .FORCE
$(Q) $(MAKE) $(build)=crit $@
crit: criu
$(Q) $(MAKE) $(build)=crit all
.PHONY: crit
unittest: $(criu-deps)
$(Q) $(MAKE) $(build)=criu unittest
.PHONY: unittest
#
# Libraries next once crit it ready
# Libraries next once criu is ready
# (we might generate headers and such
# when building criu itself).
lib/Makefile: ;
lib/%: crit .FORCE
lib/%: criu .FORCE
$(Q) $(MAKE) $(build)=lib $@
lib: crit
lib: criu
$(Q) $(MAKE) $(build)=lib all
.PHONY: lib
@ -290,7 +283,6 @@ clean mrproper:
$(Q) $(MAKE) $(build)=compel $@
$(Q) $(MAKE) $(build)=compel/plugins $@
$(Q) $(MAKE) $(build)=lib $@
$(Q) $(MAKE) $(build)=crit $@
.PHONY: clean mrproper
clean-amdgpu_plugin:

View File

@ -1,13 +0,0 @@
all-y += crit
crit/crit: crit/crit-$(PYTHON)
$(Q) cp $^ $@
crit: crit/crit
.PHONY: crit
clean-crit:
$(Q) $(RM) crit/crit
.PHONY: clean-crit
clean: clean-crit
mrproper: clean

View File

@ -3,4 +3,4 @@
from pycriu import cli
if __name__ == '__main__':
cli.main()
cli.main()

View File

@ -1,6 +0,0 @@
#!/usr/bin/env python2
from pycriu import cli
if __name__ == '__main__':
cli.main()

View File

@ -41,7 +41,7 @@ clean: clean-lib
cleanup-y += lib/c/$(CRIU_SO) lib/c/$(CRIU_A) lib/c/criu.pc
mrproper: clean
install: lib-c lib-a lib-py crit/crit lib/c/criu.pc.in
install: lib-c lib-a lib-py lib/c/criu.pc.in
$(E) " INSTALL " lib
$(Q) mkdir -p $(DESTDIR)$(LIBDIR)
$(Q) install -m 755 lib/c/$(CRIU_SO) $(DESTDIR)$(LIBDIR)/$(CRIU_SO).$(CRIU_SO_VERSION_MAJOR).$(CRIU_SO_VERSION_MINOR)

View File

@ -1,3 +1,4 @@
#!/usr/bin/env python3
from __future__ import print_function
import argparse
import sys

View File

@ -2,16 +2,7 @@
CRIU=$(readlink -f `dirname ${BASH_SOURCE[0]}`/../../criu/criu)
criu=$CRIU
if [ $(which python3) ]; then
PYTHON=python3
elif [ $(which python2) ]; then
PYTHON=python2
else
echo "FAIL: Neither python3 nor python2"
exit 1
fi
#export PYTHON
CRIT=$(readlink -f `dirname ${BASH_SOURCE[0]}`/../../crit/crit-"${PYTHON}")
CRIT=$(readlink -f `dirname ${BASH_SOURCE[0]}`/../../crit/crit)
crit=$CRIT
CRIU_COREDUMP=$(readlink -f `dirname ${BASH_SOURCE[0]}`/../../coredump/coredump)
criu_coredump=$CRIU_COREDUMP