~ubuntu-branches/ubuntu/karmic/python-docutils/karmic

« back to all changes in this revision

Viewing changes to debian/patches/14_distutils_setup.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): martin f. krafft
  • Date: 2006-07-10 11:45:05 UTC
  • mfrom: (2.1.4 edgy)
  • Revision ID: james.westby@ubuntu.com-20060710114505-otkhqcslevewxmz5
Tags: 0.4-3
Added build dependency on python-central (closes: #377580).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh /usr/share/dpatch/dpatch-run
 
2
## 14_distutils_setup.dpatch by Simon McVittie <smcv@ianadd.pseudorandom.co.uk>
 
3
##
 
4
## All lines beginning with `## DP:' are a description of the patch.
 
5
## DP: Split roman.py setup into a separate script
 
6
 
 
7
@DPATCH@
 
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
 
11
@@ -23,9 +23,6 @@
 
12
 
 
13
 def do_setup():
 
14
     kwargs = package_data.copy()
 
15
-    extras = get_extras()
 
16
-    if extras:
 
17
-        kwargs['py_modules'] = extras
 
18
     if sys.hexversion >= 0x02030000:    # Python 2.3
 
19
         kwargs['classifiers'] = classifiers
 
20
     else:
 
21
@@ -53,7 +50,7 @@
 
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',
 
28
                  'docutils.languages',
 
29
                  'docutils.parsers',
 
30
@@ -84,6 +81,7 @@
 
31
                      ['docutils/writers/s5_html/themes/README.txt']),]
 
32
                    + s5_theme_files),
 
33
     'scripts' : ['tools/rst2html.py',
 
34
+                 'tools/rstpep2html.py',
 
35
                  'tools/rst2s5.py',
 
36
                  'tools/rst2latex.py',
 
37
                  'tools/rst2newlatex.py',
 
38
@@ -120,29 +118,6 @@
 
39
 """Trove classifiers for the Distutils "register" command;
 
40
 Python 2.3 and up."""
 
41
 
 
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])."""
 
48
-
 
49
-def get_extras():
 
50
-    extras = []
 
51
-    for module_name, version, attributes in extra_modules:
 
52
-        try:
 
53
-            module = __import__(module_name)
 
54
-            if version and module.__version__ < version:
 
55
-                raise ValueError
 
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)
 
62
-    return extras
 
63
-
 
64
-
 
65
 class dual_build_py(build_py):
 
66
 
 
67
     """
 
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
 
71
@@ -0,0 +1,21 @@
 
72
+#!/usr/bin/python
 
73
+# $Id: setup.py,v 1.9 2002/12/12 02:45:53 goodger Exp $
 
74
+
 
75
+from distutils.core import setup
 
76
+
 
77
+def do_setup():
 
78
+    dist = setup(
 
79
+          name = 'roman',
 
80
+          description = 'Python Roman-numbers library',
 
81
+          #long_description = '',
 
82
+          url = 'http://docutils.sourceforge.net/',
 
83
+          version = '0.2+',
 
84
+          author = 'Mark Pilgrim',
 
85
+          author_email = 'f8dy@diveintopython.org',
 
86
+          license = 'Python',
 
87
+          package_dir = {'': 'extras'},
 
88
+                 py_modules = ['roman'])
 
89
+    return dist
 
90
+
 
91
+if __name__ == '__main__' :
 
92
+    do_setup()