From 1e7b49476ad295a390cb10d08099ab9e1d795a3051afdea5a89867e0ea9ac6b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Fri, 3 May 2024 21:41:08 +0200 Subject: [PATCH] Sync from SUSE:SLFO:Main python-numexpr revision 8f5bf97080f310136c64818ae6ca195c --- .gitattributes | 23 ++ numexpr-2.8.4.tar.gz | 3 + python-numexpr.changes | 470 +++++++++++++++++++++++++++++++++++++++++ python-numexpr.spec | 71 +++++++ 4 files changed, 567 insertions(+) create mode 100644 .gitattributes create mode 100644 numexpr-2.8.4.tar.gz create mode 100644 python-numexpr.changes create mode 100644 python-numexpr.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/numexpr-2.8.4.tar.gz b/numexpr-2.8.4.tar.gz new file mode 100644 index 0000000..6df58e6 --- /dev/null +++ b/numexpr-2.8.4.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d5432537418d18691b9115d615d6daa17ee8275baef3edf1afbbf8bc69806147 +size 98719 diff --git a/python-numexpr.changes b/python-numexpr.changes new file mode 100644 index 0000000..aad2466 --- /dev/null +++ b/python-numexpr.changes @@ -0,0 +1,470 @@ +------------------------------------------------------------------- +Mon Jan 2 18:44:01 UTC 2023 - Dirk Müller + +- update to 2.8.4: + * Support for Python 3.11 has been added. + * Thanks to Tobias Hangleiter for an improved accuracy complex `expm1` function. + While it is 25 % slower, it is significantly more accurate for the real component + over a range of values and matches NumPy outputs much more closely. + * Thanks to Kirill Kouzoubov for a range of fixes to constants parsing that was + resulting in duplicated constants of the same value. + * Thanks to Mark Harfouche for noticing that we no longer need `numpy` version + checks. `packaging` is no longer a requirement as a result. + +------------------------------------------------------------------- +Sun Jul 17 18:42:38 UTC 2022 - Ben Greiner + +- Fix requirements + +------------------------------------------------------------------- +Sat Jul 9 13:38:01 UTC 2022 - Arun Persaud + +- specfile: + * require python >= 3.7 + +- update to version 2.8.3: + * Support for Python 3.6 has been dropped due to the need to + substitute the flag NPY_ARRAY_WRITEBACKIFCOPY for + NPY_ARRAY_UPDATEIFCOPY. This flag change was initiated in NumPy + 1.14 and finalized in 1.23. The only changes were made to cases + where an unaligned constant was passed in with a pre-allocated + output variable: + ``` + x = np.empty(5, dtype=np.uint8)[1:].view(np.int32) ne.evaluate('3', out=x) + ``` + We think the risk of issues is very low, but if you are using + NumExpr as a expression evaluation tool you may want to write a + test for this edge case. + * Thanks to Matt Einhorn (@matham) for improvements to the GitHub + Actions build process to add support for Apple Silicon and + aarch64. + * Thanks to Biswapriyo Nath (@biswa96) for a fix to allow mingw + builds on Windows. + * There have been some changes made to not import platform.machine() + on sparc but it is highly advised to upgrade to Python 3.9+ to + avoid this issue with the Python core package platform. + +- changes from version 2.8.2: + * skipped due to an error in uploading to PyPi. + +------------------------------------------------------------------- +Mon Feb 7 03:27:38 UTC 2022 - Arun Persaud + +- specfile: + * update copyright year + * skip build for python2 + +- update to version 2.8.1: + * Fixed dependency list. + * Added "pyproject.toml" and modernize the "setup.py" script. Thanks + to Antonio Valentino for the PR. + +- changes from version 2.8.0: + * Wheels for Python 3.10 are now provided. + * Support for Python 2.7 and 3.5 has been discontinued. + * All residual support for Python 2.X syntax has been removed, and + therefore the setup build no longer makes calls to the `2to3` + script. The `setup.py` has been refactored to be more modern. + * The examples on how to link into Intel VML/MKL/oneAPI now use the + dynamic library. + +------------------------------------------------------------------- +Fri Mar 12 20:28:19 UTC 2021 - Dirk Müller + +- skip python3.6 build (no numpy) + +------------------------------------------------------------------- +Wed Mar 3 19:08:44 UTC 2021 - Arun Persaud + +- update to version 2.7.3: + * Pinned Numpy versions to minimum supported version in an effort to + alleviate issues seen in Windows machines not having the same MSVC + runtime installed as was used to build the wheels. + * ARMv8 wheels are now available, thanks to odidev for the pull + request. + +------------------------------------------------------------------- +Sat Jan 9 20:01:06 UTC 2021 - Arun Persaud + +- specfile: + * update copyright year + +- update to version 2.7.2: + * Support for Python 2.7 and 3.5 is deprecated and will be + discontinued when cibuildwheels and/or GitHub Actions no longer + support these versions. + * Wheels are now provided for Python 3.7, 3.5, 3.6, 3.7, 3.8, and + 3.9 via GitHub Actions. + * The block size is now exported into the namespace as + numexpr.__BLOCK_SIZE1__ as a read-only value. + * If using MKL, the number of threads for VML is no longer forced to + 1 on loading the module. Testing has shown that VML never runs in + multi-threaded mode for the default BLOCKSIZE1 of 1024 elements, + and forcing to 1 can have deleterious effects on NumPy functions + when built with MKL. See issue #355 for details. + * Use of ndarray.tostring() in tests has been switch to + ndarray.tobytes() for future-proofing deprecation of .tostring(), + if the version of NumPy is greater than 1.9. + * Added a utility method get_num_threads that returns the (maximum) + number of threads currently in use by the virtual machine. The + functionality of set_num_threads whereby it returns the previous + value has been deprecated and will be removed in 2.8.X. + +------------------------------------------------------------------- +Wed Jan 8 18:04:17 UTC 2020 - Todd R + +- Update to 2.7.1 + * Python 3.8 support has been added. + * Python 3.4 support is discontinued. + * The tests are now compatible with NumPy 1.18. + * site.cfg.example was updated to use the libraries tag instead + of mkl_libs, which is recommended for newer version of NumPy. +- Drop upstream-included fix_test.patch + +------------------------------------------------------------------- +Sat Aug 31 04:46:34 UTC 2019 - Arun Persaud + +- specfile: + * update copyright year + * added fix to call python in tests: fix_test.patch + +- update to version 2.7.0: + * The default number of 'safe' threads has been restored to the + historical limit of 8, if the environment variable + "NUMEXPR_MAX_THREADS" has not been set. + * Thanks to @eltoder who fixed a small memory leak. + * Support for Python 2.6 has been dropped, as it is no longer + available via TravisCI. + * A typo in the test suite that had a less than rather than greater + than symbol in the NumPy version check has been corrected thanks + to dhomeier. + * The file site.cfg was being accidently included in the sdists on + PyPi. It has now been excluded. + +------------------------------------------------------------------- +Sat Dec 22 05:26:03 UTC 2018 - Todd R + +- Update to 2.6.9 + * Thanks to Mike Toews for more robust handling of the thread-setting environment variables. + * With Appveyor updating to Python 3.7.1, wheels for Python 3.7 are now available in addition to those for other OSes. + +------------------------------------------------------------------- +Sun Sep 2 16:48:00 UTC 2018 - arun@gmx.de + +- update to version 2.6.8: + * Add check to make sure that f_locals is not actually f_globals + when we do the f_locals clear to avoid the #310 memory leak issue. + * Compare NumPy versions using distutils.version.LooseVersion to + avoid issue #312 when working with NumPy development versions. + * As part of multibuild, wheels for Python 3.7 for Linux and MacOSX + are now available on PyPI. + +- changes from version 2.6.7: + * Thanks to Lehman Garrison for finding and fixing a bug that + exhibited memory leak-like behavior. The use in numexpr.evaluate + of sys._getframe combined with .f_locals from that frame object + results an extra refcount on objects in the frame that calls + numexpr.evaluate, and not evaluate's frame. So if the calling + frame remains in scope for a long time (such as a procedural + script where numexpr is called from the base frame) garbage + collection would never occur. + * Imports for the numexpr.test submodule were made lazy in the + numexpr module. + +------------------------------------------------------------------- +Mon Aug 6 20:04:09 UTC 2018 - toddrme2178@gmail.com + +- Update to 2.6.6 + * Thanks to Mark Dickinson for a fix to the thread barrier that occassionally suffered from spurious wakeups on MacOSX. +- Update to 2.6.5 + * The maximum thread count can now be set at import-time by setting the environment variable ‘NUMEXPR_MAX_THREADS’. The default number of max threads was lowered from 4096 (which was deemed excessive) to 64. + * A number of imports were removed (pkg_resources) or made lazy (cpuinfo) in order to speed load-times for downstream packages (such as pandas, sympy, and tables). Import time has dropped from about 330 ms to 90 ms. Thanks to Jason Sachs for pointing out the source of the slow-down. + * Thanks to Alvaro Lopez Ortega for updates to benchmarks to be compatible with Python 3. + * Travis and AppVeyor now fail if the test module fails or errors. + * Thanks to Mahdi Ben Jelloul for a patch that removed a bug where constants in where calls would raise a ValueError. + * Fixed a bug whereby all-constant power operations would lead to infinite recursion. + +------------------------------------------------------------------- +Mon Oct 2 21:57:06 UTC 2017 - jengelh@inai.de + +- Ensure neutrality of description. + +------------------------------------------------------------------- +Sun Sep 24 21:29:49 UTC 2017 - arun@gmx.de + +- update to version 2.6.4: + * Christoph Gohkle noticed a lack of coverage for the 2.6.3 floor + and ceil functions for MKL that caused seg-faults in + +- changes from version 2.6.2: + * Documentation now available at readthedocs.io. + * Support for floor() and ceil() functions added by Caleb P. Burns. + * NumPy requirement increased from 1.6 to 1.7 due to changes in + iterator flags (#245). + * Sphinx autodocs support added for documentation on + readthedocs.org. + * Fixed a bug where complex constants would return an error, fixing + problems with sympy when using NumExpr as a backend. + * Fix for #277 whereby arrays of shape (1,...) would be reduced as + if they were full reduction. Behavoir now matches that of NumPy. + * String literals are automatically encoded into 'ascii' bytes for + convience (see #281). + +------------------------------------------------------------------- +Wed Apr 19 22:13:57 UTC 2017 - toddrme2178@gmail.com + +- Source url must be https. + +------------------------------------------------------------------- +Wed Apr 19 18:38:25 UTC 2017 - toddrme2178@gmail.com + +- Update to 2.6.2 + * Updates to keep with API changes in newer NumPy versions (#228). + Thanks to Oleksandr Pavlyk. + * Removed several warnings (#226 and #227). Thanks to Oleksander Pavlyk. + * Fix bugs in function `stringcontains()` (#230). Thanks to Alexander Shadchin. + * Detection of the POWER processor (#232). Thanks to Breno Leitao. + * Fix pow result casting (#235). Thanks to Fernando Seiti Furusato. + * Fix integers to negative integer powers (#240). Thanks to Antonio Valentino. + * Detect numpy exceptions in expression evaluation (#240). Thanks to Antonio Valentino. + * Better handling of RC versions (#243). Thanks to Antonio Valentino. +- Update to 2.6.1 + * Fixed a performance regression in some situations as consequence of + increasing too much the BLOCK_SIZE1 constant. After more careful + benchmarks (both in VML and non-VML modes), the value has been set + again to 1024 (down from 8192). The benchmarks have been made with + a relatively new processor (Intel Xeon E3-1245 v5 @ 3.50GHz), so + they should work well for a good range of processors again. + * Added NetBSD support to CPU detection. Thanks to Thomas Klausner. +- Update to 2.6.0 + * Introduced a new re_evaluate() function for re-evaluating the + previous executed array expression without any check. This is meant + for accelerating loops that are re-evaluating the same expression + repeatedly without changing anything else than the operands. If + unsure, use evaluate() which is safer. + * The BLOCK_SIZE1 and BLOCK_SIZE2 constants have been re-checked in + order to find a value maximizing most of the benchmarks in bench/ + directory. The new values (8192 and 16 respectively) give somewhat + better results (~5%) overall. The CPU used for fine tuning is a + relatively new Haswell processor (E3-1240 v3). + * The '--name' flag for `setup.py` returning the name of the package + is honored now (issue #215). +- Update to 2.5.2 + * conj() and abs() actually added as VML-powered functions, preventing + the same problems than log10() before (PR #212). Thanks to Tom Kooij + for the fix! +- Update to 2.5.1 + * Fix for log10() and conj() functions. These produced wrong results + when numexpr was compiled with Intel's MKL (which is a popular build + since Anaconda ships it by default) and non-contiguous data (issue + #210). Thanks to Arne de Laat and Tom Kooij for reporting and + providing a nice test unit. + * Fix that allows numexpr-powered apps to be profiled with pympler. + Thanks to @nbecker. +- Update to 2.5 + * Added locking for allowing the use of numexpr in multi-threaded + callers (this does not prevent numexpr to use multiple cores + simultaneously). (PR #199, Antoine Pitrou, PR #200, Jenn Olsen). + * Added new min() and max() functions (PR #195, CJ Carey). +- Implement single-spec version + +------------------------------------------------------------------- +Mon Feb 1 11:39:24 UTC 2016 - toddrme2178@gmail.com + +- update to version 2.4.6: + * Fixed some UserWarnings in Solaris (PR #189, Graham Jones). + * Better handling of MSVC defines. (#168, Francesc Alted). +- update to version 2.4.5: + * Undone a 'fix' for a harmless data race. (#185 Benedikt Reinartz, + Francesc Alted). + * Ignore NumPy warnings (overflow/underflow, divide by zero and + others) that only show up in Python3. Masking these warnings in + tests is fine because all the results are checked to be + valid. (#183, Francesc Alted). +- update to version 2.4.4: + * Honor OMP_NUM_THREADS as a fallback in case NUMEXPR_NUM_THREADS is + not set. Fixes #161. (PR #175, Stefan Erb). + * Added support for AppVeyor (PR #178 Andrea Bedini) + * Fix to allow numexpr to be imported after eventlet.monkey_patch(), + as suggested in #118 (PR #180 Ben Moran). + * Fix harmless data race that triggers false positives in + ThreadSanitizer. (PR #179, Clement Courbet). + * Fixed some string tests on Python 3 (PR #182, Antonio Valentino). + +------------------------------------------------------------------- +Thu May 7 18:37:17 UTC 2015 - benoit.monin@gmx.fr + +- update to version 2.4.3: + * Comparisons with empty strings work correctly now. Fixes #121 + and PyTables #184. +- additional changes from version 2.4.2: + * Improved setup.py so that pip can query the name and version + without actually doing the installation. Thanks to Joris + Borgdorff. +- additional changes from version 2.4.1: + * Added more configuration examples for compiling with MKL/VML + support. Thanks to Davide Del Vento. + * Symbol MKL_VML changed into MKL_DOMAIN_VML because the former + is deprecated in newer MKL. Thanks to Nick Papior Andersen. + * Better determination of methods in cpuinfo module. Thanks to + Marc Jofre. + * Improved NumPy version determination (handy for 1.10.0). Thanks + to Åsmund Hjulstad. + * Benchmarks run now with both Python 2 and Python 3. Thanks to + Zoran Plesivčak. +- remove shebang of cpuinfo.py instead of setting it executable +- remove unneeded clean section + +------------------------------------------------------------------- +Thu May 8 10:51:51 UTC 2014 - toddrme2178@gmail.com + +- Update to 2.4 + * A new `contains()` function has been added for detecting substrings + in strings. Only plain strings (bytes) are supported for now. See + PR #135 and ticket #142. Thanks to Marcin Krol. + * New version of setup.py that allows better management of NumPy + dependency. See PR #133. Thanks to Aleks Bunin. + +------------------------------------------------------------------- +Wed Mar 12 13:24:36 UTC 2014 - toddrme2178@gmail.com + +- update to 2.3.1 + * Added support for shift-left (<<) and shift-right (>>) binary operators. + See PR #131. Thanks to fish2000! + * Removed the rpath flag for the GCC linker, because it is probably + not necessary and it chokes to clang. +- update to 2.3 + * Site has been migrated to https://github.com/pydata/numexpr. All + new tickets and PR should be directed there. + * [ENH] A `conj()` function for computing the conjugate of complex + arrays has been added. Thanks to David Menéndez. See PR #125. + * [FIX] Fixed a DeprecationWarning derived of using oa_ndim == 0 and + op_axes == NULL when using NpyIter_AdvancedNew() and NumPy 1.8. + Thanks to Mark Wiebe for advise on how to fix this properly. + +------------------------------------------------------------------- +Tue Oct 22 13:32:08 UTC 2013 - toddrme2178@gmail.com + +- update to 2.2.2 + * The `copy_args` argument of `NumExpr` function has been brought + back. This has been mainly necessary for compatibility with + PyTables < 3.0, which I decided to continue to support. Fixed #115. + * The `__nonzero__` method in `ExpressionNode` class has been + commented out. This is also for compatibility with PyTables < 3.0. + See #24 for details. + * Fixed the type of some parameters in the C extension so that s390 + architecture compiles. Fixes #116. Thank to Antonio Valentino for + reporting and the patch. +- update to 2.2.1 + * Fixes a secondary effect of "from numpy.testing import `*`", where + division is imported now too, so only then necessary functions from + there are imported now. Thanks to Christoph Gohlke for the patch. +- update to 2.2 + * [LICENSE] Fixed a problem with the license of the + numexpr/win32/pthread.{c,h} files emulating pthreads on Windows + platforms. After persmission from the original authors is granted, + these files adopt the MIT license and can be redistributed without + problems. See issue #109 for details + (https://code.google.com/p/numexpr/issues/detail?id=110). + * [ENH] Improved the algorithm to decide the initial number of threads + to be used. This was necessary because by default, numexpr was + using a number of threads equal to the detected number of cores, and + this can be just too much for moder systems where this number can be + too high (and counterporductive for performance in many cases). + Now, the 'NUMEXPR_NUM_THREADS' environment variable is honored, and + in case this is not present, a maximum number of *8* threads are + setup initially. The new algorithm is fully described in the Users + Guide now in the note of 'General routines' section: + https://code.google.com/p/numexpr/wiki/UsersGuide#General_routines. + Closes #110. + * [ENH] numexpr.test() returns `TestResult` instead of None now. + Closes #111. + * [FIX] Modulus with zero with integers no longer crashes the + interpreter. It nows puts a zero in the result. Fixes #107. + * [API CLEAN] Removed `copy_args` argument of `evaluate`. This should + only be used by old versions of PyTables (< 3.0). + * [DOC] Documented the `optimization` and `truediv` flags of + `evaluate` in Users Guide + (https://code.google.com/p/numexpr/wiki/UsersGuide). + +------------------------------------------------------------------- +Mon May 6 06:22:06 UTC 2013 - highwaystar.ru@gmail.com + +- python3 package added +- update to 2.1 + * New compatibility with Python 3: + * switch from PyString to PyBytes API (requires Python >= 2.6). + * fixed incompatibilities regarding the int/long API + * use the Py_TYPE macro + * use the PyVarObject_HEAD_INIT macro instead of PyObject_HEAD_INIT + * Dropped compatibility with Python < 2.6. + * Fixed several issues with different platforms not supporting + multithreading or subprocess properly (see tickets #75 and #77). + * Now, when trying to use pure Python boolean operators, 'and', + 'or' and 'not, an error is issued and suggesting that '&', '|' + and '~' should be used instead (fixes #24). + +------------------------------------------------------------------- +Tue Aug 14 10:24:42 UTC 2012 - scorot@free.fr + +- fix requiements for SLE 11 + +------------------------------------------------------------------- +Tue Jul 31 13:42:58 UTC 2012 - toddrme2178@gmail.com + +- Update to 2.0.1 + *Added compatibility with Python 2.5 (2.4 is definitely not supported + anymore). + *`numexpr.evaluate` is fully documented now, in particular the new + `out`, `order` and `casting` parameters. + *Reduction operations are fully documented now. + *Negative axis in reductions are not supported (they have never been + actually), and a `ValueError` will be raised if they are used. +- Update to 2.0 + - Added support for the new iterator object in NumPy 1.6 and later. + This allows for better performance with operations that implies + broadcast operations, fortran-ordered or non-native byte orderings. + Performance for other scenarios is preserved (except for very small + arrays). + - Division in numexpr is consistent now with Python/NumPy. Fixes #22 + and #58. + - Constants like "2." or "2.0" must be evaluated as float, not + integer. Fixes #59. + - `evaluate()` function has received a new parameter `out` for storing + the result in already allocated arrays. This is very useful when + dealing with large arrays, and a allocating new space for keeping + the result is not acceptable. Closes #56. + - Maximum number of threads raised from 256 to 4096. Machines with a + higher number of cores will still be able to import numexpr, but + limited to 4096 (which is an absurdly high number already). +- Update to 1.4.2 + - Multithreaded operation is disabled for small arrays (< 32 KB). + This allows to remove the overhead of multithreading for such a + small arrays. Closes #36. + - Dividing int arrays by zero gives a 0 as result now (and not a + floating point exception anymore. This behaviour mimics NumPy. + Thanks to Gaëtan de Menten for the fix. Closes #37. + - When compiled with VML support, the number of threads is set to 1 + for VML core, and to the number of cores for the native pthreads + implementation. This leads to much better performance. Closes #39. + - Fixed different issues with reduction operations (`sum`, `prod`). + The problem is that the threaded code does not work well for + broadcasting or reduction operations. Now, the serial code is used + in those cases. Closes #41. + - Optimization of "compilation phase" through a better hash. This can + lead up to a 25% of improvement when operating with variable + expressions over small arrays. Thanks to Gaëtan de Menten for the + patch. Closes #43. + - The ``set_num_threads`` now returns the number of previous thread + setting, as stated in the docstrings. + +------------------------------------------------------------------- +Fri Jul 1 08:16:08 UTC 2011 - saschpe@suse.de + +- Require python-numpy + +------------------------------------------------------------------- +Fri Jul 1 07:22:37 UTC 2011 - saschpe@suse.de + +- Initial version + diff --git a/python-numexpr.spec b/python-numexpr.spec new file mode 100644 index 0000000..460c6a1 --- /dev/null +++ b/python-numexpr.spec @@ -0,0 +1,71 @@ +# +# spec file for package python-numexpr +# +# Copyright (c) 2023 SUSE LLC +# +# 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 https://bugs.opensuse.org/ +# + + +Name: python-numexpr +Version: 2.8.4 +Release: 0 +Summary: Numerical expression evaluator for NumPy +License: MIT +Group: Development/Languages/Python +URL: https://github.com/pydata/numexpr/ +Source: https://files.pythonhosted.org/packages/source/n/numexpr/numexpr-%{version}.tar.gz +BuildRequires: %{python_module devel >= 3.7} +BuildRequires: %{python_module numpy-devel >= 1.13.3} +BuildRequires: %{python_module setuptools} +BuildRequires: fdupes +BuildRequires: gcc-c++ +BuildRequires: python-rpm-macros +Requires: python-numpy >= 1.13.3 +%python_subpackages + +%description +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. + +%prep +%setup -q -n numexpr-%{version} +# wrong-file-end-of-line-encoding +sed -i 's/\r$//' ANNOUNCE.rst AUTHORS.txt README.rst RELEASE_NOTES.rst site.cfg.example +# remove unwanted shebang +sed -i '/^#!/ d' numexpr/cpuinfo.py + +%build +export CFLAGS="%{optflags} -fno-strict-aliasing" +%python_build + +%install +%python_install +%python_expand %fdupes %{buildroot}%{$python_sitearch} + +%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 + +%files %{python_files} +%doc ANNOUNCE.rst AUTHORS.txt README.rst RELEASE_NOTES.rst site.cfg.example +%license LICENSE.txt +%{python_sitearch}/numexpr/ +%{python_sitearch}/numexpr-%{version}-py*.egg-info + +%changelog