Commit af74019d authored by Raghavendra Prabhu's avatar Raghavendra Prabhu Committed by Pavel Emelyanov

Ensure the install process is PEP-394 compliant.

The installation needs to use python2, but it uses python in the
Makefile which fails later with syntax error
(since it is written for python2).

As per PEP-394 - https://www.python.org/dev/peps/pep-0394/ -,
'all distributions should ensure that python refers to the same target
as python2 .', hence this change.

Therefore, python2 is used by default in lib/Makefile, though
this can be overriden with PYTHON_BIN.

Tested with:

a) PYTHON_BIN=python2 make install
b) make install

c) export PYTHON_BIN=python2
   make test

Signed-off-by: Raghavendra Prabhu <me at rdprabhu dot com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 3a18b4c9
...@@ -2,6 +2,7 @@ include $(__nmk_dir)include.mk ...@@ -2,6 +2,7 @@ include $(__nmk_dir)include.mk
CRIU_SO := libcriu.so CRIU_SO := libcriu.so
UAPI_HEADERS := c/criu.h ../images/rpc.proto UAPI_HEADERS := c/criu.h ../images/rpc.proto
PYTHON_BIN ?= python2
# #
# File to keep track of files installed by setup.py # File to keep track of files installed by setup.py
...@@ -55,7 +56,7 @@ install: lib-c lib-py ../crit/crit c/criu.pc.in ...@@ -55,7 +56,7 @@ install: lib-c lib-py ../crit/crit c/criu.pc.in
$(Q) sed -e 's,@version@,$(CRIU_VERSION),' -e 's,@libdir@,$(LIBDIR),' -e 's,@includedir@,$(dir $(INCLUDEDIR)),' c/criu.pc.in > c/criu.pc $(Q) sed -e 's,@version@,$(CRIU_VERSION),' -e 's,@libdir@,$(LIBDIR),' -e 's,@includedir@,$(dir $(INCLUDEDIR)),' c/criu.pc.in > c/criu.pc
$(Q) install -m 644 c/criu.pc $(DESTDIR)$(LIBDIR)/pkgconfig $(Q) install -m 644 c/criu.pc $(DESTDIR)$(LIBDIR)/pkgconfig
$(E) " INSTALL " crit $(E) " INSTALL " crit
$(Q) python ../scripts/crit-setup.py install --root=$(DESTDIR) --prefix=$(PREFIX) --record $(CRIT_SETUP_FILES) $(Q) $(PYTHON_BIN) ../scripts/crit-setup.py install --root=$(DESTDIR) --prefix=$(PREFIX) --record $(CRIT_SETUP_FILES)
.PHONY: install .PHONY: install
uninstall: uninstall:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment