Commit 52cd8755 authored by jim's avatar jim

Don't write .exe files if the files exist and are the same. This makes

stupid windows errors less likely.


git-svn-id: http://svn.zope.org/repos/main/zc.buildout/trunk@88546 62d5b8a3-27da-0310-9561-8e5933582275
parent 4da58d23
...@@ -925,9 +925,10 @@ def _script(module_name, attrs, path, dest, executable, arguments, ...@@ -925,9 +925,10 @@ def _script(module_name, attrs, path, dest, executable, arguments,
if sys.platform == 'win32': if sys.platform == 'win32':
# generate exe file and give the script a magic name: # generate exe file and give the script a magic name:
exe = script+'.exe' exe = script+'.exe'
open(exe, 'wb').write( new_data = pkg_resources.resource_string('setuptools', 'cli.exe')
pkg_resources.resource_string('setuptools', 'cli.exe') if not os.path.exists(exe) or (open(exe, 'rb').read() != new_data):
) # Only write it if it's different.
open(exe, 'wb').write(new_data)
generated.append(exe) generated.append(exe)
if changed: if changed:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment