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

Subscribers

People subscribed via source and target branches