~bzr/ubuntu/natty/python-testtools/bzr-ppa

« back to all changes in this revision

Viewing changes to setup.py

  • Committer: Robert Collins
  • Date: 2009-12-15 23:13:38 UTC
  • mfrom: (16.11.2 upstream)
  • Revision ID: robertc@robertcollins.net-20091215231338-en4foxftyfaaqgn0
* New upstream release.
* Include the manual in the package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/env python
1
2
"""Distutils installer for testtools."""
2
3
 
3
4
from distutils.core import setup
 
5
import testtools
 
6
version = '.'.join(str(component) for component in testtools.__version__[0:3])
 
7
phase = testtools.__version__[3]
 
8
if 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()
4
17
 
5
18
setup(name='testtools',
6
19
      author='Jonathan M. Lange',
8
21
      url='https://launchpad.net/testtools',
9
22
      description=('Extensions to the Python standard library unit testing '
10
23
                   'framework'),
11
 
      version='0.9.0',
12
 
      packages=['testtools'])
 
24
      version=version,
 
25
      packages=['testtools', 'testtools.testresult', 'testtools.tests'])