Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Update compiler.py
Solves error generated by using sys.maxint constant in Python 3.1.5^, sys.maxsize is available for use in Python 2.0.0.

Python docs for reference:
- sys.maxint deprecated in Python 3.1.5^: https://docs.python.org/3.1/whatsnew/3.0.html#integers
- sys.maxsize supported in Python 2.6^ : https://docs.python.org/2.6/library/sys.html#sys.maxsize
  • Loading branch information
greenstick committed May 25, 2016
1 parent 22c147e commit e3864b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pycuda/compiler.py
Expand Up @@ -240,7 +240,7 @@ def compile(source, nvcc="nvcc", options=None, keep=False,
if code is not None:
options.extend(["-code", code])

if 'darwin' in sys.platform and sys.maxint == 9223372036854775807:
if 'darwin' in sys.platform and sys.maxsize == 9223372036854775807:
options.append('-m64')
elif 'win32' in sys.platform and sys.maxsize == 9223372036854775807:
options.append('-m64')
Expand Down

0 comments on commit e3864b5

Please sign in to comment.