aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/python.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Formula/python.rb')
-rw-r--r--Library/Formula/python.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/Library/Formula/python.rb b/Library/Formula/python.rb
index e4fa7f00d..748943f2d 100644
--- a/Library/Formula/python.rb
+++ b/Library/Formula/python.rb
@@ -40,6 +40,10 @@ class Python < Formula
skip_clean ['bin', 'lib']
def install
+ # Python requires -fwrapv for proper Decimal division
+ # See: http://stackoverflow.com/questions/7590137/dividing-decimals-yields-invalid-results-in-python-2-5-to-2-7
+ ENV.append_to_cflags "-fwrapv"
+
if build_framework? and ARGV.include? "--static"
onoe "Cannot specify both framework and static."
exit 99