2017-05-27 13:14:35 +02:00
|
|
|
#
|
|
|
|
# spec file for package python-numba
|
|
|
|
#
|
2018-01-13 21:48:11 +01:00
|
|
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
2017-05-27 13:14:35 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
|
|
Name: python-numba
|
2018-07-13 10:21:26 +02:00
|
|
|
Version: 0.39.0
|
2017-05-27 13:14:35 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: Compiling Python code using LLVM
|
|
|
|
License: BSD-2-Clause
|
|
|
|
Group: Development/Languages/Python
|
2018-05-16 11:39:35 +02:00
|
|
|
URL: http://numba.github.com
|
2017-05-27 13:14:35 +02:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/n/numba/numba-%{version}.tar.gz
|
|
|
|
BuildRequires: %{python_module devel}
|
2018-07-21 10:25:28 +02:00
|
|
|
BuildRequires: %{python_module llvmlite >= 0.24}
|
2018-05-29 10:29:51 +02:00
|
|
|
BuildRequires: %{python_module numpy-devel >= 1.10}
|
|
|
|
BuildRequires: %{python_module pytest}
|
|
|
|
BuildRequires: %{python_module scipy >= 0.16}
|
2017-10-09 19:43:11 +02:00
|
|
|
BuildRequires: %{python_module setuptools}
|
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: gcc-c++
|
|
|
|
BuildRequires: python-rpm-macros
|
2018-05-29 10:29:51 +02:00
|
|
|
BuildRequires: python2-funcsigs
|
|
|
|
BuildRequires: python2-singledispatch
|
2018-07-21 10:25:28 +02:00
|
|
|
Requires: python-llvmlite >= 0.24
|
2018-05-29 10:29:51 +02:00
|
|
|
Requires: python-numpy >= 1.10
|
|
|
|
Requires: python-scipy >= 0.16
|
2017-05-27 13:14:35 +02:00
|
|
|
Requires(post): update-alternatives
|
|
|
|
Requires(preun): update-alternatives
|
2018-05-29 10:29:51 +02:00
|
|
|
%ifpython2
|
|
|
|
Requires: python2-funcsigs
|
|
|
|
Requires: python2-singledispatch
|
|
|
|
%endif
|
2017-05-27 13:14:35 +02:00
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%description
|
|
|
|
Numba is a NumPy-aware optimizing compiler for Python. It uses the
|
|
|
|
LLVM compiler infrastructure to compile Python syntax to
|
|
|
|
machine code.
|
|
|
|
|
|
|
|
It is aware of NumPy arrays as typed memory regions and so can speed-up
|
|
|
|
code using NumPy arrays. Other, less well-typed code will be translated
|
|
|
|
to Python C-API calls, effectively removing the "interpreter", but not removing
|
|
|
|
the dynamic indirection.
|
|
|
|
|
|
|
|
Numba is also not a tracing JIT. It *compiles* your code before it gets
|
|
|
|
run, either using run-time type information or type information you provide
|
|
|
|
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
|
|
|
|
Summary: Development files for numba applications
|
|
|
|
Group: Development/Libraries/Python
|
|
|
|
Requires: %{name} = %{version}
|
|
|
|
Requires: python-devel
|
|
|
|
Requires: python-numpy-devel >= 1.7
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
This package contains files for developing applications using numba.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n numba-%{version}
|
2018-05-16 11:39:35 +02:00
|
|
|
sed -i '1{\@^#!%{_bindir}/env python@d}' numba/appdirs.py
|
2017-05-27 13:14:35 +02:00
|
|
|
|
|
|
|
%build
|
|
|
|
%python_build
|
|
|
|
|
|
|
|
%install
|
|
|
|
%python_install
|
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
|
|
|
|
|
|
|
%python_clone -a %{buildroot}%{_bindir}/numba
|
|
|
|
%python_clone -a %{buildroot}%{_bindir}/pycc
|
|
|
|
|
2018-05-29 10:29:51 +02:00
|
|
|
%check
|
|
|
|
# Sadly needs 3 hours to finish in OBS run localy when updating!
|
|
|
|
#%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitearch}
|
|
|
|
#pushd $PYTHONPATH
|
|
|
|
#$python -Wd -m pytest numba/tests -v -rs
|
|
|
|
#popd
|
|
|
|
#}
|
|
|
|
|
2017-05-27 13:14:35 +02:00
|
|
|
%post
|
|
|
|
%{python_install_alternative numba pycc}
|
|
|
|
|
|
|
|
%preun
|
|
|
|
%python_uninstall_alternative numba
|
|
|
|
|
|
|
|
%files %{python_files}
|
2018-05-16 11:39:35 +02:00
|
|
|
%license LICENSE
|
|
|
|
%doc AUTHORS CHANGE_LOG README.rst
|
2017-05-27 13:14:35 +02:00
|
|
|
%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
|
|
|
|
|
|
|
|
%changelog
|