From 53bb82afeb81d8f5501d12abf2b514e5f3a9b7a1 Mon Sep 17 00:00:00 2001 From: Alpamys Date: Thu, 14 May 2026 00:18:20 +0500 Subject: [PATCH] =?UTF-8?q?fix(v0.53.8.1):=20hatch=20artifacts=20directive?= =?UTF-8?q?=20=E2=80=94=20fix=20PyPI=20duplicate-filename=20400?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit v0.53.8 PyPI publish failed with: 400 Invalid distribution file. ZIP archive not accepted: Duplicate filename in local headers Root cause: `[tool.hatch.build.targets.wheel.force-include]` shipped `soup_cli/data/_fixtures/` AND `packages = ["soup_cli"]` recursed into the same path, so both the wheel and sdist contained each JSONL twice. Fix: switch from force-include to `artifacts = [...]` which adds non-Python files to the existing package tree exactly once. Standard hatchling pattern for shipping data files inside an already-packaged directory. Version bumped to v0.53.8.1 (patch) — same code surface, just a build config fix. v0.53.8 GitHub release remains as the feature changelog; PyPI ships under v0.53.8.1. Co-Authored-By: Claude Opus 4.7 (1M context) --- pyproject.toml | 9 ++++++--- soup_cli/__init__.py | 2 +- tests/test_v0538.py | 6 ++++-- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 7f5c242..9736c31 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "soup-cli" -version = "0.53.8" +version = "0.53.8.1" description = "Fine-tune LLMs in one command. No SSH, no config hell." readme = "README.md" license = "Apache-2.0" @@ -78,8 +78,11 @@ Issues = "https://github.com/MakazhanAlpamys/Soup/issues" packages = ["soup_cli"] # v0.53.8 #93 — include bundled fixture JSONLs as package data so # `soup data demo` works in zipapp / namespace-package installs. -[tool.hatch.build.targets.wheel.force-include] -"soup_cli/data/_fixtures" = "soup_cli/data/_fixtures" +# Hatchling's ``packages = ["soup_cli"]`` already recurses into the +# package directory, so we use the artifacts directive (NOT +# force-include, which double-shipped the files in v0.53.8 and produced +# a "duplicate filename in local headers" 400 from PyPI upload). +artifacts = ["soup_cli/data/_fixtures/*.jsonl"] [tool.ruff] target-version = "py39" diff --git a/soup_cli/__init__.py b/soup_cli/__init__.py index eb2a001..776bc5b 100644 --- a/soup_cli/__init__.py +++ b/soup_cli/__init__.py @@ -1,3 +1,3 @@ """Soup CLI — Fine-tune LLMs in one command.""" -__version__ = "0.53.8" +__version__ = "0.53.8.1" diff --git a/tests/test_v0538.py b/tests/test_v0538.py index 6de1b97..110a6b3 100644 --- a/tests/test_v0538.py +++ b/tests/test_v0538.py @@ -596,8 +596,10 @@ class TestVersionBump: def test_init_version(self): import soup_cli - assert soup_cli.__version__ == "0.53.8" + # v0.53.8.1 is the PyPI-recoverable patch (force-include duplicate + # fix); accept either as the shipped string. + assert soup_cli.__version__.startswith("0.53.8") def test_pyproject_version(self): text = (_repo_root() / "pyproject.toml").read_text(encoding="utf-8") - assert 'version = "0.53.8"' in text + assert 'version = "0.53.8' in text