4 # If the user has setuptools / distribute installed, use it
5 from setuptools import setup
7 # Otherwise, fall back to distutils.
8 from distutils.core import setup
22 def _get_version_from_file(filename, start_of_line, split_marker):
23 """Extract version from file, giving last matching value or None"""
25 return [x for x in open(filename)
26 if x.startswith(start_of_line)][-1].split(split_marker)[1].strip()
27 except (IOError, IndexError):
32 # Assume we are in a distribution, which has PKG-INFO
33 _get_version_from_file('PKG-INFO', 'Version:', ':')
34 # Must be a development checkout, so use the Makefile
35 or _get_version_from_file('Makefile', 'VERSION', '=')
39 relpath = os.path.dirname(__file__)
43 name='python-subunit',
45 description=('Python implementation of subunit test streaming protocol'),
46 long_description=open('README').read(),
48 'Intended Audience :: Developers',
49 'Programming Language :: Python :: 3',
50 'Programming Language :: Python',
51 'Topic :: Software Development :: Testing',
53 keywords='python test streaming',
54 author='Robert Collins',
55 author_email='subunit-dev@lists.launchpad.net',
56 url='http://launchpad.net/subunit',
57 packages=['subunit', 'subunit.tests'],
58 package_dir={'subunit': 'python/subunit'},
60 'filters/subunit-1to2',
61 'filters/subunit-2to1',
62 'filters/subunit-filter',
64 'filters/subunit-notify',
65 'filters/subunit-output',
66 'filters/subunit-stats',
67 'filters/subunit-tags',
68 'filters/subunit2csv',
69 'filters/subunit2gtk',
70 'filters/subunit2junitxml',
71 'filters/subunit2pyunit',
72 'filters/tap2subunit',