Skip to content

Commit 38ace15

Browse files
committed
Adding support for windows and cygwin
1 parent 8ebe7bb commit 38ace15

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

arrayfire/library.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,16 @@
1212

1313
def load_backend(name):
1414
platform_name = platform.system()
15+
assert(len(platform_name) >= 3)
1516

1617
libname = 'libaf' + name
1718
if platform_name == 'Linux':
1819
libname += '.so'
1920
elif platform_name == 'Darwin':
2021
libname += '.dylib'
22+
elif platform_name == "Windows" or platform_name[:3] == "CYG":
23+
libname += '.dll'
24+
libname = libname[3:] # remove 'lib'
2125
else:
2226
raise OSError(platform_name + ' not supported')
2327

0 commit comments

Comments
 (0)