From e79cddda18938f294f7915162c9a843445fb5041 Mon Sep 17 00:00:00 2001 From: Matt Wala Date: Mon, 15 Jan 2018 15:39:02 -0600 Subject: [PATCH] Fix 32 bit check for Python 3 on macOS. sys.maxint is not available in Python 3. The recommended way to check the platform is to use sys.maxsize instead. --- codepy/toolchain.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/codepy/toolchain.py b/codepy/toolchain.py index cec6ad6..5e72433 100644 --- a/codepy/toolchain.py +++ b/codepy/toolchain.py @@ -450,7 +450,7 @@ def guess_toolchain(): # So we need to check explicitly how we're running # And update the cflags accordingly import sys - if sys.maxint == 0x7fffffff: + if sys.maxsize == 0x7fffffff: kwargs["cflags"].extend(['-arch', 'i386']) return GCCToolchain(**kwargs) @@ -463,7 +463,7 @@ def guess_toolchain(): # So we need to check explicitly how we're running # And update the cflags accordingly import sys - if sys.maxint == 0x7fffffff: + if sys.maxsize == 0x7fffffff: kwargs["cflags"].extend(['-arch', 'i386']) return GCCToolchain(**kwargs) -- GitLab