summaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2002-09-12 14:41:20 (GMT)
committerGuido van Rossum <guido@python.org>2002-09-12 14:41:20 (GMT)
commit770acd3f7fff52eef0d0ad02beaa4c569d70811f (patch)
tree952fcf24aae745a721ba78f80d55ea93bbee07da /setup.py
parented44dbd9596f1eb424d5cd0df0669dad6baaa309 (diff)
downloadcpython-770acd3f7fff52eef0d0ad02beaa4c569d70811f.zip
cpython-770acd3f7fff52eef0d0ad02beaa4c569d70811f.tar.gz
cpython-770acd3f7fff52eef0d0ad02beaa4c569d70811f.tar.bz2
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.
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/setup.py b/setup.py
index 3341e46..7e9d7fe 100644
--- a/setup.py
+++ b/setup.py
@@ -732,9 +732,11 @@ class PyBuildExt(build_ext):
))
# Dynamic loading module
- 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']) )
+ if sys.maxint == 0x7fffffff:
+ # This requires sizeof(int) == sizeof(long) == sizeof(char*)
+ 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
if platform == 'linux2':