Skip to content

Commit 8942689

Browse files
committed
setup.py: Tweak how KLUSolve is copied
1 parent 7dd87c9 commit 8942689

File tree

1 file changed

+19
-9
lines changed

1 file changed

+19
-9
lines changed

setup.py

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,35 @@
1212
match = re.search("__version__ = '(.*?)'", f.read())
1313
package_version = match.group(1)
1414

15+
1516
# Copy the DLLs
17+
18+
# KLUSolve DLL
19+
base_dll_path_out = 'dss/'
20+
base_dll_path_in = '../dss_capi/lib/{}'.format(PLATFORM_FOLDER)
21+
22+
if sys.platform == 'win32':
23+
libklusolve = 'libklusolve'
24+
else:
25+
libklusolve = 'klusolve'
26+
27+
shutil.copy(
28+
os.path.join(base_dll_path_in, DLL_PREFIX + libklusolve + DLL_SUFFIX),
29+
os.path.join(base_dll_path_out, DLL_PREFIX + libklusolve + DLL_SUFFIX)
30+
)
31+
32+
# DSS_CAPI DLLs
1633
for i, version in enumerate(DSS_VERSIONS):
1734
base_dll_path_in = '../dss_capi/lib/{}/{}'.format(PLATFORM_FOLDER, version)
18-
base_dll_path_out = 'dss/'
19-
2035
file_list = ['dss_capi_{}'.format(version)]
21-
if i == 0:
22-
if sys.platform == 'win32':
23-
file_list.append('libklusolve')
24-
else:
25-
file_list.append('klusolve')
26-
36+
2737
for fn in file_list:
2838
shutil.copy(
2939
os.path.join(base_dll_path_in, DLL_PREFIX + fn + DLL_SUFFIX),
3040
os.path.join(base_dll_path_out, DLL_PREFIX + fn + DLL_SUFFIX)
3141
)
3242

33-
43+
3444
extra_args = dict(package_data={
3545
'dss': ['*{}'.format(DLL_SUFFIX)]
3646
})

0 commit comments

Comments
 (0)