fa34b4d
%global with_python3 1
fa34b4d
Thibault North 18bd92e
%{?filter_setup:
Thibault North 18bd92e
%filter_provides_in %{python_sitearch}/.*\.so$
fa34b4d
%filter_provides_in %{python3_sitearch}/.*\.so$
Thibault North 18bd92e
%filter_setup}
Thibault North 18bd92e
Thibault North 18bd92e
%global	module	numexpr
Thibault North 18bd92e
Thibault North 18bd92e
Summary:	Fast numerical array expression evaluator for Python and NumPy
Thibault North 18bd92e
Name:		python-%{module}
f0ca6b2
Version:	2.3
0b2d526
Release:	7%{?dist}
f0ca6b2
Source0:	https://github.com/pydata/numexpr/archive/%{module}-%{version}.tar.gz
Thibault North 18bd92e
License:	MIT
Thibault North 18bd92e
Group:		Development/Languages
Thibault North 18bd92e
URL:		http://numexpr.googlecode.com/
Thibault North 18bd92e
a285d15
Requires:	numpy >= 1.6
a285d15
BuildRequires:	numpy >= 1.6
fa34b4d
BuildRequires:	python2-devel
fa34b4d
%if 0%{?with_python3}
fa34b4d
BuildRequires:	python3-devel
f0ca6b2
BuildRequires:	python3-numpy
fa34b4d
%endif # with_python3
Thibault North 18bd92e
Thibault North 18bd92e
%description
Thibault North 18bd92e
The numexpr package evaluates multiple-operator array expressions many
Thibault North 18bd92e
times faster than NumPy can. It accepts the expression as a string,
Thibault North 18bd92e
analyzes it, rewrites it more efficiently, and compiles it to faster
b3b30ff
Python code on the fly. It’s the next best thing to writing the
Thibault North 18bd92e
expression in C and compiling it with a specialized just-in-time (JIT)
Thibault North 18bd92e
compiler, i.e. it does not require a compiler at runtime.
Thibault North 18bd92e
fa34b4d
%if 0%{?with_python3}
fa34b4d
%package -n python3-%{module}
fa34b4d
Summary:	Fast numerical array expression evaluator for Python and NumPy
b3b30ff
Requires:	python3-numpy >= 1.6
fa34b4d
fa34b4d
%description -n python3-%{module}
fa34b4d
The numexpr package evaluates multiple-operator array expressions many
fa34b4d
times faster than NumPy can. It accepts the expression as a string,
fa34b4d
analyzes it, rewrites it more efficiently, and compiles it to faster
b3b30ff
Python code on the fly. It’s the next best thing to writing the
fa34b4d
expression in C and compiling it with a specialized just-in-time (JIT)
fa34b4d
compiler, i.e. it does not require a compiler at runtime.
fa34b4d
fa34b4d
This is the version for Python 3.
fa34b4d
%endif # with_python3
fa34b4d
fa34b4d
Thibault North 18bd92e
%prep
Thibault North 18bd92e
%setup -q -n %{module}-%{version}
Thibault North 18bd92e
Thibault North 18bd92e
sed -i "s|/usr/bin/env |/usr/bin/|" %{module}/cpuinfo.py
Thibault North 18bd92e
fa34b4d
%if 0%{?with_python3}
fa34b4d
rm -rf %{py3dir}
fa34b4d
cp -a . %{py3dir}
fa34b4d
%endif # with_python3
fa34b4d
Thibault North 18bd92e
%build
fa34b4d
python setup.py build
fa34b4d
%if 0%{?with_python3}
fa34b4d
pushd %{py3dir}
fa34b4d
python3 setup.py build
fa34b4d
popd
fa34b4d
%endif # with_python3
Thibault North 18bd92e
Thibault North 18bd92e
%check
Thibault North 18bd92e
libdir=`ls build/|grep lib`
fa34b4d
pushd "build/$libdir"
fa34b4d
python -c 'import numexpr; numexpr.test()'
fa34b4d
popd
Thibault North 18bd92e
fa34b4d
%if 0%{?with_python3}
fa34b4d
pushd %{py3dir}
fa34b4d
libdir=`ls build/|grep lib`
fa34b4d
cd "build/$libdir"
fa34b4d
python3 -c 'import numexpr; numexpr.test()'
fa34b4d
popd
fa34b4d
%endif # with_python3
Thibault North 18bd92e
fa34b4d
%install
fa34b4d
python setup.py install -O1 --skip-build --root=%{buildroot}
Thibault North 18bd92e
#This could be done more properly ?
Thibault North 18bd92e
chmod 0644 %{buildroot}%{python_sitearch}/%{module}/cpuinfo.py
Thibault North 18bd92e
chmod 0755 %{buildroot}%{python_sitearch}/%{module}/*.so
Thibault North 18bd92e
fa34b4d
%if 0%{?with_python3}
fa34b4d
pushd %{py3dir}
fa34b4d
python3 setup.py install -O1 --skip-build --root=%{buildroot}
fa34b4d
popd
fa34b4d
%endif # with_python3
fa34b4d
Thibault North 18bd92e
%files
f0ca6b2
%doc ANNOUNCE.rst LICENSE.txt RELEASE_NOTES.rst README.rst
Thibault North 18bd92e
%{python_sitearch}/numexpr/
Thibault North 18bd92e
%{python_sitearch}/numexpr-%{version}-py*.egg-info/
Thibault North 18bd92e
fa34b4d
%if 0%{?with_python3}
fa34b4d
%files -n python3-%{module}
f0ca6b2
%doc ANNOUNCE.rst LICENSE.txt RELEASE_NOTES.rst README.rst
fa34b4d
%{python3_sitearch}/numexpr/
fa34b4d
%{python3_sitearch}/numexpr-%{version}-py*.egg-info
fa34b4d
%endif # with_python3
fa34b4d
Thibault North 18bd92e
%changelog
0b2d526
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3-7
0b2d526
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
0b2d526
e6af5ea
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3-6
e6af5ea
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
e6af5ea
94cbd1f
* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 2.3-5
94cbd1f
- Rebuilt for GCC 5 C++11 ABI change
94cbd1f
6700dd9
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3-4
6700dd9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
6700dd9
e733cc9
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3-3
e733cc9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
e733cc9
1bcdc70
* Wed May 28 2014 Kalev Lember <kalevlember@gmail.com> - 2.3-2
1bcdc70
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
1bcdc70
f0ca6b2
* Tue Jan 28 2014 Thibault North <tnorth@fedoraproject.org> -2.3-1
f0ca6b2
- Update to new release 2.3
f0ca6b2
b3b30ff
* Fri Jan 17 2014 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 2.2.2-2
b3b30ff
- Move requirements to the proper package (#1054683)
b3b30ff
6cf692a
* Sun Sep 29 2013 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 2.2.2-1
b3b30ff
- Update to 2.2.2 (#1013130)
6cf692a
1cfb070
* Mon Sep 09 2013 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 2.2.1-1
1cfb070
- Update to 2.2.1
1cfb070
f6029d1
* Thu Sep 05 2013 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 2.2-1
f6029d1
- Update to 2.2
fa34b4d
- Add python3-numexpr package
f6029d1
52a7038
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.1-4
52a7038
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
52a7038
4fbd2b9
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.1-3
4fbd2b9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
4fbd2b9
e97a261
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.1-2
e97a261
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
e97a261
6125b57
* Sun Jan 8 2012  Thibault North <tnorth@fedoraproject.org> - 2.0.1-1
6125b57
- Update to 2.0.1
6125b57
a285d15
* Sun Nov 27 2011 Thibault North <tnorth@fedoraproject.org> - 2.0-1
a285d15
- Update to 2.0
a285d15
Thibault North 18bd92e
* Sun Oct 30 2011 Thibault North <tnorth@fedoraproject.org> - 1.4.2-2
Thibault North 18bd92e
- Add check section
Thibault North 18bd92e
- Fix permissions and remove useless sections
Thibault North 18bd92e
Thibault North 18bd92e
* Thu Oct 20 2011 Thibault North <tnorth@fedoraproject.org> - 1.4.2-1
Thibault North 18bd92e
- Updated to 1.4.2
Thibault North 18bd92e
Thibault North 18bd92e
* Fri Apr 29 2011 Thibault North <tnorth@fedoraproject.org> - 1.4.1-3
Thibault North 18bd92e
- Fix buildroot issue
Thibault North 18bd92e
Thibault North 18bd92e
* Tue Dec 21 2010 Thibault North <tnorth@fedoraproject.org> - 1.4.1-2
Thibault North 18bd92e
- Fixes for the review process
Thibault North 18bd92e
1cfb070
* Fri Nov 05 2010 Thibault North <tnorth@fedoraproject.org> - 1.4.1-1
Thibault North 18bd92e
- Initial package based on Mandriva's one