mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2026-11-26 23:29:02 +00:00
🧑💻 Fix Python detection on Windows (#28733)
This commit is contained in:
parent
0e29237521
commit
782697fca1
1 changed files with 2 additions and 2 deletions
4
Makefile
4
Makefile
|
|
@ -9,8 +9,8 @@ export PRETTIER_VERSION
|
|||
|
||||
# Find a Python 3 interpreter
|
||||
ifeq ($(OS),Windows_NT)
|
||||
# Windows: use `where` – fall back through the three common names
|
||||
PYTHON := $(shell which python 2>nul || which python3 2>nul || which py 2>nul)
|
||||
# Windows: use the first of the three common names that runs
|
||||
PYTHON := $(if $(filter ok,$(shell python -c "print('ok')" 2>/dev/null)),python,$(if $(filter ok,$(shell python3 -c "print('ok')" 2>/dev/null)),python3,py))
|
||||
# Windows: Use Python script to find pins files
|
||||
ALL_PINS := $(shell $(PYTHON) $(MAKESCRIPTS_DIR)/find.py Marlin/src/pins -mindepth 2 -name 'pins_*.h')
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue