Python requires -fwrapv for Decimal division
According to: http://stackoverflow.com/questions/7590137/dividing-decimals-yields-invalid-results-in-python-2-5-to-2-7 the Python interpreter must be built with -fwrapv for proper Decimal division. To test: python -c "from decimal import Decimal; print Decimal(4) / Decimal(2)" If built with -fwrapv, this yields 2. Closes Homebrew/homebrew#10487. Signed-off-by: Adam Vandenberg <flangy@gmail.com>master
parent
b9e1f00952
commit
d4fd1b9aae
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue