From a70bf57c6f1cb1a25b6a597a61bfbb14a7b9cc96 Mon Sep 17 00:00:00 2001 From: Branch Vincent Date: Tue, 14 Dec 2021 00:19:52 -0500 Subject: [PATCH] fix(makefile): support python 3.10 Signed-off-by: Branch Vincent --- third-party/chpl-venv/Makefile | 32 ++++---------------------------- 1 file changed, 4 insertions(+), 28 deletions(-) diff --git a/third-party/chpl-venv/Makefile b/third-party/chpl-venv/Makefile index eb227b116ff7..c623a1222d8d 100644 --- a/third-party/chpl-venv/Makefile +++ b/third-party/chpl-venv/Makefile @@ -24,34 +24,10 @@ OLD_PYTHON_ERROR="python3 version 3.5 or later is required to install chpldoc an # (to allow for a different path to the system python3 in the future) $(CHPL_VENV_VIRTUALENV_DIR_OK): @# First check the python version is OK - @case `$(PYTHON) --version` in \ - *"Python 3.0"*) \ - echo $(OLD_PYTHON_ERROR) ; \ - exit 1 ; \ - ;; \ - *"Python 3.1"*) \ - echo $(OLD_PYTHON_ERROR) ; \ - exit 1 ; \ - ;; \ - *"Python 3.2"*) \ - echo $(OLD_PYTHON_ERROR) ; \ - exit 1 ; \ - ;; \ - *"Python 3.3"*) \ - echo $(OLD_PYTHON_ERROR) ; \ - exit 1 ; \ - ;; \ - *"Python 3.4"*) \ - echo $(OLD_PYTHON_ERROR) ; \ - exit 1 ; \ - ;; \ - *"Python 3"*) \ - ;; \ - *) \ - echo $(OLD_PYTHON_ERROR) ; \ - exit 1 ; \ - ;; \ - esac + @if $(PYTHON) -c 'import sys; sys.exit(int(sys.version_info[:2] >= (3, 5)))'; then \ + echo $(OLD_PYTHON_ERROR); \ + exit 1; \ + fi @# Now create the venv to use to get the dependencies $(PYTHON) -m venv $(CHPL_VENV_VIRTUALENV_DIR)