summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorThomas Heller <theller@ctypes.org>2006-04-07 19:27:56 +0000
committerThomas Heller <theller@ctypes.org>2006-04-07 19:27:56 +0000
commit5e72caa4593f912969268c17d038816438fc586a (patch)
tree8a064f868cac572330cea02771f9a3e2b829ba49 /setup.py
parentfafc370362aa14156234539596305a84dbee6311 (diff)
downloadcpython-5e72caa4593f912969268c17d038816438fc586a.tar.gz
Don't try to build ctypes when configuration of libffi fails.
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/setup.py b/setup.py
index 5a19383bd0..065a115878 100644
--- a/setup.py
+++ b/setup.py
@@ -181,7 +181,8 @@ class PyBuildExt(build_ext):
def build_extension(self, ext):
if ext.name == '_ctypes':
- self.configure_ctypes(ext)
+ if not self.configure_ctypes(ext):
+ return
try:
build_ext.build_extension(self, ext)
@@ -1287,7 +1288,7 @@ class PyBuildExt(build_ext):
res = os.system(cmd)
if res or not os.path.exists(ffi_configfile):
print "Failed to configure _ctypes module"
- return
+ return False
fficonfig = {}
execfile(ffi_configfile, globals(), fficonfig)
@@ -1303,6 +1304,7 @@ class PyBuildExt(build_ext):
ext.sources.extend(fficonfig['ffi_sources'])
ext.include_dirs.extend(include_dirs)
ext.extra_compile_args.extend(extra_compile_args)
+ return True
def detect_ctypes(self):
include_dirs = []