diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2014-12-14 20:29:12 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2015-03-06 04:41:48 +0100 |
commit | 8918481a8415c76b83230067162a53935a4cce4a (patch) | |
tree | 509da04c7913b054767c8d7660c2b08a24ce6904 /lib/testtools/setup.py | |
parent | da04eb9c3aced4ec62c6cda54061a303d608c016 (diff) | |
download | samba-8918481a8415c76b83230067162a53935a4cce4a.tar.gz samba-8918481a8415c76b83230067162a53935a4cce4a.tar.xz samba-8918481a8415c76b83230067162a53935a4cce4a.zip |
Remove bundled testtools.
Change-Id: Ic6ddb352e403c9591cbe4ad3fd36758ffcc2ddb9
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'lib/testtools/setup.py')
-rwxr-xr-x | lib/testtools/setup.py | 85 |
1 files changed, 0 insertions, 85 deletions
diff --git a/lib/testtools/setup.py b/lib/testtools/setup.py deleted file mode 100755 index 7ecd6d24d2..0000000000 --- a/lib/testtools/setup.py +++ /dev/null @@ -1,85 +0,0 @@ -#!/usr/bin/env python -"""Distutils installer for testtools.""" - -from distutils.core import setup -import email -import os - -import testtools - - -def get_revno(): - import bzrlib.errors - import bzrlib.workingtree - try: - t = bzrlib.workingtree.WorkingTree.open_containing(__file__)[0] - except (bzrlib.errors.NotBranchError, bzrlib.errors.NoWorkingTree): - return None - else: - return t.branch.revno() - - -def get_version_from_pkg_info(): - """Get the version from PKG-INFO file if we can.""" - pkg_info_path = os.path.join(os.path.dirname(__file__), 'PKG-INFO') - try: - pkg_info_file = open(pkg_info_path, 'r') - except (IOError, OSError): - return None - try: - pkg_info = email.message_from_file(pkg_info_file) - except email.MessageError: - return None - return pkg_info.get('Version', None) - - -def get_version(): - """Return the version of testtools that we are building.""" - version = '.'.join( - str(component) for component in testtools.__version__[0:3]) - phase = testtools.__version__[3] - if phase == 'final': - return version - pkg_info_version = get_version_from_pkg_info() - if pkg_info_version: - return pkg_info_version - revno = get_revno() - if revno is None: - # Apparently if we just say "snapshot" then distribute won't accept it - # as satisfying versioned dependencies. This is a problem for the - # daily build version. - return "snapshot-%s" % (version,) - if phase == 'alpha': - # No idea what the next version will be - return 'next-r%s' % revno - else: - # Preserve the version number but give it a revno prefix - return version + '-r%s' % revno - - -def get_long_description(): - manual_path = os.path.join( - os.path.dirname(__file__), 'doc/overview.rst') - return open(manual_path).read() - - -setup(name='testtools', - author='Jonathan M. Lange', - author_email='jml+testtools@mumak.net', - url='https://launchpad.net/testtools', - description=('Extensions to the Python standard library unit testing ' - 'framework'), - long_description=get_long_description(), - version=get_version(), - classifiers=["License :: OSI Approved :: MIT License", - "Programming Language :: Python :: 3", - ], - packages=[ - 'testtools', - 'testtools.matchers', - 'testtools.testresult', - 'testtools.tests', - 'testtools.tests.matchers', - ], - cmdclass={'test': testtools.TestCommand}, - zip_safe=False) |