Only build the 'dl' extension when sys.maxint equals 2**31-1.
This module raises "SystemError: module dl requires sizeof(int) == sizeof(long) == sizeof(char*)" when compiled on 64-bit platforms.
This commit is contained in:
parent
ed44dbd959
commit
770acd3f7f
8
setup.py
8
setup.py
|
@ -732,9 +732,11 @@ class PyBuildExt(build_ext):
|
||||||
))
|
))
|
||||||
|
|
||||||
# Dynamic loading module
|
# Dynamic loading module
|
||||||
dl_inc = find_file('dlfcn.h', [], inc_dirs)
|
if sys.maxint == 0x7fffffff:
|
||||||
if (dl_inc is not None) and (platform not in ['atheos']):
|
# This requires sizeof(int) == sizeof(long) == sizeof(char*)
|
||||||
exts.append( Extension('dl', ['dlmodule.c']) )
|
dl_inc = find_file('dlfcn.h', [], inc_dirs)
|
||||||
|
if (dl_inc is not None) and (platform not in ['atheos']):
|
||||||
|
exts.append( Extension('dl', ['dlmodule.c']) )
|
||||||
|
|
||||||
# Platform-specific libraries
|
# Platform-specific libraries
|
||||||
if platform == 'linux2':
|
if platform == 'linux2':
|
||||||
|
|
Loading…
Reference in New Issue