Commit 213c08ef authored by Denis Bilenko's avatar Denis Bilenko

setup.py: more reliable unlink

parent c44cf31a
...@@ -79,8 +79,10 @@ try: ...@@ -79,8 +79,10 @@ try:
path_to_core_so = abspath(join('gevent', basename(path_to_build_core_so))) path_to_core_so = abspath(join('gevent', basename(path_to_build_core_so)))
if path_to_build_core_so != path_to_core_so: if path_to_build_core_so != path_to_core_so:
print 'Linking %s to %s' % (path_to_build_core_so, path_to_core_so) print 'Linking %s to %s' % (path_to_build_core_so, path_to_core_so)
if os.path.exists(path_to_core_so): try:
os.unlink(path_to_core_so) os.unlink(path_to_core_so)
except OSError:
pass
if hasattr(os, 'symlink'): if hasattr(os, 'symlink'):
os.symlink(path_to_build_core_so, path_to_core_so) os.symlink(path_to_build_core_so, path_to_core_so)
else: else:
......
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