Skip to content

🐛 fix(build): match hatchling floor to python-requires#94

Merged
gaborbernat merged 1 commit into
mainfrom
fix/hatchling-python-marker
Jul 3, 2026
Merged

🐛 fix(build): match hatchling floor to python-requires#94
gaborbernat merged 1 commit into
mainfrom
fix/hatchling-python-marker

Conversation

@gaborbernat

Copy link
Copy Markdown
Member

Installing python-discovery from source on Python 3.8 or 3.9 fails at the build step with No matching distribution found for hatchling>=1.28, reported in #92. The build pin hatchling>=1.28 requires Python >=3.10, yet the project declares requires-python = ">=3.8" and tests against 3.8/3.9, so pip cannot find a backend when it builds the sdist on those interpreters.

Nothing needs that specific floor; it landed during the standalone rewrite in #28. An environment marker splits the requirement so interpreters below 3.10 pull hatchling>=1.27, the last release supporting <3.10, while 3.10 and newer keep hatchling>=1.28.

Published wheels ship prebuilt and skip the backend, so they stay unchanged. This restores source builds on the older interpreters the package already supports.

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.
@gaborbernat gaborbernat added the bug Something isn't working label Jul 3, 2026
@gaborbernat gaborbernat merged commit cabc631 into main Jul 3, 2026
16 checks passed
@gaborbernat gaborbernat deleted the fix/hatchling-python-marker branch July 3, 2026 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant