Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0c46c0c

Browse files
author
Michael W. Hudson
committed
Apply Jack's patch attached to
[ 508779 ] Disable flat namespace on MacOS X I presume you wanted this on the trunk too, Jack? 2.2.1 candidate.
1 parent 02b28ec commit 0c46c0c

2 files changed

Lines changed: 9 additions & 5 deletions

File tree

configure.in

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -793,8 +793,9 @@ then
793793
# Link against the framework. All externals should be defined.
794794
LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
795795
else
796-
# No framework. Ignore undefined symbols, assuming they come from Python
797-
LDSHARED="$LDSHARED -flat_namespace -undefined suppress"
796+
# No framework, use the Python app as bundle-loader
797+
BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
798+
LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/$(PYTHON)'
798799
fi ;;
799800
Linux*|GNU*) LDSHARED="gcc -shared";;
800801
dgux*) LDSHARED="ld -G";;

setup.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,8 @@ def detect_modules(self):
604604
# available here. This Makefile variable is also what the install
605605
# procedure triggers on.
606606
frameworkdir = sysconfig.get_config_var('PYTHONFRAMEWORKDIR')
607-
exts.append( Extension('gestalt', ['gestaltmodule.c']) )
607+
exts.append( Extension('gestalt', ['gestaltmodule.c'],
608+
extra_link_args=['-framework', 'Carbon']) )
608609
exts.append( Extension('MacOS', ['macosmodule.c'],
609610
extra_link_args=['-framework', 'Carbon']) )
610611
exts.append( Extension('icglue', ['icgluemodule.c'],
@@ -613,8 +614,10 @@ def detect_modules(self):
613614
['macfsmodule.c',
614615
'../Python/getapplbycreator.c'],
615616
extra_link_args=['-framework', 'Carbon']) )
616-
exts.append( Extension('_CF', ['cf/_CFmodule.c']) )
617-
exts.append( Extension('_Res', ['res/_Resmodule.c']) )
617+
exts.append( Extension('_CF', ['cf/_CFmodule.c'],
618+
extra_link_args=['-framework', 'CoreFoundation']) )
619+
exts.append( Extension('_Res', ['res/_Resmodule.c'],
620+
extra_link_args=['-framework', 'Carbon']) )
618621
exts.append( Extension('_Snd', ['snd/_Sndmodule.c'],
619622
extra_link_args=['-framework', 'Carbon']) )
620623
if frameworkdir:

0 commit comments

Comments
 (0)