From 994a4df196b1d61a9a96ce57ffa1dab74ba4b282 Mon Sep 17 00:00:00 2001 From: Catherine Date: Tue, 8 Aug 2023 10:50:57 +0000 Subject: 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. --- pyproject.toml | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) (limited to 'pyproject.toml') diff --git a/pyproject.toml b/pyproject.toml index b61e0ff..ee3c4df 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,3 @@ -[build-system] -requires = ["wheel", "setuptools~=67.0", "setuptools_scm[toml]>=6.2"] -build-backend = "setuptools.build_meta" - [project] dynamic = ["version"] @@ -20,6 +16,12 @@ dependencies = [ "Source Code" = "https://github.com/amaranth-lang/amaranth-boards" "Bug Tracker" = "https://github.com/amaranth-lang/amaranth-boards/issues" +# Build system configuration + +[build-system] +requires = ["wheel", "setuptools~=67.0", "setuptools_scm[toml]>=6.2"] +build-backend = "setuptools.build_meta" + [tool.setuptools] # If old amaranth-boards is checked out with git (e.g. as a part of a persistent editable install # or a git worktree cached by tools like poetry), it can have an empty `nmigen_boards` directory @@ -29,3 +31,17 @@ packages = ["amaranth_boards"] [tool.setuptools_scm] local_scheme = "node-and-timestamp" + +# Development workflow configuration + +[tool.pdm.dev-dependencies] +toolchain = [ + "amaranth-yosys", + "yowasp-yosys", + "yowasp-nextpnr-ice40", + "yowasp-nextpnr-ecp5", + "yowasp-nextpnr-gowin", +] + +[tool.pdm.scripts] +_.env_file = ".env.toolchain" -- cgit v1.2.3