diff --git a/python/Makefile b/python/Makefile index 470d32b9d4..6c7e1ab32c 100644 --- a/python/Makefile +++ b/python/Makefile @@ -8,7 +8,7 @@ debug = not-set ifneq ($(python), not-set) PYTHON=$(python) else - PYTHON=python + PYTHON=python3 endif ifneq ($(debug), not-set) diff --git a/python/README.md b/python/README.md index c1cd00e4aa..57a3179bac 100644 --- a/python/README.md +++ b/python/README.md @@ -14,7 +14,7 @@ thing, but support different options: You can specify a few arguments to this: - - python version: `make python=python3 test` + - python version: `make python=python3.9 test` (defaults to `python3`; you should expect errors if trying to run with python2) - verbose: `make verbose=true test` - debug: `make debug=true test` diff --git a/python/ctsm/test/joblauncher/test_unit_job_launcher_no_batch.py b/python/ctsm/test/joblauncher/test_unit_job_launcher_no_batch.py old mode 100644 new mode 100755 index c407c62904..53bb6dc07d --- a/python/ctsm/test/joblauncher/test_unit_job_launcher_no_batch.py +++ b/python/ctsm/test/joblauncher/test_unit_job_launcher_no_batch.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """Unit tests for job_launcher_no_batch """ diff --git a/python/ctsm/test/test_sys_lilac_build_ctsm.py b/python/ctsm/test/test_sys_lilac_build_ctsm.py index 74121ba90d..5a44688171 100755 --- a/python/ctsm/test/test_sys_lilac_build_ctsm.py +++ b/python/ctsm/test/test_sys_lilac_build_ctsm.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """System tests for lilac_build_ctsm diff --git a/python/ctsm/test/test_unit_lilac_build_ctsm.py b/python/ctsm/test/test_unit_lilac_build_ctsm.py index 677de63da4..3c1a600326 100755 --- a/python/ctsm/test/test_unit_lilac_build_ctsm.py +++ b/python/ctsm/test/test_unit_lilac_build_ctsm.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """Unit tests for lilac_build_ctsm """ diff --git a/python/ctsm/test/test_unit_lilac_make_runtime_inputs.py b/python/ctsm/test/test_unit_lilac_make_runtime_inputs.py index 7c94089269..e6b602b3d7 100755 --- a/python/ctsm/test/test_unit_lilac_make_runtime_inputs.py +++ b/python/ctsm/test/test_unit_lilac_make_runtime_inputs.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """Unit tests for lilac_make_runtime_inputs """ diff --git a/python/ctsm/test/test_unit_machine.py b/python/ctsm/test/test_unit_machine.py index 65cd73620e..6a2f7ac172 100755 --- a/python/ctsm/test/test_unit_machine.py +++ b/python/ctsm/test/test_unit_machine.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """Unit tests for machine """ diff --git a/python/ctsm/test/test_unit_path_utils.py b/python/ctsm/test/test_unit_path_utils.py index 9d4d1a78ff..9fc996aa2c 100755 --- a/python/ctsm/test/test_unit_path_utils.py +++ b/python/ctsm/test/test_unit_path_utils.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """Unit tests for path_utils """ diff --git a/python/ctsm/test/test_unit_run_sys_tests.py b/python/ctsm/test/test_unit_run_sys_tests.py index 78ab02a648..8a53081a5b 100755 --- a/python/ctsm/test/test_unit_run_sys_tests.py +++ b/python/ctsm/test/test_unit_run_sys_tests.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """Unit tests for run_sys_tests """ diff --git a/python/ctsm/test/test_unit_utils.py b/python/ctsm/test/test_unit_utils.py index 34449aa93c..4a3fbbbb15 100755 --- a/python/ctsm/test/test_unit_utils.py +++ b/python/ctsm/test/test_unit_utils.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """Unit tests for utils """ diff --git a/python/run_ctsm_py_tests b/python/run_ctsm_py_tests index ef56f74740..a3da6fdb1f 100755 --- a/python/run_ctsm_py_tests +++ b/python/run_ctsm_py_tests @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """Driver for running the unit tests of the python code We use this rather than simply relying on 'python -m unittest discover' so we can do some diff --git a/run_sys_tests b/run_sys_tests index bccf6f00e1..48e6c71370 100755 --- a/run_sys_tests +++ b/run_sys_tests @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """Driver for running CTSM system tests""" import os