Skip to content

Commit

Permalink
[Fix] Catch symlink failure on Windows (open-mmlab#1039)
Browse files Browse the repository at this point in the history
* Catch symlink failure on Windows

* Fix typo in setup.py
  • Loading branch information
QwQ2000 authored Dec 2, 2021
1 parent 59c5cc1 commit f81cca5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import os
import os.path as osp
import platform
import shutil
import sys
import warnings
Expand Down Expand Up @@ -115,7 +116,10 @@ def add_mim_extension():
# parse installment mode
if 'develop' in sys.argv:
# installed by `pip install -e .`
mode = 'symlink'
if platform.system() == 'Windows':
mode = 'copy'
else:
mode = 'symlink'
elif 'sdist' in sys.argv or 'bdist_wheel' in sys.argv:
# installed by `pip install .`
# or create source distribution by `python setup.py sdist`
Expand Down

0 comments on commit f81cca5

Please sign in to comment.