2014-07-17 15:31:35 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-numexpr
|
|
|
|
#
|
2023-01-02 18:50:45 +00:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2014-07-17 15:31:35 +00: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.
|
2015-05-15 05:43:52 +00:00
|
|
|
|
2018-12-23 04:00:53 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2014-07-17 15:31:35 +00:00
|
|
|
#
|
|
|
|
|
2015-05-15 05:43:52 +00:00
|
|
|
|
2023-12-18 09:24:49 +00:00
|
|
|
%{?sle15_python_module_pythons}
|
2016-02-03 09:19:43 +00:00
|
|
|
Name: python-numexpr
|
2023-12-18 09:24:49 +00:00
|
|
|
Version: 2.8.8
|
2014-07-17 15:31:35 +00:00
|
|
|
Release: 0
|
2017-10-05 09:58:44 +00:00
|
|
|
Summary: Numerical expression evaluator for NumPy
|
2014-07-17 15:31:35 +00:00
|
|
|
License: MIT
|
|
|
|
Group: Development/Languages/Python
|
2018-09-03 09:06:05 +00:00
|
|
|
URL: https://github.com/pydata/numexpr/
|
2017-05-03 13:55:01 +00:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/n/numexpr/numexpr-%{version}.tar.gz
|
2022-07-18 09:52:07 +00:00
|
|
|
BuildRequires: %{python_module devel >= 3.7}
|
|
|
|
BuildRequires: %{python_module numpy-devel >= 1.13.3}
|
2023-09-05 08:00:57 +00:00
|
|
|
BuildRequires: %{python_module pip}
|
|
|
|
BuildRequires: %{python_module wheel}
|
2017-09-28 10:34:50 +00:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: gcc-c++
|
|
|
|
BuildRequires: python-rpm-macros
|
2022-07-18 09:52:07 +00:00
|
|
|
Requires: python-numpy >= 1.13.3
|
2017-05-03 13:55:01 +00:00
|
|
|
%python_subpackages
|
2014-07-17 15:31:35 +00:00
|
|
|
|
|
|
|
%description
|
2017-10-05 09:58:44 +00:00
|
|
|
Numexpr is a numerical expression evaluator for NumPy. It is a C++
|
|
|
|
module. With it, expressions that operate on arrays (like "3*a+4*b")
|
|
|
|
can be accelerated and use less memory than doing the same
|
|
|
|
calculation in Python.
|
2014-07-17 15:31:35 +00:00
|
|
|
|
|
|
|
%prep
|
2016-02-03 09:19:43 +00:00
|
|
|
%setup -q -n numexpr-%{version}
|
2018-12-23 04:00:53 +00:00
|
|
|
# wrong-file-end-of-line-encoding
|
|
|
|
sed -i 's/\r$//' ANNOUNCE.rst AUTHORS.txt README.rst RELEASE_NOTES.rst site.cfg.example
|
2015-05-15 05:43:52 +00:00
|
|
|
# remove unwanted shebang
|
|
|
|
sed -i '/^#!/ d' numexpr/cpuinfo.py
|
2014-07-17 15:31:35 +00:00
|
|
|
|
|
|
|
%build
|
2017-05-03 13:55:01 +00:00
|
|
|
export CFLAGS="%{optflags} -fno-strict-aliasing"
|
2023-09-05 08:00:57 +00:00
|
|
|
%pyproject_wheel
|
2014-07-17 15:31:35 +00:00
|
|
|
|
|
|
|
%install
|
2023-09-05 08:00:57 +00:00
|
|
|
%pyproject_install
|
2017-05-03 13:55:01 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
2014-07-17 15:31:35 +00:00
|
|
|
|
2018-12-23 04:00:53 +00:00
|
|
|
%check
|
|
|
|
mkdir tester
|
|
|
|
pushd tester
|
|
|
|
%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitearch}
|
|
|
|
$python -B -c "import sys;import numexpr;sys.exit(0 if numexpr.test().wasSuccessful() else 1)"
|
|
|
|
}
|
|
|
|
popd
|
|
|
|
|
2017-05-03 13:55:01 +00:00
|
|
|
%files %{python_files}
|
2018-08-07 07:44:18 +00:00
|
|
|
%doc ANNOUNCE.rst AUTHORS.txt README.rst RELEASE_NOTES.rst site.cfg.example
|
|
|
|
%license LICENSE.txt
|
2023-09-05 08:00:57 +00:00
|
|
|
%{python_sitearch}/numexpr
|
|
|
|
%{python_sitearch}/numexpr-%{version}.dist-info
|
2014-07-17 15:31:35 +00:00
|
|
|
|
|
|
|
%changelog
|