@@ -1118,16 +1118,6 @@ def detect_readline_curses(self):
11181118 if find_file ('readline/rlconf.h' , self .inc_dirs , []) is None :
11191119 do_readline = False
11201120 if do_readline :
1121- if MACOS and os_release < 9 :
1122- # In every directory on the search path search for a dynamic
1123- # library and then a static library, instead of first looking
1124- # for dynamic libraries on the entire path.
1125- # This way a statically linked custom readline gets picked up
1126- # before the (possibly broken) dynamic library in /usr/lib.
1127- readline_extra_link_args = ('-Wl,-search_paths_first' ,)
1128- else :
1129- readline_extra_link_args = ()
1130-
11311121 readline_libs = [readline_lib ]
11321122 if readline_termcap_library :
11331123 pass # Issue 7384: Already linked against curses or tinfo.
@@ -1139,7 +1129,6 @@ def detect_readline_curses(self):
11391129 readline_libs .append ('termcap' )
11401130 self .add (Extension ('readline' , ['readline.c' ],
11411131 library_dirs = ['/usr/lib/termcap' ],
1142- extra_link_args = readline_extra_link_args ,
11431132 libraries = readline_libs ))
11441133 else :
11451134 self .missing .append ('readline' )
@@ -1603,16 +1592,6 @@ def detect_sqlite(self):
16031592 ):
16041593 raise DistutilsError ("System version of SQLite does not support loadable extensions" )
16051594
1606- if MACOS :
1607- # In every directory on the search path search for a dynamic
1608- # library and then a static library, instead of first looking
1609- # for dynamic libraries on the entire path.
1610- # This way a statically linked custom sqlite gets picked up
1611- # before the dynamic library in /usr/lib.
1612- sqlite_extra_link_args = ('-Wl,-search_paths_first' ,)
1613- else :
1614- sqlite_extra_link_args = ()
1615-
16161595 include_dirs = ["Modules/_sqlite" ]
16171596 # Only include the directory where sqlite was found if it does
16181597 # not already exist in set include directories, otherwise you
@@ -1626,7 +1605,6 @@ def detect_sqlite(self):
16261605 define_macros = sqlite_defines ,
16271606 include_dirs = include_dirs ,
16281607 library_dirs = sqlite_libdir ,
1629- extra_link_args = sqlite_extra_link_args ,
16301608 libraries = ["sqlite3" ,]))
16311609 else :
16321610 self .missing .append ('_sqlite3' )
@@ -1685,13 +1663,8 @@ def detect_compress_exts(self):
16851663 break
16861664 if version >= version_req :
16871665 if (self .compiler .find_library_file (self .lib_dirs , 'z' )):
1688- if MACOS :
1689- zlib_extra_link_args = ('-Wl,-search_paths_first' ,)
1690- else :
1691- zlib_extra_link_args = ()
16921666 self .add (Extension ('zlib' , ['zlibmodule.c' ],
1693- libraries = ['z' ],
1694- extra_link_args = zlib_extra_link_args ))
1667+ libraries = ['z' ]))
16951668 have_zlib = True
16961669 else :
16971670 self .missing .append ('zlib' )
@@ -1706,24 +1679,16 @@ def detect_compress_exts(self):
17061679 if have_zlib :
17071680 extra_compile_args .append ('-DUSE_ZLIB_CRC32' )
17081681 libraries = ['z' ]
1709- extra_link_args = zlib_extra_link_args
17101682 else :
17111683 libraries = []
1712- extra_link_args = []
17131684 self .add (Extension ('binascii' , ['binascii.c' ],
17141685 extra_compile_args = extra_compile_args ,
1715- libraries = libraries ,
1716- extra_link_args = extra_link_args ))
1686+ libraries = libraries ))
17171687
17181688 # Gustavo Niemeyer's bz2 module.
17191689 if (self .compiler .find_library_file (self .lib_dirs , 'bz2' )):
1720- if MACOS :
1721- bz2_extra_link_args = ('-Wl,-search_paths_first' ,)
1722- else :
1723- bz2_extra_link_args = ()
17241690 self .add (Extension ('_bz2' , ['_bz2module.c' ],
1725- libraries = ['bz2' ],
1726- extra_link_args = bz2_extra_link_args ))
1691+ libraries = ['bz2' ]))
17271692 else :
17281693 self .missing .append ('_bz2' )
17291694
0 commit comments