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 def _get_version_from_file(filename
, start_of_line
, split_marker
):
18 """Extract version from file, giving last matching value or None"""
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):
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', '=')
35 name
='python-subunit',
37 description
=('Python implementation of subunit test streaming protocol'),
38 long_description
=open('README').read(),
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'},
52 'filters/subunit2gtk',
53 'filters/subunit2junitxml',
54 'filters/subunit2pyunit',
55 'filters/subunit-filter',
57 'filters/subunit-notify',
58 'filters/subunit-stats',
59 'filters/subunit-tags',
60 'filters/tap2subunit',