From ce48b581df608a51447b758fbd405261732e76b3 Mon Sep 17 00:00:00 2001 From: Max Bachaud Date: Mon, 11 May 2026 09:30:08 -0700 Subject: [PATCH] fix(ci): explicit setuptools packages + SPDX license MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CI failed across all 4 matrix legs (ubuntu/windows × py3.11/3.12) at the `pip install -e .[dev]` step. Root cause: setuptools flat-layout auto-discovery saw lib/, hooks/, agents/, skills/, scaffold/, commands/ as top-level packages and refused to build with 'Multiple top-level packages discovered'. Fix: - Restrict packages to lib* via [tool.setuptools.packages.find] - hooks/agents/skills/scaffold/commands are plugin data, not Python packages - Switch license from deprecated TOML table to SPDX string + license-files - Pin setuptools>=77.0.0 for SPDX support Verified locally: 'pip install -e .[dev]' succeeds, 92 tests pass, ruff clean. --- pyproject.toml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 01ef593..c2b9e8a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,13 +3,25 @@ name = "maxexpresskit" version = "0.1.2" description = "Three guardrails for Claude Code: compliance, drift, ledger." requires-python = ">=3.11" -license = { text = "Apache-2.0" } +license = "Apache-2.0" +license-files = ["LICENSE"] authors = [{ name = "Max Bachaud", email = "maxbachaud@gmail.com" }] dependencies = [ "pyyaml>=6.0.1", "tomli>=2.0.1; python_version < '3.11'", ] +[build-system] +requires = ["setuptools>=77.0.0"] +build-backend = "setuptools.build_meta" + +[tool.setuptools.packages.find] +# Only `lib` is a real Python package. The other top-level dirs (hooks, agents, +# skills, scaffold, commands) are plugin data — Claude Code reads them directly, +# they are not Python packages and must not be picked up by setuptools auto-discovery. +include = ["lib*"] +exclude = ["tests*", "scaffold*", "agents*", "skills*", "commands*", "docs*", "hooks*"] + [project.optional-dependencies] dev = [ "pytest>=8.0",