aboutsummaryrefslogtreecommitdiff
path: root/pyproject.toml
diff options
context:
space:
mode:
authorThomas Watson <twatson52@icloud.com>2024-06-22 11:47:03 -0500
committerCatherine <whitequark@whitequark.org>2024-06-23 04:28:04 +0100
commit4813ae7dabf5481808c5e4aae78d540df907d5bd (patch)
treef15d75d86717f978326026fec87245d727c72ad0 /pyproject.toml
parentaba2300dc83216523e1c98fdb22471cb4bac5027 (diff)
Migrate to the PDM build system
Avoids problems with .git_archival.txt breaking reproducibility. Nabbed from https://github.com/amaranth-lang/amaranth-soc/commit/d66881d83419c689fc96168150e57d9f467723aa
Diffstat (limited to 'pyproject.toml')
-rw-r--r--pyproject.toml21
1 files changed, 8 insertions, 13 deletions
diff --git a/pyproject.toml b/pyproject.toml
index 93a981d..8cf2701 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,3 +1,8 @@
+# Project metadata
+
+[tool.pdm.version]
+source = "scm"
+
[project]
dynamic = ["version"]
@@ -19,18 +24,8 @@ dependencies = [
# 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
-# left over, which causes a hard error because setuptools cannot determine the top-level package.
-# Add a workaround to improve experience for people upgrading from old checkouts.
-packages = ["amaranth_boards"]
-
-[tool.setuptools_scm]
-local_scheme = "node-and-timestamp"
+requires = ["pdm-backend"]
+build-backend = "pdm.backend"
# Development workflow configuration
@@ -44,4 +39,4 @@ toolchain = [
[tool.pdm.scripts]
_.env_file = ".env.toolchain"
-test.cmd = "python -m unittest discover -t . -s amaranth_boards -p *.py" \ No newline at end of file
+test.cmd = "python -m unittest discover -t . -s amaranth_boards -p *.py"