Skip to content

Commit 0397448

Browse files
stinosdpgeorge
authored andcommitted
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.
1 parent 5ef71cd commit 0397448

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

ports/windows/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,10 @@ Running the tests
9090
This is similar for all ports:
9191

9292
cd ../../tests
93+
python ./run-tests
94+
95+
Though when running on Cygwin and using Cygwin's Python installation you'll need:
96+
9397
python3 ./run-tests
9498

9599
Depending on the combination of platform and Python version used it might be

tests/run-tests

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def base_path(*p):
2020
# is of lower version, you can point MICROPY_CPYTHON3 environment var
2121
# to the correct executable.
2222
if os.name == 'nt':
23-
CPYTHON3 = os.getenv('MICROPY_CPYTHON3', 'python3.exe')
23+
CPYTHON3 = os.getenv('MICROPY_CPYTHON3', 'python')
2424
MICROPYTHON = os.getenv('MICROPY_MICROPYTHON', base_path('../ports/windows/micropython.exe'))
2525
else:
2626
CPYTHON3 = os.getenv('MICROPY_CPYTHON3', 'python3')

0 commit comments

Comments
 (0)