Python: add DTrace support
Makes use of a patch from http://bugs.python.org/issue13405 with the first part modified to remove the .hgignore patch. This ends up providing full probes in OSX just like you have with built-in Python. Closes Homebrew/homebrew#14343. Signed-off-by: Adam Vandenberg <flangy@gmail.com>master
parent
64c2b7f6a1
commit
3b41404923
|
@ -40,6 +40,11 @@ class Python < Formula
|
|||
option :universal
|
||||
option 'quicktest', 'Run `make quicktest` after the build'
|
||||
|
||||
# --with-dtrace relies on CLT as the patch from
|
||||
# http://bugs.python.org/issue13405 requires it.
|
||||
# A note is added upstream about the CLT requirement.
|
||||
option 'with-dtrace', 'Install with DTrace support' if MacOS::CLT.installed?
|
||||
|
||||
# Skip binaries so modules will load; skip lib because it is mostly Python files
|
||||
skip_clean ['bin', 'lib']
|
||||
|
||||
|
@ -47,6 +52,10 @@ class Python < Formula
|
|||
prefix/"Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages"
|
||||
end
|
||||
|
||||
def patches
|
||||
'https://raw.github.com/gist/3415636/2365dea8dc5415daa0148e98c394345e1191e4aa/pythondtrace-patch.diff'
|
||||
end if build.include? 'with-dtrace'
|
||||
|
||||
# The HOMEBREW_PREFIX location of site-packages.
|
||||
def site_packages
|
||||
HOMEBREW_PREFIX/"lib/python2.7/site-packages"
|
||||
|
@ -76,6 +85,7 @@ class Python < Formula
|
|||
]
|
||||
|
||||
args << '--without-gcc' if ENV.compiler == :clang
|
||||
args << '--with-dtrace' if build.include? 'with-dtrace'
|
||||
|
||||
# Further, Python scans all "-I" dirs but not "-isysroot", so we add
|
||||
# the needed includes with "-I" here to avoid this err:
|
||||
|
|
Loading…
Reference in New Issue