File tree Expand file tree Collapse file tree 1 file changed +0
-41
lines changed Expand file tree Collapse file tree 1 file changed +0
-41
lines changed Original file line number Diff line number Diff line change 20
20
MSVCP140_SRC_PATH = "C:\\ Windows\\ System32\\ msvcp140.dll"
21
21
22
22
23
- def make_distributor_init_32_bits (
24
- distributor_init , vcomp140_dll_filename , vcruntime140_dll_filename
25
- ):
26
- """Create a _distributor_init.py file for 32-bit architectures.
27
-
28
- This file is imported first when importing the sklearn package
29
- so as to pre-load the vendored vcomp140.dll and vcruntime140.dll.
30
- """
31
- with open (distributor_init , "wt" ) as f :
32
- f .write (
33
- textwrap .dedent (
34
- """
35
- '''Helper to preload vcomp140.dll and vcruntime140.dll to
36
- prevent "not found" errors.
37
-
38
- Once vcomp140.dll and vcruntime140.dll are preloaded, the
39
- namespace is made available to any subsequent vcomp140.dll
40
- and vcruntime140.dll. This is created as part of the scripts
41
- that build the wheel.
42
- '''
43
-
44
-
45
- import os
46
- import os.path as op
47
- from ctypes import WinDLL
48
-
49
-
50
- if os.name == "nt":
51
- # Load vcomp140.dll and vcruntime140.dll
52
- libs_path = op.join(op.dirname(__file__), ".libs")
53
- vcomp140_dll_filename = op.join(libs_path, "{0}")
54
- vcruntime140_dll_filename = op.join(libs_path, "{1}")
55
- WinDLL(op.abspath(vcomp140_dll_filename))
56
- WinDLL(op.abspath(vcruntime140_dll_filename))
57
- """ .format (
58
- vcomp140_dll_filename , vcruntime140_dll_filename
59
- )
60
- )
61
- )
62
-
63
-
64
23
def make_distributor_init_64_bits (
65
24
distributor_init ,
66
25
vcomp140_dll_filename ,
You can’t perform that action at this time.
0 commit comments