Closed mcclure closed 1 year ago
I will study that carefully. I did the minimal changes to use pdm instead of build and solve the immediate problem.
So thank you to point some reference material and underlining that it becomes the prefered build system.
Sure, let me know if you need any other help
Resolved with #12
As we discussed in the other issue, recently Amaranth has moved over to a build/deployment system based on pdm. pdm is like npm for python, you can use it in a venv-like way but the normal way is to invoke pdm scripts like
python -m pdm run scriptname
which then run inside pdm's venv. In7-does-not-appear-to-build-on-windows
you have upgraded to amaranth pdm, but you could go further.If you compare amaranth projects based on current sample code— for example see this project for doppler (I messed up the build system a little here, see run.txt) or this project for Analogue Pocket, both forks of whitequark templates— every part of install, build and synthesis is managed through pdm. External tools like bash are not needed, everything is scripted through python. A yosys installation is not needed because of some thing whitequark rigged up where yosys is compiled as a wasm blob installed via a python package. In the basic template a bitstream can be created directly from
pdm run build_ice40
(which executes function build_ice40() in amaranth_template_fpga/init.py(), see pyproject.toml).If your workflow works for you, then you do not need to do this :) But, moving to this approach would be more in line with other current Amaranth-based projects and aid with running on a broader range of configurations (for example in #7 to run on Windows I am currently having to open the bash script in a second window and mentally convert it to windows cmd line by line when I type commands, also the bash script has the minor problem that it assumes the python executable is named python3).