[CRIU] [PATCH 2/2] crit: use whatever python version is default

Kir Kolyshkin kolyshkin at gmail.com
Fri May 3 18:28:37 MSK 2019


Now crit should work equally well with either python 2 or 3,
so the python2/3 hack for crit is no longer needed.

This reverts commit 4feb07020dedbf845fc00268d8ca02f4645641cd
("crit: enable python2 or python3 based crit"), and changes
`python2` to `python`.

Cc: Adrian Reber <areber at redhat.com>
Signed-off-by: Kir Kolyshkin <kolyshkin at gmail.com>
---
 .gitignore                 |  1 -
 Makefile                   | 17 ++++-------------
 crit/Makefile              | 13 -------------
 lib/py/cli.py => crit/crit |  1 +
 crit/crit-python2          |  6 ------
 crit/crit-python3          |  6 ------
 6 files changed, 5 insertions(+), 39 deletions(-)
 delete mode 100644 crit/Makefile
 rename lib/py/cli.py => crit/crit (99%)
 delete mode 100755 crit/crit-python2
 delete mode 100755 crit/crit-python3

diff --git a/.gitignore b/.gitignore
index c231104af..048668905 100644
--- a/.gitignore
+++ b/.gitignore
@@ -24,7 +24,6 @@ images/google/protobuf/*.c
 images/google/protobuf/*.h
 .gitid
 criu/criu
-crit/crit
 criu/arch/*/sys-exec-tbl*.c
 # x86 syscalls-table is not generated
 !criu/arch/x86/sys-exec-tbl.c
diff --git a/Makefile b/Makefile
index 38887da99..ce03fa4c0 100644
--- a/Makefile
+++ b/Makefile
@@ -127,7 +127,7 @@ HOSTCFLAGS		+= $(WARNINGS) $(DEFINES) -iquote include/
 export CFLAGS USERCLFAGS HOSTCFLAGS
 
 # Default target
-all: criu lib crit
+all: criu lib
 .PHONY: all
 
 #
@@ -228,22 +228,14 @@ 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
-
-
 #
-# Libraries next once crit it ready
+# Libraries next once criu it 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
 
@@ -255,7 +247,6 @@ clean mrproper:
 	$(Q) $(MAKE) $(build)=compel $@
 	$(Q) $(MAKE) $(build)=compel/plugins $@
 	$(Q) $(MAKE) $(build)=lib $@
-	$(Q) $(MAKE) $(build)=crit $@
 .PHONY: clean mrproper
 
 clean-top:
diff --git a/crit/Makefile b/crit/Makefile
deleted file mode 100644
index 988b481b6..000000000
--- a/crit/Makefile
+++ /dev/null
@@ -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
diff --git a/lib/py/cli.py b/crit/crit
similarity index 99%
rename from lib/py/cli.py
rename to crit/crit
index 29b21ec8f..28007217a 100755
--- a/lib/py/cli.py
+++ b/crit/crit
@@ -1,3 +1,4 @@
+#!/usr/bin/env python
 from __future__ import print_function
 from builtins import object
 import argparse
diff --git a/crit/crit-python2 b/crit/crit-python2
deleted file mode 100755
index b0b7d3c3a..000000000
--- a/crit/crit-python2
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/usr/bin/env python2
-
-from pycriu import cli
-
-if __name__ == '__main__':
-	cli.main()
diff --git a/crit/crit-python3 b/crit/crit-python3
deleted file mode 100755
index 80467cba7..000000000
--- a/crit/crit-python3
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/usr/bin/env python3
-
-from pycriu import cli
-
-if __name__ == '__main__':
-	cli.main()
-- 
2.17.1



More information about the CRIU mailing list