0ef78f8
Summary:        Fast numerical array expression evaluator for Python and NumPy
0546a72
Name:           python-numexpr
b11b2d3
Version:        2.8.5
8a1994e
Release:        %autorelease
357b9c4
URL:            https://github.com/pydata/numexpr
0546a72
License:        MIT
0c007d5
Source:         https://github.com/pydata/numexpr/archive/v%{version}/numexpr-%{version}.tar.gz
0c007d5
Patch:          0002-Revert-Make-more-difficult-sanitize-of-the-expressio.patch
0c007d5
Patch:          0003-Revert-Add-in-protections-against-call-to-eval-expre.patch
0c007d5
Patch:          0004-Revert-Adding-tests-for-validate-and-noticed-that-re.patch
0c007d5
Patch:          0005-Revert-Add-in-docstring-intro-for-validate.patch
0c007d5
Patch:          0006-Revert-Add-a-validate-.-function-that-can-be-used-to.patch
0c007d5
Patch:          0007-Use-r-to-avoid-warning-about-unknown-escapes.patch
0ef78f8
4678a69
BuildRequires:  gcc-c++
0ef78f8
BuildRequires:  python%{python3_pkgversion}-devel
0ef78f8
BuildRequires:  python%{python3_pkgversion}-numpy
0ef78f8
BuildRequires:  python%{python3_pkgversion}-setuptools
Thibault North 18bd92e
0546a72
%global _description %{expand:
6314fe5
The numexpr package evaluates multiple-operator array expressions many times
6314fe5
faster than NumPy can. It accepts the expression as a string, analyzes it,
6314fe5
rewrites it more efficiently, and compiles it to faster Python code on the
6314fe5
fly. It’s the next best thing to writing the expression in C and compiling it
6314fe5
with a specialized just-in-time (JIT) compiler, i.e. it does not require a
6314fe5
compiler at runtime.}
Thibault North 18bd92e
28f7853
%description %_description
28f7853
0546a72
%package -n python%{python3_pkgversion}-numexpr
0ef78f8
Summary:        %{summary}
0ef78f8
Requires:       python%{python3_pkgversion}-numpy >= 1.6
0546a72
%{?python_provide:%python_provide python%{python3_pkgversion}-numexpr}
fa34b4d
0546a72
%description -n python%{python3_pkgversion}-numexpr %_description
fa34b4d
Thibault North 18bd92e
%prep
0546a72
%autosetup -n numexpr-%{version} -p1
Thibault North 18bd92e
Thibault North 18bd92e
%build
28f7853
%py3_build
Thibault North 18bd92e
fa34b4d
%install
28f7853
%py3_install
0546a72
chmod 0755 %{buildroot}%{python3_sitearch}/numexpr/cpuinfo.py
6314fe5
sed -i "1s|/usr/bin/env python$|%{python3}|" %{buildroot}%{python3_sitearch}/numexpr/cpuinfo.py
Orion Poplawski e97c92d
Orion Poplawski e97c92d
%check
79bd165
pushd build/lib.linux*
b11b2d3
%py3_test_envvars %python3 -c 'import numexpr, sys; sys.exit(not numexpr.test().wasSuccessful())'
fa34b4d
popd
fa34b4d
0546a72
%files -n python%{python3_pkgversion}-numexpr
3b2bd6f
%license LICENSE.txt
3b2bd6f
%doc ANNOUNCE.rst RELEASE_NOTES.rst README.rst
fa34b4d
%{python3_sitearch}/numexpr/
fa34b4d
%{python3_sitearch}/numexpr-%{version}-py*.egg-info
fa34b4d
Thibault North 18bd92e
%changelog
8a1994e
%autochangelog