mock: Use of pbr breaks cx_freeze applications
The given code:
_v = VersionInfo('mock').semantic_version()
__version__ = _v.release_string()
version_info = _v.version_tuple()
is not really friendly to frozen applications… also, I’d say, it adds a lot of logic under the hood to just to the version (besides adding having a runtime requirement to setuptools, which is usually just a setup time requirement), so, I’d like to check how feasible it’d be to revert it to just coding the __version__ and version_info directly into the source code – also, I’d say it makes it easier to know the current version by looking at the source code and makes the code clearer 😉
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 3
- Comments: 25 (6 by maintainers)
Commits related to this issue
- Use get_distribution to resolve version. Ref testing-cabal/mock#385. — committed to pypa/setuptools by jaraco 8 years ago
I see, thanks. Using
setuptools_scmwas my initial attempt to contribute tomockto solve this problem, but unfortunately I hit the problem of theversion_infopublic variable and CHANGELOG generation mentioned at the beginning of the issue.Sorry, I meant to use the current methods in a function, like this:
And then users can get the version by calling
setuptools.get_version()instead ofsetuptools.__version__.