From c70d1c07e4e697156bd49c43e2cc800f3085b182 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Thu, 8 Mar 2018 20:18:01 +0200 Subject: python-numpy: update to 1.14.1 Drop backported 0001-BUG-fix-infinite-loop-when-creating-np.pad-on-an-emp.patch. Drop 0001-BUG-fix-infinite-loop-when-creating-np.pad-on-an-emp.patch as upstream is using os.path.basename() instead now. License-Update: License.txt file was update to list licenses of individual components; not all of them are 3-clause BSD. Signed-off-by: Alexander Kanavin Signed-off-by: Ross Burton --- ...inite-loop-when-creating-np.pad-on-an-emp.patch | 45 ---------------------- ...h-usr-and-so-on-for-libraries-by-default-.patch | 33 +++++++++------- .../files/remove-build-path-in-comments.patch | 30 --------------- 3 files changed, 19 insertions(+), 89 deletions(-) delete mode 100644 meta/recipes-devtools/python-numpy/files/0001-BUG-fix-infinite-loop-when-creating-np.pad-on-an-emp.patch delete mode 100644 meta/recipes-devtools/python-numpy/files/remove-build-path-in-comments.patch (limited to 'meta/recipes-devtools/python-numpy/files') diff --git a/meta/recipes-devtools/python-numpy/files/0001-BUG-fix-infinite-loop-when-creating-np.pad-on-an-emp.patch b/meta/recipes-devtools/python-numpy/files/0001-BUG-fix-infinite-loop-when-creating-np.pad-on-an-emp.patch deleted file mode 100644 index b9e585610f..0000000000 --- a/meta/recipes-devtools/python-numpy/files/0001-BUG-fix-infinite-loop-when-creating-np.pad-on-an-emp.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 4170b98e0d5864ef4db1c5704a6e9428c3be9fb8 Mon Sep 17 00:00:00 2001 -From: Iryna Shcherbina -Date: Thu, 24 Aug 2017 18:01:43 +0200 -Subject: [PATCH] BUG: fix infinite loop when creating np.pad on an empty array - -Upstream-Status: Backport [https://github.com/numpy/numpy/pull/9599/commits/6f9ea0abbd305d53f9017debab3a3a591fe0e249] -CVE: CVE-2017-12852 -Signed-off-by: Dengke Du ---- - numpy/lib/arraypad.py | 3 +++ - numpy/lib/tests/test_arraypad.py | 4 ++++ - 2 files changed, 7 insertions(+) - -diff --git a/numpy/lib/arraypad.py b/numpy/lib/arraypad.py -index 2dad99c..294a689 100644 ---- a/numpy/lib/arraypad.py -+++ b/numpy/lib/arraypad.py -@@ -1406,6 +1406,9 @@ def pad(array, pad_width, mode, **kwargs): - newmat = _append_min(newmat, pad_after, chunk_after, axis) - - elif mode == 'reflect': -+ if narray.size == 0: -+ raise ValueError("There aren't any elements to reflect in `array`") -+ - for axis, (pad_before, pad_after) in enumerate(pad_width): - # Recursive padding along any axis where `pad_amt` is too large - # for indexing tricks. We can only safely pad the original axis -diff --git a/numpy/lib/tests/test_arraypad.py b/numpy/lib/tests/test_arraypad.py -index 056aa45..0f71d32 100644 ---- a/numpy/lib/tests/test_arraypad.py -+++ b/numpy/lib/tests/test_arraypad.py -@@ -1014,6 +1014,10 @@ class ValueError1(TestCase): - assert_raises(ValueError, pad, arr, ((-2, 3), (3, 2)), - **kwargs) - -+ def test_check_empty_array(self): -+ assert_raises(ValueError, pad, [], 4, mode='reflect') -+ assert_raises(ValueError, pad, np.ndarray(0), 4, mode='reflect') -+ - - class ValueError2(TestCase): - def test_check_negative_pad_amount(self): --- -2.8.1 - diff --git a/meta/recipes-devtools/python-numpy/files/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch b/meta/recipes-devtools/python-numpy/files/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch index ffd6ced136..516ccd7b9b 100644 --- a/meta/recipes-devtools/python-numpy/files/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch +++ b/meta/recipes-devtools/python-numpy/files/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch @@ -1,23 +1,24 @@ -From cc2ce6d8b6a3e6e2c8874896c10897034a80cd4f Mon Sep 17 00:00:00 2001 +From c8c6649b29a08f82e1d6761a6d62ce5f632313c5 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Thu, 10 Dec 2015 13:20:30 +0200 -Subject: [PATCH] Don't search /usr and so on for libraries by default to avoid - host contamination. +Subject: [PATCH 1/3] Don't search /usr and so on for libraries by default to + avoid host contamination. Upstream-Status: Inappropriate (As the code stands, this is a hack) Signed-off-by: Ross Burton Signed-off-by: Alexander Kanavin + --- numpy/distutils/system_info.py | 50 +++++------------------------------------- 1 file changed, 6 insertions(+), 44 deletions(-) -Index: numpy-1.13.1/numpy/distutils/system_info.py -=================================================================== ---- numpy-1.13.1.orig/numpy/distutils/system_info.py -+++ numpy-1.13.1/numpy/distutils/system_info.py -@@ -211,51 +211,13 @@ if sys.platform == 'win32': - default_x11_lib_dirs = [] - default_x11_include_dirs = [] +diff --git a/numpy/distutils/system_info.py b/numpy/distutils/system_info.py +index bea120c..544e056 100644 +--- a/numpy/distutils/system_info.py ++++ b/numpy/distutils/system_info.py +@@ -262,51 +262,13 @@ if sys.platform == 'win32': + add_system_root(os.path.join(conda_dir, 'Library')) + else: - default_lib_dirs = libpaths(['/usr/local/lib', '/opt/lib', '/usr/lib', - '/opt/local/lib', '/sw/lib'], platform_bits) @@ -29,10 +30,7 @@ Index: numpy-1.13.1/numpy/distutils/system_info.py - '/opt/local/include', '/sw/include', - '/usr/include/suitesparse'] - default_src_dirs = ['.', '/usr/local/src', '/opt/src', '/sw/src'] -+ default_lib_dirs = libpaths(['/deadir/lib'], platform_bits) -+ default_include_dirs = ['/deaddir/include'] -+ default_src_dirs = ['.', '/deaddir/src'] - +- - default_x11_lib_dirs = libpaths(['/usr/X11R6/lib', '/usr/X11/lib', - '/usr/lib'], platform_bits) - default_x11_include_dirs = ['/usr/X11R6/include', '/usr/X11/include', @@ -67,8 +65,15 @@ Index: numpy-1.13.1/numpy/distutils/system_info.py - finally: - if tmp is not None: - tmp.close() ++ default_lib_dirs = libpaths(['/deadir/lib'], platform_bits) ++ default_include_dirs = ['/deaddir/include'] ++ default_src_dirs = ['.', '/deaddir/src'] ++ + default_x11_lib_dirs = libpaths(['/deaddir/lib'], platform_bits) + default_x11_include_dirs = ['/deaddir/include'] if os.path.join(sys.prefix, 'lib') not in default_lib_dirs: default_lib_dirs.insert(0, os.path.join(sys.prefix, 'lib')) +-- +2.16.1 + diff --git a/meta/recipes-devtools/python-numpy/files/remove-build-path-in-comments.patch b/meta/recipes-devtools/python-numpy/files/remove-build-path-in-comments.patch deleted file mode 100644 index eb8a71a2e2..0000000000 --- a/meta/recipes-devtools/python-numpy/files/remove-build-path-in-comments.patch +++ /dev/null @@ -1,30 +0,0 @@ -From c560abff71f98a39a7401f08c2c13dad9ae7f15f Mon Sep 17 00:00:00 2001 -From: Hongxu Jia -Date: Thu, 25 Feb 2016 01:23:32 -0500 -Subject: [PATCH] remove build path in comments - -It has build path in comments, so remove it. - -Upstream-Status: Inappropriate [openembedded specific] - -Signed-off-by: Hongxu Jia ---- - numpy/distutils/misc_util.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/numpy/distutils/misc_util.py b/numpy/distutils/misc_util.py -index 345e60f..dafb068 100644 ---- a/numpy/distutils/misc_util.py -+++ b/numpy/distutils/misc_util.py -@@ -2254,7 +2254,7 @@ def generate_config_py(target): - from distutils.dir_util import mkpath - mkpath(os.path.dirname(target)) - f = open(target, 'w') -- f.write('# This file is generated by %s\n' % (os.path.abspath(sys.argv[0]))) -+ f.write('# This file is generated by %s\n' % (os.path.abspath(sys.argv[0]).replace(os.path.abspath('../'),''))) - f.write('# It contains system_info results at the time of building this package.\n') - f.write('__all__ = ["get_info","show"]\n\n') - for k, i in system_info.saved_results.items(): --- -1.9.1 - -- cgit 1.2.3-korg