[Python-checkins] distutils2: merge
tarek.ziade
python-checkins at python.org
Wed Feb 16 22:23:55 CET 2011
tarek.ziade pushed a832bc472995 to distutils2:
http://hg.python.org/distutils2/rev/a832bc472995
changeset: 992:a832bc472995
parent: 991:feda55d419cb
parent: 990:16a91e49164c
user: Alexis Metaireau <alexis at notmyidea.org>
date: Tue Feb 01 01:38:08 2011 +0000
summary:
merge
files:
distutils2/util.py
diff --git a/distutils2/util.py b/distutils2/util.py
--- a/distutils2/util.py
+++ b/distutils2/util.py
@@ -1080,7 +1080,6 @@
# There is no such option in the setup.cfg
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:
@@ -1108,12 +1107,18 @@
raise DistutilsFileError("A pre existing setup.py file exists")
handle = open("setup.py", "w")
- handle.write("# Distutils script using distutils2 setup.cfg to call the\n")
- handle.write("# distutils.core.setup() with the right args.\n\n\n")
- handle.write("import os\n")
- handle.write("from distutils.core import setup\n")
- handle.write("from ConfigParser import RawConfigParser\n\n")
- handle.write(getsource(generate_distutils_kwargs_from_setup_cfg))
- handle.write("\n\nkwargs = generate_distutils_kwargs_from_setup_cfg()\n")
- handle.write("setup(**kwargs)")
- handle.close()
+ try:
+ handle.write(
+ "# Distutils script using distutils2 setup.cfg to call the\n"
+ "# distutils.core.setup() with the right args.\n\n"
+ "import os\n"
+ "from distutils.core import setup\n"
+ "from ConfigParser import RawConfigParser\n\n"
+ "" + getsource(generate_distutils_kwargs_from_setup_cfg) + "\n\n"
+ "kwargs = generate_distutils_kwargs_from_setup_cfg()\n"
+ "setup(**kwargs)\n"
+ )
+ finally:
+ handle.close()
+
+generate_distutils_setup_py()
--
Repository URL: http://hg.python.org/distutils2
More information about the Python-checkins
mailing list