-
Notifications
You must be signed in to change notification settings - Fork 162
Rework setuptools-scm configuration #1192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This patch sets an upper bound for setuptools_scm which has breaking changes and prevents the project from being built.
This is required for reproducible builds. Pinned build dependencies should be updated by dependabot.
This is required for reproducible builds. Pinned build dependencies should be updated by dependabot.
This replaces the existing approach that uses a version file generated by setuptools-scm.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1192 +/- ##
==========================================
+ Coverage 88.88% 88.91% +0.02%
==========================================
Files 2 2
Lines 405 406 +1
Branches 44 44
==========================================
+ Hits 360 361 +1
Misses 35 35
Partials 10 10 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@seifertm FYI this way of packaging with pinning the build deps is actively harmful for downstreams like Linux distribution packagers. Instead, use pip constraints to make the upstream packaging predictable. |
We were just talking about it the other day over at PyPUG, by the way: pypa/packaging.python.org#1886 |
@webknjaz Thanks for bringing this up, I didn't think of this. My understanding is that downstream packagers may want to build from source using the build dependencies that are available in their respective package repositories. Specifying exact versions of build dependencies would interfere with that. Is that about right? In that case, let's revert to specifying lower |
@seifertm yes. Downstreams usually don't have per-venv separation and so there's exactly one version of a build deps on the system at a time. For example, one version of
I usually recommend the lower bound corresponding to a version where a feature you use was added. Upper bounds cause almost as many problems as hard pins. Version exclusions ( Though, while the metadata shouldn't be overly tight, you can still set the |
pytest-asyncio has an unnecessarily complex setuptools-scm configuration, which is split over multiple files (pyproject.toml and setup.cfg). This setup broke with the recent release of setuptools-scm v9.2 leading to build errors.
This PR addresses several issues:
pytest_asyncio.__version__
throughimportlib.metadata
as opposed to a version file leading to simpler configuration