blob: a7e34def3165f0546b774264e7e809167a05c7eb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
--- docutils-0.3/setup.py 2003-06-25 02:47:04.000000000 +0100
+++ docutils-0.3/setup.py.new 2003-07-08 00:21:59.000000000 +0100
@@ -78,20 +78,15 @@
List of (module name, minimum __version__ string, [attribute names])."""
def get_extras():
- extras = []
- for module_name, version, attributes in extra_modules:
- try:
- module = __import__(module_name)
- if version and module.__version__ < version:
- raise ValueError
- for attribute in attributes or []:
- getattr(module, attribute)
- print ('"%s" module already present; ignoring extras/%s.py.'
- % (module_name, module_name))
- except (ImportError, AttributeError, ValueError):
- extras.append(module_name)
- return extras
-
+ # old method does not work for upgrading/downgrading docutils.
+ # so we use a simple rule, 'optparse' and 'textwrap' are not installed
+ # for >=python-2.3
+
+ pyver = sys.version_info
+ if pyver[0] == 2 and pyver[1] > 2:
+ return ["roman"]
+ else:
+ return ["optparse","textwrap","roman"]
class dual_build_py(build_py):
|