From: Andrei Tatar Date: Wed, 11 Oct 2023 07:34:09 +0000 (+0200) Subject: Makefile.uk: Ensure consistent Python binary name X-Git-Tag: RELEASE-0.15.0~1 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=14e77dd52fbbfc98eb5f2a6bff4489530b87cafa;p=unikraft%2Flibs%2Fpython3.git Makefile.uk: Ensure consistent Python binary name 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 Reviewed-by: Stefan Jumarea Reviewed-by: Radu Nichita Approved-by: Razvan Deaconescu GitHub-Closes: #22 --- diff --git a/Makefile.uk b/Makefile.uk index d3b506a..7622bb0 100644 --- a/Makefile.uk +++ b/Makefile.uk @@ -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