summaryrefslogtreecommitdiff
path: root/testtools
diff options
context:
space:
mode:
authorRobert Collins <robertc@robertcollins.net>2015-05-05 10:45:22 +1200
committerRobert Collins <robertc@robertcollins.net>2015-05-05 11:18:00 +1200
commit915b2b604c0e9b97e813711c035dfd13682fb6df (patch)
treeeeccb290c1237aeec8773338e2071977009c04bb /testtools
parent6e59b74343cd8f7ad80b8bcbeca03cd14ec7b147 (diff)
downloadtesttools-915b2b604c0e9b97e813711c035dfd13682fb6df.tar.gz
Switch to pbr as a build system
This automates the manual dance around version numbers for less maintenance pain. The main visible changes are: - requirements are in requirements.txt for now - tags must be just x.y.z not testtools-x.y.z - version information in __init__ is dynamically looked up. - we can probably cleanup a bunch of our bootstrap import glue but in the interest of clear reviews, and avoiding surprises, I'm leaving that alone for now. Change-Id: Ia54f681b50764a94ada68a6b2ac1bc77bfb619c5
Diffstat (limited to 'testtools')
-rw-r--r--testtools/__init__.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/testtools/__init__.py b/testtools/__init__.py
index 6d838f6..336df24 100644
--- a/testtools/__init__.py
+++ b/testtools/__init__.py
@@ -121,5 +121,7 @@ else:
# established at this point, and setup.py will use a version of next-$(revno).
# If the releaselevel is 'final', then the tarball will be major.minor.micro.
# Otherwise it is major.minor.micro~$(revno).
-
-__version__ = (1, 8, 0, 'dev', 0)
+from pbr.version import VersionInfo
+_version = VersionInfo('testtools')
+__version__ = _version.semantic_version().version_tuple()
+version = _version.release_string()