1
0
mirror of synced 2026-02-09 01:50:59 +00:00

Merge pull request #5111 from YosysHQ/krys/config_python

Makefile: Conditional assignment of python exe
This commit is contained in:
KrystalDelusion
2025-05-13 09:54:26 +12:00
committed by GitHub

View File

@@ -204,7 +204,7 @@ endif
include Makefile.conf
endif
PYTHON_EXECUTABLE := $(shell if python3 -c ""; then echo "python3"; else echo "python"; fi)
PYTHON_EXECUTABLE ?= $(shell if python3 -c ""; then echo "python3"; else echo "python"; fi)
ifeq ($(ENABLE_PYOSYS),1)
PYTHON_VERSION_TESTCODE := "import sys;t='{v[0]}.{v[1]}'.format(v=list(sys.version_info[:2]));print(t)"
PYTHON_VERSION := $(shell $(PYTHON_EXECUTABLE) -c ""$(PYTHON_VERSION_TESTCODE)"")