Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37560187
en ru br
ALT Linux repos
S:2.8.3-alt1

Group :: Development/Python3
RPM: python3-module-numexpr

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

%define _unpackaged_files_terminate_build 1
%define oname numexpr

%def_with check

Name: python3-module-%oname
Version: 2.8.3
Release: alt1
Epoch: 1

Summary: Fast numerical array expression evaluator for Python and NumPy

Group: Development/Python3
License: MIT
Url: https://github.com/pydata/numexpr

Source: %name-%version.tar
Source1: site.cfg
Patch: %name-%version-alt.patch

BuildRequires(pre): rpm-build-python3
BuildRequires: libnumpy-py3-devel

BuildRequires: gcc-c++ liblapack-devel

%if_with check
BuildRequires: /proc
BuildRequires: python3(tox)
BuildRequires: python3(numpy.testing)
%endif

%description
The numexpr package evaluates multiple-operator array expressions many
times faster than NumPy can. It accepts the expression as a string,
analyzes it, rewrites it more efficiently, and compiles it to faster
Python code on the fly. It's the next best thing to writing the
expression in C and compiling it with a specialized just-in-time (JIT)
compiler, i.e. it does not require a compiler at runtime.

Also, numexpr has support for the Intel VML (Vector Math Library) --
integrated in Intel MKL (Math Kernel Library) --, allowing nice
speed-ups when computing transcendental functions (like trigonometrical,
exponentials...) on top of Intel-compatible platforms. This support also
allows to use multiple cores in your computations.

%prep
%setup
%autopatch -p1

install -p -m644 %SOURCE1 ./
sed -i 's| at LIBDIR at |%_libdir|' site.cfg
%ifnarch %ix86 x86_64 armh aarch64 ppc64le %e2k
sed -i 's at  openblas, at  blas, at ' site.cfg
%endif
sed -i 's| at PYVER at |%_python3_version%_python3_abiflags|' \
site.cfg

%build
%add_optflags -fno-strict-aliasing
%python3_build_debug

%install
%python3_install

%check
cat > tox.ini <<'EOF'
[testenv]
usedevelop=True
commands =
   # must be synced with CI config (e.g. travis)
   python -c 'import sys, numexpr; sys.exit(0 if numexpr.test().wasSuccessful() else 1)'
EOF
export PIP_NO_BUILD_ISOLATION=no
export PIP_NO_INDEX=YES
export TOXENV=py3
tox.py3 --sitepackages -vvr -s false

%files
%doc *.txt *.rst
%python3_sitelibdir/%oname/
%python3_sitelibdir/%oname-%version-py%_python3_version.egg-info/

%changelog

Full changelog you can see here

 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin