summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authormattip <matti.picus@gmail.com>2020-02-27 10:15:21 +0200
committermattip <matti.picus@gmail.com>2020-02-27 10:50:42 +0200
commiteeb9e5061596a0a434ed5dfc3fa136f56ac12cb1 (patch)
treeb9d8b4a0fc3b97a8b3e00c9e95fa1603b77d2d55 /tools
parenteb8a54031bdd48655bf9a683f935fbd529f5e013 (diff)
downloadnumpy-eeb9e5061596a0a434ed5dfc3fa136f56ac12cb1.tar.gz
BLD: consolidate openblas verison check to be self-contained
Diffstat (limited to 'tools')
-rw-r--r--tools/openblas_support.py13
-rwxr-xr-xtools/pypy-test.sh2
-rwxr-xr-xtools/travis-test.sh2
3 files changed, 10 insertions, 7 deletions
diff --git a/tools/openblas_support.py b/tools/openblas_support.py
index 34e6b36c4..c7de1fb2a 100644
--- a/tools/openblas_support.py
+++ b/tools/openblas_support.py
@@ -9,7 +9,7 @@ from tempfile import mkstemp, gettempdir
import zipfile
import tarfile
-OPENBLAS_V = 'v0.3.8'
+OPENBLAS_V = '0.3.9'
OPENBLAS_LONG = 'v0.3.7-391-gddcbed66' # the 0.3.7 is misleading
BASE_LOC = 'https://anaconda.org/multibuild-wheels-staging/openblas-libs'
BASEURL = f'{BASE_LOC}/{OPENBLAS_LONG}/download'
@@ -243,8 +243,11 @@ def test_version(expected_version, ilp64=get_ilp64()):
get_config.restype=ctypes.c_char_p
res = get_config()
print('OpenBLAS get_config returned', str(res))
- check_str = b'OpenBLAS %s' % expected_version[0].encode()
- assert check_str in res
+ if not expected_version:
+ expected_version = OPENBLAS_V
+ check_str = b'OpenBLAS %s' % expected_version.encode()
+ print(check_str)
+ assert check_str in res, '%s not found in %s' %(expected_version, res)
if ilp64:
assert b"USE64BITINT" in res
else:
@@ -257,10 +260,10 @@ if __name__ == '__main__':
'architecture')
parser.add_argument('--test', nargs='*', default=None,
help='Test different architectures. "all", or any of %s' % ARCHITECTURES)
- parser.add_argument('--check_version', nargs=1, default=None,
+ parser.add_argument('--check_version', nargs='?', default='',
help='Check provided OpenBLAS version string against available OpenBLAS')
args = parser.parse_args()
- if args.check_version is not None:
+ if args.check_version != '':
test_version(args.check_version)
elif args.test is None:
print(setup_openblas())
diff --git a/tools/pypy-test.sh b/tools/pypy-test.sh
index 5a7b28f9a..af806a5f6 100755
--- a/tools/pypy-test.sh
+++ b/tools/pypy-test.sh
@@ -45,4 +45,4 @@ pypy3/bin/pypy3 runtests.py --debug-info --show-build-log -v -- -rsx \
echo Make sure the correct openblas has been linked in
pypy3/bin/pip install .
-pypy3/bin/pypy3 tools/openblas_support.py --check_version "$OpenBLAS_version"
+pypy3/bin/pypy3 tools/openblas_support.py --check_version
diff --git a/tools/travis-test.sh b/tools/travis-test.sh
index cd3ffe29a..225cbfa0c 100755
--- a/tools/travis-test.sh
+++ b/tools/travis-test.sh
@@ -97,7 +97,7 @@ run_test()
export PYTHONWARNINGS=default
if [ -n "$CHECK_BLAS" ]; then
- $PYTHON ../tools/openblas_support.py --check_version $OpenBLAS_version
+ $PYTHON ../tools/openblas_support.py --check_version
fi
if [ -n "$RUN_FULL_TESTS" ]; then