Commits

antoine.pitrou  committed 2f90923

[svn r80982] Revert r80963 - it broke compilation everywhere

  • Participants
  • Parent commits c1e3403

Comments (0)

Files changed (1)

File Lib/distutils/unixccompiler.py

   * link shared library handled by 'cc -shared'
 """
 
-__revision__ = "$Id: unixccompiler.py 80963 2010-05-08 08:44:37Z ronald.oussoren $"
+__revision__ = "$Id: unixccompiler.py 80982 2010-05-08 15:23:57Z antoine.pitrou $"
 
-import os, sys, re
+import os, sys
 from types import StringType, NoneType
 
 from distutils import sysconfig
         dylib_f = self.library_filename(lib, lib_type='dylib')
         static_f = self.library_filename(lib, lib_type='static')
 
-        if sys.platform == 'darwin':
-            # On OSX users can specify an alternate SDK using
-            # '-isysroot', calculate the SDK root if it is specified
-            # (and use it further on)
-            cflags = sysconfig.get_config_var('CFLAGS')
-            m = re.search(r'-isysroot\s+(\S+)', cflags)
-            if m is None:
-                sysroot = '/'
-            else:
-                sysroot = m.group(1)
-
-
-
         for dir in dirs:
             shared = os.path.join(dir, shared_f)
             dylib = os.path.join(dir, dylib_f)
             static = os.path.join(dir, static_f)
-
-            if sys.platform == 'darwin' and (dir.startswith('/System/') or dir.startswith('/usr/')):
-                shared = os.path.join(sysroot, dir[1:], shared_f)
-                dylib = os.path.join(sysroot, dir[1:], dylib_f)
-                static = os.path.join(sysroot, dir[1:], static_f)
-
             # We're second-guessing the linker here, with not much hard
             # data to go on: GCC seems to prefer the shared library, so I'm
             # assuming that *all* Unix C compilers do.  And of course I'm