[Python-checkins] distutils2: Fixing: the long-description field was never taken into account
tarek.ziade
python-checkins at python.org
Sat Jan 29 14:21:48 CET 2011
tarek.ziade pushed 7b032f44cf80 to distutils2:
http://hg.python.org/distutils2/rev/7b032f44cf80
changeset: 910:7b032f44cf80
user: Julien Miotte <miotte.julien at gmail.com>
date: Sat Jan 29 02:48:08 2011 +0100
summary:
Fixing: the long-description field was never taken into account
files:
distutils2/util.py
patch
diff --git a/distutils2/util.py b/distutils2/util.py
--- a/distutils2/util.py
+++ b/distutils2/util.py
@@ -1203,12 +1203,13 @@
in_cfg_value = has_get_option(config, section, option)
if not in_cfg_value:
# There is no such option in the setup.cfg
- continue
-
- if arg == "long_description":
- filename = has_get_option("description_file")
- if filename:
- in_cfg_value = open(filename).read()
+ if arg == "long_description":
+ filename = has_get_option(config, section, "description_file")
+ print "We have a filename", filename
+ if filename:
+ in_cfg_value = open(filename).read()
+ else:
+ continue
if arg in MULTI_FIELDS:
# Special behaviour when we have a multi line option
diff --git a/patch b/patch
new file mode 100644
--- /dev/null
+++ b/patch
@@ -0,0 +1,23 @@
+diff -r 5603e1bc5442 distutils2/util.py
+--- a/distutils2/util.py Fri Jan 28 18:42:44 2011 +0100
++++ b/distutils2/util.py Sat Jan 29 02:39:55 2011 +0100
+@@ -1203,12 +1203,13 @@
+ in_cfg_value = has_get_option(config, section, option)
+ if not in_cfg_value:
+ # There is no such option in the setup.cfg
+- continue
+-
+- if arg == "long_description":
+- filename = has_get_option("description_file")
+- if filename:
+- in_cfg_value = open(filename).read()
++ if arg == "long_description":
++ filename = has_get_option(config, section, "description_file")
++ print "We have a filename", filename
++ if filename:
++ in_cfg_value = open(filename).read()
++ else:
++ continue
+
+ if arg in MULTI_FIELDS:
+ # Special behaviour when we have a multi line option
--
Repository URL: http://hg.python.org/distutils2
More information about the Python-checkins
mailing list