2009-02-12 04:52:59 +01:00
|
|
|
#
|
2021-10-12 09:12:08 +02:00
|
|
|
# spec file
|
2009-02-12 04:52:59 +01:00
|
|
|
#
|
2023-01-03 10:23:16 +01:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2009-02-12 04:52:59 +01: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.
|
|
|
|
|
2019-10-03 15:54:26 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2009-02-12 04:52:59 +01:00
|
|
|
#
|
|
|
|
|
2017-04-19 18:08:20 +02:00
|
|
|
|
2017-10-20 14:38:55 +02:00
|
|
|
%global flavor @BUILD_FLAVOR@%{nil}
|
2023-03-22 14:08:53 +01:00
|
|
|
%define ver 1.24.2
|
|
|
|
%define _ver 1_24_2
|
2017-10-20 14:38:55 +02:00
|
|
|
%define pname python-numpy
|
2022-12-20 07:18:27 +01:00
|
|
|
%define plainpython python
|
2017-11-17 10:36:10 +01:00
|
|
|
%define hpc_upcase_trans_hyph() %(echo %{**} | tr [a-z] [A-Z] | tr '-' '_')
|
2019-09-26 10:39:18 +02:00
|
|
|
%if "%{flavor}" == ""
|
2017-10-20 14:38:55 +02:00
|
|
|
%bcond_with hpc
|
2020-09-18 13:23:54 +02:00
|
|
|
%bcond_with openblas
|
2017-01-25 22:34:53 +01:00
|
|
|
%endif
|
2019-09-26 10:39:18 +02:00
|
|
|
%if "%{flavor}" == "gnu-hpc"
|
2017-10-20 14:38:55 +02:00
|
|
|
%bcond_without hpc
|
2016-09-17 14:34:03 +02:00
|
|
|
%endif
|
2019-09-26 10:39:18 +02:00
|
|
|
%if "%{flavor}" == "gnu7-hpc"
|
|
|
|
%define c_f_ver 7
|
2017-10-20 14:38:55 +02:00
|
|
|
%bcond_without hpc
|
2020-09-18 13:23:54 +02:00
|
|
|
%endif
|
2022-10-12 01:41:41 +02:00
|
|
|
%if %{with hpc}
|
|
|
|
%bcond_without openblas
|
|
|
|
%endif
|
2018-05-16 11:21:50 +02:00
|
|
|
%if 0%{?sle_version} == 120300
|
|
|
|
%{?with_openblas:ExclusiveArch: do_not_build}
|
|
|
|
%endif
|
|
|
|
%ifarch s390 s390x
|
2018-02-09 15:44:14 +01:00
|
|
|
%{?with_openblas:ExclusiveArch: do_not_build}
|
|
|
|
%endif
|
2019-09-26 10:39:18 +02:00
|
|
|
%{?with_hpc:%{hpc_requires}}
|
2022-10-10 09:22:04 +02:00
|
|
|
#
|
|
|
|
%if 0%{?suse_version} > 1500
|
|
|
|
%bcond_without libalternatives
|
2023-02-01 22:53:48 +01:00
|
|
|
%bcond_without cblas
|
2022-10-10 09:22:04 +02:00
|
|
|
%else
|
|
|
|
%bcond_with libalternatives
|
2023-02-01 22:53:48 +01:00
|
|
|
%bcond_with cblas
|
2022-10-10 09:22:04 +02:00
|
|
|
%endif
|
2022-10-12 01:41:41 +02:00
|
|
|
#
|
2019-09-26 10:39:18 +02:00
|
|
|
%bcond_with ringdisabled
|
2022-10-12 01:41:41 +02:00
|
|
|
#
|
2017-10-20 14:38:55 +02:00
|
|
|
%if %{without hpc}
|
|
|
|
%define package_name %{pname}
|
2019-09-26 10:39:18 +02:00
|
|
|
%define p_python_sitearch %{python_sitearch}
|
|
|
|
%define p_prefix %{_prefix}
|
|
|
|
%define p_bindir %{_bindir}
|
2017-10-20 14:38:55 +02:00
|
|
|
%else
|
2019-09-26 10:39:18 +02:00
|
|
|
%{!?compiler_family:%global compiler_family gnu}
|
|
|
|
%{hpc_init -c %{compiler_family} %{?c_f_ver:-v %{c_f_ver}} %{?mpi_ver:-V %{mpi_ver}}}
|
|
|
|
%define package_name %{hpc_package_name %{_ver}}
|
|
|
|
%define p_python_sitearch %{hpc_python_sitearch}
|
|
|
|
%define p_prefix %{hpc_prefix}
|
|
|
|
%define p_bindir %{hpc_bindir}
|
2017-10-20 14:38:55 +02:00
|
|
|
# Magic for OBS Staging. Only build the flavors required by
|
|
|
|
# other packages in the ring.
|
|
|
|
%if %{with ringdisabled}
|
|
|
|
ExclusiveArch: do_not_build
|
|
|
|
%endif
|
2017-01-25 22:34:53 +01:00
|
|
|
%endif
|
2023-04-26 22:47:51 +02:00
|
|
|
%{?sle15_python_module_pythons}
|
2022-10-12 01:41:41 +02:00
|
|
|
Name: %{package_name}
|
|
|
|
# set %%ver and %%_ver instead above
|
|
|
|
Version: %{ver}
|
|
|
|
Release: 0
|
|
|
|
Summary: NumPy array processing for numbers, strings, records and objects
|
|
|
|
License: BSD-3-Clause
|
|
|
|
URL: http://www.numpy.org/
|
|
|
|
Source: https://files.pythonhosted.org/packages/source/n/numpy/numpy-%{version}.tar.gz
|
|
|
|
Source99: python-numpy-rpmlintrc
|
|
|
|
# PATCH-FIX-OPENSUSE numpy-buildfix.patch -- openSUSE-specific build fixes
|
|
|
|
Patch0: numpy-buildfix.patch
|
|
|
|
# PATCH-FIX-OPENSUSE numpy-1.9.0-remove-__declspec.patch -- fix for spurious compiler warnings that cause build failure
|
|
|
|
Patch1: numpy-1.9.0-remove-__declspec.patch
|
2023-03-24 08:03:33 +01:00
|
|
|
# PATCH-FIX-OPENSUSE Ignore DeprecationWarnings when importing pkg_resources
|
|
|
|
Patch2: ignore-pkg_resources-deprecation.patch
|
2022-10-12 01:41:41 +02:00
|
|
|
BuildRequires: %{python_module Cython >= 0.29.30}
|
|
|
|
BuildRequires: %{python_module base >= 3.8}
|
|
|
|
BuildRequires: %{python_module devel}
|
|
|
|
BuildRequires: %{python_module setuptools >= 60.0.0}
|
|
|
|
BuildRequires: gcc-c++
|
|
|
|
BuildRequires: python-rpm-macros >= 20210929
|
|
|
|
BuildConflicts: gcc11 < 11.2
|
|
|
|
%if 0%{?suse_version}
|
|
|
|
BuildRequires: fdupes
|
|
|
|
%endif
|
2022-12-20 07:18:27 +01:00
|
|
|
# SECTION test requirements
|
|
|
|
BuildRequires: %{python_module pytest >= 6.2.5}
|
|
|
|
BuildRequires: %{python_module hypothesis >= 6.24.1}
|
|
|
|
BuildRequires: %{python_module pytest-xdist}
|
|
|
|
BuildRequires: %{python_module testsuite}
|
|
|
|
BuildRequires: %{python_module typing-extensions >= 4.2.0}
|
|
|
|
# /SECTION
|
2017-10-20 14:38:55 +02:00
|
|
|
%if %{without hpc}
|
2022-10-10 09:22:04 +02:00
|
|
|
# Last version which packaged %%{_bindir}/f2py without update-alternatives
|
2022-12-20 07:18:27 +01:00
|
|
|
Conflicts: %{plainpython}-numpy <= 1.12.0
|
2023-01-23 11:00:01 +01:00
|
|
|
%if 0%{?suse_version}
|
2017-04-19 18:08:20 +02:00
|
|
|
BuildRequires: gcc-fortran
|
2023-01-23 11:00:01 +01:00
|
|
|
%else
|
2017-06-20 11:00:48 +02:00
|
|
|
BuildRequires: gcc-gfortran
|
2023-01-23 11:00:01 +01:00
|
|
|
%endif
|
|
|
|
%if %{with openblas}
|
2022-10-10 09:22:04 +02:00
|
|
|
BuildRequires: openblas-devel > 0.3.20
|
2023-01-23 11:00:01 +01:00
|
|
|
%else
|
2017-10-20 14:38:55 +02:00
|
|
|
BuildRequires: blas-devel
|
|
|
|
BuildRequires: lapack-devel
|
2023-02-01 22:53:48 +01:00
|
|
|
%if %{with cblas}
|
2020-10-08 20:09:39 +02:00
|
|
|
# openblas has significantly better performance for some operations
|
2023-02-01 22:53:48 +01:00
|
|
|
BuildRequires: cblas-devel
|
2020-10-08 20:09:39 +02:00
|
|
|
Recommends: libopenblas_pthreads0
|
2023-01-23 11:00:01 +01:00
|
|
|
%endif
|
2023-02-01 22:53:48 +01:00
|
|
|
%endif
|
2023-01-23 11:00:01 +01:00
|
|
|
%if %{with libalternatives}
|
2021-10-12 09:12:08 +02:00
|
|
|
BuildRequires: alts
|
|
|
|
Requires: alts
|
2023-01-23 11:00:01 +01:00
|
|
|
%else
|
2021-10-12 09:12:08 +02:00
|
|
|
Requires(post): update-alternatives
|
|
|
|
Requires(postun):update-alternatives
|
2023-01-23 11:00:01 +01:00
|
|
|
%endif
|
2017-10-20 14:38:55 +02:00
|
|
|
%else
|
|
|
|
BuildRequires: %{compiler_family}%{?c_f_ver}-compilers-hpc-macros-devel
|
|
|
|
BuildRequires: libopenblas%{?hpc_ext}-%{compiler_family}%{?c_f_ver}-hpc-devel
|
|
|
|
BuildRequires: lua-lmod
|
|
|
|
BuildRequires: suse-hpc
|
2017-11-17 10:36:10 +01:00
|
|
|
Requires: libopenblas%{?hpc_ext}-%{compiler_family}%{?c_f_ver}-hpc
|
2021-10-06 02:24:58 +02:00
|
|
|
%endif
|
2017-04-19 18:08:20 +02:00
|
|
|
%python_subpackages
|
|
|
|
|
2009-02-12 04:52:59 +01:00
|
|
|
%description
|
2010-03-05 15:57:57 +01:00
|
|
|
NumPy is a general-purpose array-processing package designed to
|
|
|
|
efficiently manipulate large multi-dimensional arrays of arbitrary
|
|
|
|
records without sacrificing too much speed for small multi-dimensional
|
|
|
|
arrays. NumPy is built on the Numeric code base and adds features
|
|
|
|
introduced by numarray as well as an extended C-API and the ability to
|
|
|
|
create arrays of arbitrary type which also makes NumPy suitable for
|
|
|
|
interfacing with general-purpose data-base applications.
|
2009-02-12 04:52:59 +01:00
|
|
|
|
2010-03-05 15:57:57 +01:00
|
|
|
There are also basic facilities for discrete fourier transform,
|
|
|
|
basic linear algebra and random number generation.
|
2009-02-12 04:52:59 +01:00
|
|
|
|
2017-10-20 14:38:55 +02:00
|
|
|
%{?with_hpc:%{hpc_python_master_package -L -a }}
|
2017-04-19 18:08:20 +02:00
|
|
|
|
2010-03-05 15:57:57 +01:00
|
|
|
%package devel
|
2014-08-13 17:19:54 +02:00
|
|
|
Summary: Development files for numpy applications
|
2010-03-05 15:57:57 +01:00
|
|
|
Requires: %{name} = %{version}
|
2017-04-19 18:08:20 +02:00
|
|
|
Requires: python-devel
|
2022-12-20 07:18:27 +01:00
|
|
|
Requires: %plainpython(abi) = %{python_version}
|
2017-10-20 14:38:55 +02:00
|
|
|
%if %{without hpc}
|
2018-02-16 21:40:19 +01:00
|
|
|
%if %{with openblas}
|
2017-04-19 18:08:20 +02:00
|
|
|
Requires: openblas-devel
|
2018-02-16 21:40:19 +01:00
|
|
|
%else
|
2017-10-20 14:38:55 +02:00
|
|
|
Requires: blas-devel
|
2023-02-01 22:53:48 +01:00
|
|
|
%if %{with cblas}
|
2020-10-08 20:09:39 +02:00
|
|
|
Requires: cblas-devel
|
2023-02-01 22:53:48 +01:00
|
|
|
%endif
|
2017-10-20 14:38:55 +02:00
|
|
|
Requires: lapack-devel
|
2018-02-16 21:40:19 +01:00
|
|
|
%endif
|
2017-10-20 14:38:55 +02:00
|
|
|
%else
|
2017-11-09 13:53:36 +01:00
|
|
|
Requires: libopenblas%{?hpc_ext}-%{compiler_family}%{?c_f_ver}-hpc-devel
|
2019-09-26 10:39:18 +02:00
|
|
|
%{hpc_requires_devel}
|
2011-09-22 10:58:19 +02:00
|
|
|
%endif
|
2009-02-12 04:52:59 +01:00
|
|
|
|
2010-03-05 15:57:57 +01:00
|
|
|
%description devel
|
2014-08-13 17:19:54 +02:00
|
|
|
This package contains files for developing applications using numpy.
|
2009-02-12 04:52:59 +01:00
|
|
|
|
2017-10-20 14:38:55 +02:00
|
|
|
%{?with_hpc:%{hpc_python_master_package devel -a }}
|
2017-04-19 18:08:20 +02:00
|
|
|
|
2009-02-12 04:52:59 +01:00
|
|
|
%prep
|
2021-07-17 08:27:46 +02:00
|
|
|
%autosetup -p1 -n numpy-%{version}
|
2013-11-14 08:43:27 +01:00
|
|
|
# Fix non-executable scripts
|
Accepting request 761226 from home:TheBlackCat:branches:devel:languages:python:numeric
- update to version 1.18.0:
+ Highlights
* The C-API for ``numpy.random`` has been defined and documented.
* Basic infrastructure for linking with 64 bit BLAS and LAPACK libraries.
* Many documentation improvements.
+ New functions
* Multivariate hypergeometric distribution added to ``numpy.random``
+ Deprecations
* ``np.fromfile`` and ``np.fromstring`` will error on bad data
* Deprecate non-scalar arrays as fill values in ``ma.fill_value``
* Deprecate ``PyArray_As1D``, ``PyArray_As2D``
* Deprecate ``np.alen``
* Deprecate the financial functions
* The ``axis`` argument to ``numpy.ma.mask_cols`` and ``numpy.ma.mask_row`` is deprecated
+ Expired deprecations
* ``PyArray_As1D`` and ``PyArray_As2D`` have been removed in favor of
``PyArray_AsCArray``
* ``np.rank`` has been removed. This was deprecated in NumPy 1.10
and has been replaced by ``np.ndim``.
* The deprecation of ``expand_dims`` out-of-range axes in 1.13.0 has
expired.
* ``PyArray_FromDimsAndDataAndDescr`` and ``PyArray_FromDims`` have been
removed (they will always raise an error). Use ``PyArray_NewFromDescr``
and ``PyArray_SimpleNew`` instead.
* ``numeric.loads``, ``numeric.load``, ``np.ma.dump``,
``np.ma.dumps``, ``np.ma.load``, ``np.ma.loads`` are removed,
use ``pickle`` methods instead
* ``arrayprint.FloatFormat``, ``arrayprint.LongFloatFormat`` has been removed,
use ``FloatingFormat`` instead
* ``arrayprint.ComplexFormat``, ``arrayprint.LongComplexFormat`` has been
removed, use ``ComplexFloatingFormat`` instead
* ``arrayprint.StructureFormat`` has been removed, use ``StructureVoidFormat``
instead
* ``np.testing.rand`` has been removed. This was deprecated in NumPy 1.11
and has been replaced by ``np.random.rand``.
* Class ``SafeEval`` in ``numpy/lib/utils.py`` has been removed.
This was deprecated in NumPy 1.10. Use ``np.safe_eval`` instead.
* Remove deprecated support for boolean and empty condition lists in
``np.select``
* Array order only accepts 'C', 'F', 'A', and 'K'. More permissive options
were deprecated in NumPy 1.11.
* np.linspace parameter ``num`` must be an integer. Deprecated in NumPy 1.12.
* UFuncs with multiple outputs must use a tuple for the ``out`` kwarg. This
finishes a deprecation started in NumPy 1.10.
* The files ``numpy/testing/decorators.py``, ``numpy/testing/noseclasses.py``
and ``numpy/testing/nosetester.py`` have been removed. They were never
meant to be public (all relevant objects are present in the
``numpy.testing`` namespace), and importing them has given a deprecation
warning since NumPy 1.15.0
+ Compatibility notes
* `numpy.lib.recfunctions.drop_fields` can no longer return None
* ``numpy.argmin/argmax/min/max`` returns ``NaT`` if it exists in array
* ``np.can_cast(np.uint64, np.timedelta64, casting='safe')`` is now ``False``
* Changed random variate stream from ``numpy.random.Generator.integers``
* Add more ufunc loops for ``datetime64``, ``timedelta64``
* Moved modules in ``numpy.random``
+ C API changes
* ``PyDataType_ISUNSIZED(descr)`` now returns False for structured datatypes
+ New Features
* Add our own ``*.pxd`` cython import file
* A tuple of axes can now be input to ``expand_dims``
* Support for 64-bit OpenBLAS
* Add ``--f2cmap`` option to F2PY
+ Improvements
* Different C numeric types of the same size have unique names
* ``argwhere`` now produces a consistent result on 0d arrays
* Add ``axis`` argument for ``random.permutation`` and ``random.shuffle``
* ``method`` keyword argument for ``np.random.multivariate_normal``
* Add complex number support for ``numpy.fromstring``
* ``numpy.unique`` has consistent axes order when ``axis`` is not None
* ``numpy.matmul`` with boolean output now converts to boolean values
* ``numpy.random.randint`` produced incorrect value when the range was ``2**32``
* Add complex number support for ``numpy.fromfile``
* ``std=c99`` added if compiler is named ``gcc``
+ Changes
* ``NaT`` now sorts to the end of arrays
* Incorrect ``threshold`` in ``np.set_printoptions`` raises ``TypeError`` or ``ValueError``
* Warn when saving a dtype with metadata
* ``numpy.distutils`` append behavior changed for LDFLAGS and similar
* Remove ``numpy.random.entropy`` without a deprecation
* Add options to quiet build configuration and build with ``-Werror``
OBS-URL: https://build.opensuse.org/request/show/761226
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-numpy?expand=0&rev=47
2020-01-07 07:39:50 +01:00
|
|
|
sed -i '1s/^#!.*$//' numpy/{compat/setup,random/_examples/cython/setup,distutils/{conv_template,cpuinfo,exec_command,from_template,setup,system_info},f2py/{__init__,auxfuncs,capi_maps,cb_rules,cfuncs,common_rules,crackfortran,diagnose,f2py2e,f90mod_rules,func2subr,rules,setup,use_rules},ma/{setup,bench},matrixlib/setup,setup,testing/{print_coercion_tables,setup}}.py
|
|
|
|
sed -i '1s/^#!.*$//' numpy/random/_examples/cython/*.pyx
|
2009-02-12 04:52:59 +01:00
|
|
|
|
2019-10-03 15:54:26 +02:00
|
|
|
# force cythonization
|
2021-12-05 08:19:11 +01:00
|
|
|
rm -f PKG-INFO
|
2019-10-03 15:54:26 +02:00
|
|
|
|
2009-02-12 04:52:59 +01:00
|
|
|
%build
|
2019-05-30 10:39:20 +02:00
|
|
|
%define _lto_cflags %{nil}
|
2017-10-20 14:38:55 +02:00
|
|
|
%if %{with hpc}
|
|
|
|
%hpc_setup
|
|
|
|
module load openblas
|
|
|
|
export CFLAGS="$(pkg-config --cflags openblas) %{optflags} -fno-strict-aliasing" LIBS="$(pkg-config --libs openblas)"
|
|
|
|
cat > site.cfg <<EOF
|
|
|
|
[openblas]
|
|
|
|
libraries = openblas
|
|
|
|
library_dirs = $OPENBLAS_LIB
|
|
|
|
include_dirs = $OPENBLAS_INC
|
|
|
|
EOF
|
|
|
|
%else
|
2017-04-19 18:08:20 +02:00
|
|
|
export CFLAGS="%{optflags} -fno-strict-aliasing"
|
2017-10-20 14:38:55 +02:00
|
|
|
%endif
|
|
|
|
|
2017-04-19 18:08:20 +02:00
|
|
|
%python_build
|
|
|
|
|
2009-02-12 04:52:59 +01:00
|
|
|
%install
|
2019-09-26 10:39:18 +02:00
|
|
|
%{?with_hpc:%hpc_setup}
|
2017-10-20 14:38:55 +02:00
|
|
|
%{?with_hpc:module load openblas}
|
|
|
|
|
|
|
|
%python_exec setup.py install --prefix=%{p_prefix} --root=%{buildroot}
|
2020-04-07 13:56:09 +02:00
|
|
|
|
2020-04-07 15:08:50 +02:00
|
|
|
%if !%{with hpc}
|
2021-09-19 19:42:02 +02:00
|
|
|
%python_clone -a %{buildroot}%{_bindir}/f2py
|
2022-12-20 07:18:27 +01:00
|
|
|
%python_expand rm %{buildroot}%{$python_sitearch}/numpy/core/include/numpy/.doxyfile
|
|
|
|
%else
|
|
|
|
rm %{buildroot}%{p_python_sitearch}/numpy/core/include/numpy/.doxyfile
|
2020-04-07 15:08:50 +02:00
|
|
|
%endif
|
2017-10-20 14:38:55 +02:00
|
|
|
|
2017-06-20 11:00:48 +02:00
|
|
|
%if 0%{?suse_version}
|
2017-10-20 14:38:55 +02:00
|
|
|
%fdupes %{buildroot}%{p_prefix}
|
|
|
|
%endif
|
|
|
|
|
Accepting request 761226 from home:TheBlackCat:branches:devel:languages:python:numeric
- update to version 1.18.0:
+ Highlights
* The C-API for ``numpy.random`` has been defined and documented.
* Basic infrastructure for linking with 64 bit BLAS and LAPACK libraries.
* Many documentation improvements.
+ New functions
* Multivariate hypergeometric distribution added to ``numpy.random``
+ Deprecations
* ``np.fromfile`` and ``np.fromstring`` will error on bad data
* Deprecate non-scalar arrays as fill values in ``ma.fill_value``
* Deprecate ``PyArray_As1D``, ``PyArray_As2D``
* Deprecate ``np.alen``
* Deprecate the financial functions
* The ``axis`` argument to ``numpy.ma.mask_cols`` and ``numpy.ma.mask_row`` is deprecated
+ Expired deprecations
* ``PyArray_As1D`` and ``PyArray_As2D`` have been removed in favor of
``PyArray_AsCArray``
* ``np.rank`` has been removed. This was deprecated in NumPy 1.10
and has been replaced by ``np.ndim``.
* The deprecation of ``expand_dims`` out-of-range axes in 1.13.0 has
expired.
* ``PyArray_FromDimsAndDataAndDescr`` and ``PyArray_FromDims`` have been
removed (they will always raise an error). Use ``PyArray_NewFromDescr``
and ``PyArray_SimpleNew`` instead.
* ``numeric.loads``, ``numeric.load``, ``np.ma.dump``,
``np.ma.dumps``, ``np.ma.load``, ``np.ma.loads`` are removed,
use ``pickle`` methods instead
* ``arrayprint.FloatFormat``, ``arrayprint.LongFloatFormat`` has been removed,
use ``FloatingFormat`` instead
* ``arrayprint.ComplexFormat``, ``arrayprint.LongComplexFormat`` has been
removed, use ``ComplexFloatingFormat`` instead
* ``arrayprint.StructureFormat`` has been removed, use ``StructureVoidFormat``
instead
* ``np.testing.rand`` has been removed. This was deprecated in NumPy 1.11
and has been replaced by ``np.random.rand``.
* Class ``SafeEval`` in ``numpy/lib/utils.py`` has been removed.
This was deprecated in NumPy 1.10. Use ``np.safe_eval`` instead.
* Remove deprecated support for boolean and empty condition lists in
``np.select``
* Array order only accepts 'C', 'F', 'A', and 'K'. More permissive options
were deprecated in NumPy 1.11.
* np.linspace parameter ``num`` must be an integer. Deprecated in NumPy 1.12.
* UFuncs with multiple outputs must use a tuple for the ``out`` kwarg. This
finishes a deprecation started in NumPy 1.10.
* The files ``numpy/testing/decorators.py``, ``numpy/testing/noseclasses.py``
and ``numpy/testing/nosetester.py`` have been removed. They were never
meant to be public (all relevant objects are present in the
``numpy.testing`` namespace), and importing them has given a deprecation
warning since NumPy 1.15.0
+ Compatibility notes
* `numpy.lib.recfunctions.drop_fields` can no longer return None
* ``numpy.argmin/argmax/min/max`` returns ``NaT`` if it exists in array
* ``np.can_cast(np.uint64, np.timedelta64, casting='safe')`` is now ``False``
* Changed random variate stream from ``numpy.random.Generator.integers``
* Add more ufunc loops for ``datetime64``, ``timedelta64``
* Moved modules in ``numpy.random``
+ C API changes
* ``PyDataType_ISUNSIZED(descr)`` now returns False for structured datatypes
+ New Features
* Add our own ``*.pxd`` cython import file
* A tuple of axes can now be input to ``expand_dims``
* Support for 64-bit OpenBLAS
* Add ``--f2cmap`` option to F2PY
+ Improvements
* Different C numeric types of the same size have unique names
* ``argwhere`` now produces a consistent result on 0d arrays
* Add ``axis`` argument for ``random.permutation`` and ``random.shuffle``
* ``method`` keyword argument for ``np.random.multivariate_normal``
* Add complex number support for ``numpy.fromstring``
* ``numpy.unique`` has consistent axes order when ``axis`` is not None
* ``numpy.matmul`` with boolean output now converts to boolean values
* ``numpy.random.randint`` produced incorrect value when the range was ``2**32``
* Add complex number support for ``numpy.fromfile``
* ``std=c99`` added if compiler is named ``gcc``
+ Changes
* ``NaT`` now sorts to the end of arrays
* Incorrect ``threshold`` in ``np.set_printoptions`` raises ``TypeError`` or ``ValueError``
* Warn when saving a dtype with metadata
* ``numpy.distutils`` append behavior changed for LDFLAGS and similar
* Remove ``numpy.random.entropy`` without a deprecation
* Add options to quiet build configuration and build with ``-Werror``
OBS-URL: https://build.opensuse.org/request/show/761226
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-numpy?expand=0&rev=47
2020-01-07 07:39:50 +01:00
|
|
|
%if %{with hpc}
|
2017-10-20 14:38:55 +02:00
|
|
|
|
2021-01-17 08:22:09 +01:00
|
|
|
%define hpc_module_pname ${python_flavor}-numpy
|
2017-10-20 14:38:55 +02:00
|
|
|
%{python_expand # Don't package testsuite
|
2021-01-17 08:22:09 +01:00
|
|
|
python_flavor=`cat _current_flavor`
|
2017-10-20 14:38:55 +02:00
|
|
|
sitesearch_path=`$python -c "import sysconfig as s; print(s.get_paths(vars={'platbase':'%{hpc_prefix}','base':'%{hpc_prefix}'}).get('platlib'))"`
|
|
|
|
rm -rf %{buildroot}${sitesearch_path}/numpy/{,core,distutils,f2py,fft,lib,linalg,ma,matrixlib,oldnumeric,polynomial,random,testing}/tests
|
|
|
|
%hpc_write_modules_files
|
|
|
|
#%%Module1.0#####################################################################
|
|
|
|
|
|
|
|
proc ModulesHelp { } {
|
|
|
|
|
|
|
|
puts stderr " "
|
|
|
|
puts stderr "This module loads the %{pname} library built with the %{compiler_family} compiler"
|
|
|
|
puts stderr "toolchain."
|
|
|
|
puts stderr "\nVersion %{version}\n"
|
|
|
|
|
|
|
|
}
|
|
|
|
module-whatis "Name: %{pname} built with %{compiler_family} compiler"
|
|
|
|
module-whatis "Version: %{version}"
|
|
|
|
module-whatis "Category: python module"
|
2018-02-13 10:26:18 +01:00
|
|
|
module-whatis "Description: %{SUMMARY:0}"
|
2017-10-20 14:38:55 +02:00
|
|
|
module-whatis "URL %{url}"
|
|
|
|
|
|
|
|
set version %{version}
|
|
|
|
|
|
|
|
if [ expr [ module-info mode load ] || [module-info mode display ] ] {
|
|
|
|
if { ![is-loaded intel] && ![is-loaded openblas] } {
|
|
|
|
module load openblas
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
prepend-path PATH %{hpc_bindir}
|
|
|
|
prepend-path PYTHONPATH ${sitesearch_path}
|
|
|
|
|
2019-09-26 10:39:18 +02:00
|
|
|
setenv %{hpc_upcase_trans_hyph %{pname}}_DIR %{hpc_prefix}
|
|
|
|
setenv %{hpc_upcase_trans_hyph %{pname}}_BIN %{hpc_bindir}
|
2017-10-20 14:38:55 +02:00
|
|
|
|
2017-11-23 09:34:11 +01:00
|
|
|
family "NumPy"
|
2017-10-20 14:38:55 +02:00
|
|
|
EOF
|
|
|
|
}
|
Accepting request 761226 from home:TheBlackCat:branches:devel:languages:python:numeric
- update to version 1.18.0:
+ Highlights
* The C-API for ``numpy.random`` has been defined and documented.
* Basic infrastructure for linking with 64 bit BLAS and LAPACK libraries.
* Many documentation improvements.
+ New functions
* Multivariate hypergeometric distribution added to ``numpy.random``
+ Deprecations
* ``np.fromfile`` and ``np.fromstring`` will error on bad data
* Deprecate non-scalar arrays as fill values in ``ma.fill_value``
* Deprecate ``PyArray_As1D``, ``PyArray_As2D``
* Deprecate ``np.alen``
* Deprecate the financial functions
* The ``axis`` argument to ``numpy.ma.mask_cols`` and ``numpy.ma.mask_row`` is deprecated
+ Expired deprecations
* ``PyArray_As1D`` and ``PyArray_As2D`` have been removed in favor of
``PyArray_AsCArray``
* ``np.rank`` has been removed. This was deprecated in NumPy 1.10
and has been replaced by ``np.ndim``.
* The deprecation of ``expand_dims`` out-of-range axes in 1.13.0 has
expired.
* ``PyArray_FromDimsAndDataAndDescr`` and ``PyArray_FromDims`` have been
removed (they will always raise an error). Use ``PyArray_NewFromDescr``
and ``PyArray_SimpleNew`` instead.
* ``numeric.loads``, ``numeric.load``, ``np.ma.dump``,
``np.ma.dumps``, ``np.ma.load``, ``np.ma.loads`` are removed,
use ``pickle`` methods instead
* ``arrayprint.FloatFormat``, ``arrayprint.LongFloatFormat`` has been removed,
use ``FloatingFormat`` instead
* ``arrayprint.ComplexFormat``, ``arrayprint.LongComplexFormat`` has been
removed, use ``ComplexFloatingFormat`` instead
* ``arrayprint.StructureFormat`` has been removed, use ``StructureVoidFormat``
instead
* ``np.testing.rand`` has been removed. This was deprecated in NumPy 1.11
and has been replaced by ``np.random.rand``.
* Class ``SafeEval`` in ``numpy/lib/utils.py`` has been removed.
This was deprecated in NumPy 1.10. Use ``np.safe_eval`` instead.
* Remove deprecated support for boolean and empty condition lists in
``np.select``
* Array order only accepts 'C', 'F', 'A', and 'K'. More permissive options
were deprecated in NumPy 1.11.
* np.linspace parameter ``num`` must be an integer. Deprecated in NumPy 1.12.
* UFuncs with multiple outputs must use a tuple for the ``out`` kwarg. This
finishes a deprecation started in NumPy 1.10.
* The files ``numpy/testing/decorators.py``, ``numpy/testing/noseclasses.py``
and ``numpy/testing/nosetester.py`` have been removed. They were never
meant to be public (all relevant objects are present in the
``numpy.testing`` namespace), and importing them has given a deprecation
warning since NumPy 1.15.0
+ Compatibility notes
* `numpy.lib.recfunctions.drop_fields` can no longer return None
* ``numpy.argmin/argmax/min/max`` returns ``NaT`` if it exists in array
* ``np.can_cast(np.uint64, np.timedelta64, casting='safe')`` is now ``False``
* Changed random variate stream from ``numpy.random.Generator.integers``
* Add more ufunc loops for ``datetime64``, ``timedelta64``
* Moved modules in ``numpy.random``
+ C API changes
* ``PyDataType_ISUNSIZED(descr)`` now returns False for structured datatypes
+ New Features
* Add our own ``*.pxd`` cython import file
* A tuple of axes can now be input to ``expand_dims``
* Support for 64-bit OpenBLAS
* Add ``--f2cmap`` option to F2PY
+ Improvements
* Different C numeric types of the same size have unique names
* ``argwhere`` now produces a consistent result on 0d arrays
* Add ``axis`` argument for ``random.permutation`` and ``random.shuffle``
* ``method`` keyword argument for ``np.random.multivariate_normal``
* Add complex number support for ``numpy.fromstring``
* ``numpy.unique`` has consistent axes order when ``axis`` is not None
* ``numpy.matmul`` with boolean output now converts to boolean values
* ``numpy.random.randint`` produced incorrect value when the range was ``2**32``
* Add complex number support for ``numpy.fromfile``
* ``std=c99`` added if compiler is named ``gcc``
+ Changes
* ``NaT`` now sorts to the end of arrays
* Incorrect ``threshold`` in ``np.set_printoptions`` raises ``TypeError`` or ``ValueError``
* Warn when saving a dtype with metadata
* ``numpy.distutils`` append behavior changed for LDFLAGS and similar
* Remove ``numpy.random.entropy`` without a deprecation
* Add options to quiet build configuration and build with ``-Werror``
OBS-URL: https://build.opensuse.org/request/show/761226
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-numpy?expand=0&rev=47
2020-01-07 07:39:50 +01:00
|
|
|
|
2017-06-20 11:00:48 +02:00
|
|
|
%endif
|
2009-02-12 04:52:59 +01:00
|
|
|
|
2019-02-19 13:53:12 +01:00
|
|
|
%check
|
2022-12-20 07:18:27 +01:00
|
|
|
# https://numpy.org/doc/stable/dev/development_environment.html#running-tests
|
2019-02-20 11:57:42 +01:00
|
|
|
%if %{without hpc}
|
2019-09-26 10:39:18 +02:00
|
|
|
export PATH="%{buildroot}%{_bindir}:$PATH"
|
2021-12-09 23:23:44 +01:00
|
|
|
|
|
|
|
mkdir -p testing
|
|
|
|
cp pytest.ini testing/
|
2019-09-26 10:39:18 +02:00
|
|
|
pushd testing
|
2021-12-09 23:23:44 +01:00
|
|
|
|
2021-01-17 08:22:09 +01:00
|
|
|
# flaky tests
|
|
|
|
test_failok+=" or test_structured_object_indexing"
|
|
|
|
test_failok+=" or test_structured_object_item_setting"
|
2022-12-20 07:18:27 +01:00
|
|
|
# flaky due to memory consumption
|
|
|
|
test_failok+=" or test_big_arrays"
|
|
|
|
# gh#numpy/numpy#22825
|
|
|
|
test_failok+=" or TestPrintOptions"
|
|
|
|
# gh#numpy/numpy#22835
|
|
|
|
test_failok+=" or test_keepdims_out"
|
2020-06-30 15:24:12 +02:00
|
|
|
# boo#1148173 gh#numpy/numpy#14438
|
|
|
|
%ifarch ppc64 ppc64le
|
2021-01-17 08:22:09 +01:00
|
|
|
test_failok+=" or test_generalized_sq"
|
2023-03-10 09:51:25 +01:00
|
|
|
# situation with IBM and double numbers is ... complicated
|
|
|
|
# gh#numpy/numpy#21094
|
|
|
|
test_failok+=" or test_ppc64_ibm_double_double128"
|
2020-06-30 15:24:12 +02:00
|
|
|
%endif
|
2021-02-10 22:14:05 +01:00
|
|
|
# these tests fail on big endian gh#numpy/numpy#11831
|
|
|
|
%ifarch s390x ppc ppc64
|
|
|
|
test_failok+=" or TestF77ReturnCharacter"
|
|
|
|
test_failok+=" or TestF90ReturnCharacter"
|
|
|
|
%endif
|
2022-12-20 07:18:27 +01:00
|
|
|
# missing instruction set
|
|
|
|
%ifarch s390x
|
|
|
|
test_failok+=" or test_truncate_f32"
|
|
|
|
%endif
|
2022-10-10 09:22:04 +02:00
|
|
|
%ifarch %{ix86}
|
2021-02-10 22:14:05 +01:00
|
|
|
# (arm 32-bit seems okay here)
|
2021-05-07 23:21:51 +02:00
|
|
|
# gh#numpy/numpy#18387
|
2021-02-10 22:14:05 +01:00
|
|
|
test_failok+=" or test_pareto"
|
|
|
|
# gh#numpy/numpy#18388
|
|
|
|
test_failok+=" or test_float_remainder_overflow"
|
|
|
|
%endif
|
2022-12-20 07:18:27 +01:00
|
|
|
%ifarch %{ix86} %{arm32}
|
|
|
|
# too much memory for 32bit
|
|
|
|
test_failok+=" or test_identityless_reduction_huge_array"
|
|
|
|
test_failok+=" or test_huge_vectordot"
|
|
|
|
# invalid int type for 32bit
|
|
|
|
test_failok+=" or (test_kind and test_all)"
|
|
|
|
%endif
|
2021-11-11 09:31:55 +01:00
|
|
|
%ifarch riscv64
|
|
|
|
# These tests fail due to non-portable assumptions about the signbit of NaN
|
|
|
|
# gh#numpy/numpy#8213
|
|
|
|
test_failok+=" or test_fpclass"
|
|
|
|
test_failok+=" or test_float"
|
|
|
|
%endif
|
2021-12-09 23:23:44 +01:00
|
|
|
|
|
|
|
echo "
|
|
|
|
import sys
|
|
|
|
import numpy
|
2022-12-20 07:18:27 +01:00
|
|
|
r = numpy.test(label='full', verbose=2,
|
|
|
|
extra_argv=['-v', '-n', 'auto', '-k'] + sys.argv[1:])
|
|
|
|
sys.exit(0 if r else 1)
|
2021-12-09 23:23:44 +01:00
|
|
|
" > runobstest.py
|
|
|
|
|
2020-11-30 16:01:32 +01:00
|
|
|
%{python_expand # for all python3 flavors
|
|
|
|
export PYTHONPATH=%{buildroot}%{$python_sitearch}
|
|
|
|
export PYTHONDONTWRITEBYTECODE=1
|
2021-12-09 23:23:44 +01:00
|
|
|
[ -n "$test_failok" ] && $python runobstest.py "${test_failok:4}" ||:
|
2022-12-20 07:18:27 +01:00
|
|
|
# test_new_policy: duplicates test runs and output and does not follow our deselection
|
|
|
|
$python runobstest.py "not (test_new_policy ${test_failok})"
|
2020-11-30 16:01:32 +01:00
|
|
|
}
|
2021-12-09 23:23:44 +01:00
|
|
|
|
2019-09-26 10:39:18 +02:00
|
|
|
popd
|
2019-02-20 11:57:42 +01:00
|
|
|
%endif
|
2020-10-08 20:09:39 +02:00
|
|
|
|
2021-10-12 09:12:08 +02:00
|
|
|
%if %{without hpc}
|
2021-10-06 02:24:58 +02:00
|
|
|
%pre
|
|
|
|
# If libalternatives is used: Removing old update-alternatives entries.
|
|
|
|
%python_libalternatives_reset_alternative f2py
|
|
|
|
|
2020-04-06 23:42:47 +02:00
|
|
|
%post
|
2020-04-07 15:08:50 +02:00
|
|
|
%python_install_alternative f2py
|
2020-04-06 23:42:47 +02:00
|
|
|
|
|
|
|
%postun
|
2020-04-07 15:08:50 +02:00
|
|
|
%python_uninstall_alternative f2py
|
|
|
|
%endif
|
2020-04-06 23:42:47 +02:00
|
|
|
|
2017-04-19 18:08:20 +02:00
|
|
|
%files %{python_files}
|
2019-07-29 10:45:51 +02:00
|
|
|
%doc README.md THANKS.txt
|
2019-04-01 12:17:32 +02:00
|
|
|
%if %{without hpc}
|
2020-04-07 15:59:46 +02:00
|
|
|
%python_alternative %{_bindir}/f2py
|
2020-11-30 16:01:32 +01:00
|
|
|
%if "%{python_flavor}" == "python3" || "%{python_provides}" == "python3"
|
|
|
|
%{_bindir}/f2py3
|
2022-12-20 07:18:27 +01:00
|
|
|
%else
|
|
|
|
%exclude %{_bindir}/f2py3
|
2020-11-30 16:01:32 +01:00
|
|
|
%endif
|
|
|
|
%{_bindir}/f2py%{python_bin_suffix}
|
2019-04-01 12:17:32 +02:00
|
|
|
%{python_sitearch}/numpy/
|
|
|
|
%{python_sitearch}/numpy-%{version}-py*.egg-info
|
2019-07-29 10:45:51 +02:00
|
|
|
%license %{python_sitearch}/numpy/LICENSE.txt
|
|
|
|
%exclude %{python_sitearch}/numpy/core/include/
|
2021-02-10 22:14:05 +01:00
|
|
|
%exclude %{python_sitearch}/numpy/distutils/mingw/*.c
|
|
|
|
%exclude %{python_sitearch}/numpy/distutils/checks/*.c
|
2019-07-29 10:45:51 +02:00
|
|
|
%exclude %{python_sitearch}/numpy/f2py/src/
|
2019-04-01 12:17:32 +02:00
|
|
|
%exclude %{python_sitearch}/numpy/core/lib/libnpymath.a
|
2021-01-17 08:22:09 +01:00
|
|
|
%exclude %{python_sitearch}/numpy/random/lib/libnpyrandom.a
|
2019-04-01 12:17:32 +02:00
|
|
|
%else
|
2020-11-30 16:01:32 +01:00
|
|
|
%if "%{python_flavor}" == "python3" || "%{python_provides}" == "python3"
|
|
|
|
%{p_bindir}/f2py
|
|
|
|
%{p_bindir}/f2py3
|
2022-12-20 07:18:27 +01:00
|
|
|
%else
|
|
|
|
%exclude %{p_bindir}/f2py
|
|
|
|
%exclude %{p_bindir}/f2py3
|
2020-11-30 16:01:32 +01:00
|
|
|
%endif
|
|
|
|
%{p_bindir}/f2py%{python_bin_suffix}
|
2017-10-20 14:38:55 +02:00
|
|
|
%{p_python_sitearch}/numpy/
|
|
|
|
%{p_python_sitearch}/numpy-%{version}-py*.egg-info
|
2019-07-29 10:45:51 +02:00
|
|
|
%license %{p_python_sitearch}/numpy/LICENSE.txt
|
|
|
|
%exclude %{p_python_sitearch}/numpy/core/include/
|
2017-10-20 14:38:55 +02:00
|
|
|
%exclude %{p_python_sitearch}/numpy/core/lib/libnpymath.a
|
2021-01-17 08:22:09 +01:00
|
|
|
%exclude %{p_python_sitearch}/numpy/random/lib/libnpyrandom.a
|
2021-02-10 22:14:05 +01:00
|
|
|
%exclude %{p_python_sitearch}/numpy/distutils/mingw/*.c
|
|
|
|
%exclude %{p_python_sitearch}/numpy/distutils/checks/*.c
|
2019-07-29 10:45:51 +02:00
|
|
|
%exclude %{p_python_sitearch}/numpy/f2py/src/
|
2019-04-01 12:17:32 +02:00
|
|
|
%endif
|
2017-10-20 14:38:55 +02:00
|
|
|
|
|
|
|
%if %{with hpc}
|
2021-01-17 08:22:09 +01:00
|
|
|
%define hpc_module_pname %{python_flavor}-numpy
|
2017-10-20 14:38:55 +02:00
|
|
|
%{hpc_modules_files}
|
|
|
|
%{hpc_dirs}
|
2019-09-26 10:39:18 +02:00
|
|
|
%dir %{hpc_bindir}
|
2017-10-20 14:38:55 +02:00
|
|
|
%dir %{hpc_libdir}/python%{hpc_python_version}
|
|
|
|
%dir %{p_python_sitearch}
|
|
|
|
%endif
|
2010-03-05 15:57:57 +01:00
|
|
|
|
2017-04-19 18:08:20 +02:00
|
|
|
%files %{python_files devel}
|
2019-02-20 10:29:00 +01:00
|
|
|
%license LICENSE.txt
|
2019-04-01 12:17:32 +02:00
|
|
|
%if %{without hpc}
|
2019-07-29 10:45:51 +02:00
|
|
|
%{python_sitearch}/numpy/core/include/
|
2021-02-10 22:14:05 +01:00
|
|
|
%{python_sitearch}/numpy/distutils/mingw/*.c
|
|
|
|
%{python_sitearch}/numpy/distutils/checks/*.c
|
2019-07-29 10:45:51 +02:00
|
|
|
%{python_sitearch}/numpy/f2py/src/
|
2019-04-01 12:17:32 +02:00
|
|
|
%{python_sitearch}/numpy/core/lib/libnpymath.a
|
2021-01-17 08:22:09 +01:00
|
|
|
%{python_sitearch}/numpy/random/lib/libnpyrandom.a
|
2019-04-01 12:17:32 +02:00
|
|
|
%else
|
2019-07-29 10:45:51 +02:00
|
|
|
%{p_python_sitearch}/numpy/core/include/
|
2017-10-20 14:38:55 +02:00
|
|
|
%{p_python_sitearch}/numpy/core/lib/libnpymath.a
|
2021-01-17 08:22:09 +01:00
|
|
|
%{p_python_sitearch}/numpy/random/lib/libnpyrandom.a
|
2021-02-10 22:14:05 +01:00
|
|
|
%{p_python_sitearch}/numpy/distutils/mingw/*.c
|
|
|
|
%{p_python_sitearch}/numpy/distutils/checks/*.c
|
2019-07-29 10:45:51 +02:00
|
|
|
%{p_python_sitearch}/numpy/f2py/src/
|
2019-04-01 12:17:32 +02:00
|
|
|
%endif
|
2009-02-12 04:52:59 +01:00
|
|
|
|
|
|
|
%changelog
|