Skip to content

Commit 994a4df

Browse files
committed
Add PDM development workflow that integrates YoWASP toolchain.
This can simplify smoke testing of boards supported by the FOSS toolchains. Testing a board with an iCE40, ECP5, etc FPGA is now as simple as: pdm install --dev pdm run python -m amaranth_boards.board_name It is not necessary to install a toolchain, set several environment variables, or do anything else.
1 parent 3a662f0 commit 994a4df

File tree

2 files changed

+28
-7
lines changed

2 files changed

+28
-7
lines changed

.gitignore

+8-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
# Python
2-
*.pyc
3-
/*.egg-info
4-
/.eggs
2+
__pycache__/
3+
*.egg-info
54
/dist
65

6+
# pdm
7+
/.pdm-plugins
8+
/.pdm-python
9+
/.venv
10+
/pdm.lock
11+
712
# misc user-created
813
/build

pyproject.toml

+20-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
[build-system]
2-
requires = ["wheel", "setuptools~=67.0", "setuptools_scm[toml]>=6.2"]
3-
build-backend = "setuptools.build_meta"
4-
51
[project]
62
dynamic = ["version"]
73

@@ -20,6 +16,12 @@ dependencies = [
2016
"Source Code" = "https://github.com/amaranth-lang/amaranth-boards"
2117
"Bug Tracker" = "https://github.com/amaranth-lang/amaranth-boards/issues"
2218

19+
# Build system configuration
20+
21+
[build-system]
22+
requires = ["wheel", "setuptools~=67.0", "setuptools_scm[toml]>=6.2"]
23+
build-backend = "setuptools.build_meta"
24+
2325
[tool.setuptools]
2426
# If old amaranth-boards is checked out with git (e.g. as a part of a persistent editable install
2527
# or a git worktree cached by tools like poetry), it can have an empty `nmigen_boards` directory
@@ -29,3 +31,17 @@ packages = ["amaranth_boards"]
2931

3032
[tool.setuptools_scm]
3133
local_scheme = "node-and-timestamp"
34+
35+
# Development workflow configuration
36+
37+
[tool.pdm.dev-dependencies]
38+
toolchain = [
39+
"amaranth-yosys",
40+
"yowasp-yosys",
41+
"yowasp-nextpnr-ice40",
42+
"yowasp-nextpnr-ecp5",
43+
"yowasp-nextpnr-gowin",
44+
]
45+
46+
[tool.pdm.scripts]
47+
_.env_file = ".env.toolchain"

0 commit comments

Comments
 (0)