summaryrefslogtreecommitdiffstats
path: root/openstack/common/version.py
Commit message (Collapse)AuthorAgeFilesLines
* Migrate to pbr.Monty Taylor2013-05-171-94/+0
| | | | | | | | | Also, remove the files associated with this that should not be pulled from oslo-incubator any longer. Closes bug 1179007 Change-Id: Id2e882837bdde51a60562e8cdd207c7ff0c88a6a
* Fix Copyright Headers - Rename LLC to FoundationDavanum Srinivas2013-03-111-1/+1
| | | | | | One code change, rest are in headers Change-Id: I73f59681358629e1ad74e49d3d3ca13fcb5c2eb1
* Allow running test in uninstalled source tree.Monty Taylor2013-02-101-3/+3
| | | | | | | | It was pointed out that we missed the use-case that running tests in a fresh tree checkout should work - and we missed that by reaching too far into the setup module interface. Shame on us. Change-Id: Ic0056a3113b308f063d927484e1e4a44c9316a2d
* Add support for directly stringifying VersionInfo.Monty Taylor2013-02-071-0/+8
| | | | | | | | | | | glanceclient, and others, want to have a __version__ member in their top-level __init__.py. This leads to attempting to process the version information to realize the string at import time, rather than at request time. If we make VersionInfo a thing which can behave like a string, then, we should get the things we want without the operational weirdness. Change-Id: I3eb15006f50ed1155c85977aaae842677c5ec4bc
* Support running uninstalled in a tarball dir.Monty Taylor2013-01-251-3/+10
| | | | | | | | | | Running tests from the directory of an expanded tarball is a reasonable thing to do, so support it by checking for PKG-INFO file if the pkg_resources version grab fails. Fixes bug 1103473 Change-Id: I2bf1fc39b070d3a2cdf6a3abe5e816c81d2916a0
* Use revno and git sha for pre-release versioning.Monty Taylor2013-01-181-3/+17
| | | | | | | | | | | | | | | | | | | | | | | In discussions with ttx and zul, it became clear that the git describe info for our intra-release case wasn't providing any value and was providing confusion. Additionally, plain git sha's are not providing enough info. So, the scheme settled on that breaks the least amount of things and yet still reduces complexity is: if pre-version: # server projects try: use current tag except: use pre-version+revcount+gitsha else: use git describe | s/-/./ Additionally, we'll use a as a prefix for the revcount, b as the prefix for the milestone portion of a milestone tag, and rc as the prefix for rc's, so that for our releases, python version sorting works as expected. Change-Id: I6f0fe029d225afa8f435bc83216fc144c2402ae0
* Simplify version processing.Monty Taylor2013-01-111-90/+16
| | | | | | | | | | | | | | | In response to the cessation of per-commit tarballs produced by the CI systems, simplify the version processing code. We did many many many complicated things to support producing release artifacts that were not actually supported release artifacts. After a bunch of issues emerged, it was determined that the best way forward was to stop producing quasi-not-really non-release tarballs. If people want to consume versions of openstack that are not released versions, the git repos are always available. Additionally, this patch removes versioninfo and just uses PKG-INFO and pkg_resources to handle version processing. Change-Id: I5c799f3520adb2ba5288d852543706d81a92f8a1
* Use package for writing versioninfo.Steve Baker2013-01-041-2/+2
| | | | | | | | | | | | | This currently fails for client projects as python_package is the name of the project, while package is where versioninfo is written to. This doesn't affect server openstack projects because python_package == package. This hasn't affected any client projects yet because most likely none of them call version.canonical_version_string() in their setup.py Change-Id: Ia97e5fae378c47909f3dbc842dc83e408af68671
* fix intermittent failures with deferred version testDavanum Srinivas2012-12-251-35/+6
| | | | | | | | | | | | | | Need to get rid of the deferred string approach as the problem was overriding string methods is hard and flaky. There is just no other documented argparse hook to allow deferring of the version calculation as version passed in has to be a str or buffer. Added a test to try longer string and even run it in a loop just to be sure. Fixes LP #1087575 Change-Id: Icf83944d67b8ce5d3230627f3de10501da3276f2
* Fix broken --version commandDavanum Srinivas2012-12-041-6/+26
| | | | | | | | | | | | | The code for lazy loading of version string was broken. The way it breaks in glance and oslo is different. This patch is just for oslo. Here we end up overriding more methods in our lazy string class to make argparse happy and added test cases to make sure we don't break again. we also sure we cache the result of the lookup so we return the same version everytime and for performance. Added a few test cases as well. Fixes LP #1085984 Change-Id: I0635899c37fa8e5a7edf282907d2a5e04aa064cb
* Remove unused importsJoe Gordon2012-07-261-1/+0
| | | | Change-Id: Ia2900e50263950ba40ba86e685640cacaa2137a7
* fix bug lp:1019348,update openstack-common to support pep8 1.3.Yaguang Tang2012-07-181-1/+1
| | | | | | also,this patch turns off pep8 E125 check. Change-Id: I22d2a94d89530586d614af39af17ae542c5e0cbf
* Rework the version consumer functionality.Monty Taylor2012-07-111-80/+123
| | | | | | | | | | | | | | | | Moved the version routines into a class for better structure. Added caching/memoization logic so that pkg_resources/git doesn't get called more than is necessary. Added periodic-based caching that will only cause the meta info refs to be checked at most once a day, to reduce network load for developers. (The information in the meta refs should really only change once a month, and this will only affect local developer workstation version reporting, so we should be fine here. Added a deferred version string class and function to allow for consuming of the version string but doing the calculation only when it is requested, based on test runs in glance. Change-Id: I6a436c8817f6904959727a76d876b807ec545ee9
* Add a new module for use in consuming versioninfo.Monty Taylor2012-07-081-0/+106
The new tag-based versioning produces files that we can consume that tell us the versioning. That's all well and good, but what good is automatically generated versioning if there are no apis to consume it. This is derived from work to add those to nova and python-swiftclient. Change-Id: I91568ef28a9ed7e7365f66bca2294670df6e0c41