]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
When building with --disable-toolbox-glue under Darwin, skip building any
authorBrett Cannon <bcannon@gmail.com>
Thu, 26 Aug 2004 01:44:07 +0000 (01:44 +0000)
committerBrett Cannon <bcannon@gmail.com>
Thu, 26 Aug 2004 01:44:07 +0000 (01:44 +0000)
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.

Misc/NEWS
setup.py

index fd5ba686fd514274c64ebc2cd8d5933cd7a863c6..c7478d49cacc5983f52178aff880518902b1675c 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -139,6 +139,9 @@ Tools/Demos
 Build
 -----
 
+- bug #991962: When building with --disable-toolbox-glue on Darwin no
+  attempt to build Mac-specific modules occurs.
+
 - The --with-tsc flag to configure to enable VM profiling with the
   processor's timestamp counter now works on PPC platforms.
 
index c309a32d95009200d771d8a654d0ccd7631946a2..50e57673b568132992256483ca5da16bfe00aac1 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -119,7 +119,8 @@ class PyBuildExt(build_ext):
 
         # 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 @@ class PyBuildExt(build_ext):
             # 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']) )