From 8b890f6a6f813ff291ef648114aa69e2ffdf878f Mon Sep 17 00:00:00 2001 From: Lee Packham Date: Tue, 21 Aug 2012 14:51:37 +0100 Subject: 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 #14343. Signed-off-by: Adam Vandenberg --- Library/Formula/python.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Library') diff --git a/Library/Formula/python.rb b/Library/Formula/python.rb index 49c3c3bde..c9358db43 100644 --- a/Library/Formula/python.rb +++ b/Library/Formula/python.rb @@ -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: -- cgit v1.2.3