summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorRobert Collins <robertc@robertcollins.net>2010-06-24 21:35:52 +1000
committerRobert Collins <robertc@robertcollins.net>2010-06-24 21:35:52 +1000
commitc3c3682b0f10652173bbcc45fb5c8534d38034b4 (patch)
treed0d5441f5970818763f1726c0f0fe30c3df87c9c /setup.py
parent63110838d18544d2e6f29fd0fd8a0546e8c30e13 (diff)
parent4672d0fdc526d46d92cf93428bf1aef5884bca13 (diff)
downloadsubunit-c3c3682b0f10652173bbcc45fb5c8534d38034b4.tar.gz
Merge the setup.py Tres supplied.
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py59
1 files changed, 59 insertions, 0 deletions
diff --git a/setup.py b/setup.py
new file mode 100755
index 0000000..b9d6c5a
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,59 @@
+#!/usr/bin/env python
+try:
+ # If the user has setuptools / distribute installed, use it
+ from setuptools import setup
+except ImportError:
+ # Otherwise, fall back to distutils.
+ from distutils.core import setup
+ extra = {}
+else:
+ extra = {
+ 'install_requires': [
+ 'testtools',
+ ]
+ }
+
+try:
+ # Assume we are in a distribution, which has PKG-INFO
+ version_lines = [x for x in open('PKG-INFO').readlines()
+ if x.startswith('Version:')]
+ version_line = version_lines and version_lines[-1] or 'VERSION = 0.0'
+ VERSION = version_line.split(':')[1].strip()
+
+except IOError:
+ # Must be a development checkout, so use the Makefile
+ version_lines = [x for x in open('Makefile').readlines()
+ if x.startswith('VERSION')]
+ version_line = version_lines and version_lines[-1] or 'VERSION = 0.0'
+ VERSION = version_line.split('=')[1].strip()
+
+
+setup(
+ name='python-subunit',
+ version=VERSION,
+ description=('Python implementation of subunit test streaming protocol'),
+ long_description=open('README').read(),
+ classifiers=[
+ 'Intended Audience :: Developers',
+ 'Programming Language :: Python',
+ 'Topic :: Software Development :: Testing',
+ ],
+ keywords='python test streaming',
+ author='Robert Collins',
+ author_email='subunit-dev@lists.launchpad.net',
+ url='http://launchpad.net/subunit',
+ packages=['subunit'],
+ package_dir={'subunit': 'python/subunit'},
+ scripts = [
+ 'filters/subunit2gtk',
+ 'filters/subunit2junitxml',
+ 'filters/subunit2pyunit',
+ 'filters/subunit-filter',
+ 'filters/subunit-ls',
+ 'filters/subunit-notify',
+ 'filters/subunit-stats',
+ 'filters/subunit-tags',
+ 'filters/tap2subunit',
+ ],
+ **extra
+)