From 844857d1bae9206f83e543b509351b9cdbbb6209 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bern=C3=A1t=20G=C3=A1bor?= Date: Fri, 3 Jul 2026 06:07:52 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(build):=20make=20hatchling?= =?UTF-8?q?=20floor=20match=20python-requires?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Building the sdist on Python 3.8/3.9 failed to resolve a backend because the build requirement pinned hatchling>=1.28, which dropped Python 3.9, while the project still declares requires-python >=3.8. Split the floor with an environment marker so old interpreters get hatchling>=1.27, the last release supporting <3.10, and modern ones keep >=1.28. Fixes #92. --- docs/changelog/92.packaging.rst | 3 +++ pyproject.toml | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 docs/changelog/92.packaging.rst diff --git a/docs/changelog/92.packaging.rst b/docs/changelog/92.packaging.rst new file mode 100644 index 0000000..7decd64 --- /dev/null +++ b/docs/changelog/92.packaging.rst @@ -0,0 +1,3 @@ +Constrain the ``hatchling`` build requirement per Python version so sdist builds resolve a compatible backend on the +declared ``>=3.8`` floor - ``hatchling>=1.28`` dropped Python 3.9, leaving 3.8/3.9 unbuildable from source - by +:user:`gaborbernat`. diff --git a/pyproject.toml b/pyproject.toml index 283b6ce..de2563e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,8 @@ build-backend = "hatchling.build" requires = [ "hatch-vcs>=0.5", - "hatchling>=1.28", + "hatchling>=1.27; python_version<'3.10'", + "hatchling>=1.28; python_version>='3.10'", ] [project]