diff setup.py @ 33285:ee703a094dfb legacy-trunk

When building with --disable-toolbox-glue under Darwin, skip building any Mac-specific modules. Before all modules were compiled but would fail thanks to a dependence on the code included when Python was built without the compiler flag. Closes bug #991962.
author Brett Cannon <bcannon@gmail.com>
date Thu, 26 Aug 2004 01:44:07 +0000
parents aad118643598
children 67fbbeb1e218
line wrap: on
line diff
--- a/setup.py	Thu Aug 26 01:41:51 2004 +0000
+++ b/setup.py	Thu Aug 26 01:44:07 2004 +0000
@@ -119,7 +119,8 @@
 
         # Platform-dependent module source and include directories
         platform = self.get_platform()
-        if platform in ('darwin', 'mac'):
+        if platform in ('darwin', 'mac') and ("--disable-toolbox-glue" not in 
+            sysconfig.get_config_var("CONFIG_ARGS")):
             # Mac OS X also includes some mac-specific modules
             macmoddir = os.path.join(os.getcwd(), srcdir, 'Mac/Modules')
             moddirlist.append(macmoddir)
@@ -789,7 +790,8 @@
             # SunOS specific modules
             exts.append( Extension('sunaudiodev', ['sunaudiodev.c']) )
 
-        if platform == 'darwin':
+        if platform == 'darwin' and ("--disable-toolbox-glue" not in 
+            sysconfig.get_config_var("CONFIG_ARGS")):
             # Mac OS X specific modules.
             exts.append( Extension('_CF', ['cf/_CFmodule.c', 'cf/pycfbridge.c'],
                         extra_link_args=['-framework', 'CoreFoundation']) )