From 46e0a00a08607ad50d6ff9326b471b136ea86960 Mon Sep 17 00:00:00 2001 From: Catherine Date: Wed, 22 Mar 2023 00:41:15 +0000 Subject: [PATCH] Add a workaround for setuptools erroring out on stale git checkouts. --- pyproject.toml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 7e79d80..4e6cee6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,5 +26,12 @@ remote-build = ["paramiko~=2.7"] [project.scripts] amaranth-rpc = "amaranth.rpc:main" +[tool.setuptools] +# If amaranth 0.3 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` 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"] + [tool.setuptools_scm] local_scheme = "node-and-timestamp"