-
Notifications
You must be signed in to change notification settings - Fork 94
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
Always use versioneer command classes in setup.py #948
Always use versioneer command classes in setup.py #948
Conversation
The GIT_DESCRIBE_TAG and VERSION_SUFFIX environment variables are used to control the name and version of the created conda/pypi package. They should, however, not be used to control the version of the installed package by overriding the versioneer cmdclass since that leaves an unmodified _version.py file in the installed package directory. A consequence is that the version reported by dask_cuda.__version__ is "0+unknown". To fix this, always use the versioneer-provided cmdclass. While we're here, bring the conda version string into line with the rest of the rapids ecosystem.
Right now,
I think this is the right fix but am not really able to test if this will break package version resolution. I also don't really know much about how the conda packages are built, so careful eyes are welcome. |
Per PEP440, local version identifiers are disallowed for uploads to public index servers. In CI, when we build pypi packages, we override the versioneer-provided version with a PEP440-compatible version by defining GIT_DESCRIBE_TAG and VERSION_SUFFIX. These are glued together to produce a version which we then use to override the version produced by versioneer. This leaves us free to use the command classes provided by versioneer in all circumstances. Closes rapidsai#336.
OK, I think I have a horrible hack that will work. |
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.
Much nicer now:
$ python -c "import dask_cuda; print(dask_cuda.__version__)"
22.08.00a+30.g221c883.dirty
Thanks @wence- !
@gpucibot merge |
rerun tests |
2 similar comments
rerun tests |
rerun tests |
Codecov Report
@@ Coverage Diff @@
## branch-22.08 #948 +/- ##
==============================================
Coverage ? 0.00%
==============================================
Files ? 16
Lines ? 2106
Branches ? 0
==============================================
Hits ? 0
Misses ? 2106
Partials ? 0 Continue to review full report at Codecov.
|
Let's keep an eye on the pre-releases on PyPI to make sure they are still getting published. |
Looks like it: https://pypi.org/project/dask-cuda/22.8.0a220726/
|
Thanks Lawrence! 🙏 |
The
GIT_DESCRIBE_TAG
andVERSION_SUFFIX
environment variables are usedto control the name and version of the created conda/pypi package.
They should, however, not be used to control the version of the
installed package by overriding the versioneer cmdclass since that
leaves an unmodified _version.py file in the installed package
directory. A consequence is that the version reported by
dask_cuda.__version__
is"0+unknown"
.We cannot always use the versioneer-provided cmdclass unmodified since
PEP440 specifically forbids PyPI from accepting packages that have local
version identifiers (as used by versioneer). To get around this, when setup.py
detects it is building a PyPI package (
GIT_DESCRIBE_TAG
is in the environment),patch the version returned from versioneer with a PyPI-compatible one.
While we're here, bring the conda version string into line with the
rest of the rapids ecosystem.
Closes #336.