s3:torture: call fault_setup() to get usage backtraces
[Samba/gebeck_regimport.git] / lib / subunit / setup.py
blob1a0b192b1b64607bdbc86a95ff43565579c7b3ec
1 #!/usr/bin/env python
2 try:
3 # If the user has setuptools / distribute installed, use it
4 from setuptools import setup
5 except ImportError:
6 # Otherwise, fall back to distutils.
7 from distutils.core import setup
8 extra = {}
9 else:
10 extra = {
11 'install_requires': [
12 'testtools>=0.9.23',
17 def _get_version_from_file(filename, start_of_line, split_marker):
18 """Extract version from file, giving last matching value or None"""
19 try:
20 return [x for x in open(filename)
21 if x.startswith(start_of_line)][-1].split(split_marker)[1].strip()
22 except (IOError, IndexError):
23 return None
26 VERSION = (
27 # Assume we are in a distribution, which has PKG-INFO
28 _get_version_from_file('PKG-INFO', 'Version:', ':')
29 # Must be a development checkout, so use the Makefile
30 or _get_version_from_file('Makefile', 'VERSION', '=')
31 or "0.0")
34 setup(
35 name='python-subunit',
36 version=VERSION,
37 description=('Python implementation of subunit test streaming protocol'),
38 long_description=open('README').read(),
39 classifiers=[
40 'Intended Audience :: Developers',
41 'Programming Language :: Python :: 3',
42 'Programming Language :: Python',
43 'Topic :: Software Development :: Testing',
45 keywords='python test streaming',
46 author='Robert Collins',
47 author_email='subunit-dev@lists.launchpad.net',
48 url='http://launchpad.net/subunit',
49 packages=['subunit', 'subunit.tests'],
50 package_dir={'subunit': 'python/subunit'},
51 scripts = [
52 'filters/subunit2gtk',
53 'filters/subunit2junitxml',
54 'filters/subunit2pyunit',
55 'filters/subunit-filter',
56 'filters/subunit-ls',
57 'filters/subunit-notify',
58 'filters/subunit-stats',
59 'filters/subunit-tags',
60 'filters/tap2subunit',
62 **extra