generic: Fix Python path not including the examples/ directory in the example

It seems that at some point, the embedded Python stopped including the
directory that nextpnr-generic was executed in inside of its sys.path.
This likely happened by de3d5be8 specifying an explicit argv to
the interpreter init function.
This commit is contained in:
Josef Gajdusek 2026-04-24 23:31:16 +02:00
parent 98c18d7f14
commit 7f1fa155d3
2 changed files with 2 additions and 0 deletions

View File

@ -1,5 +1,6 @@
#!/usr/bin/env bash
set -ex
export PYTHONPATH=$(dirname $0)
yosys -p "tcl ../synth/synth_generic.tcl 4 blinky.json" blinky.v
${NEXTPNR:-../../nextpnr-generic} --pre-pack simple.py --pre-place simple_timing.py --json blinky.json --post-route bitstream.py --write pnrblinky.json
yosys -p "read_verilog -lib ../synth/prims.v; read_json pnrblinky.json; dump -o blinky.il; show -format png -prefix blinky"

View File

@ -1,5 +1,6 @@
#!/usr/bin/env bash
set -ex
export PYTHONPATH=$(dirname $0)
yosys -p "tcl ../synth/synth_generic.tcl 4 blinky.json" blinky.v
${NEXTPNR:-../../nextpnr-generic} --no-iobs --pre-pack simple.py --pre-place simple_timing.py --json blinky.json --post-route bitstream.py --write pnrblinky.json
yosys -p "read_json pnrblinky.json; write_verilog -noattr -norename pnrblinky.v"