-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Fix version detection for sdist builds without git info #17605
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
Thanks for the PR! Should this go into the |
cc717a9
to
2386f0a
Compare
…nction Move version parsing and bumping logic to top of file and consolidate version handling through a single bump_version function. Replace complex setuptools_scm parsing and version_scheme with streamlined implementation using OVERRIDE_GIT_DESCRIBE environment variable handling.
251587f
to
3bac50b
Compare
Tl;dr: version bumping should now work correctly and installing from an sdist should work again when this lands. BackgroundIf we don't pass in a
If we do pass in a Since setuptools_scm does only one thing different from how we want it, I just fixed that. In this pr:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this makes sense to me 👍
As far as I can tell the biggest changes are:
- That we don't allow
SETUPTOOLS_SCM_PRETEND_VERSION[_FOR_DUCKDB]
- We use a generated
SETUPTOOLS_SCM_PRETEND_VERSION_FOR_DUCKDB
to forward the intention of theOVERRIDE_GIT_DESCRIBE
functionality.
Removing the hacky (and problematic) parse
method override in the process 🎉
One question popped up though, about SETUPTOOLS_SCM_PRETEND_VERSION
, is it not possible that this is set for a different package, where duckdb is somehow part of the build process?
If we delete the env, it might cause a problem for that package (if this scenario even exists)
Perhaps we can save it and restore it after we're done?
Edit: When building a package pip spawns off a child process for each package, so changing the environment in one building process won't affect the environment for another process. This also happens when you use |
This looks ready to me, should this also go in? |
Thanks! |
Bugfixes (duckdb/duckdb#17695) Fix version detection for sdist builds without git info (duckdb/duckdb#17605)
@evertlammerts @carlopi I had to reconcile a merge conflict between #17708 and #17605 - could you double check that the code in `setup.py` is still correct?
https://github.com/duckdblabs/duckdb-internal/issues/4942