File tree Expand file tree Collapse file tree 2 files changed +20
-3
lines changed Expand file tree Collapse file tree 2 files changed +20
-3
lines changed Original file line number Diff line number Diff line change 11import errno
22import logging
33import os
4+ import platform
45import shutil
56
67from dvc .compat import fspath
78from dvc .exceptions import DvcException
89
9-
1010logger = logging .getLogger (__name__ )
1111
12+ if platform .system () == "Windows" :
13+ try :
14+ import speedcopy
15+
16+ speedcopy .patch_copyfile ()
17+ except ImportError :
18+ pass
19+ else :
20+ import sys
21+
22+ if sys .version_info < (3 , 8 ):
23+ try :
24+ # Importing the module monkey-patches shutil.copyfile
25+ import pyfastcopy # noqa: F401
26+ except ImportError :
27+ pass
28+
1229
1330class System (object ):
1431 @staticmethod
@@ -90,8 +107,6 @@ def _reflink_linux(src, dst):
90107
91108 @staticmethod
92109 def reflink (source , link_name ):
93- import platform
94-
95110 source , link_name = fspath (source ), fspath (link_name )
96111
97112 system = platform .system ()
Original file line number Diff line number Diff line change @@ -75,6 +75,8 @@ def run(self):
7575 "win-unicode-console>=0.5; sys_platform == 'win32'" ,
7676 "pywin32>=225; sys_platform == 'win32'" ,
7777 "networkx>=2.1,<2.4" ,
78+ "speedcopy>=2.0.1" ,
79+ "pyfastcopy>=1.0.3" ,
7880 "flatten-dict>=0.2.0" ,
7981 "texttable>=0.5.2" ,
8082]
You can’t perform that action at this time.
0 commit comments