Source

pypy-patches / no-macports.diff

Full commit
# HG changeset patch
# User Dan Villiom Podlaski Christiansen <danchr@gmail.com>
# Date 1291027470 -3600
# Node ID ed0f5c2e844f5742d097d130f74ba60cb815f0dc
# Parent  8b2a646e506bb3ff60669cde478d1a23781828a0
don't search MacPorts & Fink by default.

diff --git a/pypy/translator/platform/darwin.py b/pypy/translator/platform/darwin.py
--- a/pypy/translator/platform/darwin.py
+++ b/pypy/translator/platform/darwin.py
@@ -31,14 +31,10 @@ class Darwin(posix.BasePosix):
     
     def _preprocess_include_dirs(self, include_dirs):
         res_incl_dirs = list(include_dirs)
-        res_incl_dirs.append('/usr/local/include') # Homebrew
-        res_incl_dirs.append('/opt/local/include') # MacPorts
         return res_incl_dirs
 
     def _preprocess_library_dirs(self, library_dirs):
         res_lib_dirs = list(library_dirs) 
-        res_lib_dirs.append('/usr/local/lib') # Homebrew
-        res_lib_dirs.append('/opt/local/lib') # MacPorts
         return res_lib_dirs
 
     def include_dirs_for_libffi(self):
diff --git a/pypy/translator/platform/distutils_platform.py b/pypy/translator/platform/distutils_platform.py
--- a/pypy/translator/platform/distutils_platform.py
+++ b/pypy/translator/platform/distutils_platform.py
@@ -68,13 +68,6 @@ class DistutilsPlatform(Platform):
             self.link_extra += ['/DEBUG'] # generate .pdb file
         if self.name == 'darwin':
             # support Fink & Darwinports
-            for s in ('/sw/', '/opt/local/'):
-                if s + 'include' not in self.include_dirs and \
-                   os.path.exists(s + 'include'):
-                    self.include_dirs.append(s + 'include')
-                if s + 'lib' not in self.library_dirs and \
-                   os.path.exists(s + 'lib'):
-                    self.library_dirs.append(s + 'lib')
             self.compile_extra += CFLAGS + ['-fomit-frame-pointer']
             for framework in self.frameworks:
                 self.link_extra += ['-framework', framework]