1
#! /bin/sh /usr/share/dpatch/dpatch-run
2
## 14_distutils_setup.dpatch by Simon McVittie <smcv@ianadd.pseudorandom.co.uk>
4
## All lines beginning with `## DP:' are a description of the patch.
5
## DP: Split roman.py setup into a separate script
8
diff -urNad docutils-0.4~/setup.py docutils-0.4/setup.py
9
--- docutils-0.4~/setup.py 2006-07-02 17:22:09.542140332 +0100
10
+++ docutils-0.4/setup.py 2006-07-02 17:22:10.018137952 +0100
14
kwargs = package_data.copy()
15
- extras = get_extras()
17
- kwargs['py_modules'] = extras
18
if sys.hexversion >= 0x02030000: # Python 2.3
19
kwargs['classifiers'] = classifiers
22
'author_email': 'goodger@users.sourceforge.net',
23
'license': 'public domain, Python, BSD, GPL (see COPYING.txt)',
24
'platforms': 'OS-independent',
25
- 'package_dir': {'docutils': 'docutils', '': 'extras'},
26
+ 'package_dir': {'docutils': 'docutils'},
27
'packages': ['docutils',
31
['docutils/writers/s5_html/themes/README.txt']),]
33
'scripts' : ['tools/rst2html.py',
34
+ 'tools/rstpep2html.py',
37
'tools/rst2newlatex.py',
39
"""Trove classifiers for the Distutils "register" command;
42
-extra_modules = [('optparse', '1.4.1', None),
43
- ('textwrap', None, None),
44
- ('roman', '1.4', ['toRoman', 'fromRoman',
45
- 'InvalidRomanNumeralError'])]
46
-"""Third-party modules to install if they're not already present.
47
-List of (module name, minimum __version__ string, [attribute names])."""
51
- for module_name, version, attributes in extra_modules:
53
- module = __import__(module_name)
54
- if version and module.__version__ < version:
56
- for attribute in attributes or []:
57
- getattr(module, attribute)
58
- print ('"%s" module already present; ignoring extras/%s.py.'
59
- % (module_name, module_name))
60
- except (ImportError, AttributeError, ValueError):
61
- extras.append(module_name)
65
class dual_build_py(build_py):
68
diff -urNad docutils-0.4~/setup_roman.py docutils-0.4/setup_roman.py
69
--- docutils-0.4~/setup_roman.py 2006-07-02 17:20:58.000000000 +0100
70
+++ docutils-0.4/setup_roman.py 2006-07-02 17:22:10.018137952 +0100
73
+# $Id: setup.py,v 1.9 2002/12/12 02:45:53 goodger Exp $
75
+from distutils.core import setup
80
+ description = 'Python Roman-numbers library',
81
+ #long_description = '',
82
+ url = 'http://docutils.sourceforge.net/',
84
+ author = 'Mark Pilgrim',
85
+ author_email = 'f8dy@diveintopython.org',
87
+ package_dir = {'': 'extras'},
88
+ py_modules = ['roman'])
91
+if __name__ == '__main__' :