File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 11# Copyright (c) OpenMMLab. All rights reserved.
22import os
33import os .path as osp
4+ import platform
45import shutil
56import sys
67import warnings
@@ -109,10 +110,16 @@ def add_mim_extension():
109110 # parse installment mode
110111 if 'develop' in sys .argv :
111112 # installed by `pip install -e .`
112- mode = 'symlink'
113- elif 'sdist' in sys .argv or 'bdist_wheel' in sys .argv :
113+ if platform .system () == 'Windows' :
114+ # set `copy` mode here since symlink fails on Windows.
115+ mode = 'copy'
116+ else :
117+ mode = 'symlink'
118+ elif 'sdist' in sys .argv or 'bdist_wheel' in sys .argv or \
119+ platform .system () == 'Windows' :
114120 # installed by `pip install .`
115121 # or create source distribution by `python setup.py sdist`
122+ # set `copy` mode here since symlink fails with WinError on Windows.
116123 mode = 'copy'
117124 else :
118125 return
You can’t perform that action at this time.
0 commit comments