Skip to content

Commit ff4971c

Browse files
committed
Fix os.uname on Windows
1 parent 642733a commit ff4971c

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

aeneas/globalfunctions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ def can_run_cew():
584584
elif name == "cew":
585585
return can_run_cew()
586586
else:
587-
if os.uname()[0] == "Linux":
587+
if (os.name == "posix") and (os.uname()[0] == "Linux"):
588588
# Linux
589589
return can_run_cdtw() and can_run_cmfcc() and can_run_cew()
590590
else:

check_dependencies.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ def stepC2():
143143

144144
def stepC3():
145145
on_info("Test 7/7 (cew)...")
146-
if os.uname()[0] != "Linux":
146+
if not ((os.name == "posix") and (os.uname()[0] == "Linux")):
147147
on_info(" Python C Extension cew is not available for your OS")
148148
on_info(" You can still run aeneas, but it will be a bit slower than Linux")
149149
return True

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
EXTENSION_CMFCC = Extension("aeneas.cmfcc", ["aeneas/cmfcc.c"], include_dirs=[get_include()])
2626

2727
EXTENSIONS = [EXTENSION_CDTW, EXTENSION_CMFCC]
28-
if os.uname()[0] == "Linux":
28+
if (os.name == "posix") and (os.uname()[0] == "Linux"):
2929
# cew is available only for Linux at the moment
3030
EXTENSIONS.append(EXTENSION_CEW)
3131

0 commit comments

Comments
 (0)