Skip to content

Commit b163f7f

Browse files
author
Kevin D Smith
committed
Add 64-bit Python check
1 parent 128eb8f commit b163f7f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

swat/clib.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,12 @@ def _import_pyswat():
7979
if libssl:
8080
os.environ['TKESSL_OPENSSL_LIB'] = libssl[-1]
8181

82+
if struct.calcsize('P') < 8:
83+
raise RuntimeError('A 64-bit build of Python is required for the '
84+
'binary protocol. You can either install a 64-bit '
85+
'version of Python, or use the REST interface as '
86+
'an alternative.')
87+
8288
# Try to import the C extension
8389
try:
8490
_pyswat = importlib.import_module('.lib.%s.%s' % (platform, libname),

0 commit comments

Comments
 (0)