mirror of
https://github.com/python/cpython.git
synced 2025-10-22 14:42:22 +00:00
Don't disable building Mac-specific modules for a non-framework build:
whether they crash or not is not a matter of using a framework or not, but whether the code is run from an app bundle or not. And that it _can_ crash (instead of tracing back) is Apple's bug anyway, not ours.
This commit is contained in:
parent
d5169bad94
commit
05ced6aa76
1 changed files with 89 additions and 99 deletions
12
setup.py
12
setup.py
|
@ -694,20 +694,10 @@ class PyBuildExt(build_ext):
|
||||||
exts.append( Extension('sunaudiodev', ['sunaudiodev.c']) )
|
exts.append( Extension('sunaudiodev', ['sunaudiodev.c']) )
|
||||||
|
|
||||||
if platform == 'darwin':
|
if platform == 'darwin':
|
||||||
# Mac OS X specific modules. Modules linked against the Carbon
|
# Mac OS X specific modules.
|
||||||
# framework are only built for framework-enabled Pythons. As
|
|
||||||
# of MacOSX 10.1 importing the Carbon framework from a non-windowing
|
|
||||||
# application (MacOSX server, not logged in on the console) may
|
|
||||||
# result in Python crashing.
|
|
||||||
#
|
|
||||||
# I would like to trigger on WITH_NEXT_FRAMEWORK but that isn't
|
|
||||||
# available here. This Makefile variable is also what the install
|
|
||||||
# procedure triggers on.
|
|
||||||
exts.append( Extension('_CF', ['cf/_CFmodule.c', 'cf/pycfbridge.c'],
|
exts.append( Extension('_CF', ['cf/_CFmodule.c', 'cf/pycfbridge.c'],
|
||||||
extra_link_args=['-framework', 'CoreFoundation']) )
|
extra_link_args=['-framework', 'CoreFoundation']) )
|
||||||
|
|
||||||
framework = sysconfig.get_config_var('PYTHONFRAMEWORK')
|
|
||||||
if framework:
|
|
||||||
exts.append( Extension('gestalt', ['gestaltmodule.c'],
|
exts.append( Extension('gestalt', ['gestaltmodule.c'],
|
||||||
extra_link_args=['-framework', 'Carbon']) )
|
extra_link_args=['-framework', 'Carbon']) )
|
||||||
exts.append( Extension('MacOS', ['macosmodule.c'],
|
exts.append( Extension('MacOS', ['macosmodule.c'],
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue