-
-
Notifications
You must be signed in to change notification settings - Fork 213
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
Equivalent to VersionInfo.version_tuple()? #135
Comments
Just found a related issue: #36. |
@nicoddemus please note that if its already using pbr and its runtime metadata services (and likely its tooling for many related things, there is no point to push it to setuptools_scm on its own, as it handles only a subset of all that pbr does (bascially pbr is a bug ball of features that breaks things for me ^^) |
but in any case, what you request is a run-time service a install requirement would provide |
You mean from pbr.version import VersionInfo
_v = VersionInfo('mock').semantic_version()
__version__ = _v.release_string()
version_info = _v.version_tuple() There's no other import for |
Currently # coding: utf-8
# file generated by setuptools_scm
# don't change, don't track in version control
version = '2.0.1.dev1+ngb7a77db.d20161129' I would like to propose to generate in addition something like: version_info = (2, 0, 1, 'dev1', 'ngb7a77db.d20161129') It seems like it could be useful and backward compatible. What do you think? |
It feels a bit messy to me to have setuptools_scm be generating a version file, but even more hacky for the version file to be generating multiple representations of a given version. If multiple version formats are necessary, mock should provide or require the tools necessary to perform those translations. Reading the parent ticket, I see that the issue is that the cx_freeze model of packaging is not properly including the package metadata. I'll address that issue in the parent ticket. |
Thanks for joining in the discussion @jaraco, continuing on the parent ticket. |
@jaraco there is a small reason to do generate the file - utility libraries may want to avoid the cost incurred by initializing pkg_ressources, but i dont see any other good reasons |
@RonnyPfannschmidt that's one of the points I made in the parent ticket. |
Hi,
I'm trying to update
mock
to usesetuptools_scm
to solve testing-cabal/mock#385. Here's the relevant code inmock/mock.py
:Replacing
__version__
is simple enough, but how about theversion_info
tuple? Is there something insetuptools_scm
which provides the same functionality?Here's what
version_info
looks like formock-2.0.0
:The text was updated successfully, but these errors were encountered: