Skip to content

Relax build dependency pins to a floor/ceiling range - #288

Merged
benoit74 merged 1 commit into
mainfrom
benoit74/relax-pyproject.toml-requirements
Oct 30, 2026
Merged

benoit74 merged 1 commit into
mainfrom
benoit74/relax-pyproject.toml-requirements

Conversation

@benoit74

Copy link
Copy Markdown
Contributor

Summary

  • Switch setuptools, wheel, cython and delocate from exact == pins to >=floor,<next_major ranges in build-system.requires and the build extra, so downstream packagers (e.g. nixpkgs, distro packages) aren't forced onto one exact patch version.
  • Keep the current pinned versions as the floor for now; the floor should only move deliberately when actually needed, not on every routine dependency bump.
  • Add a single-OS CI job (build-floor-versions) that installs the floor versions explicitly and builds/tests against them with --no-build-isolation, so the stated minimum is verified rather than assumed.

Closes #268

@benoit74 benoit74 self-assigned this Oct 27, 2026
@benoit74
benoit74 force-pushed the benoit74/relax-pyproject.toml-requirements branch from cd985a9 to 9359ef8 Compare October 27, 2026 15:53
@codecov

codecov Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.29%. Comparing base (1ffeb52) to head (a39aa6e).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #288   +/-   ##
=======================================
  Coverage   95.29%   95.29%           
=======================================
  Files           1        1           
  Lines         638      638           
=======================================
  Hits          608      608           
  Misses         30       30           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@benoit74
benoit74 requested a review from rgaudin October 29, 2026 13:13
@benoit74

Copy link
Copy Markdown
Contributor Author

@oneorseveralcats does this match your needs?

@rgaudin rgaudin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hum, we already define those versions twice in pyproject.toml already. Adding it a third time looks silly.
We could read it via TOML instead.
Could you look into also getting rid of one version in pyproject?

Last, I'd not touch the delocate thing since it's pinned exactly because new versions don't work.

@oneorseveralcats

Copy link
Copy Markdown

@benoit74 Yeah, that should be perfect. Thanks so much!

@benoit74
benoit74 force-pushed the benoit74/relax-pyproject.toml-requirements branch from ee09045 to 9d9a644 Compare October 30, 2026 08:31
@benoit74

Copy link
Copy Markdown
Contributor Author

Added a script to not repeat versions a third time.

Checked again why we need to have versions two times: this is mandatory, see comment for details.

Added a script to check the two versions are aligned + added a comment explaining it must be kept in sync.

@rgaudin rgaudin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Switch setuptools, wheel and cython from exact == pins to
>=floor,<next_major ranges in build-system.requires and the build
extra, easing downstream packaging (e.g. nixpkgs) without opening the
door to an untested future major. delocate stays exactly pinned since
it's used for a narrow, internal-API purpose (setup.py's Windows DLL
repair step) rather than its documented public API.

Add CI jobs to keep this honest:
- build-floor-versions (Tests.yaml) installs the floor pins derived
  from pyproject.toml by scripts/floor_versions.py and builds/tests
  against them with --no-build-isolation, so the stated minimum is
  verified rather than assumed.
- check-build-deps-sync (QA.yaml, via scripts/check_build_deps_sync.py)
  fails if build-system.requires and the build extra ever drift apart,
  since PEP 518 forces that duplication and nothing else guards it.

Closes #268
@benoit74
benoit74 force-pushed the benoit74/relax-pyproject.toml-requirements branch from 9d9a644 to a39aa6e Compare October 30, 2026 09:58
@benoit74
benoit74 merged commit 93fba70 into main Oct 30, 2026
71 of 72 checks passed
@benoit74
benoit74 deleted the benoit74/relax-pyproject.toml-requirements branch October 30, 2026 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Relax pyproject.toml requirements?

3 participants