Skip to content

Commit

Permalink
Use python3 in more shebang lines
Browse files Browse the repository at this point in the history
This is needed to run the python unit tests on cheyenne without
explicitly pointing to python3.

There are still more shebang instances throughout CTSM that I have not
yet changed, because I'm not positive if they should be changed
yet. (buildnml and buildlib should probably be changed in conjunction
with others through CESM, and I'm not sure about the usage of the
contrib tools.)
  • Loading branch information
billsacks committed Apr 1, 2021
1 parent 6fad071 commit 610b99b
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion python/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ debug = not-set
ifneq ($(python), not-set)
PYTHON=$(python)
else
PYTHON=python
PYTHON=python3
endif

ifneq ($(debug), not-set)
Expand Down
2 changes: 1 addition & 1 deletion python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`

Expand Down
2 changes: 1 addition & 1 deletion python/ctsm/test/joblauncher/test_unit_job_launcher_no_batch.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

"""Unit tests for job_launcher_no_batch
"""
Expand Down
2 changes: 1 addition & 1 deletion python/ctsm/test/test_sys_lilac_build_ctsm.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

"""System tests for lilac_build_ctsm
Expand Down
2 changes: 1 addition & 1 deletion python/ctsm/test/test_unit_lilac_build_ctsm.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

"""Unit tests for lilac_build_ctsm
"""
Expand Down
2 changes: 1 addition & 1 deletion python/ctsm/test/test_unit_lilac_make_runtime_inputs.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

"""Unit tests for lilac_make_runtime_inputs
"""
Expand Down
2 changes: 1 addition & 1 deletion python/ctsm/test/test_unit_machine.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

"""Unit tests for machine
"""
Expand Down
2 changes: 1 addition & 1 deletion python/ctsm/test/test_unit_path_utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

"""Unit tests for path_utils
"""
Expand Down
2 changes: 1 addition & 1 deletion python/ctsm/test/test_unit_run_sys_tests.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

"""Unit tests for run_sys_tests
"""
Expand Down
2 changes: 1 addition & 1 deletion python/ctsm/test/test_unit_utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

"""Unit tests for utils
"""
Expand Down
2 changes: 1 addition & 1 deletion python/run_ctsm_py_tests
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion run_sys_tests
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""Driver for running CTSM system tests"""

import os
Expand Down

0 comments on commit 610b99b

Please sign in to comment.