- Update to 0.56.2

This release continues to add new features, bug fixes and stability
  improvements to Numba. Please note that this will be the last release that
  has support for Python 3.7 as the next release series (Numba 0.57) will
  support Python 3.11! Also note that, this will be the last release to support
  linux-32 packages produced by the Numba team.
- Remove fix-max-name-size.patch, it's included in the new version.
- Add update-tbb-backend-calls-2021.6.patch to make it compatible with the
  latest tbb-devel version.
- Add fix-cli-test.patch to disable one test that fails with OBS.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-numba?expand=0&rev=55
This commit is contained in:
Daniel Garcia 2022-10-03 13:07:28 +00:00 committed by Git OBS Bridge
parent 624ca76ff3
commit bf674995ad
7 changed files with 106 additions and 34 deletions

12
fix-cli-test.patch Normal file
View File

@ -0,0 +1,12 @@
Index: numba-0.56.2/numba/tests/test_cli.py
===================================================================
--- numba-0.56.2.orig/numba/tests/test_cli.py
+++ numba-0.56.2/numba/tests/test_cli.py
@@ -264,6 +264,7 @@ class TestGDBCLIInfoBrokenGdbs(TestCase)
self.assertIn("No such file or directory", stdout)
self.assertIn(path, stdout)
+ @unittest.skip("Fails on type check in OBS")
def test_nonsense_gdb_binary(self):
# Tests that a nonsense binary specified as gdb it picked up ok
env = os.environ.copy()

View File

@ -1,26 +0,0 @@
From 4e42221e368b4486be2ec8381f20382fc3609351 Mon Sep 17 00:00:00 2001
From: Todd <toddrme2178@gmail.com>
Date: Sat, 27 Jul 2019 18:29:47 -0400
Subject: [PATCH] Set maximum name size to maximum allowable value
Fix for #3876 without needing to patch LLVM.
---
numba/__init__.py | 5 +++++
1 file changed, 5 insertions(+)
Index: numba-0.54.1/numba/__init__.py
===================================================================
--- numba-0.54.1.orig/numba/__init__.py
+++ numba-0.54.1/numba/__init__.py
@@ -119,6 +119,11 @@ def _ensure_llvm():
"Please update llvmlite." %
(_min_llvm_version + llvm_version_info))
raise ImportError(msg)
+
+ try:
+ llvmlite.binding.set_option("tmp", "-non-global-value-max-name-size=4294967295")
+ except:
+ pass
check_jit_execution()

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e428d9e11d9ba592849ccc9f7a009003eb7d30612007e365afe743ce7118c6f4
size 2302683

3
numba-0.56.2.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3492f0a5d09e257fc521f5377a6c6b907eec1920d14739f0b2458b9d29946a5a
size 2417234

View File

@ -1,3 +1,18 @@
-------------------------------------------------------------------
Mon Oct 3 12:02:05 UTC 2022 - Daniel Garcia <daniel.garcia@suse.com>
- Update to 0.56.2
This release continues to add new features, bug fixes and stability
improvements to Numba. Please note that this will be the last release that
has support for Python 3.7 as the next release series (Numba 0.57) will
support Python 3.11! Also note that, this will be the last release to support
linux-32 packages produced by the Numba team.
- Remove fix-max-name-size.patch, it's included in the new version.
- Add update-tbb-backend-calls-2021.6.patch to make it compatible with the
latest tbb-devel version.
- Add fix-cli-test.patch to disable one test that fails with OBS.
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Jul 11 16:05:33 UTC 2022 - Ben Greiner <code@bnavigator.de> Mon Jul 11 16:05:33 UTC 2022 - Ben Greiner <code@bnavigator.de>

View File

