@@ -147,7 +147,7 @@ def get_base_dirs():
147
147
148
148
basedir_map = {
149
149
'win32' : ['win32_static' , ],
150
- 'darwin' : ['/usr/local/' , '/usr' , '/usr/X11' ,
150
+ 'darwin' : [sys . prefix , '/usr/local/' , '/usr' , '/usr/X11' ,
151
151
'/opt/X11' , '/opt/local' ],
152
152
'sunos5' : [os .getenv ('MPLIB_BASE' ) or '/usr/local' , ],
153
153
'gnu0' : ['/usr' ],
@@ -203,6 +203,13 @@ def print_line(*args, **kwargs):
203
203
customize_compiler = sysconfig .customize_compiler
204
204
def my_customize_compiler (compiler ):
205
205
retval = customize_compiler (compiler )
206
+ print (compiler .compiler_so )
207
+ print (compiler .linker_so )
208
+ dl_kwd_index = compiler .linker_so .index ('dynamic_lookup' )
209
+ compiler .linker_so .pop (dl_kwd_index )
210
+ compiler .linker_so .pop (dl_kwd_index - 1 )
211
+ compiler .linker_so .extend (['-Bstatic' , '-lstdc++' , '-lpython2.7' ])
212
+ print (compiler .linker_so )
206
213
try :
207
214
compiler .compiler_so .remove ('-Wstrict-prototypes' )
208
215
except (ValueError , AttributeError ):
@@ -1467,6 +1474,12 @@ def add_flags(self, ext):
1467
1474
ext .library_dirs .extend ([os .path .join (sys .prefix , 'dlls' )])
1468
1475
1469
1476
elif sys .platform == 'darwin' :
1477
+ if os .path .exists (os .path .join (sys .prefix , 'include' , 'tcl.h' )):
1478
+ ext .libraries .extend (['tk8.5' ])
1479
+ ext .libraries .extend (['tcl8.5' ])
1480
+ # ext.include_dirs.append(os.path.join(sys.prefix, 'include'))
1481
+ return
1482
+
1470
1483
# this config section lifted directly from Imaging - thanks to
1471
1484
# the effbot!
1472
1485
@@ -1492,6 +1505,7 @@ def add_flags(self, ext):
1492
1505
tk_framework_found = 1
1493
1506
break
1494
1507
if tk_framework_found :
1508
+ print ('FRAMEWORK FOUND' )
1495
1509
# For 8.4a2, we must add -I options that point inside
1496
1510
# the Tcl and Tk frameworks. In later release we
1497
1511
# should hopefully be able to pass the -F option to
0 commit comments