From bb73c9901cf845f81310eb603c9576fa417b50b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?I=C3=B1igo=20Etxaniz?= Date: Tue, 4 Aug 2026 09:27:03 +0200 Subject: [PATCH] Add packaging metadata so python -m build works MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #110 recorded pyproject.toml + __init__.py as verified on a real toolchain but they were never committed; origin has nothing past d5203ce. pyproject.toml is deliberately plain: the sidecar's pypi.ReadProjectMetadata is a line scanner, not a TOML parser, and reads name and version as literal single-line assignments under [project]. A dynamic version would break both the publish check and the startup reconcile. __init__.py re-exports the public API so src/i7lib is an importable package. .gitignore keeps dist/ out of the tree — a committed wheel would travel in gitea's source archive and trip the builder's one-wheel-in-dist check. --- .gitignore | 5 +++++ pyproject.toml | 17 +++++++++++++++++ src/i7lib/__init__.py | 5 +++++ 3 files changed, 27 insertions(+) create mode 100644 .gitignore create mode 100644 pyproject.toml create mode 100644 src/i7lib/__init__.py diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1a52355 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +dist/ +build/ +*.egg-info/ +__pycache__/ +*.pyc diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..4f8a174 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,17 @@ +[build-system] +requires = ["setuptools>=68"] +build-backend = "setuptools.build_meta" + +[project] +name = "i7lib" +version = "0.1.0" +description = "i7 library for scripts" +readme = "README.md" +requires-python = ">=3.8" +dependencies = ["requests>=2.31"] + +[project.optional-dependencies] +dotenv = ["python-dotenv>=1.0"] + +[tool.setuptools.packages.find] +where = ["src"] diff --git a/src/i7lib/__init__.py b/src/i7lib/__init__.py new file mode 100644 index 0000000..eca5cb3 --- /dev/null +++ b/src/i7lib/__init__.py @@ -0,0 +1,5 @@ +from . import timeutils +from .client import Plant, WriteBatch, run +from .dbutils import Database + +__all__ = ["Database", "Plant", "WriteBatch", "run", "timeutils"]