Accepting request 742269 from devel:languages:python:numeric

OBS-URL: https://build.opensuse.org/request/show/742269
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-numba?expand=0&rev=20
This commit is contained in:
Dominique Leuenberger 2019-10-24 21:09:33 +00:00 committed by Git OBS Bridge
commit 1514976690
6 changed files with 67 additions and 22 deletions

26
fix-max-name-size.patch Normal file
View File

@ -0,0 +1,26 @@
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(+)
diff --git a/numba/__init__.py b/numba/__init__.py
index c62ad06289..114e9a597e 100644
--- a/numba/__init__.py
+++ b/numba/__init__.py
@@ -102,6 +102,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:41376e8635fa43743ca7ff9b4fb503c0c3315a9243d523b5870207d6199bdfd9
size 1782845

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

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

View File

@ -1,6 +1,18 @@
-------------------------------------------------------------------
Thu Sep 26 08:06:01 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
- Update to 0.46.0:
* Many fixes and changes for llvm/cuda updates
See CHANGE_LOG file for details
- Add fix-max-name-size.patch to fix issue with numba
identifier length on recent LLVM versions.
- Remove test from skip-failing-tests.patch fixed by
fix-max-name-size.patch. The test is important, if it is failing
numba will not work reliably.
-------------------------------------------------------------------
Thu Sep 26 08:06:01 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
- Update to 0.45.1:
* Many fixes and changes for llvm/cuda updates
See CHANGE_LOG file for details

View File

@ -17,8 +17,9 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-numba
Version: 0.45.1
Version: 0.46.0
Release: 0
Summary: NumPy-aware optimizing compiler for Python using LLVM
License: BSD-2-Clause
@ -26,7 +27,13 @@ Group: Development/Languages/Python
URL: https://github.com/numba/numba
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
BuildRequires: %{python_module Jinja2}
BuildRequires: %{python_module Pygments}
BuildRequires: %{python_module cffi}
BuildRequires: %{python_module devel}
BuildRequires: %{python_module ipython}
BuildRequires: %{python_module llvmlite >= 0.29}
BuildRequires: %{python_module numpy-devel >= 1.10}
BuildRequires: %{python_module pytest}
@ -36,15 +43,24 @@ BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: python-funcsigs
BuildRequires: python-rpm-macros
BuildRequires: python-singledispatch
BuildRequires: python2-enum34
BuildRequires: python2-funcsigs
BuildRequires: python2-singledispatch
BuildRequires: python3-tbb
BuildRequires: tbb-devel
Requires: python-llvmlite >= 0.29
Requires: python-numpy >= 1.10
Requires: python-scipy >= 0.16
Recommends: python-Jinja2
Recommends: python-Pygments
Recommends: python-cffi
Recommends: python-tbb
Requires(post): update-alternatives
Requires(preun): update-alternatives
%ifpython2
Requires: python-funcsigs
Requires: python-singledispatch
Requires: python2-enum34
Requires: python2-funcsigs
Requires: python2-singledispatch
%endif
%python_subpackages
@ -65,14 +81,14 @@ in the decorator.
Numba is a mechanism for producing machine code from Python syntax and typed
data structures such as those that exist in NumPy.
%package devel
%package devel
Summary: Development files for numba applications
Group: Development/Libraries/Python
Requires: %{name} = %{version}
Requires: python-devel
Requires: python-numpy-devel >= 1.7
%description devel
%description devel
This package contains files for developing applications using numba.
%prep
@ -81,6 +97,7 @@ This package contains files for developing applications using numba.
sed -i '1{\@^#!%{_bindir}/env python@d}' numba/appdirs.py
%build
export CFLAGS="%{optflags} -fPIC"
%python_build
%install
@ -91,11 +108,13 @@ sed -i '1{\@^#!%{_bindir}/env python@d}' numba/appdirs.py
%python_clone -a %{buildroot}%{_bindir}/pycc
%check
mv numba numba_temp
export NUMBA_PARALLEL_DIAGNOSTICS=1
%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitearch}
$python setup.py build_ext --inplace
%{buildroot}%{_bindir}/numba-%{$python_bin_suffix} -s
$python -m numba.runtests -v -b --exclude-tags='long_running' -m %{_smp_build_ncpus} -- numba.tests
}
mv numba_temp numba
%post
%{python_install_alternative numba pycc}

View File

@ -12,18 +12,6 @@ Index: numba-0.45.1/numba/tests/test_runtests.py
def test_random(self):
self.check_testsuite_size(
['--random', '0.1', 'numba.tests.npyufunc'], 5)
Index: numba-0.45.1/numba/tests/test_jitclasses.py
===================================================================
--- numba-0.45.1.orig/numba/tests/test_jitclasses.py
+++ numba-0.45.1/numba/tests/test_jitclasses.py
@@ -869,6 +869,7 @@ class TestJitClass(TestCase, MemoryLeakM
self.assertEqual(t[2:2:1], 2)
self.assertEqual(t[6:6:1], 3)
+ @unittest.skip("This will fail with system llvm and LTO")
def test_jitclass_longlabel_not_truncated(self):
# See issue #3872, llvm 7 introduced a max label length of 1024 chars
# Numba ships patched llvm 7.1 (ppc64le) and patched llvm 8 to undo this
Index: numba-0.45.1/numba/tests/test_parfors.py
===================================================================
--- numba-0.45.1.orig/numba/tests/test_parfors.py