Merge lp:~tseaver/subunit/add_distutils_support into lp:~subunit/subunit/trunk

Proposed by Tres Seaver
Status: Merged
Merged at revision: 128
Proposed branch: lp:~tseaver/subunit/add_distutils_support
Merge into: lp:~subunit/subunit/trunk
Diff against target: 87 lines (+78/-0)
2 files modified
MANIFEST.in (+20/-0)
setup.py (+58/-0)
To merge this branch: bzr merge lp:~tseaver/subunit/add_distutils_support
Reviewer Review Type Date Requested Status
Robert Collins Approve
Review via email: mp+26653@code.launchpad.net

Description of the change

The setup.py and MANTIFEST.in combine to create an 'sdist' which can by installed
in a virtualenv / buildout.

The scripts in 'filters/' get installed as well, with their shebangs adjusted (but
adjusted only when installed via setuptools -- distutils doesn't have that feature).

To post a comment you must log in.
Revision history for this message
Robert Collins (lifeless) wrote :

Thanks, I've merged it; its about what I expected :/, but I understand the need. I appreciate your offer to help in the future, and I'll certainly take you up on that.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'MANIFEST.in'
2--- MANIFEST.in 1970-01-01 00:00:00 +0000
3+++ MANIFEST.in 2010-06-03 00:25:36 +0000
4@@ -0,0 +1,20 @@
5+exclude .bzrignore
6+exclude aclocal.m4
7+prune autom4te.cache
8+prune c
9+prune c++
10+prune compile
11+exclude configure*
12+exclude depcomp
13+exclude INSTALL
14+exclude install-sh
15+exclude lib*
16+exclude ltmain.sh
17+prune m4
18+exclude Makefile*
19+exclude missing
20+prune perl
21+exclude py-compile
22+prune shell
23+prune python/iso8601
24+exclude stamp-h1
25
26=== added file 'setup.py'
27--- setup.py 1970-01-01 00:00:00 +0000
28+++ setup.py 2010-06-03 00:25:36 +0000
29@@ -0,0 +1,58 @@
30+try:
31+ # If the user has setuptools / distribute installed, use it
32+ from setuptools import setup
33+except ImportError:
34+ # Otherwise, fall back to distutils.
35+ from distutils.core import setup
36+ extra = {}
37+else:
38+ extra = {
39+ 'install_requires': [
40+ 'testtools',
41+ ]
42+ }
43+
44+try:
45+ # Assume we are in a distribution, which has PKG-INFO
46+ version_lines = [x for x in open('PKG-INFO').readlines()
47+ if x.startswith('Version:')]
48+ version_line = version_lines and version_lines[-1] or 'VERSION = 0.0'
49+ VERSION = version_line.split(':')[1].strip()
50+
51+except IOError:
52+ # Must be a development checkout, so use the Makefile
53+ version_lines = [x for x in open('Makefile').readlines()
54+ if x.startswith('VERSION')]
55+ version_line = version_lines and version_lines[-1] or 'VERSION = 0.0'
56+ VERSION = version_line.split('=')[1].strip()
57+
58+
59+setup(
60+ name='subunit-python',
61+ version=VERSION,
62+ description=('Python implementation of subunit test streaming protocol'),
63+ long_description=open('README').read(),
64+ classifiers=[
65+ 'Intended Audience :: Developers',
66+ 'Programming Language :: Python',
67+ 'Topic :: Software Development :: Testing',
68+ ],
69+ keywords='python test streaming',
70+ author='Robert Collins',
71+ author_email='subunit-dev@lists.launchpad.net',
72+ url='http://launchpad.net/subunit',
73+ packages=['subunit'],
74+ package_dir={'subunit': 'python/subunit'},
75+ scripts = [
76+ 'filters/subunit2gtk',
77+ 'filters/subunit2junitxml',
78+ 'filters/subunit2pyunit',
79+ 'filters/subunit-filter',
80+ 'filters/subunit-ls',
81+ 'filters/subunit-notify',
82+ 'filters/subunit-stats',
83+ 'filters/subunit-tags',
84+ 'filters/tap2subunit',
85+ ],
86+ **extra
87+)

Subscribers

People subscribed via source and target branches