Commit 8e3a0a42 authored by matham's avatar matham Committed by GitHub

Don't use symbolic links on Windows since it may require admin rights. (GH-3815)

parent fbebd7d1
......@@ -31,7 +31,9 @@ try:
except (ImportError, AttributeError):
IS_CPYTHON = True
IS_PYPY = False
IS_PY2 = sys.version_info[0] < 3
CAN_SYMLINK = sys.platform != 'win32' and hasattr(os, 'symlink')
from io import open as io_open
try:
......@@ -1003,10 +1005,7 @@ class CythonCompileTestCase(unittest.TestCase):
fout.write(preparse_func(fin.read()))
else:
# use symlink on Unix, copy on Windows
try:
copy = os.symlink
except AttributeError:
copy = shutil.copy
copy = os.symlink if CAN_SYMLINK else shutil.copy
join = os.path.join
for filename in file_list:
......
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