Created
August 14, 2019 16:06
-
-
Save eblot/32a30be8df405b0832be68bd925199e6 to your computer and use it in GitHub Desktop.
Build Homebrew's Python3 intepreter with debug symbols
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Formula/python.rb b/Formula/python.rb | |
index 0d799476..6b1b2ad0 100644 | |
--- a/Formula/python.rb | |
+++ b/Formula/python.rb | |
@@ -113,10 +113,13 @@ class Python < Formula | |
system "./configure", *args | |
system "make" | |
+ system "xcrun dsymutil Python.framework/Versions/#{xy}/Python" | |
ENV.deparallelize do | |
# Tell Python not to install into /Applications (default for framework builds) | |
system "make", "install", "PYTHONAPPSDIR=#{prefix}" | |
+ # There's likely a better way to copy a subdirectory tree with Homebrew, but I'm tired of Ruby syntax | |
+ system "tar cf - Python.framework/Versions/#{xy}/Python.dSYM | tar xvf - -C #{frameworks}" | |
system "make", "frameworkinstallextras", "PYTHONAPPSDIR=#{pkgshare}" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note: Patching Homebrew's
cc
file is also required to prevent brew from stripping out-g