summaryrefslogtreecommitdiff
path: root/dev-python/numpy/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-21 18:59:32 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-21 18:59:32 +0100
commit520a5b56dff7c24c9d42eafec142cb78b44f8e3e (patch)
treef562f705600dbd2292e97c0b4145787c2a8d1f97 /dev-python/numpy/files
parent3811bc3072bf19e2be351d2c63f81532945c0f21 (diff)
gentoo resync : 21.07.2018
Diffstat (limited to 'dev-python/numpy/files')
-rw-r--r--dev-python/numpy/files/numpy-1.14.5-no-hardcode-blas.patch75
-rw-r--r--dev-python/numpy/files/numpy-1.14.5-py37.patch135
2 files changed, 210 insertions, 0 deletions
diff --git a/dev-python/numpy/files/numpy-1.14.5-no-hardcode-blas.patch b/dev-python/numpy/files/numpy-1.14.5-no-hardcode-blas.patch
new file mode 100644
index 000000000000..39777ec55afb
--- /dev/null
+++ b/dev-python/numpy/files/numpy-1.14.5-no-hardcode-blas.patch
@@ -0,0 +1,75 @@
+diff --git a/numpy/distutils/system_info.py b/numpy/distutils/system_info.py
+index 93a8e6f..df3f3f8 100644
+--- a/numpy/distutils/system_info.py
++++ b/numpy/distutils/system_info.py
+@@ -364,28 +364,7 @@ def get_info(name, notfound_action=0):
+ 1 - display warning message
+ 2 - raise error
+ """
+- cl = {'atlas': atlas_info, # use lapack_opt or blas_opt instead
+- 'atlas_threads': atlas_threads_info, # ditto
+- 'atlas_blas': atlas_blas_info,
+- 'atlas_blas_threads': atlas_blas_threads_info,
+- 'lapack_atlas': lapack_atlas_info, # use lapack_opt instead
+- 'lapack_atlas_threads': lapack_atlas_threads_info, # ditto
+- 'atlas_3_10': atlas_3_10_info, # use lapack_opt or blas_opt instead
+- 'atlas_3_10_threads': atlas_3_10_threads_info, # ditto
+- 'atlas_3_10_blas': atlas_3_10_blas_info,
+- 'atlas_3_10_blas_threads': atlas_3_10_blas_threads_info,
+- 'lapack_atlas_3_10': lapack_atlas_3_10_info, # use lapack_opt instead
+- 'lapack_atlas_3_10_threads': lapack_atlas_3_10_threads_info, # ditto
+- 'mkl': mkl_info,
+- # openblas which may or may not have embedded lapack
+- 'openblas': openblas_info, # use blas_opt instead
+- # openblas with embedded lapack
+- 'openblas_lapack': openblas_lapack_info, # use blas_opt instead
+- 'openblas_clapack': openblas_clapack_info, # use blas_opt instead
+- 'blis': blis_info, # use blas_opt instead
+- 'lapack_mkl': lapack_mkl_info, # use lapack_opt instead
+- 'blas_mkl': blas_mkl_info, # use blas_opt instead
+- 'x11': x11_info,
++ cl = {'x11': x11_info,
+ 'fft_opt': fft_opt_info,
+ 'fftw': fftw_info,
+ 'fftw2': fftw2_info,
+@@ -730,10 +709,7 @@ class system_info(object):
+ return [b for b in [a.strip() for a in libs.split(',')] if b]
+
+ def get_libraries(self, key='libraries'):
+- if hasattr(self, '_lib_names'):
+- return self.get_libs(key, default=self._lib_names)
+- else:
+- return self.get_libs(key, '')
++ return self.get_libs(key, '')
+
+ def library_extensions(self):
+ c = customized_ccompiler()
+@@ -1740,7 +1716,7 @@ class blas_info(system_info):
+ lib = self.has_cblas(info)
+ if lib is not None:
+ info['language'] = 'c'
+- info['libraries'] = [lib]
++ info['libraries'] = lib
+ info['define_macros'] = [('HAVE_CBLAS', None)]
+ self.set_info(**info)
+
+@@ -1772,16 +1748,16 @@ class blas_info(system_info):
+ # check for cblas lib, and if not present check for blas lib.
+ try:
+ c.link_executable(obj, os.path.join(tmpdir, "a.out"),
+- libraries=["cblas"],
++ libraries=info["libraries"],
+ library_dirs=info['library_dirs'],
+ extra_postargs=info.get('extra_link_args', []))
+- res = "cblas"
++ res = info["libraries"]
+ except distutils.ccompiler.LinkError:
+ c.link_executable(obj, os.path.join(tmpdir, "a.out"),
+ libraries=["blas"],
+ library_dirs=info['library_dirs'],
+ extra_postargs=info.get('extra_link_args', []))
+- res = "blas"
++ res = ["blas"]
+ except distutils.ccompiler.CompileError:
+ res = None
+ finally:
diff --git a/dev-python/numpy/files/numpy-1.14.5-py37.patch b/dev-python/numpy/files/numpy-1.14.5-py37.patch
new file mode 100644
index 000000000000..c53b3acf6966
--- /dev/null
+++ b/dev-python/numpy/files/numpy-1.14.5-py37.patch
@@ -0,0 +1,135 @@
+From dce7f20e95e6bd3fc07517c0b2daf3942a34ddf7 Mon Sep 17 00:00:00 2001
+From: Charles Harris <charlesr.harris@gmail.com>
+Date: Wed, 14 Mar 2018 12:52:26 -0600
+Subject: [PATCH] MAINT: Fix test_utils.py for Python 3.7.
+
+The contents of the module warnings registries was made more module
+specific in Python 3.7 and consequently the tests of the context
+managers clear_and_catch_warnings and suppress_warnings need updating.
+---
+ numpy/testing/tests/test_utils.py | 43 +++++++++++++++++++++----------
+ 1 file changed, 29 insertions(+), 14 deletions(-)
+
+diff --git a/numpy/testing/tests/test_utils.py b/numpy/testing/tests/test_utils.py
+index a97b627f9..33b3555b0 100644
+--- a/numpy/testing/tests/test_utils.py
++++ b/numpy/testing/tests/test_utils.py
+@@ -1114,18 +1114,28 @@ class TestStringEqual(unittest.TestCase):
+ lambda: assert_string_equal("foo", "hello"))
+
+
+-def assert_warn_len_equal(mod, n_in_context, py3_n_in_context=None):
++def assert_warn_len_equal(mod, n_in_context, py34=None, py37=None):
+ mod_warns = mod.__warningregistry__
++ num_warns = len(mod_warns)
+ # Python 3.4 appears to clear any pre-existing warnings of the same type,
+ # when raising warnings inside a catch_warnings block. So, there is a
+ # warning generated by the tests within the context manager, but no
+ # previous warnings.
+ if 'version' in mod_warns:
+- if py3_n_in_context is None:
+- py3_n_in_context = n_in_context
+- assert_equal(len(mod_warns) - 1, py3_n_in_context)
+- else:
+- assert_equal(len(mod_warns), n_in_context)
++ # Python 3 adds a 'version' entry to the registry,
++ # do not count it.
++ num_warns -= 1
++
++ # Behavior of warnings is Python version dependent. Adjust the
++ # expected result to compensate. In particular, Python 3.7 does
++ # not make an entry for ignored warnings.
++ if sys.version_info[:2] >= (3, 7):
++ if py37 is not None:
++ n_in_context = py37
++ elif sys.version_info[:2] >= (3, 4):
++ if py34 is not None:
++ n_in_context = py34
++ assert_equal(num_warns, n_in_context)
+
+
+ def _get_fresh_mod():
+@@ -1134,6 +1144,8 @@ def _get_fresh_mod():
+ try:
+ my_mod.__warningregistry__.clear()
+ except AttributeError:
++ # will not have a __warningregistry__ unless warning has been
++ # raised in the module at some point
+ pass
+ return my_mod
+
+@@ -1147,21 +1159,23 @@ def test_clear_and_catch_warnings():
+ warnings.warn('Some warning')
+ assert_equal(my_mod.__warningregistry__, {})
+ # Without specified modules, don't clear warnings during context
++ # Python 3.7 catch_warnings doesn't make an entry for 'ignore'.
+ with clear_and_catch_warnings():
+ warnings.simplefilter('ignore')
+ warnings.warn('Some warning')
+- assert_warn_len_equal(my_mod, 1)
++ assert_warn_len_equal(my_mod, 1, py37=0)
+ # Confirm that specifying module keeps old warning, does not add new
+ with clear_and_catch_warnings(modules=[my_mod]):
+ warnings.simplefilter('ignore')
+ warnings.warn('Another warning')
+- assert_warn_len_equal(my_mod, 1)
++ assert_warn_len_equal(my_mod, 1, py37=0)
+ # Another warning, no module spec does add to warnings dict, except on
+ # Python 3.4 (see comments in `assert_warn_len_equal`)
++ # Python 3.7 catch_warnings doesn't make an entry for 'ignore'.
+ with clear_and_catch_warnings():
+ warnings.simplefilter('ignore')
+ warnings.warn('Another warning')
+- assert_warn_len_equal(my_mod, 2, 1)
++ assert_warn_len_equal(my_mod, 2, py34=1, py37=0)
+
+
+ def test_suppress_warnings_module():
+@@ -1178,6 +1192,7 @@ def test_suppress_warnings_module():
+ np.apply_along_axis(warn, 0, [0])
+
+ # Test module based warning suppression:
++ assert_warn_len_equal(my_mod, 0)
+ with suppress_warnings() as sup:
+ sup.record(UserWarning)
+ # suppress warning from other module (may have .pyc ending),
+@@ -1189,8 +1204,7 @@ def test_suppress_warnings_module():
+ # got filtered)
+ assert_(len(sup.log) == 1)
+ assert_(sup.log[0].message.args[0] == "Some warning")
+-
+- assert_warn_len_equal(my_mod, 0)
++ assert_warn_len_equal(my_mod, 0, py37=0)
+ sup = suppress_warnings()
+ # Will have to be changed if apply_along_axis is moved:
+ sup.filter(module=my_mod)
+@@ -1204,11 +1218,11 @@ def test_suppress_warnings_module():
+ assert_warn_len_equal(my_mod, 0)
+
+ # Without specified modules, don't clear warnings during context
++ # Python 3.7 does not add ignored warnings.
+ with suppress_warnings():
+ warnings.simplefilter('ignore')
+ warnings.warn('Some warning')
+- assert_warn_len_equal(my_mod, 1)
+-
++ assert_warn_len_equal(my_mod, 1, py37=0)
+
+ def test_suppress_warnings_type():
+ # Initial state of module, no warnings
+@@ -1232,10 +1246,11 @@ def test_suppress_warnings_type():
+ assert_warn_len_equal(my_mod, 0)
+
+ # Without specified modules, don't clear warnings during context
++ # Python 3.7 does not add ignored warnings.
+ with suppress_warnings():
+ warnings.simplefilter('ignore')
+ warnings.warn('Some warning')
+- assert_warn_len_equal(my_mod, 1)
++ assert_warn_len_equal(my_mod, 1, py37=0)
+
+
+ def test_suppress_warnings_decorate_no_record():
+--
+2.18.0
+