aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCatherine <whitequark@whitequark.org>2023-03-22 10:56:35 +0000
committerCatherine <whitequark@whitequark.org>2023-03-22 10:56:39 +0000
commit42152283d98ec99d6841b4f9447505cb0985db28 (patch)
tree8b5fd2223f8c1b0e4706e670ae66deec664734c3
parentce26e35b5c079625b0e7618e2e8d3a7e225db6df (diff)
Add a workaround for setuptools erroring out on stale git checkouts.
-rw-r--r--pyproject.toml7
1 files changed, 7 insertions, 0 deletions
diff --git a/pyproject.toml b/pyproject.toml
index a5ffc83..fa90ad8 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -20,5 +20,12 @@ dependencies = [
"Source Code" = "https://github.com/amaranth-lang/amaranth-boards"
"Bug Tracker" = "https://github.com/amaranth-lang/amaranth-boards/issues"
+[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"