mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-30 05:48:05 +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:
parent
7825f4ebfa
commit
f5d06571c5
1
.gitignore
vendored
1
.gitignore
vendored
@ -25,7 +25,6 @@ images/google/protobuf/*.h
|
|||||||
.gitid
|
.gitid
|
||||||
criu/criu
|
criu/criu
|
||||||
criu/unittest/unittest
|
criu/unittest/unittest
|
||||||
crit/crit
|
|
||||||
criu/arch/*/sys-exec-tbl*.c
|
criu/arch/*/sys-exec-tbl*.c
|
||||||
# x86 syscalls-table is not generated
|
# x86 syscalls-table is not generated
|
||||||
!criu/arch/x86/sys-exec-tbl.c
|
!criu/arch/x86/sys-exec-tbl.c
|
||||||
|
16
Makefile
16
Makefile
@ -156,7 +156,7 @@ HOSTCFLAGS += $(WARNINGS) $(DEFINES) -iquote include/
|
|||||||
export AFLAGS CFLAGS USERCLFAGS HOSTCFLAGS
|
export AFLAGS CFLAGS USERCLFAGS HOSTCFLAGS
|
||||||
|
|
||||||
# Default target
|
# Default target
|
||||||
all: criu lib crit
|
all: criu lib
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -259,26 +259,19 @@ criu: $(criu-deps)
|
|||||||
$(Q) $(MAKE) $(build)=criu all
|
$(Q) $(MAKE) $(build)=criu all
|
||||||
.PHONY: criu
|
.PHONY: criu
|
||||||
|
|
||||||
crit/Makefile: ;
|
|
||||||
crit/%: criu .FORCE
|
|
||||||
$(Q) $(MAKE) $(build)=crit $@
|
|
||||||
crit: criu
|
|
||||||
$(Q) $(MAKE) $(build)=crit all
|
|
||||||
.PHONY: crit
|
|
||||||
|
|
||||||
unittest: $(criu-deps)
|
unittest: $(criu-deps)
|
||||||
$(Q) $(MAKE) $(build)=criu unittest
|
$(Q) $(MAKE) $(build)=criu unittest
|
||||||
.PHONY: unittest
|
.PHONY: unittest
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Libraries next once crit it ready
|
# Libraries next once criu is ready
|
||||||
# (we might generate headers and such
|
# (we might generate headers and such
|
||||||
# when building criu itself).
|
# when building criu itself).
|
||||||
lib/Makefile: ;
|
lib/Makefile: ;
|
||||||
lib/%: crit .FORCE
|
lib/%: criu .FORCE
|
||||||
$(Q) $(MAKE) $(build)=lib $@
|
$(Q) $(MAKE) $(build)=lib $@
|
||||||
lib: crit
|
lib: criu
|
||||||
$(Q) $(MAKE) $(build)=lib all
|
$(Q) $(MAKE) $(build)=lib all
|
||||||
.PHONY: lib
|
.PHONY: lib
|
||||||
|
|
||||||
@ -290,7 +283,6 @@ clean mrproper:
|
|||||||
$(Q) $(MAKE) $(build)=compel $@
|
$(Q) $(MAKE) $(build)=compel $@
|
||||||
$(Q) $(MAKE) $(build)=compel/plugins $@
|
$(Q) $(MAKE) $(build)=compel/plugins $@
|
||||||
$(Q) $(MAKE) $(build)=lib $@
|
$(Q) $(MAKE) $(build)=lib $@
|
||||||
$(Q) $(MAKE) $(build)=crit $@
|
|
||||||
.PHONY: clean mrproper
|
.PHONY: clean mrproper
|
||||||
|
|
||||||
clean-amdgpu_plugin:
|
clean-amdgpu_plugin:
|
||||||
|
@ -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
|
|
@ -3,4 +3,4 @@
|
|||||||
from pycriu import cli
|
from pycriu import cli
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
cli.main()
|
cli.main()
|
@ -1,6 +0,0 @@
|
|||||||
#!/usr/bin/env python2
|
|
||||||
|
|
||||||
from pycriu import cli
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
cli.main()
|
|
@ -41,7 +41,7 @@ clean: clean-lib
|
|||||||
cleanup-y += lib/c/$(CRIU_SO) lib/c/$(CRIU_A) lib/c/criu.pc
|
cleanup-y += lib/c/$(CRIU_SO) lib/c/$(CRIU_A) lib/c/criu.pc
|
||||||
mrproper: clean
|
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
|
$(E) " INSTALL " lib
|
||||||
$(Q) mkdir -p $(DESTDIR)$(LIBDIR)
|
$(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)
|
$(Q) install -m 755 lib/c/$(CRIU_SO) $(DESTDIR)$(LIBDIR)/$(CRIU_SO).$(CRIU_SO_VERSION_MAJOR).$(CRIU_SO_VERSION_MINOR)
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
import argparse
|
import argparse
|
||||||
import sys
|
import sys
|
||||||
|
@ -2,16 +2,7 @@
|
|||||||
|
|
||||||
CRIU=$(readlink -f `dirname ${BASH_SOURCE[0]}`/../../criu/criu)
|
CRIU=$(readlink -f `dirname ${BASH_SOURCE[0]}`/../../criu/criu)
|
||||||
criu=$CRIU
|
criu=$CRIU
|
||||||
if [ $(which python3) ]; then
|
CRIT=$(readlink -f `dirname ${BASH_SOURCE[0]}`/../../crit/crit)
|
||||||
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=$CRIT
|
crit=$CRIT
|
||||||
CRIU_COREDUMP=$(readlink -f `dirname ${BASH_SOURCE[0]}`/../../coredump/coredump)
|
CRIU_COREDUMP=$(readlink -f `dirname ${BASH_SOURCE[0]}`/../../coredump/coredump)
|
||||||
criu_coredump=$CRIU_COREDUMP
|
criu_coredump=$CRIU_COREDUMP
|
||||||
|
Loading…
x
Reference in New Issue
Block a user