From cc4f0f36195d5494ba95b4ccf39ee7fbcbf26325 Mon Sep 17 00:00:00 2001 From: MinRK Date: Fri, 13 Apr 2012 21:47:40 -0700 Subject: [PATCH] use writelines when writing _sysinfo.py --- setupbase.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/setupbase.py b/setupbase.py index 5b5b98256..cdc2eae8a 100644 --- a/setupbase.py +++ b/setupbase.py @@ -389,9 +389,8 @@ def record_commit_info(pkg_dir, build_cmd=build_py): # We write the installation commit even if it's empty out_pth = pjoin(self.build_lib, pkg_dir, 'utils', '_sysinfo.py') with io.open(out_pth, 'w') as out_file: - for line in [ - u"# GENERATED BY setup.py", - u"commit = '%s'" % repo_commit, - ]: - out_file.write(line + u'\n') + out_file.writelines([ + u"# GENERATED BY setup.py\n", + u"commit = '%s'\n" % repo_commit, + ]) return MyBuildPy