From 42641fe1da8dfc4c2d40075515e4e13f4a8dafd2 2012-04-14 04:47:40 From: MinRK Date: 2012-04-14 04:47:40 Subject: [PATCH] use writelines when writing _sysinfo.py --- diff --git a/setupbase.py b/setupbase.py index 5b5b982..cdc2eae 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