Merge lp:~lifeless/testtools/version into lp:~testtools-committers/testtools/trunk

Proposed by Robert Collins
Status: Merged
Approved by: Jonathan Lange
Approved revision: not available
Merged at revision: not available
Proposed branch: lp:~lifeless/testtools/version
Merge into: lp:~testtools-committers/testtools/trunk
Diff against target: 64 lines (+28/-2)
3 files modified
HACKING (+1/-1)
setup.py (+13/-1)
testtools/__init__.py (+14/-0)
To merge this branch: bzr merge lp:~lifeless/testtools/version
Reviewer Review Type Date Requested Status
Jonathan Lange Approve
Review via email: mp+15999@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Robert Collins (lifeless) wrote :

__version__ can be useful.

Revision history for this message
Jonathan Lange (jml) wrote :

SMASH

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'HACKING'
--- HACKING 2009-12-01 10:04:35 +0000
+++ HACKING 2009-12-11 05:01:12 +0000
@@ -112,7 +112,7 @@
112112
113* Choose a version number.113* Choose a version number.
114114
115* Ensure setup.py has that version.115* Ensure __init__ has that version.
116116
117* Add a version number to NEWS immediately below NEXT.117* Add a version number to NEWS immediately below NEXT.
118118
119119
=== modified file 'setup.py'
--- setup.py 2009-11-29 00:43:57 +0000
+++ setup.py 2009-12-11 05:01:12 +0000
@@ -2,6 +2,18 @@
2"""Distutils installer for testtools."""2"""Distutils installer for testtools."""
33
4from distutils.core import setup4from distutils.core import setup
5import testtools
6version = '.'.join(str(component) for component in testtools.__version__[0:3])
7phase = testtools.__version__[3]
8if phase != 'final':
9 import bzrlib.workingtree
10 t = bzrlib.workingtree.WorkingTree.open_containing(__file__)[0]
11 if phase == 'alpha':
12 # No idea what the next version will be
13 version = 'next-%s' % t.branch.revno()
14 else:
15 # Preserve the version number but give it a revno prefix
16 version = version + '~%s' % t.branch.revno()
517
6setup(name='testtools',18setup(name='testtools',
7 author='Jonathan M. Lange',19 author='Jonathan M. Lange',
@@ -9,5 +21,5 @@
9 url='https://launchpad.net/testtools',21 url='https://launchpad.net/testtools',
10 description=('Extensions to the Python standard library unit testing '22 description=('Extensions to the Python standard library unit testing '
11 'framework'),23 'framework'),
12 version='0.9.1',24 version=version,
13 packages=['testtools'])25 packages=['testtools'])
1426
=== modified file 'testtools/__init__.py'
--- testtools/__init__.py 2009-11-21 09:34:58 +0000
+++ testtools/__init__.py 2009-12-11 05:01:12 +0000
@@ -42,3 +42,17 @@
42 ConcurrentTestSuite,42 ConcurrentTestSuite,
43 )43 )
44from testtools.utils import iterate_tests44from testtools.utils import iterate_tests
45
46# same format as sys.version_info: "A tuple containing the five components of
47# the version number: major, minor, micro, releaselevel, and serial. All
48# values except releaselevel are integers; the release level is 'alpha',
49# 'beta', 'candidate', or 'final'. The version_info value corresponding to the
50# Python version 2.0 is (2, 0, 0, 'final', 0)." Additionally we use a
51# releaselevel of 'dev' for unreleased under-development code.
52#
53# If the releaselevel is 'alpha' then the major/minor/micro components are not
54# established at this point, and setup.py will use a version of next-$(revno).
55# If the releaselevel is 'final', then the tarball will be major.minor.micro.
56# Otherwise it is major.minor.micro~$(revno).
57
58__version__ = (0, 9, 2, 'alpha', 0)

Subscribers

People subscribed via source and target branches