From fefe6684cd9e0d9d24a895e48a19f5ab633fe7af Mon Sep 17 00:00:00 2001 From: ines Date: Sat, 15 Apr 2017 12:17:27 +0200 Subject: [PATCH] Fix symlink function to check for Windows --- spacy/compat.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/spacy/compat.py b/spacy/compat.py index 6c2b00bae..a42646959 100644 --- a/spacy/compat.py +++ b/spacy/compat.py @@ -39,12 +39,11 @@ elif is_python3: def symlink_to(orig, dest): - if is_python3: - orig.symlink_to(dest) - - elif is_python2: + if is_python2 and is_windows: import subprocess subprocess.call(['mklink', '/d', unicode(orig), unicode(dest)], shell=True) + else: + orig.symlink_to(dest) def is_config(python2=None, python3=None, windows=None, linux=None, osx=None):