From 932853228928bd084e67641a165bfcaffb0d8535 Mon Sep 17 00:00:00 2001 From: Dmitry Prudnikov Date: Thu, 9 Apr 2026 17:05:59 +0300 Subject: [PATCH] fix(coordinode): move package into coordinode/ subdirectory for correct wheel build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit hatchling's packages = ["coordinode"] requires a coordinode/ subdirectory. Previously __init__.py and other modules were co-located with pyproject.toml, making the project root the package root — unsupported by hatchling. Move __init__.py, client.py, _types.py → coordinode/coordinode/ Update pyproject.toml: version-file path, revert sources → packages Update Makefile: PROTO_OUT points to coordinode/coordinode/_proto/ Update .gitignore: adjusted paths for generated files The resulting wheel now correctly contains coordinode/__init__.py and all submodules, making the package importable after pip install. --- .gitignore | 4 ++-- Makefile | 2 +- coordinode/{ => coordinode}/__init__.py | 0 coordinode/{ => coordinode}/_types.py | 0 coordinode/{ => coordinode}/client.py | 0 coordinode/pyproject.toml | 4 ++-- 6 files changed, 5 insertions(+), 5 deletions(-) rename coordinode/{ => coordinode}/__init__.py (100%) rename coordinode/{ => coordinode}/_types.py (100%) rename coordinode/{ => coordinode}/client.py (100%) diff --git a/.gitignore b/.gitignore index 9ba8e35..f19cdd2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ # Generated proto stubs — run `make proto` to regenerate -coordinode/_proto/ +coordinode/coordinode/_proto/ # Build artifacts dist/ @@ -17,7 +17,7 @@ venv/ env/ # Version files generated by hatch-vcs -coordinode/_version.py +coordinode/coordinode/_version.py langchain-coordinode/langchain_coordinode/_version.py llama-index-coordinode/llama_index/graph_stores/coordinode/_version.py GAPS.md diff --git a/Makefile b/Makefile index 5613832..d789a65 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ .PHONY: proto proto-check install install-pip test test-unit test-integration lint clean PROTO_SRC := proto -PROTO_OUT := coordinode/_proto +PROTO_OUT := coordinode/coordinode/_proto PYTHON ?= python3 # Generate gRPC stubs from proto submodule into coordinode/_proto/ diff --git a/coordinode/__init__.py b/coordinode/coordinode/__init__.py similarity index 100% rename from coordinode/__init__.py rename to coordinode/coordinode/__init__.py diff --git a/coordinode/_types.py b/coordinode/coordinode/_types.py similarity index 100% rename from coordinode/_types.py rename to coordinode/coordinode/_types.py diff --git a/coordinode/client.py b/coordinode/coordinode/client.py similarity index 100% rename from coordinode/client.py rename to coordinode/coordinode/client.py diff --git a/coordinode/pyproject.toml b/coordinode/pyproject.toml index c38e378..781a8c2 100644 --- a/coordinode/pyproject.toml +++ b/coordinode/pyproject.toml @@ -48,10 +48,10 @@ fallback-version = "0.0.0" raw-options = {root = ".."} [tool.hatch.build.hooks.vcs] -version-file = "_version.py" +version-file = "coordinode/_version.py" [tool.hatch.build.targets.wheel] -sources = {"." = "coordinode"} +packages = ["coordinode"] [tool.pytest.ini_options] asyncio_mode = "auto"