3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-06-27 16:38:46 +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
commit c590c0c12c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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)"")