mirror of
https://github.com/YosysHQ/yosys
synced 2025-05-12 02:04:44 +00:00
Makefile: Conditional assignment of python exe
Using `:=` while providing an override (either in Makefile.conf or on the command line) does not correctly apply the override in other simply expanded variables (using `:=`). Instead, passing an explicit `PYTHON_EXECUTABLE=python3.15` while leaving `PYTHON_CONFIG` implicitly defined results in it being set to `python3-config` instead of the expected `python3.15-config`.
This commit is contained in:
parent
55bd950af4
commit
1e2d6508d0
1 changed files with 1 additions and 1 deletions
2
Makefile
2
Makefile
|
@ -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)"")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue