Skip to content

Instantly share code, notes, and snippets.

@abrodkin
Created September 25, 2018 11:25
Show Gist options
  • Save abrodkin/274d8537dd527d469ed6c26738ea096b to your computer and use it in GitHub Desktop.
Save abrodkin/274d8537dd527d469ed6c26738ea096b to your computer and use it in GitHub Desktop.
Build CPython 2.x with crap in /usr/local/
diff --git a/setup.py b/setup.py
index 33cecc6875..52265a58fc 100644
--- a/setup.py
+++ b/setup.py
@@ -454,10 +454,6 @@ class PyBuildExt(build_ext):
             os.unlink(tmpfile)
 
     def detect_modules(self):
-        # Ensure that /usr/local is always used
-        if not cross_compiling:
-            add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
-            add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
         if cross_compiling:
             self.add_gcc_paths()
         self.add_multiarch_paths()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment