From 493db693e1a33e5da6903cd9b60febbeb8e75337 Mon Sep 17 00:00:00 2001 From: Krzysztof kuhy Rudnicki Date: Tue, 4 Aug 2026 23:16:51 +0200 Subject: [PATCH] crdt-sync 0.5.1: name the packages, so pip can build again `tool/` carries an __init__.py so its scripts import cleanly, which makes it a second top-level package. setuptools' flat-layout auto-discovery refuses to build at all in that case: error: Multiple top-level packages discovered in a flat-layout: ['tool', 'crdt_sync'] so `pip install crdt-sync @ git+...` failed outright. Naming the package explicitly fixes the build and keeps one-shot migration scripts out of every consumer's site-packages. Verified by installing from a clean target directory and importing mirror_client_for from the built wheel. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01SJ9sxEw3ymzXNjL7SHNpJc --- crdt-sync/pyproject.toml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/crdt-sync/pyproject.toml b/crdt-sync/pyproject.toml index bef7f5c..060ab75 100644 --- a/crdt-sync/pyproject.toml +++ b/crdt-sync/pyproject.toml @@ -1,10 +1,18 @@ [project] name = "crdt-sync" -version = "0.5.0" +version = "0.5.1" description = "Shared CRDT merge scheme + GitHub-Contents-API sync transport for cross-device apps" requires-python = ">=3.10" dependencies = ["requests"] +# Ship only the library. `tool/` is a package too (it has an __init__.py so +# its scripts import cleanly), and setuptools' flat-layout auto-discovery +# refuses to build at all once it sees two top-level packages -- naming the +# one that belongs in the wheel is what keeps `pip install` working, and +# keeps one-shot migration scripts out of every consumer's site-packages. +[tool.setuptools] +packages = ["crdt_sync", "crdt_sync.tests"] + [tool.ruff] target-version = "py310" include = ["*.py", "**/*.py"]