@ -31,24 +31,25 @@
%bcond_with test %bcond_with test
%endif %endif
Name: python-numba%{psuffix} Name: python-numba%{psuffix}
Version: 0.55.2 Version: 0.56.2
Release: 0 Release: 0
Summary: NumPy-aware optimizing compiler for Python using LLVM Summary: NumPy-aware optimizing compiler for Python using LLVM
License: BSD-2-Clause License: BSD-2-Clause
URL: https://numba.pydata.org/ URL: https://numba.pydata.org/
Source: https://files.pythonhosted.org/packages/source/n/numba/numba-%{version}.tar.gz Source: https://files.pythonhosted.org/packages/source/n/numba/numba-%{version}.tar.gz
# PATCH-FIX-UPSTREAM fix-max-name-size.patch -- fix for gh#numba/numba#3876 -- from gh#numba/numba#4373
Patch0: fix-max-name-size.patch
# PATCH-FIX-OPENSUSE skip tests failing due to OBS specifics # PATCH-FIX-OPENSUSE skip tests failing due to OBS specifics
Patch2: fix-cli-test.patch
Patch3: skip-failing-tests.patch Patch3: skip-failing-tests.patch
# PATCH-FIX-OPENSUSE update-tbb-backend-calls-2021.6.patch, based on gh#numba/numba#7608
Patch4: update-tbb-backend-calls-2021.6.patch
BuildRequires: %{python_module devel >= 3.7} BuildRequires: %{python_module devel >= 3.7}
BuildRequires: %{python_module numpy-devel >= %{min_numpy_ver} with %python-numpy-devel < %{max_numpy_ver}} BuildRequires: %{python_module numpy-devel >= %{min_numpy_ver} with %python-numpy-devel < %{max_numpy_ver}}
BuildRequires: %{python_module setuptools} BuildRequires: %{python_module setuptools}
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
BuildRequires: (tbb-devel >= 2021 with tbb-devel < 2021.6) BuildRequires: (tbb-devel >= 2021)
Requires: (python-llvmlite >= 0.38 with python-llvmlite < 0.39) Requires: (python-llvmlite >= 0.39 with python-llvmlite < 0.40)
Requires: (python-numpy >= %{min_numpy_ver} with python-numpy < %{max_numpy_ver}) Requires: (python-numpy >= %{min_numpy_ver} with python-numpy < %{max_numpy_ver})
Requires(post): update-alternatives Requires(post): update-alternatives
Requires(postun):update-alternatives Requires(postun):update-alternatives

View File

@ -0,0 +1,70 @@
Index: numba-0.56.2/numba/np/ufunc/tbbpool.cpp
===================================================================
--- numba-0.56.2.orig/numba/np/ufunc/tbbpool.cpp
+++ numba-0.56.2/numba/np/ufunc/tbbpool.cpp
@@ -12,6 +12,7 @@ Implement parallel vectorize workqueue o
#undef _XOPEN_SOURCE
#endif
+#include <tbb/version.h>
#include <tbb/tbb.h>
#include <string.h>
#include <stdio.h>
@@ -27,10 +28,28 @@ Implement parallel vectorize workqueue o
* from here:
* https://github.com/intel/tbb/blob/2019_U5/include/tbb/tbb_stddef.h#L29
*/
-#if (TBB_INTERFACE_VERSION >= 12060) || (TBB_INTERFACE_VERSION < 12010)
-#error "TBB version is incompatible, 2021.1 through to 2021.5 required, i.e. 12010 <= TBB_INTERFACE_VERSION < 12060"
+#if TBB_INTERFACE_VERSION < 12010
+#error "TBB version is too old, 2021 update 1, i.e. TBB_INTERFACE_VERSION >= 12010 required"
#endif
+static tbb::task_scheduler_handle tbb_tsh_attach()
+{
+#if TBB_INTERFACE_VERSION >= 12060
+ return tbb::attach();
+#else
+ return tbb::task_scheduler_handle::get();
+#endif
+}
+
+static void tbb_tsh_release(tbb::task_scheduler_handle& tsh)
+{
+#if TBB_INTERFACE_VERSION >= 12060
+ tsh.release();
+#else
+ tbb::task_scheduler_handle::release(tsh);
+#endif
+}
+
#define _DEBUG 0
#define _TRACE_SPLIT 0
@@ -235,7 +254,7 @@ static void prepare_fork(void)
{
if (!tbb::finalize(tsh, std::nothrow))
{
- tbb::task_scheduler_handle::release(tsh);
+ tbb_tsh_release(tsh);
puts("Unable to join threads to shut down before fork(). "
"This can break multithreading in child processes.\n");
}
@@ -260,7 +279,7 @@ static void reset_after_fork(void)
if(need_reinit_after_fork)
{
- tsh = tbb::task_scheduler_handle::get();
+ tbb_tsh_attach();
set_main_thread();
tsh_was_initialized = true;
need_reinit_after_fork = false;
@@ -298,7 +317,7 @@ static void launch_threads(int count)
if(count < 1)
count = tbb::task_arena::automatic;
- tsh = tbb::task_scheduler_handle::get();
+ tsh = tbb_tsh_attach();
tsh_was_initialized = true;
tg = new tbb::task_group;