]> xenbits.xensource.com Git - unikraft/libs/python3.git/commitdiff
Makefile.uk: Ensure consistent Python binary name
authorAndrei Tatar <andrei@unikraft.io>
Wed, 11 Oct 2023 07:34:09 +0000 (09:34 +0200)
committerRazvan Deaconescu <razvand@unikraft.io>
Mon, 16 Oct 2023 00:48:12 +0000 (03:48 +0300)
Previously Makefile.uk used `python` and `python3` interchangeably which
caused unexpected issues on misconfigured systems where these two do not
point to the same binary.
This change fixes this oversight by using `python` everywhere.

Signed-off-by: Andrei Tatar <andrei@unikraft.io>
Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com>
Reviewed-by: Radu Nichita <radunichita99@gmail.com>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #22

Makefile.uk

index d3b506af34fe02e237af357df9b7d7f9990615d1..7622bb0033555ab5880b509384c478f0659cdddc 100644 (file)
@@ -497,7 +497,7 @@ PYTHON_ROOTFS = $(APP_BASE)/$(path)
 $(PYTHON_ROOTFS)/.keep: $(LIBPYTHON3_BUILD)/.origin
        @test $(LIBPYTHON3_VERSION) = `python -V | cut -d' ' -f2 | cut -d. -f1,2` || \
                (echo -e "WARNING: creating virtualenv with wrong python version, pip might not work correctly\nPress return to continue" && read)
-       python3 -m venv $(PYTHON_ROOTFS)
+       python -m venv $(PYTHON_ROOTFS)
        find "$(PYTHON_ROOTFS)" -type d -name '__pycache__' | xargs rm -rf
        touch $@
 
@@ -516,7 +516,7 @@ $(PYTHON_ROOTFS)/.done: $(PYTHON_ROOTFS)/.configured
 $(PYTHON_ROOTFS)/.compiled: python-rootfs
        test $(LIBPYTHON3_VERSION) = `python -V | cut -d' ' -f2 | cut -d. -f1,2` || \
                (echo "ERROR: local Python version is not $(LIBPYTHON3_VERSION), cannot compile .py files" && false)
-       python3 -m compileall -x 'lib2to3/|test/bad' "$(PYTHON_ROOTFS)/lib"
+       python -m compileall -x 'lib2to3/|test/bad' "$(PYTHON_ROOTFS)/lib"
        touch $@
 
 .PHONY: python-rootfs