Magellan Linux

Contents of /trunk/docutils/patches/docutils-0.4-extramodules.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 437 - (show annotations) (download)
Tue Jan 1 15:54:43 2008 UTC (16 years, 4 months ago) by niro
File size: 1163 byte(s)
-some patches for docutils-0.4-r1

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