diff --git a/numba-0.51.2.tar.gz b/numba-0.51.2.tar.gz deleted file mode 100644 index 2a5cd0c..0000000 --- a/numba-0.51.2.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:16bd59572114adbf5f600ea383880d7b2071ae45477e84a24994e089ea390768 -size 2059680 diff --git a/numba-0.53.0.tar.gz b/numba-0.53.0.tar.gz new file mode 100644 index 0000000..83c0578 --- /dev/null +++ b/numba-0.53.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:55c11d7edbba2ba715f2b56f5294cad55cfd87bff98e2627c3047c2d5cc52d16 +size 2212284 diff --git a/numba-pr6851-llvm-timings.patch b/numba-pr6851-llvm-timings.patch new file mode 100644 index 0000000..c3f092e --- /dev/null +++ b/numba-pr6851-llvm-timings.patch @@ -0,0 +1,72 @@ +diff --git a/numba/misc/llvm_pass_timings.py b/numba/misc/llvm_pass_timings.py +index 205bb3396..b3263dd45 100644 +--- a/numba/misc/llvm_pass_timings.py ++++ b/numba/misc/llvm_pass_timings.py +@@ -239,12 +239,14 @@ class ProcessedPassTimings: + missing[k] = 0.0 + # parse timings + n = r"\s*((?:[0-9]+\.)?[0-9]+)" +- pat = f"\\s+{n}\\s*\\({n}%\\)" * (len(headers) - 1) + r"\s*(.*)" ++ pat = f"\\s+(?:{n}\\s*\\({n}%\\)|-+)" * (len(headers) - 1) ++ pat += r"\s*(.*)" + for ln in line_iter: + m = re.match(pat, ln) + if m is not None: + raw_data = list(m.groups()) +- data = {k: float(v) for k, v in zip(attrs, raw_data)} ++ data = {k: float(v) if v is not None else 0.0 ++ for k, v in zip(attrs, raw_data)} + data.update(missing) + pass_name = raw_data[-1] + rec = PassTimingRecord( +diff --git a/numba/tests/test_llvm_pass_timings.py b/numba/tests/test_llvm_pass_timings.py +index a7e9135cd..25b77e2c5 100644 +--- a/numba/tests/test_llvm_pass_timings.py ++++ b/numba/tests/test_llvm_pass_timings.py +@@ -5,6 +5,30 @@ from numba.tests.support import TestCase, override_config + from numba.misc import llvm_pass_timings as lpt + + ++timings_raw1 = """ ++===-------------------------------------------------------------------------=== ++ ... Pass execution timing report ... ++===-------------------------------------------------------------------------=== ++ Total Execution Time: 0.0001 seconds (0.0001 wall clock) ++ ++ ---User Time--- --System Time-- --User+System-- ---Wall Time--- --- Name --- ++ 0.0001 ( 90.1%) 0.0001 ( 90.1%) 0.0001 ( 90.1%) 0.0001 ( 90.1%) A1 ++ 0.0000 ( 9.9%) 0.0000 ( 9.9%) 0.0000 ( 9.9%) 0.0000 ( 9.9%) A2 ++ 0.0001 (100.0%) 0.0001 (100.0%) 0.0001 (100.0%) 0.0001 (100.0%) Total ++ ++""" # noqa: E501 ++ ++timings_raw2 = """ ++ Total Execution Time: 0.0001 seconds (0.0001 wall clock) ++ ++ ---User Time--- --System Time-- --User+System-- ---Wall Time--- --- Name --- ++ 0.0001 ( 90.1%) ----- 0.0001 ( 90.1%) 0.0001 ( 90.1%) A1 ++ 0.0000 ( 9.9%) ----- 0.0000 ( 9.9%) 0.0000 ( 9.9%) A2 ++ 0.0001 (100.0%) ----- 0.0001 (100.0%) 0.0001 (100.0%) Total ++ ++""" # noqa: E501 ++ ++ + class TestLLVMPassTimings(TestCase): + + def test_usage(self): +@@ -61,6 +85,15 @@ class TestLLVMPassTimings(TestCase): + self.assertGreaterEqual(last, cur) + cur = last + ++ def test_parse_raw(self): ++ timings1 = lpt.ProcessedPassTimings(timings_raw1) ++ self.assertAlmostEqual(timings1.get_total_time(), 0.0001) ++ self.assertIsInstance(timings1.summary(), str) ++ ++ timings2 = lpt.ProcessedPassTimings(timings_raw2) ++ self.assertAlmostEqual(timings2.get_total_time(), 0.0001) ++ self.assertIsInstance(timings2.summary(), str) ++ + + class TestLLVMPassTimingsDisabled(TestCase): + def test_disabled_behavior(self): diff --git a/packaging-ignore-setuptools-deprecation.patch b/packaging-ignore-setuptools-deprecation.patch new file mode 100644 index 0000000..ecda389 --- /dev/null +++ b/packaging-ignore-setuptools-deprecation.patch @@ -0,0 +1,52 @@ +From 4811aeceb2dde05124697909b87cf4ad2ae07c65 Mon Sep 17 00:00:00 2001 +From: Stuart Archibald +Date: Wed, 17 Mar 2021 12:29:16 +0000 +Subject: [PATCH 1/2] Ignore warnings from packaging module when testing import + behaviour. + +As title. + +Fixes #6831 +--- + numba/tests/test_import.py | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/numba/tests/test_import.py b/numba/tests/test_import.py +index 7cc9082046..a46ad2df6c 100644 +--- a/numba/tests/test_import.py ++++ b/numba/tests/test_import.py +@@ -58,7 +58,9 @@ def test_no_accidental_warnings(self): + # checks that importing Numba isn't accidentally triggering warnings due + # to e.g. deprecated use of import locations from Python's stdlib + code = "import numba" +- flags = ["-Werror",] ++ # See: https://github.com/numba/numba/issues/6831 ++ # bug in setuptools/packaging causing a deprecation warning ++ flags = ["-Werror", "-Wignore::DeprecationWarning:packaging:"] + self.run_in_subproc(code, flags) + + def test_import_star(self): + +From 94fc06e77b648b1cb5021cd6d460aa42808a0393 Mon Sep 17 00:00:00 2001 +From: Stuart Archibald +Date: Wed, 17 Mar 2021 16:42:14 +0000 +Subject: [PATCH 2/2] Respond to feedback + +As title] +--- + numba/tests/test_import.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/numba/tests/test_import.py b/numba/tests/test_import.py +index a46ad2df6c..a0ca5725eb 100644 +--- a/numba/tests/test_import.py ++++ b/numba/tests/test_import.py +@@ -60,7 +60,7 @@ def test_no_accidental_warnings(self): + code = "import numba" + # See: https://github.com/numba/numba/issues/6831 + # bug in setuptools/packaging causing a deprecation warning +- flags = ["-Werror", "-Wignore::DeprecationWarning:packaging:"] ++ flags = ["-Werror", "-Wignore::DeprecationWarning:packaging.version:"] + self.run_in_subproc(code, flags) + + def test_import_star(self): diff --git a/python-numba.changes b/python-numba.changes index 5bb7471..8716c61 100644 --- a/python-numba.changes +++ b/python-numba.changes @@ -1,3 +1,88 @@ +------------------------------------------------------------------- +Wed Mar 17 16:51:46 UTC 2021 - Ben Greiner + +- Update to 0.53.0 + * Support for Python 3.9 + * Function sub-typing + * Initial support for dynamic gufuncs (i.e. from @guvectorize) + * Parallel Accelerator (@njit(parallel=True) now supports + Fortran ordered arrays + * Full release notes at + https://numba.readthedocs.io/en/0.53.0/release-notes.html +- Don't unpin-llvmlite.patch. It really need to be the correct + version. +- Refresh skip-failing-tests.patch +- Add packaging-ignore-setuptools-deprecation.patch + gh#numba/numba#6837 +- Add numba-pr6851-llvm-timings.patch gh#numba/numba#6851 in order + to fix 32-bit issues gh#numba/numba#6832 + +------------------------------------------------------------------- +Wed Feb 17 09:49:48 UTC 2021 - Ben Greiner + +- Update to 0.52.0 + https://numba.readthedocs.io/en/stable/release-notes.html + This release focuses on performance improvements, but also adds + some new features and contains numerous bug fixes and stability + improvements. + Highlights of core performance improvements include: + * Intel kindly sponsored research and development into producing + a new reference count pruning pass. This pass operates at the + LLVM level and can prune a number of common reference counting + patterns. This will improve performance for two primary + reasons: + - There will be less pressure on the atomic locks used to do + the reference counting. + - Removal of reference counting operations permits more + inlining and the optimisation passes can in general do more + with what is present. + (Siu Kwan Lam). + * Intel also sponsored work to improve the performance of the + numba.typed.List container, particularly in the case of + __getitem__ and iteration (Stuart Archibald). + * Superword-level parallelism vectorization is now switched on + and the optimisation pipeline has been lightly analysed and + tuned so as to be able to vectorize more and more often + (Stuart Archibald). + Highlights of core feature changes include: + * The inspect_cfg method on the JIT dispatcher object has been + significantly enhanced and now includes highlighted output and + interleaved line markers and Python source (Stuart Archibald). + * The BSD operating system is now unofficially supported (Stuart + Archibald). + * Numerous features/functionality improvements to NumPy support, + including support for: + - np.asfarray (Guilherme Leobas) + - “subtyping” in record arrays (Lucio Fernandez-Arjona) + - np.split and np.array_split (Isaac Virshup) + - operator.contains with ndarray (@mugoh). + - np.asarray_chkfinite (Rishabh Varshney). + - NumPy 1.19 (Stuart Archibald). + - the ndarray allocators, empty, ones and zeros, accepting a + dtype specified as a string literal (Stuart Archibald). + * Booleans are now supported as literal types (Alexey Kozlov). + * On the CUDA target: + * CUDA 9.0 is now the minimum supported version (Graham Markall). + * Support for Unified Memory has been added (Max Katz). + * Kernel launch overhead is reduced (Graham Markall). + * Cudasim support for mapped array, memcopies and memset has + been * added (Mike Williams). + * Access has been wired in to all libdevice functions (Graham + Markall). + * Additional CUDA atomic operations have been added (Michae + Collison). + * Additional math library functions (frexp, ldexp, isfinite) + (Zhihao * Yuan). + * Support for power on complex numbers (Graham Markall). + Deprecations to note: + * There are no new deprecations. However, note that + “compatibility” mode, which was added some 40 releases ago to + help transition from 0.11 to 0.12+, has been removed! Also, + the shim to permit the import of jitclass from Numba’s top + level namespace has now been removed as per the deprecation + schedule. +- NEP 29: Skip python36 build. Python 3.6 is dropped by NumPy 1.20 + ------------------------------------------------------------------- Mon Nov 2 16:34:48 UTC 2020 - Marketa Calabkova diff --git a/python-numba.spec b/python-numba.spec index f181d94..8c158fb 100644 --- a/python-numba.spec +++ b/python-numba.spec @@ -1,7 +1,7 @@ # -# spec file for package python-numba +# spec file for package python-numba-test # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,6 +18,8 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define skip_python2 1 +# NEP 29: python36-numpy and -scipy no longer in TW +%define skip_python36 1 %global flavor @BUILD_FLAVOR@%{nil} %if "%{flavor}" == "test" %define psuffix -test @@ -27,16 +29,20 @@ %bcond_with test %endif Name: python-numba%{psuffix} -Version: 0.51.2 +Version: 0.53.0 Release: 0 Summary: NumPy-aware optimizing compiler for Python using LLVM License: BSD-2-Clause -URL: https://github.com/numba/numba +URL: https://numba.pydata.org/ Source: https://files.pythonhosted.org/packages/source/n/numba/numba-%{version}.tar.gz -Patch0: skip-failing-tests.patch # PATCH-FIX-UPSTREAM fix-max-name-size.patch -- fix for gh#numba/numba#3876 -- from gh#numba/numba#4373 -Patch1: fix-max-name-size.patch -Patch2: unpin-llvmlite.patch +Patch0: fix-max-name-size.patch +# PATCH-FIX-UPSTREAM packaging-ignore-setuptools-deprecation.patch -- gh#numba/numba#6837 +Patch1: https://github.com/numba/numba/pull/6837.patch#/packaging-ignore-setuptools-deprecation.patch +# PATCH-FIX-USPTREAM ignore empty system time column on llvm timings -- gh#numba/numba#6851 +Patch2: numba-pr6851-llvm-timings.patch +# PATCH-FIX-OPENSUSE skip tests failing due to OBS specifics +Patch3: skip-failing-tests.patch BuildRequires: %{python_module devel} BuildRequires: %{python_module numpy-devel >= 1.15} BuildRequires: %{python_module setuptools} @@ -44,11 +50,12 @@ BuildRequires: fdupes BuildRequires: gcc-c++ BuildRequires: python-rpm-macros BuildRequires: tbb-devel -Requires: python-llvmlite >= 0.33 +Requires: python-llvmlite < 0.37 +Requires: python-llvmlite >= 0.36 Requires: python-numpy >= 1.15 Requires: python-scipy >= 0.16 Requires(post): update-alternatives -Requires(preun): update-alternatives +Requires(preun):update-alternatives Recommends: python-Jinja2 Recommends: python-Pygments Recommends: python-cffi @@ -59,10 +66,10 @@ BuildRequires: %{python_module PyYAML} BuildRequires: %{python_module Pygments} BuildRequires: %{python_module cffi} BuildRequires: %{python_module ipython} -BuildRequires: %{python_module llvmlite >= 0.33} BuildRequires: %{python_module numba >= %{version}} BuildRequires: %{python_module numba-devel >= %{version}} BuildRequires: %{python_module pip} +BuildRequires: %{python_module psutil} BuildRequires: %{python_module pytest} BuildRequires: %{python_module scipy >= 0.16} BuildRequires: %{python_module tbb} @@ -99,19 +106,20 @@ This package contains files for developing applications using numba. %setup -q -n numba-%{version} %autopatch -p1 -# due to new numpy version tests now fail -# Remove this with version update! (>0.48.0) +# Incompatilbe numpy versions (?) +# Check these with every version update! (Last check 0.53) # https://github.com/numba/numba/issues/5251 +# https://numba.discourse.group/t/helping-test-numba-0-53-0-rc/519/34 rm numba/tests/test_np_functions.py -rm numba/tests/test_ufuncs.py -rm numba/tests/test_array_manipulation.py rm numba/tests/test_array_reductions.py -# https://github.com/numba/numba/issues/5179 -rm numba/tests/test_hashing.py # timeouts randomly in OBS rm numba/tests/test_typedlist.py -# as we reduced the amount of tests: -sed -i -e 's:5000:3000:' numba/tests/test_runtests.py +# if we reduced the amount of tests too much: +#sed -i -e '/check_testsuite_size/ s/5000/3000/' numba/tests/test_runtests.py +# our setup imports distutils. Not sure why, but should not be a problem. +sed -i -e "/def test_laziness/,/def/ {/'distutils',/ d}" numba/tests/test_import.py + +sed -i -e '1{/env python/ d}' numba/misc/appdirs.py %build export CFLAGS="%{optflags} -fPIC" @@ -120,7 +128,12 @@ export CFLAGS="%{optflags} -fPIC" %install %if !%{with test} %python_install -%python_expand %fdupes %{buildroot}%{$python_sitearch} +%{python_expand # +%fdupes %{buildroot}%{$python_sitearch} +find %{buildroot}%{$python_sitearch} -name '*.[ch]' > devel-files0-%{$python_bin_suffix}.files +sed 's|^%{buildroot}||' devel-files0-%{$python_bin_suffix}.files > devel-files-%{$python_bin_suffix}.files +sed 's|^%{buildroot}|%%exclude |' devel-files0-%{$python_bin_suffix}.files > devel-files-exclude-%{$python_bin_suffix}.files +} %python_clone -a %{buildroot}%{_bindir}/numba %python_clone -a %{buildroot}%{_bindir}/pycc @@ -130,7 +143,7 @@ export CFLAGS="%{optflags} -fPIC" %if %{with test} mv numba numba_temp export NUMBA_PARALLEL_DIAGNOSTICS=1 -%{python_expand export PYTHONPATH=%{$python_sitearch} +%{python_expand # test the installed package %{_bindir}/numba-%{$python_bin_suffix} -s $python -m numba.runtests -v -b --exclude-tags='long_running' -m %{_smp_build_ncpus} -- numba.tests } @@ -144,23 +157,16 @@ mv numba_temp numba %preun %python_uninstall_alternative numba -%files %{python_files} +%files %{python_files} -f devel-files-exclude-%{python_bin_suffix}.files %license LICENSE %doc CHANGE_LOG README.rst %python_alternative %{_bindir}/numba %python_alternative %{_bindir}/pycc %{python_sitearch}/numba/ %{python_sitearch}/numba-%{version}-py*.egg-info -%exclude %{python_sitearch}/numba/*.c -%exclude %{python_sitearch}/numba/*.h -%exclude %{python_sitearch}/numba/*/*.c -%exclude %{python_sitearch}/numba/*/*.h -%files %{python_files devel} -%{python_sitearch}/numba/*.c -%{python_sitearch}/numba/*.h -%{python_sitearch}/numba/*/*.c -%{python_sitearch}/numba/*/*.h +%files %{python_files devel} -f devel-files-%{python_bin_suffix}.files +%license LICENSE %endif %changelog diff --git a/skip-failing-tests.patch b/skip-failing-tests.patch index 20761ad..d831d66 100644 --- a/skip-failing-tests.patch +++ b/skip-failing-tests.patch @@ -1,8 +1,8 @@ -Index: numba-0.49.0/numba/tests/test_parfors.py +Index: numba-0.53.0/numba/tests/test_parfors.py =================================================================== ---- numba-0.49.0.orig/numba/tests/test_parfors.py -+++ numba-0.49.0/numba/tests/test_parfors.py -@@ -1505,7 +1505,7 @@ class TestParfors(TestParforsBase): +--- numba-0.53.0.orig/numba/tests/test_parfors.py ++++ numba-0.53.0/numba/tests/test_parfors.py +@@ -1649,7 +1649,7 @@ class TestParfors(TestParforsBase): msg = ("The reshape API may only include one negative argument.") self.assertIn(msg, str(raised.exception)) @@ -11,7 +11,7 @@ Index: numba-0.49.0/numba/tests/test_parfors.py def test_ndarray_fill(self): def test_impl(x): x.fill(7.0) -@@ -2541,7 +2541,7 @@ class TestParforsVectorizer(TestPrangeBa +@@ -2842,7 +2842,7 @@ class TestParforsVectorizer(TestPrangeBa # to check vsqrtpd operates on zmm match_vsqrtpd_on_zmm = re.compile('\n\s+vsqrtpd\s+.*zmm.*\n') @@ -20,7 +20,7 @@ Index: numba-0.49.0/numba/tests/test_parfors.py def test_vectorizer_fastmath_asm(self): """ This checks that if fastmath is set and the underlying hardware is suitable, and the function supplied is amenable to fastmath based -@@ -2584,7 +2584,7 @@ class TestParforsVectorizer(TestPrangeBa +@@ -2885,7 +2885,7 @@ class TestParforsVectorizer(TestPrangeBa # check no zmm addressing is present self.assertTrue('zmm' not in v) @@ -29,10 +29,10 @@ Index: numba-0.49.0/numba/tests/test_parfors.py def test_unsigned_refusal_to_vectorize(self): """ This checks that if fastmath is set and the underlying hardware is suitable, and the function supplied is amenable to fastmath based -Index: numba-0.49.0/numba/tests/test_parfors_passes.py +Index: numba-0.53.0/numba/tests/test_parfors_passes.py =================================================================== ---- numba-0.49.0.orig/numba/tests/test_parfors_passes.py -+++ numba-0.49.0/numba/tests/test_parfors_passes.py +--- numba-0.53.0.orig/numba/tests/test_parfors_passes.py ++++ numba-0.53.0/numba/tests/test_parfors_passes.py @@ -512,6 +512,7 @@ class TestConvertLoopPass(BaseTest): str(raises.exception), ) diff --git a/unpin-llvmlite.patch b/unpin-llvmlite.patch deleted file mode 100644 index a253c33..0000000 --- a/unpin-llvmlite.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: numba-0.51.2/setup.py -=================================================================== ---- numba-0.51.2.orig/setup.py -+++ numba-0.51.2/setup.py -@@ -300,7 +300,7 @@ packages = find_packages(include=["numba - - build_requires = ['numpy >={}'.format(min_numpy_build_version)] - install_requires = [ -- 'llvmlite >={},<{}'.format(min_llvmlite_version, max_llvmlite_version), -+ 'llvmlite >={}'.format(min_llvmlite_version), - 'numpy >={}'.format(min_numpy_run_version), - 'setuptools', - ]