-
Notifications
You must be signed in to change notification settings - Fork 198
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
Generate proper, consistent nightly versions for pip and conda packages #1347
Generate proper, consistent nightly versions for pip and conda packages #1347
Conversation
01ad475
to
d76108c
Compare
0dd834b is genius! Is there a minimal version requirement for setuptools to support it? |
Should work for anything >=61.0.0, which is what added support for PEP 621-style storage of project metadata in pyproject.toml
Unfortunately it only gets you so far since we still have to patch in the version for conda packages. |
…c property in pyproject.toml
8287364
to
ba62d73
Compare
import importlib.resources | ||
|
||
__version__ = ( | ||
importlib.resources.files("rmm").joinpath("VERSION").read_text().strip() |
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.
I don't really like that importing the package now requires reading another file on disk, just to populate a version string. Is "single-source" the only benefit of the VERSION approach?
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.
Assuming that you include the dynamic version metadata support in pyproject.toml as part of single-sourcing (and not just sharing across multiple packages), yes that is the primary benefit. It is the only approach to single-sourcing that is compatible with the range of different build processes that we're currently supporting. I agree that it's not perfect, but given the number of iterations that we've gone through with these PRs across all of RAPIDS I would prefer to leave this as is for now. Every alternative has tradeoffs, so there isn't a clear winner, and at least in the specific case of how we minimize duplication of the version we're going to have to revisit this again in the near future once we switch over to scikit-build-core.
… conda and pip packages (#5607) This PR applies analogous changes to rapidsai/rmm#1335 and rapidsai/rmm#1347. Authors: - Vyas Ramasubramani (https://github.com/vyasr) Approvers: - Divye Gala (https://github.com/divyegala) - Simon Adorf (https://github.com/csadorf) - AJ Schmidt (https://github.com/ajschmidt8) - Dante Gama Dessavre (https://github.com/dantegd) URL: #5607
See rapidsai/rmm#1347 Authors: - Vyas Ramasubramani (https://github.com/vyasr) Approvers: - Lawrence Mitchell (https://github.com/wence-) - AJ Schmidt (https://github.com/ajschmidt8) URL: #14285
See rapidsai/rmm#1347 Authors: - Vyas Ramasubramani (https://github.com/vyasr) - Peter Andreas Entschev (https://github.com/pentschev) - https://github.com/jakirkham Approvers: - Peter Andreas Entschev (https://github.com/pentschev) - Lawrence Mitchell (https://github.com/wence-) - AJ Schmidt (https://github.com/ajschmidt8) URL: #997
See rapidsai/rmm#1347 Authors: - Vyas Ramasubramani (https://github.com/vyasr) Approvers: - Mark Harris (https://github.com/harrism) - AJ Schmidt (https://github.com/ajschmidt8) URL: #1285
See rapidsai/rmm#1347 Authors: - Vyas Ramasubramani (https://github.com/vyasr) Approvers: - AJ Schmidt (https://github.com/ajschmidt8) - Ajay Thorve (https://github.com/AjayThorve) URL: #548
/merge |
See rapidsai/rmm#1347 Authors: - Divye Gala (https://github.com/divyegala) Approvers: - AJ Schmidt (https://github.com/ajschmidt8) URL: #82
See rapidsai/rmm#1347 Authors: - Divye Gala (https://github.com/divyegala) Approvers: - AJ Schmidt (https://github.com/ajschmidt8) - Dante Gama Dessavre (https://github.com/dantegd) URL: #1880
See rapidsai/rmm#1347 Authors: - Divye Gala (https://github.com/divyegala) Approvers: - AJ Schmidt (https://github.com/ajschmidt8) - Chuck Hastings (https://github.com/ChuckHastings) - Rick Ratzel (https://github.com/rlratzel) URL: #3933
Description
This PR changes conda C++/Python packages and wheels to all generate a consistent version for nightlies. The nightly version is of the form YY.MM.DDaN, where N is the number of commits from the last tag. The version is embedded in both the package metadata and in the
rmm.__version__
attribute. In addition the commit hash itself is embedded into the package asrmm.__git_commit__
. These changes ensure that 1) the conda Python package for a given nightly will reliably choose the correct C++ package (previously we relied on build strings and build times, which is more fragile w.r.t. the conda solver); 2) wheels are properly considered nightlies and are treated accordingly by pip (e.g. requiring--pre
for installation, not conflicting with normal releases, etc); and 3) wheels and conda packages are aligned on versions so that they can be easily compared if necessary.Checklist