summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x.travis-make-py24-virtualenv.sh9
-rw-r--r--bscript3
-rw-r--r--numpy/build_utils/waf.py14
-rw-r--r--numpy/core/bento.info5
-rw-r--r--numpy/core/bscript5
-rw-r--r--numpy/random/tests/test_random.py8
6 files changed, 28 insertions, 16 deletions
diff --git a/.travis-make-py24-virtualenv.sh b/.travis-make-py24-virtualenv.sh
index 625f8b7b7..972e2d26c 100755
--- a/.travis-make-py24-virtualenv.sh
+++ b/.travis-make-py24-virtualenv.sh
@@ -15,4 +15,11 @@ EOF
./configure --prefix=$PWD/install
make
make install
-virtualenv -p install/bin/python2.4 --distribute $VIRTENV
+# This is the last version of virtualenv to support python 2.4:
+curl -O https://raw.github.com/pypa/virtualenv/1.7.2/virtualenv.py
+# And this is the last version of pip to support python 2.4. If
+# there's a file matching "^pip-.*(zip|tar.gz|tar.bz2|tgz|tbz)$" in
+# the current directory then virtualenv will take that as the pip
+# source distribution to install
+curl -O http://pypi.python.org/packages/source/p/pip/pip-1.1.tar.gz
+install/bin/python2.4 ./virtualenv.py --distribute $VIRTENV
diff --git a/bscript b/bscript
index 88f434d7f..d3db21fa0 100644
--- a/bscript
+++ b/bscript
@@ -12,9 +12,6 @@ Caveats:
import os
import sys
import subprocess
-import string
-
-import os.path as op
# Ugly but necessary hack: import numpy here so that wscript in sub directories
# will see this numpy and not an already installed one
diff --git a/numpy/build_utils/waf.py b/numpy/build_utils/waf.py
index 051cf27e0..ab49ecea9 100644
--- a/numpy/build_utils/waf.py
+++ b/numpy/build_utils/waf.py
@@ -412,15 +412,15 @@ def check_ldouble_representation(conf, **kw):
def post_check(self, *k, **kw):
"set the variables after a test was run successfully"
- is_success = 0
+ is_success = False
if kw['execute']:
if kw['success'] is not None:
- is_success = kw['success']
+ if kw.get('define_ret', False):
+ is_success = kw['success']
+ else:
+ is_success = (kw['success'] == 0)
else:
- if kw["success"] == 0:
- is_success = 1
- else:
- is_success = 0
+ is_success = (kw['success'] == 0)
def define_or_stuff():
nm = kw['define_name']
@@ -453,7 +453,7 @@ def post_check(self, *k, **kw):
if isinstance(val, str):
val = val.rstrip(os.path.sep)
self.env.append_unique(k + '_' + kw['uselib_store'], val)
- return is_success
+ return is_success
@waflib.Configure.conf
def define_with_comment(conf, define, value, comment=None, quote=True):
diff --git a/numpy/core/bento.info b/numpy/core/bento.info
index bf8ae3a81..9c8476eee 100644
--- a/numpy/core/bento.info
+++ b/numpy/core/bento.info
@@ -1,7 +1,7 @@
HookFile: bscript
Library:
- CompiledLibrary: npymath
+ CompiledLibrary: lib/npymath
Sources:
src/npymath/_signbit.c,
src/npymath/ieee754.c.src,
@@ -28,3 +28,6 @@ Library:
Extension: scalarmath
Sources:
src/scalarmathmodule.c.src
+ Extension: _dotblas
+ Sources:
+ blasdot/_dotblas.c
diff --git a/numpy/core/bscript b/numpy/core/bscript
index 1ded8eff3..f52c8c013 100644
--- a/numpy/core/bscript
+++ b/numpy/core/bscript
@@ -411,8 +411,7 @@ def pre_build(context):
numpyconfig_h = context.local_node.declare(os.path.join("include", "numpy", "_numpyconfig.h"))
context.register_outputs("numpy_gen_headers", "numpyconfig", [numpyconfig_h])
- context.tweak_library("npymath",
- includes=["src/private", "src/npymath", "include"])
+ context.tweak_library("lib/npymath", includes=["src/private", "src/npymath", "include"])
context.tweak_library("npysort",
includes=[".", "src/private", "src/npysort"],
@@ -507,5 +506,5 @@ def pre_build(context):
def build_dotblas(extension):
if bld.env.HAS_CBLAS:
- return context.default_builder(extension, use="CBLAS")
+ return context.default_builder(extension, use="CBLAS", includes=["src/private"])
context.register_builder("_dotblas", build_dotblas)
diff --git a/numpy/random/tests/test_random.py b/numpy/random/tests/test_random.py
index 7d9163e61..ee40cce69 100644
--- a/numpy/random/tests/test_random.py
+++ b/numpy/random/tests/test_random.py
@@ -360,7 +360,13 @@ class TestRandomDist(TestCase):
desired = np.array([[ 2.46852460439034849e+03, 1.41286880810518346e+03],
[ 5.28287797029485181e+07, 6.57720981047328785e+07],
[ 1.40840323350391515e+02, 1.98390255135251704e+05]])
- np.testing.assert_array_almost_equal(actual, desired, decimal=15)
+ # For some reason on 32-bit x86 Ubuntu 12.10 the [1, 0] entry in this
+ # matrix differs by 24 nulps. Discussion:
+ # http://mail.scipy.org/pipermail/numpy-discussion/2012-September/063801.html
+ # Consensus is that this is probably some gcc quirk that affects
+ # rounding but not in any important way, so we just use a looser
+ # tolerance on this test:
+ np.testing.assert_array_almost_equal_nulp(actual, desired, nulp=30)
def test_poisson(self):
np.random.seed(self.seed)