3 # If the user has setuptools / distribute installed, use it
4 from setuptools import setup
6 # Otherwise, fall back to distutils.
7 from distutils.core import setup
17 # Assume we are in a distribution, which has PKG-INFO
18 version_lines = [x for x in open('PKG-INFO').readlines()
19 if x.startswith('Version:')]
20 version_line = version_lines and version_lines[-1] or 'VERSION = 0.0'
21 VERSION = version_line.split(':')[1].strip()
24 # Must be a development checkout, so use the Makefile
25 version_lines = [x for x in open('Makefile').readlines()
26 if x.startswith('VERSION')]
27 version_line = version_lines and version_lines[-1] or 'VERSION = 0.0'
28 VERSION = version_line.split('=')[1].strip()
32 name='python-subunit',
34 description=('Python implementation of subunit test streaming protocol'),
35 long_description=open('README').read(),
37 'Intended Audience :: Developers',
38 'Programming Language :: Python',
39 'Topic :: Software Development :: Testing',
41 keywords='python test streaming',
42 author='Robert Collins',
43 author_email='subunit-dev@lists.launchpad.net',
44 url='http://launchpad.net/subunit',
46 package_dir={'subunit': 'python/subunit'},
48 'filters/subunit2gtk',
49 'filters/subunit2junitxml',
50 'filters/subunit2pyunit',
51 'filters/subunit-filter',
53 'filters/subunit-notify',
54 'filters/subunit-stats',
55 'filters/subunit-tags',
56 'filters/tap2subunit',