diff options
author | stijn <stijn@ignitron.net> | 2021-01-14 13:23:15 +0100 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2021-02-02 21:32:20 +1100 |
commit | 03974485016654de09e42737ea875bc601d5ec56 (patch) | |
tree | 265cd4dd1807b81d7dd643f263ab73da431a9def | |
parent | 5ef71cd16793ab254a1f0e7dd46bb9f0c5809f44 (diff) |
tests/run-tests: Change default Python command used on Windows.
Default to just calling python since that is most commonly available: the
official installer or zipfiles from python.org, anaconda, nupkg all result
in python being available but not python3. In other words: the default
used so far is wrong. Note that os.name is 'posix' when running the python
version which comes with Cygwin or MSys2 so they are not affected by this.
However of all possible ways to get Python on Windows, only Cygwin provides
no python command so update the default way for running tests in the
README.
-rw-r--r-- | ports/windows/README.md | 4 | ||||
-rwxr-xr-x | tests/run-tests | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/ports/windows/README.md b/ports/windows/README.md index 8d907d1b7..1b904f8f5 100644 --- a/ports/windows/README.md +++ b/ports/windows/README.md @@ -90,6 +90,10 @@ Running the tests This is similar for all ports: cd ../../tests + python ./run-tests + +Though when running on Cygwin and using Cygwin's Python installation you'll need: + python3 ./run-tests Depending on the combination of platform and Python version used it might be diff --git a/tests/run-tests b/tests/run-tests index cb5b5cd0a..b733d8a9f 100755 --- a/tests/run-tests +++ b/tests/run-tests @@ -20,7 +20,7 @@ def base_path(*p): # is of lower version, you can point MICROPY_CPYTHON3 environment var # to the correct executable. if os.name == 'nt': - CPYTHON3 = os.getenv('MICROPY_CPYTHON3', 'python3.exe') + CPYTHON3 = os.getenv('MICROPY_CPYTHON3', 'python') MICROPYTHON = os.getenv('MICROPY_MICROPYTHON', base_path('../ports/windows/micropython.exe')) else: CPYTHON3 = os.getenv('MICROPY_CPYTHON3', 'python3') |