wintest: add option to select the dns backend
[Samba/gebeck_regimport.git] / lib / subunit / setup.py
blobbb51a24fccc5607b12511dcc88586be8a38f2ad2
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.11',
16 try:
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()
23 except IOError:
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()
31 setup(
32 name='python-subunit',
33 version=VERSION,
34 description=('Python implementation of subunit test streaming protocol'),
35 long_description=open('README').read(),
36 classifiers=[
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',
45 packages=['subunit'],
46 package_dir={'subunit': 'python/subunit'},
47 scripts = [
48 'filters/subunit2gtk',
49 'filters/subunit2junitxml',
50 'filters/subunit2pyunit',
51 'filters/subunit-filter',
52 'filters/subunit-ls',
53 'filters/subunit-notify',
54 'filters/subunit-stats',
55 'filters/subunit-tags',
56 'filters/tap2subunit',
58 **extra