Repository navigation
fix make issue PYTHON_EXE - #4792
Conversation
0772900 switched the Tcl scripts from python3 to $::env(PYTHON_EXE), but generate-vars.sh leaves out *_EXE vars and only the yosys run-me script exported it. So OpenROAD-stage issues (e.g. global_place) failed in erase_non_stage_variables. Write a portable python3 default into both vars.sh and vars.tcl, and remove the export that only the yosys run-me script had. Signed-off-by: Augusto Berndt <augusto.berndt@precisioninno.com> Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: Augusto Berndt <augusto.berndt@precisioninno.com>
There was a problem hiding this comment.
Code Review
This pull request configures a default PYTHON_EXE (defaulting to python3) in the generated shell and Tcl variable files within flow/util/generate-vars.sh, allowing the redundant fallback to be removed from flow/util/makeIssue.sh. The review feedback recommends using the fully-qualified ::env global namespace instead of env in the generated Tcl script to prevent scoping issues and maintain consistency.
| echo 'export FLOW_HOME=${FLOW_HOME:-$(pwd)}' > $1.sh | ||
| # *_EXE paths are machine specific and excluded below; default to PATH lookup. | ||
| echo 'export PYTHON_EXE=${PYTHON_EXE:-python3}' >> $1.sh | ||
| echo 'if { ![info exists env(PYTHON_EXE)] } { set env(PYTHON_EXE) python3 }' > $1.tcl |
There was a problem hiding this comment.
Using the fully-qualified ::env global namespace is more robust in Tcl than the unqualified env array. This avoids potential scoping issues if the generated Tcl script is sourced within a non-global scope (such as inside a procedure or namespace). It also maintains consistency with how other environment variables are referenced in the codebase (e.g., $::env(FLOW_HOME)).
| echo 'if { ![info exists env(PYTHON_EXE)] } { set env(PYTHON_EXE) python3 }' > $1.tcl | |
| echo 'if { ![info exists ::env(PYTHON_EXE)] } { set ::env(PYTHON_EXE) python3 }' > $1.tcl |
🔍 QoR checkMetrics reflect the PR merge build — i.e. what will land on the target branch. Commit 62 design(s) checked — 0 with regression(s), 0 without a comparable baseline. |
|
Non-sequitor: perhaps this should be rewritten to Python now by AI and add unit-tests with mocking... |
I see the following error when executing a run-me (including -gui), generated with
make global_place_issue. Tested with private 12nm design and nangate45/gcd both reproduce the issue.