SHA256
1
0
forked from pool/python-numpy

21 Commits

Author SHA256 Message Date
f62ea266b2 Accepting request 1266567 from devel:languages:python:numeric
OBS-URL: https://build.opensuse.org/request/show/1266567
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-numpy?expand=0&rev=138
2025-04-03 14:46:02 +00:00
cf9407f14c - Disable and remove support of gnu-hpc build flavours (bsc#1239982)
Hopefully this answers your comment from the previous SR.
Also, Egbert has agreed to move forward with the drop.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-numpy?expand=0&rev=184
2025-04-02 13:55:07 +00:00
c0e6a1a4c7 Accepting request 1254141 from devel:languages:python:numeric
OBS-URL: https://build.opensuse.org/request/show/1254141
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-numpy?expand=0&rev=137
2025-03-21 19:21:26 +00:00
8fc76b3557 looks like I managed to patch numba
- Update to 2.2.2
  * New functions matvec and vecmat
  * Many improved annotations
  * Improved support for the new StringDType
  * Improved support for free threaded Python
  * Fixes for f2py
  ## Deprecations
  * _add_newdoc_ufunc is now deprecated. ufunc.__doc__ = newdoc should 
    be used instead.
  ## Expired deprecations
  * bool(np.array([])) and other empty arrays will now raise an error. 
    Use arr.size > 0 instead to check whether an array has no elements.
  ## Compatibility notes
  * numpy.cov now properly transposes single-row (2d array) design 
    matrices when rowvar=False. Previously, single-row design matrices 
    would return a scalar in this scenario, which is not correct, so 
    this is a behavior change and an array of the appropriate shape 
    will now be returned.
  ## New Features
  * New functions for matrix-vector and vector-matrix products
  * np.complexfloating[T, T] can now also be written as np.complexfloating[T]
  * UFuncs now support __dict__ attribute and allow overriding __doc__ 
    (either directly or via ufunc.__dict__["__doc__"]). __dict__ can be 
    used to also override other properties, such as __module__ or 
    __qualname__.
  * The “nbit” type parameter of np.number and its subtypes now defaults 
    to typing.Any. This way, type-checkers will infer annotations such 
    as x: np.floating as x: np.floating[Any], even in strict mode.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-numpy?expand=0&rev=182
2025-03-18 13:28:14 +00:00
5b86ce5e4d Accepting request 1245658 from devel:languages:python:numeric
OBS-URL: https://build.opensuse.org/request/show/1245658
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-numpy?expand=0&rev=136
2025-02-14 18:19:32 +00:00
5d3f5395f7 Avoid writing non-deterministic .pyc files during build for reproducible builds
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-numpy?expand=0&rev=180
2025-02-13 13:56:07 +00:00
ca90e3c8a7 Accepting request 1225917 from devel:languages:python:numeric
- Add update-meson-1_5_2.patch (gh#numpy/numpy#27531)
- Skip failing test test_api_importable

OBS-URL: https://build.opensuse.org/request/show/1225917
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-numpy?expand=0&rev=135
2024-11-26 19:55:17 +00:00
32cea0c587 - Skip failing test test_api_importable
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-numpy?expand=0&rev=178
2024-11-22 23:44:04 +00:00
9e8139f90c update the patch
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-numpy?expand=0&rev=177
2024-11-22 22:56:18 +00:00
79e298ad04 - Add update-meson-1_5_2.patch (gh#numpy/numpy#27531)
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-numpy?expand=0&rev=176
2024-11-22 22:41:51 +00:00
6e199229d3 Accepting request 1224919 from devel:languages:python:numeric
OBS-URL: https://build.opensuse.org/request/show/1224919
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-numpy?expand=0&rev=134
2024-11-20 15:59:12 +00:00
bec1d9ad74 - Revert the switch to openblas, should skip test instead
* see discussion at gh#scipy/scipy#21475

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-numpy?expand=0&rev=174
2024-11-18 17:24:47 +00:00
04389342d2 Accepting request 1221641 from home:rrahl0
- update to 2.1.3:
  * #27512: MAINT: prepare 2.1.x for further development
  * #27537: MAINT: Bump actions/cache from 4.0.2 to 4.1.1
  * #27538: MAINT: Bump pypa/cibuildwheel from 2.21.2 to 2.21.3
  * #27539: MAINT: MSVC does not support #warning directive
  * #27543: BUG: Fix user dtype can-cast with python scalar during promotion
  * #27561: DEV: bump python to 3.12 in environment.yml
  * #27562: BLD: update vendored Meson to 1.5.2
  * #27563: BUG: weighted quantile for some zero weights (#27549)
  * #27565: MAINT: Use miniforge for macos conda test.
  * #27566: BUILD: satisfy gcc-13 pendantic errors
  * #27569: BUG: handle possible error for PyTraceMallocTrack
  * #27570: BLD: start building Windows free-threaded wheels [wheel build]
  * #27571: BUILD: vendor tempita from Cython
  * #27574: BUG: Fix warning "differs in levels of indirection" in npy_atomic.h...
  * #27592: MAINT: Update Highway to latest
  * #27593: BUG: Adjust numpy.i for SWIG 4.3 compatibility
  * #27616: BUG: Fix Linux QEMU CI workflow
  * #27668: BLD: Do not set __STDC_VERSION__ to zero during build
  * #27669: ENH: fix wasm32 runtime type error in numpy._core
  * #27672: BUG: Fix a reference count leak in npy_find_descr_for_scalar.
  * #27673: BUG: fixes for StringDType/unicode promoters

OBS-URL: https://build.opensuse.org/request/show/1221641
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-numpy?expand=0&rev=173
2024-11-06 10:32:43 +00:00
e5e258441f Accepting request 1219343 from home:Guillaume_G:branches:devel:languages:python:numeric
- Use openblas instead of blas+lapack due to precision problems
  with scipy on aarch64 - https://github.com/scipy/scipy/issues/21475#issuecomment-2446077407

OBS-URL: https://build.opensuse.org/request/show/1219343
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-numpy?expand=0&rev=172
2024-10-30 16:09:11 +00:00
079cc09df6 Accepting request 1218079 from devel:languages:python:numeric
OBS-URL: https://build.opensuse.org/request/show/1218079
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-numpy?expand=0&rev=133
2024-10-25 17:19:20 +00:00
9350058396 - Build with latest gcc for Leap 16.0
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-numpy?expand=0&rev=170
2024-10-24 15:05:46 +00:00
950e7d4a41 Accepting request 1217136 from devel:languages:python:numeric
OBS-URL: https://build.opensuse.org/request/show/1217136
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-numpy?expand=0&rev=132
2024-10-23 19:07:54 +00:00
869ea14cd3 - update to 2.1.2
* #27333: MAINT: prepare 2.1.x for further development
  * #27400: BUG: apply critical sections around populating the dispatch cache
  * #27406: BUG: Stub out get_build_msvc_version if distutils.msvccompiler...
  * #27416: BUILD: fix missing include for std::ptrdiff_t for C++23 language...
  * #27433: BLD: pin setuptools to avoid breaking numpy.distutils
  * #27437: BUG: Allow unsigned shift argument for np.roll
  * #27439: BUG: Disable SVE VQSort
  * #27471: BUG: rfftn axis bug
  * #27479: BUG: Fix extra decref of PyArray_UInt8DType.
  * #27480: CI: use PyPI not scientific-python-nightly-wheels for CI doc...
  * #27481: MAINT: Check for SVE support on demand
  * #27484: BUG: initialize the promotion state to be weak
  * #27501: MAINT: Bump pypa/cibuildwheel from 2.20.0 to 2.21.2
  * #27506: BUG: avoid segfault on bad arguments in ndarray.__array_function__

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-numpy?expand=0&rev=168
2024-10-23 03:03:14 +00:00
c47dae8375 Accepting request 1199620 from devel:languages:python:numeric
OBS-URL: https://build.opensuse.org/request/show/1199620
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-numpy?expand=0&rev=131
2024-09-17 16:17:29 +00:00
50e9cfbf6b - Update to 2.1.1
* #27259: BUG: revert unintended change in the return value of
    set_printoptions
  * #27266: BUG: fix reference counting bug in __array_interface__
    implementation...
  * #27267: TST: Add regression test for missing descr in
    array-interface
  * #27276: BUG: Fix #27256 and #27257
  * #27278: BUG: Fix array_equal for numeric and non-numeric scalar
    types
  * #27304: BUG: f2py: better handle filtering of public/private
    subroutines

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-numpy?expand=0&rev=166
2024-09-09 08:31:32 +00:00
adcc16f741 Accepting request 1198038 from home:bnavigator:branches:devel:languages:python:numeric
- Update to 2.1.0
  * Support for Python 3.13.
  * Preliminary support for free threaded Python 3.13.
  * Support for the array-api 2023.12 standard.
  ## New functions
  * A new function np.unstack(array, axis=...) was added, which
    splits an array into a tuple of arrays along an axis. It serves
    as the inverse of numpy.stack. (gh-26579)
  ## Deprecations
  * The fix_imports keyword argument in numpy.save is deprecated.
    Since NumPy 1.17, numpy.save uses a pickle protocol that no
    longer supports Python 2, and ignored fix_imports keyword. This
    keyword is kept only for backward compatibility. It is now
    deprecated. (gh-26452)
  * Passing non-integer inputs as the first argument of bincount is
    now deprecated, because such inputs are silently cast to
    integers with no warning about loss of precision. (gh-27076)
  ## Expired deprecations
  * Scalars and 0D arrays are disallowed for numpy.nonzero and
    numpy.ndarray.nonzero. (gh-26268)
  * set_string_function internal function was removed and
    PyArray_SetStringFunction was stubbed out. (gh-26611)
  ## C API changes
  * API symbols now hidden but customizable
  * Many shims removed from npy_3kcompat.h
  * New PyUFuncObject field process_core_dims_func
  ## New Features
  * Preliminary Support for Free-Threaded CPython 3.13
  * f2py can generate freethreading-compatible C extensions
  ## Improvements
  * histogram auto-binning now returns bin sizes >=1 for integer
    input data
  * ndarray shape-type parameter is now covariant and bound to
    tuple[int, ...]
  * np.quantile with method closest_observation chooses nearest
    even order statistic
  * lapack_lite is now thread safe
  * The numpy.printoptions context manager is now thread and
    async-safe
  * Type hinting numpy.polynomial
  * Improved numpy.dtypes type hints
  ## Performance improvements and changes
  * ma.cov and ma.corrcoef are now significantly faster
  ## Changes
  * ma.corrcoef may return a slightly different result
  * Cast-safety fixes in copyto and full
- Release 2.0.1
  ## Improvements
  * np.quantile with method closest_observation chooses nearest
    even order statistic

OBS-URL: https://build.opensuse.org/request/show/1198038
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-numpy?expand=0&rev=165
2024-08-31 12:31:00 +00:00
6 changed files with 813 additions and 190 deletions

View File

@@ -1,3 +0,0 @@
<multibuild>
<package>gnu-hpc</package>
</multibuild>

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:cf5d1c9e6837f8af9f92b6bd3e86d513cdc11f60fd62185cc49ec7d1aba34864
size 18326228

BIN
numpy-2.2.2.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@@ -1,3 +1,184 @@
-------------------------------------------------------------------
Mon Mar 24 16:06:08 UTC 2025 - Nicolas Morey <nicolas.morey@suse.com>
- Disable and remove support of gnu-hpc build flavours (bsc#1239982)
-------------------------------------------------------------------
Mon Feb 24 16:32:10 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Update to 2.2.2
* New functions matvec and vecmat
* Many improved annotations
* Improved support for the new StringDType
* Improved support for free threaded Python
* Fixes for f2py
## Deprecations
* _add_newdoc_ufunc is now deprecated. ufunc.__doc__ = newdoc should
be used instead.
## Expired deprecations
* bool(np.array([])) and other empty arrays will now raise an error.
Use arr.size > 0 instead to check whether an array has no elements.
## Compatibility notes
* numpy.cov now properly transposes single-row (2d array) design
matrices when rowvar=False. Previously, single-row design matrices
would return a scalar in this scenario, which is not correct, so
this is a behavior change and an array of the appropriate shape
will now be returned.
## New Features
* New functions for matrix-vector and vector-matrix products
* np.complexfloating[T, T] can now also be written as np.complexfloating[T]
* UFuncs now support __dict__ attribute and allow overriding __doc__
(either directly or via ufunc.__dict__["__doc__"]). __dict__ can be
used to also override other properties, such as __module__ or
__qualname__.
* The “nbit” type parameter of np.number and its subtypes now defaults
to typing.Any. This way, type-checkers will infer annotations such
as x: np.floating as x: np.floating[Any], even in strict mode.
-------------------------------------------------------------------
Wed Feb 12 16:55:08 UTC 2025 - Bernhard Wiedemann <bwiedemann@suse.com>
- Avoid writing non-deterministic .pyc files during build
for reproducible builds
-------------------------------------------------------------------
Fri Nov 22 22:33:50 UTC 2024 - Matej Cepl <mcepl@cepl.eu>
- Add update-meson-1_5_2.patch (gh#numpy/numpy#27531)
- Skip failing test test_api_importable
-------------------------------------------------------------------
Mon Nov 18 17:23:11 UTC 2024 - Ben Greiner <code@bnavigator.de>
- Revert the switch to openblas, should skip test instead
* see discussion at gh#scipy/scipy#21475
-------------------------------------------------------------------
Tue Nov 5 01:59:21 UTC 2024 - Richard Rahl <rrahl0@opensuse.org>
- update to 2.1.3:
* #27512: MAINT: prepare 2.1.x for further development
* #27537: MAINT: Bump actions/cache from 4.0.2 to 4.1.1
* #27538: MAINT: Bump pypa/cibuildwheel from 2.21.2 to 2.21.3
* #27539: MAINT: MSVC does not support #warning directive
* #27543: BUG: Fix user dtype can-cast with python scalar during promotion
* #27561: DEV: bump python to 3.12 in environment.yml
* #27562: BLD: update vendored Meson to 1.5.2
* #27563: BUG: weighted quantile for some zero weights (#27549)
* #27565: MAINT: Use miniforge for macos conda test.
* #27566: BUILD: satisfy gcc-13 pendantic errors
* #27569: BUG: handle possible error for PyTraceMallocTrack
* #27570: BLD: start building Windows free-threaded wheels [wheel build]
* #27571: BUILD: vendor tempita from Cython
* #27574: BUG: Fix warning "differs in levels of indirection" in npy_atomic.h...
* #27592: MAINT: Update Highway to latest
* #27593: BUG: Adjust numpy.i for SWIG 4.3 compatibility
* #27616: BUG: Fix Linux QEMU CI workflow
* #27668: BLD: Do not set __STDC_VERSION__ to zero during build
* #27669: ENH: fix wasm32 runtime type error in numpy._core
* #27672: BUG: Fix a reference count leak in npy_find_descr_for_scalar.
* #27673: BUG: fixes for StringDType/unicode promoters
-------------------------------------------------------------------
Wed Oct 30 07:43:06 UTC 2024 - Guillaume GARDET <guillaume.gardet@opensuse.org>
- Use openblas instead of blas+lapack due to precision problems
with scipy on aarch64 - https://github.com/scipy/scipy/issues/21475#issuecomment-2446077407
-------------------------------------------------------------------
Thu Oct 24 12:21:00 UTC 2024 - Daniel Garcia <daniel.garcia@suse.com>
- Build with latest gcc for Leap 16.0
-------------------------------------------------------------------
Mon Oct 21 06:52:58 UTC 2024 - Richard Rahl <rrahl0@opensuse.org>
- update to 2.1.2
* #27333: MAINT: prepare 2.1.x for further development
* #27400: BUG: apply critical sections around populating the dispatch cache
* #27406: BUG: Stub out get_build_msvc_version if distutils.msvccompiler...
* #27416: BUILD: fix missing include for std::ptrdiff_t for C++23 language...
* #27433: BLD: pin setuptools to avoid breaking numpy.distutils
* #27437: BUG: Allow unsigned shift argument for np.roll
* #27439: BUG: Disable SVE VQSort
* #27471: BUG: rfftn axis bug
* #27479: BUG: Fix extra decref of PyArray_UInt8DType.
* #27480: CI: use PyPI not scientific-python-nightly-wheels for CI doc...
* #27481: MAINT: Check for SVE support on demand
* #27484: BUG: initialize the promotion state to be weak
* #27501: MAINT: Bump pypa/cibuildwheel from 2.20.0 to 2.21.2
* #27506: BUG: avoid segfault on bad arguments in ndarray.__array_function__
-------------------------------------------------------------------
Fri Sep 6 18:35:18 UTC 2024 - Ben Greiner <code@bnavigator.de>
- Update to 2.1.1
* #27259: BUG: revert unintended change in the return value of
set_printoptions
* #27266: BUG: fix reference counting bug in __array_interface__
implementation...
* #27267: TST: Add regression test for missing descr in
array-interface
* #27276: BUG: Fix #27256 and #27257
* #27278: BUG: Fix array_equal for numeric and non-numeric scalar
types
* #27304: BUG: f2py: better handle filtering of public/private
subroutines
-------------------------------------------------------------------
Sat Aug 31 09:36:14 UTC 2024 - Ben Greiner <code@bnavigator.de>
- Update to 2.1.0
* Support for Python 3.13.
* Preliminary support for free threaded Python 3.13.
* Support for the array-api 2023.12 standard.
## New functions
* A new function np.unstack(array, axis=...) was added, which
splits an array into a tuple of arrays along an axis. It serves
as the inverse of numpy.stack. (gh-26579)
## Deprecations
* The fix_imports keyword argument in numpy.save is deprecated.
Since NumPy 1.17, numpy.save uses a pickle protocol that no
longer supports Python 2, and ignored fix_imports keyword. This
keyword is kept only for backward compatibility. It is now
deprecated. (gh-26452)
* Passing non-integer inputs as the first argument of bincount is
now deprecated, because such inputs are silently cast to
integers with no warning about loss of precision. (gh-27076)
## Expired deprecations
* Scalars and 0D arrays are disallowed for numpy.nonzero and
numpy.ndarray.nonzero. (gh-26268)
* set_string_function internal function was removed and
PyArray_SetStringFunction was stubbed out. (gh-26611)
## C API changes
* API symbols now hidden but customizable
* Many shims removed from npy_3kcompat.h
* New PyUFuncObject field process_core_dims_func
## New Features
* Preliminary Support for Free-Threaded CPython 3.13
* f2py can generate freethreading-compatible C extensions
## Improvements
* histogram auto-binning now returns bin sizes >=1 for integer
input data
* ndarray shape-type parameter is now covariant and bound to
tuple[int, ...]
* np.quantile with method closest_observation chooses nearest
even order statistic
* lapack_lite is now thread safe
* The numpy.printoptions context manager is now thread and
async-safe
* Type hinting numpy.polynomial
* Improved numpy.dtypes type hints
## Performance improvements and changes
* ma.cov and ma.corrcoef are now significantly faster
## Changes
* ma.corrcoef may return a slightly different result
* Cast-safety fixes in copyto and full
- Release 2.0.1
## Improvements
* np.quantile with method closest_observation chooses nearest
even order statistic
-------------------------------------------------------------------
Tue Aug 13 06:04:49 UTC 2024 - Dirk Müller <dmueller@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-numpy
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,30 +16,8 @@
#
%global flavor @BUILD_FLAVOR@%{nil}
%define ver 2.0.0
%define _ver 2_0_0
%define pname python-numpy
%define plainpython python
%define hpc_upcase_trans_hyph() %(echo %{**} | tr [a-z] [A-Z] | tr '-' '_')
%if "%{flavor}" == ""
%bcond_with hpc
%bcond_with openblas
%endif
%if "%{flavor}" == "gnu-hpc"
%bcond_without hpc
%endif
%if "%{flavor}" == "gnu7-hpc"
%define c_f_ver 7
%bcond_without hpc
%endif
%if %{with hpc}
%bcond_without openblas
%endif
%if 0%{?sle_version} == 120300
%{?with_openblas:ExclusiveArch: do_not_build}
%endif
%{?with_hpc:%{hpc_requires}}
#
%if 0%{?suse_version} > 1500
%bcond_without libalternatives
@@ -49,30 +27,11 @@
%bcond_with cblas
%endif
#
%bcond_with ringdisabled
#
%if %{without hpc}
%define package_name %{pname}
%define p_python_sitearch %{python_sitearch}
%define p_prefix %{_prefix}
%define p_bindir %{_bindir}
%else
%{!?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}
# Magic for OBS Staging. Only build the flavors required by
# other packages in the ring.
%if %{with ringdisabled}
ExclusiveArch: do_not_build
%endif
%endif
%{?sle15_python_module_pythons}
Name: %{package_name}
Name: python-numpy
# set %%ver and %%_ver instead above
Version: %{ver}
Version: 2.2.2
Release: 0
Summary: NumPy array processing for numbers, strings, records and objects
License: BSD-3-Clause
@@ -81,14 +40,17 @@ Source: https://files.pythonhosted.org/packages/source/n/numpy/numpy-%{v
Source99: python-numpy-rpmlintrc
# PATCH-FIX-OPENSUSE numpy-buildfix.patch -- openSUSE-specific build fixes
Patch0: numpy-buildfix.patch
# PATCH-FIX-UPSTREAM update-meson-1_5_2.patch gh#numpy/numpy#27531 mcepl@suse.com
# update vendored meson
Patch1: update-meson-1_5_2.patch
BuildRequires: %{python_module Cython >= 3.0}
BuildRequires: %{python_module base >= 3.9}
BuildRequires: %{python_module base >= 3.10}
BuildRequires: %{python_module devel}
BuildRequires: %{python_module meson-python >= 0.15}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pyproject-metadata >= 0.7.1}
BuildRequires: cmake
%if 0%{?suse_version} <= 1600
%if 0%{?suse_version} < 1600
BuildRequires: gcc12
BuildRequires: gcc12-c++
%else
@@ -109,7 +71,6 @@ BuildRequires: %{python_module pytest-xdist}
BuildRequires: %{python_module testsuite}
BuildRequires: %{python_module typing-extensions >= 4.2.0}
# /SECTION
%if %{without hpc}
# Last version which packaged %%{_bindir}/f2py without update-alternatives
Conflicts: %{plainpython}-numpy <= 1.12.0
%if 0%{?suse_version}
@@ -117,9 +78,6 @@ BuildRequires: gcc-fortran
%else
BuildRequires: gcc-gfortran
%endif
%if %{with openblas}
BuildRequires: openblas-devel > 0.3.20
%else
BuildRequires: blas-devel
BuildRequires: lapack-devel
%if %{with cblas}
@@ -127,7 +85,6 @@ BuildRequires: lapack-devel
BuildRequires: cblas-devel
Recommends: libopenblas_pthreads0
%endif
%endif
%if %{with libalternatives}
BuildRequires: alts
Requires: alts
@@ -135,15 +92,6 @@ Requires: alts
Requires(post): update-alternatives
Requires(postun): update-alternatives
%endif
%else
BuildRequires: %{compiler_family}%{?c_f_ver}-compilers-hpc-macros-devel
BuildRequires: libopenblas%{?hpc_ext}-%{compiler_family}%{?c_f_ver}-hpc-devel
%ifnarch %ix86 %arm
BuildRequires: lua-lmod
%endif
BuildRequires: suse-hpc
Requires: libopenblas%{?hpc_ext}-%{compiler_family}%{?c_f_ver}-hpc
%endif
%python_subpackages
%description
@@ -158,33 +106,20 @@ interfacing with general-purpose data-base applications.
There are also basic facilities for discrete fourier transform,
basic linear algebra and random number generation.
%{?with_hpc:%{hpc_python_master_package -L -a }}
%package devel
Summary: Development files for numpy applications
Requires: %{name} = %{version}
Requires: blas-devel
Requires: python-devel
Requires: %plainpython(abi) = %{python_version}
%if %{without hpc}
%if %{with openblas}
Requires: openblas-devel
%else
Requires: blas-devel
%if %{with cblas}
Requires: cblas-devel
%endif
Requires: lapack-devel
%endif
%else
Requires: libopenblas%{?hpc_ext}-%{compiler_family}%{?c_f_ver}-hpc-devel
%{hpc_requires_devel}
%endif
%description devel
This package contains files for developing applications using numpy.
%{?with_hpc:%{hpc_python_master_package devel -a }}
%prep
%autosetup -p1 -n numpy-%{version}
# Fix non-executable scripts
@@ -201,21 +136,10 @@ chmod -x \
rm -f PKG-INFO
%build
export PYTHONDONTWRITEBYTECODE=1
%define _lto_cflags %{nil}
%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
export CFLAGS="%{optflags} -fno-strict-aliasing"
%endif
%if 0%{?suse_version} <= 1600
%if 0%{?suse_version} < 1600
export CC=gcc-12
export CXX=g++-12
%endif
@@ -223,67 +147,17 @@ export CXX=g++-12
%pyproject_wheel
%install
%{?with_hpc:%hpc_setup}
%{?with_hpc:module load openblas}
%pyproject_install
%pyproject_install --prefix %{p_prefix} --root %{buildroot}
%if !%{with hpc}
%python_clone -a %{buildroot}%{_bindir}/f2py
%python_clone -a %{buildroot}%{_bindir}/numpy-config
%endif
%if 0%{?suse_version}
%fdupes %{buildroot}%{p_prefix}
%endif
%if %{with hpc}
%define hpc_module_pname ${python_flavor}-numpy
%{python_expand # Don't package testsuite
python_flavor=`cat _current_flavor`
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"
module-whatis "Description: %{SUMMARY:0}"
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}
setenv %{hpc_upcase_trans_hyph %{pname}}_DIR %{hpc_prefix}
setenv %{hpc_upcase_trans_hyph %{pname}}_BIN %{hpc_bindir}
family "NumPy"
EOF
}
%fdupes %{buildroot}%{_prefix}
%endif
%check
# https://numpy.org/doc/stable/dev/development_environment.html#running-tests
%if %{without hpc}
mkdir -p testing
cp pytest.ini testing/
@@ -295,7 +169,6 @@ for b in f2py numpy-config; do
ln -s %{buildroot}%{_bindir}/$b-%{$python_bin_suffix} build/flavorbin/$b
done
}
%endif
# flaky tests
test_failok+=" or test_structured_object_indexing"
@@ -352,6 +225,8 @@ test_failok+=" or (test_umath and test_fp_noncontiguous)"
%endif
# The meson command is always on the primary python and wants to import numpy from there
test_failok+=" or test_limited_api"
# gh#numpy/numpy#27531
test_failok+=" or test_api_importable"
echo "
import sys
@@ -372,7 +247,6 @@ $python runobstest.py "not (test_new_policy ${test_failok} or slow)"
popd
%endif
%if %{without hpc}
%pre
# If libalternatives is used: Removing old update-alternatives entries.
%python_libalternatives_reset_alternative f2py
@@ -382,12 +256,10 @@ popd
%postun
%python_uninstall_alternative f2py
%endif
%files %{python_files}
%doc README.md THANKS.txt
%license LICENSE.txt
%if %{without hpc}
%python_alternative %{_bindir}/f2py
%python_alternative %{_bindir}/numpy-config
%{python_sitearch}/numpy/
@@ -399,37 +271,9 @@ popd
%exclude %{python_sitearch}/numpy/distutils/checks/*.c
%exclude %{python_sitearch}/numpy/f2py/src/
%exclude %{python_sitearch}/numpy/random/lib/libnpyrandom.a
%else
%if "%{python_flavor}" == "python3" || "%{python_provides}" == "python3"
%{p_bindir}/f2py
%{p_bindir}/numpy-config
%else
%exclude %{p_bindir}/f2py
%exclude %{p_bindir}/numpy-config
%endif
%{p_python_sitearch}/numpy/
%{p_python_sitearch}/numpy-%{version}.dist-info
%exclude %{p_python_sitearch}/numpy/_core/include/
%exclude %{p_python_sitearch}/numpy/_core/lib/libnpymath.a
%exclude %{p_python_sitearch}/numpy/_core/lib/pkgconfig/numpy.pc
%exclude %{p_python_sitearch}/numpy/random/lib/libnpyrandom.a
%exclude %{p_python_sitearch}/numpy/distutils/mingw/*.c
%exclude %{p_python_sitearch}/numpy/distutils/checks/*.c
%exclude %{p_python_sitearch}/numpy/f2py/src/
%endif
%if %{with hpc}
%define hpc_module_pname %{python_flavor}-numpy
%{hpc_modules_files}
%{hpc_dirs}
%dir %{hpc_bindir}
%dir %{hpc_libdir}/python%{hpc_python_version}
%dir %{p_python_sitearch}
%endif
%files %{python_files devel}
%license LICENSE.txt
%if %{without hpc}
%{python_sitearch}/numpy/_core/include/
%if 0%{python_version_nodots} < 312
%{python_sitearch}/numpy/distutils/mingw/*.c
@@ -439,16 +283,5 @@ popd
%{python_sitearch}/numpy/_core/lib/libnpymath.a
%{python_sitearch}/numpy/_core/lib/pkgconfig/numpy.pc
%{python_sitearch}/numpy/random/lib/libnpyrandom.a
%else
%{p_python_sitearch}/numpy/_core/include/
%{p_python_sitearch}/numpy/_core/lib/pkgconfig/numpy.pc
%{p_python_sitearch}/numpy/_core/lib/libnpymath.a
%{p_python_sitearch}/numpy/random/lib/libnpyrandom.a
%if 0%{python_version_nodots} < 312
%{p_python_sitearch}/numpy/distutils/mingw/*.c
%{p_python_sitearch}/numpy/distutils/checks/*.c
%endif
%{p_python_sitearch}/numpy/f2py/src/
%endif
%changelog

612
update-meson-1_5_2.patch Normal file
View File

@@ -0,0 +1,612 @@
diff -uNr numpy-2.1.3.orig/vendored-meson/meson/ci/ciimage/.gitignore numpy-2.1.3/vendored-meson/meson/ci/ciimage/.gitignore
--- numpy-2.1.3.orig/vendored-meson/meson/ci/ciimage/.gitignore 1970-01-01 01:00:00.000000000 +0100
+++ numpy-2.1.3/vendored-meson/meson/ci/ciimage/.gitignore 2024-11-22 23:52:31.819240220 +0100
@@ -0,0 +1,3 @@
+/build_*
+/test_*
+/user.sh
diff -uNr numpy-2.1.3.orig/vendored-meson/meson/.git numpy-2.1.3/vendored-meson/meson/.git
--- numpy-2.1.3.orig/vendored-meson/meson/.git 1970-01-01 01:00:00.000000000 +0100
+++ numpy-2.1.3/vendored-meson/meson/.git 2024-11-22 23:52:31.599238818 +0100
@@ -0,0 +1 @@
+gitdir: ../../.git/modules/vendored-meson/meson
diff -uNr numpy-2.1.3.orig/vendored-meson/meson/.gitattributes numpy-2.1.3/vendored-meson/meson/.gitattributes
--- numpy-2.1.3.orig/vendored-meson/meson/.gitattributes 1970-01-01 01:00:00.000000000 +0100
+++ numpy-2.1.3/vendored-meson/meson/.gitattributes 2024-11-22 23:52:31.815906865 +0100
@@ -0,0 +1,7 @@
+.gitignore export-ignore
+.gitattributes export-ignore
+* text eol=lf
+*.png binary
+*.icns binary
+data/shell-completions/bash/meson linguist-language=Shell
+data/shell-completions/zsh/_meson linguist-language=Shell
diff -uNr numpy-2.1.3.orig/vendored-meson/meson/.gitignore numpy-2.1.3/vendored-meson/meson/.gitignore
--- numpy-2.1.3.orig/vendored-meson/meson/.gitignore 1970-01-01 01:00:00.000000000 +0100
+++ numpy-2.1.3/vendored-meson/meson/.gitignore 2024-11-22 23:52:31.815906865 +0100
@@ -0,0 +1,34 @@
+.mypy_cache/
+.pytest_cache/
+/.project
+/.pydevproject
+/.settings
+/.cproject
+/.idea
+/.vscode
+
+__pycache__
+/.coverage/
+/.coveragerc
+/install dir
+/work area
+
+/meson-test-run.txt
+/meson-test-run.xml
+/meson-cross-test-run.txt
+/meson-cross-test-run.xml
+
+.DS_Store
+*~
+*.swp
+packagecache
+/MANIFEST
+/build
+/dist
+/meson.egg-info
+
+/docs/built_docs
+/docs/hotdoc-private*
+
+*.pyc
+/*venv*
diff -uNr "numpy-2.1.3.orig/vendored-meson/meson/test cases/common/153 wrap file should not failed/subprojects/.gitignore" "numpy-2.1.3/vendored-meson/meson/test cases/common/153 wrap file should not failed/subprojects/.gitignore"
--- "numpy-2.1.3.orig/vendored-meson/meson/test cases/common/153 wrap file should not failed/subprojects/.gitignore" 1970-01-01 01:00:00.000000000 +0100
+++ "numpy-2.1.3/vendored-meson/meson/test cases/common/153 wrap file should not failed/subprojects/.gitignore" 2024-11-22 23:52:31.892574021 +0100
@@ -0,0 +1,3 @@
+/foo-1.0
+/bar-1.0
+/foo-1.0-patchdir
diff -uNr "numpy-2.1.3.orig/vendored-meson/meson/test cases/common/234 get_file_contents/.gitattributes" "numpy-2.1.3/vendored-meson/meson/test cases/common/234 get_file_contents/.gitattributes"
--- "numpy-2.1.3.orig/vendored-meson/meson/test cases/common/234 get_file_contents/.gitattributes" 1970-01-01 01:00:00.000000000 +0100
+++ "numpy-2.1.3/vendored-meson/meson/test cases/common/234 get_file_contents/.gitattributes" 2024-11-22 23:52:31.905907439 +0100
@@ -0,0 +1 @@
+utf-16-text binary
diff -uNr "numpy-2.1.3.orig/vendored-meson/meson/test cases/d/11 dub/.gitignore" "numpy-2.1.3/vendored-meson/meson/test cases/d/11 dub/.gitignore"
--- "numpy-2.1.3.orig/vendored-meson/meson/test cases/d/11 dub/.gitignore" 1970-01-01 01:00:00.000000000 +0100
+++ "numpy-2.1.3/vendored-meson/meson/test cases/d/11 dub/.gitignore" 2024-11-22 23:52:31.819240220 +0100
@@ -0,0 +1 @@
+dub.json
diff -uNr "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_asimd.c" "numpy-2.1.3/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_asimd.c"
--- "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_asimd.c" 1970-01-01 01:00:00.000000000 +0100
+++ "numpy-2.1.3/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_asimd.c" 2024-11-22 23:52:31.835906993 +0100
@@ -0,0 +1,27 @@
+#ifdef _MSC_VER
+ #include <Intrin.h>
+#endif
+#include <arm_neon.h>
+
+int main(int argc, char **argv)
+{
+ float *src = (float*)argv[argc-1];
+ float32x4_t v1 = vdupq_n_f32(src[0]), v2 = vdupq_n_f32(src[1]);
+ /* MAXMIN */
+ int ret = (int)vgetq_lane_f32(vmaxnmq_f32(v1, v2), 0);
+ ret += (int)vgetq_lane_f32(vminnmq_f32(v1, v2), 0);
+ /* ROUNDING */
+ ret += (int)vgetq_lane_f32(vrndq_f32(v1), 0);
+#ifdef __aarch64__
+ {
+ double *src2 = (double*)argv[argc-1];
+ float64x2_t vd1 = vdupq_n_f64(src2[0]), vd2 = vdupq_n_f64(src2[1]);
+ /* MAXMIN */
+ ret += (int)vgetq_lane_f64(vmaxnmq_f64(vd1, vd2), 0);
+ ret += (int)vgetq_lane_f64(vminnmq_f64(vd1, vd2), 0);
+ /* ROUNDING */
+ ret += (int)vgetq_lane_f64(vrndq_f64(vd1), 0);
+ }
+#endif
+ return ret;
+}
diff -uNr "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_neon.c" "numpy-2.1.3/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_neon.c"
--- "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_neon.c" 1970-01-01 01:00:00.000000000 +0100
+++ "numpy-2.1.3/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_neon.c" 2024-11-22 23:52:31.835906993 +0100
@@ -0,0 +1,19 @@
+#ifdef _MSC_VER
+ #include <Intrin.h>
+#endif
+#include <arm_neon.h>
+
+int main(int argc, char **argv)
+{
+ // passing from untraced pointers to avoid optimizing out any constants
+ // so we can test against the linker.
+ float *src = (float*)argv[argc-1];
+ float32x4_t v1 = vdupq_n_f32(src[0]), v2 = vdupq_n_f32(src[1]);
+ int ret = (int)vgetq_lane_f32(vmulq_f32(v1, v2), 0);
+#ifdef __aarch64__
+ double *src2 = (double*)argv[argc-2];
+ float64x2_t vd1 = vdupq_n_f64(src2[0]), vd2 = vdupq_n_f64(src2[1]);
+ ret += (int)vgetq_lane_f64(vmulq_f64(vd1, vd2), 0);
+#endif
+ return ret;
+}
diff -uNr "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_neon_fp16.c" "numpy-2.1.3/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_neon_fp16.c"
--- "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_neon_fp16.c" 1970-01-01 01:00:00.000000000 +0100
+++ "numpy-2.1.3/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_neon_fp16.c" 2024-11-22 23:52:31.835906993 +0100
@@ -0,0 +1,11 @@
+#ifdef _MSC_VER
+ #include <Intrin.h>
+#endif
+#include <arm_neon.h>
+
+int main(int argc, char **argv)
+{
+ short *src = (short*)argv[argc-1];
+ float32x4_t v_z4 = vcvt_f32_f16((float16x4_t)vld1_s16(src));
+ return (int)vgetq_lane_f32(v_z4, 0);
+}
diff -uNr "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_neon_vfpv4.c" "numpy-2.1.3/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_neon_vfpv4.c"
--- "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_neon_vfpv4.c" 1970-01-01 01:00:00.000000000 +0100
+++ "numpy-2.1.3/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_neon_vfpv4.c" 2024-11-22 23:52:31.835906993 +0100
@@ -0,0 +1,21 @@
+#ifdef _MSC_VER
+ #include <Intrin.h>
+#endif
+#include <arm_neon.h>
+
+int main(int argc, char **argv)
+{
+ float *src = (float*)argv[argc-1];
+ float32x4_t v1 = vdupq_n_f32(src[0]);
+ float32x4_t v2 = vdupq_n_f32(src[1]);
+ float32x4_t v3 = vdupq_n_f32(src[2]);
+ int ret = (int)vgetq_lane_f32(vfmaq_f32(v1, v2, v3), 0);
+#ifdef __aarch64__
+ double *src2 = (double*)argv[argc-2];
+ float64x2_t vd1 = vdupq_n_f64(src2[0]);
+ float64x2_t vd2 = vdupq_n_f64(src2[1]);
+ float64x2_t vd3 = vdupq_n_f64(src2[2]);
+ ret += (int)vgetq_lane_f64(vfmaq_f64(vd1, vd2, vd3), 0);
+#endif
+ return ret;
+}
diff -uNr "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_sse.c" "numpy-2.1.3/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_sse.c"
--- "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_sse.c" 1970-01-01 01:00:00.000000000 +0100
+++ "numpy-2.1.3/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_sse.c" 2024-11-22 23:52:31.835906993 +0100
@@ -0,0 +1,7 @@
+#include <xmmintrin.h>
+
+int main(void)
+{
+ __m128 a = _mm_add_ps(_mm_setzero_ps(), _mm_setzero_ps());
+ return (int)_mm_cvtss_f32(a);
+}
diff -uNr "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_sse2.c" "numpy-2.1.3/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_sse2.c"
--- "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_sse2.c" 1970-01-01 01:00:00.000000000 +0100
+++ "numpy-2.1.3/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_sse2.c" 2024-11-22 23:52:31.835906993 +0100
@@ -0,0 +1,7 @@
+#include <emmintrin.h>
+
+int main(void)
+{
+ __m128i a = _mm_add_epi16(_mm_setzero_si128(), _mm_setzero_si128());
+ return _mm_cvtsi128_si32(a);
+}
diff -uNr "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_sse3.c" "numpy-2.1.3/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_sse3.c"
--- "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_sse3.c" 1970-01-01 01:00:00.000000000 +0100
+++ "numpy-2.1.3/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_sse3.c" 2024-11-22 23:52:31.835906993 +0100
@@ -0,0 +1,7 @@
+#include <pmmintrin.h>
+
+int main(void)
+{
+ __m128 a = _mm_hadd_ps(_mm_setzero_ps(), _mm_setzero_ps());
+ return (int)_mm_cvtss_f32(a);
+}
diff -uNr "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_sse41.c" "numpy-2.1.3/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_sse41.c"
--- "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_sse41.c" 1970-01-01 01:00:00.000000000 +0100
+++ "numpy-2.1.3/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_sse41.c" 2024-11-22 23:52:31.835906993 +0100
@@ -0,0 +1,7 @@
+#include <smmintrin.h>
+
+int main(void)
+{
+ __m128 a = _mm_floor_ps(_mm_setzero_ps());
+ return (int)_mm_cvtss_f32(a);
+}
diff -uNr "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_ssse3.c" "numpy-2.1.3/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_ssse3.c"
--- "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_ssse3.c" 1970-01-01 01:00:00.000000000 +0100
+++ "numpy-2.1.3/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_ssse3.c" 2024-11-22 23:52:31.835906993 +0100
@@ -0,0 +1,7 @@
+#include <tmmintrin.h>
+
+int main(void)
+{
+ __m128i a = _mm_hadd_epi16(_mm_setzero_si128(), _mm_setzero_si128());
+ return (int)_mm_cvtsi128_si32(a);
+}
diff -uNr "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/1 baseline/init_features/meson.build" "numpy-2.1.3/vendored-meson/meson/test cases/features/1 baseline/init_features/meson.build"
--- "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/1 baseline/init_features/meson.build" 1970-01-01 01:00:00.000000000 +0100
+++ "numpy-2.1.3/vendored-meson/meson/test cases/features/1 baseline/init_features/meson.build" 2024-11-22 23:52:31.835906993 +0100
@@ -0,0 +1,98 @@
+#project('test-features', 'c')
+mod_features = import('features')
+cpu_family = host_machine.cpu_family()
+compiler_id = meson.get_compiler('c').get_id()
+source_root = meson.project_source_root() + '/../init_features/'
+# Basic X86 Features
+# ------------------
+SSE = mod_features.new(
+ 'SSE', 1, args: '-msse',
+ test_code: files(source_root + 'checks/cpu_sse.c')[0]
+)
+SSE2 = mod_features.new(
+ 'SSE2', 2, implies: SSE,
+ args: '-msse2',
+ test_code: files(source_root + 'checks/cpu_sse2.c')[0]
+)
+# enabling SSE without SSE2 is useless also
+# it's non-optional for x86_64
+SSE.update(implies: SSE2)
+SSE3 = mod_features.new(
+ 'SSE3', 3, implies: SSE2,
+ args: '-msse3',
+ test_code: files(source_root + 'checks/cpu_sse3.c')[0]
+)
+SSSE3 = mod_features.new(
+ 'SSSE3', 4, implies: SSE3,
+ args: '-mssse3',
+ test_code: files(source_root + 'checks/cpu_ssse3.c')[0]
+)
+SSE41 = mod_features.new(
+ 'SSE41', 5, implies: SSSE3,
+ args: '-msse4.1',
+ test_code: files(source_root + 'checks/cpu_sse41.c')[0]
+)
+if cpu_family not in ['x86', 'x86_64']
+ # should disable any prevalent features
+ SSE.update(disable: 'not supported by the current platform')
+endif
+# Specializations for non unix-like compilers
+if compiler_id == 'intel-cl'
+ foreach fet : [SSE, SSE2, SSE3, SSSE3]
+ fet.update(args: {'val': '/arch:' + fet.get('name'), 'match': '/arch:.*'})
+ endforeach
+ SSE41.update(args: {'val': '/arch:SSE4.1', 'match': '/arch:.*'})
+elif compiler_id == 'msvc'
+ # only available on 32-bit. Its enabled by default on 64-bit mode
+ foreach fet : [SSE, SSE2]
+ if cpu_family == 'x86'
+ fet.update(args: {'val': '/arch:' + fet.get('name'), 'match': clear_arch})
+ else
+ fet.update(args: '')
+ endif
+ endforeach
+ # The following features don't own private FLAGS still
+ # the compiler provides ISA capability for them.
+ foreach fet : [SSE3, SSSE3, SSE41]
+ fet.update(args: '')
+ endforeach
+endif
+
+# Basic ARM Features
+# ------------------
+NEON = mod_features.new(
+ 'NEON', 200,
+ test_code: files(source_root + 'checks/cpu_neon.c')[0]
+)
+NEON_FP16 = mod_features.new(
+ 'NEON_FP16', 201, implies: NEON,
+ test_code: files(source_root + 'checks/cpu_neon_fp16.c')[0]
+)
+# FMA
+NEON_VFPV4 = mod_features.new(
+ 'NEON_VFPV4', 202, implies: NEON_FP16,
+ test_code: files(source_root + 'checks/cpu_neon_vfpv4.c')[0]
+)
+# Advanced SIMD
+ASIMD = mod_features.new(
+ 'ASIMD', 203, implies: NEON_VFPV4, detect: {'val': 'ASIMD', 'match': 'NEON.*'},
+ test_code: files(source_root + 'checks/cpu_asimd.c')[0]
+)
+if cpu_family == 'aarch64'
+ # hardware baseline, they can't be enabled independently
+ NEON.update(implies: [NEON_FP16, NEON_VFPV4, ASIMD])
+ NEON_FP16.update(implies: [NEON, NEON_VFPV4, ASIMD])
+ NEON_VFPV4.update(implies: [NEON, NEON_FP16, ASIMD])
+elif cpu_family == 'arm'
+ NEON.update(args: '-mfpu=neon')
+ NEON_FP16.update(args: ['-mfp16-format=ieee', {'val': '-mfpu=neon-fp16', 'match': '-mfpu=.*'}])
+ NEON_VFPV4.update(args: {'val': '-mfpu=neon-vfpv4', 'match': '-mfpu=.*'})
+ ASIMD.update(args: [
+ {'val': '-mfpu=neon-fp-armv8', 'match': '-mfpu=.*'},
+ '-march=armv8-a+simd'
+ ])
+else
+ # should disable any prevalent features
+ NEON.update(disable: 'not supported by the current platform')
+endif
+
diff -uNr "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_asimd.c" "numpy-2.1.3/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_asimd.c"
--- "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_asimd.c" 1970-01-01 01:00:00.000000000 +0100
+++ "numpy-2.1.3/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_asimd.c" 2024-11-22 23:52:31.835906993 +0100
@@ -0,0 +1,27 @@
+#ifdef _MSC_VER
+ #include <Intrin.h>
+#endif
+#include <arm_neon.h>
+
+int main(int argc, char **argv)
+{
+ float *src = (float*)argv[argc-1];
+ float32x4_t v1 = vdupq_n_f32(src[0]), v2 = vdupq_n_f32(src[1]);
+ /* MAXMIN */
+ int ret = (int)vgetq_lane_f32(vmaxnmq_f32(v1, v2), 0);
+ ret += (int)vgetq_lane_f32(vminnmq_f32(v1, v2), 0);
+ /* ROUNDING */
+ ret += (int)vgetq_lane_f32(vrndq_f32(v1), 0);
+#ifdef __aarch64__
+ {
+ double *src2 = (double*)argv[argc-1];
+ float64x2_t vd1 = vdupq_n_f64(src2[0]), vd2 = vdupq_n_f64(src2[1]);
+ /* MAXMIN */
+ ret += (int)vgetq_lane_f64(vmaxnmq_f64(vd1, vd2), 0);
+ ret += (int)vgetq_lane_f64(vminnmq_f64(vd1, vd2), 0);
+ /* ROUNDING */
+ ret += (int)vgetq_lane_f64(vrndq_f64(vd1), 0);
+ }
+#endif
+ return ret;
+}
diff -uNr "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_neon.c" "numpy-2.1.3/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_neon.c"
--- "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_neon.c" 1970-01-01 01:00:00.000000000 +0100
+++ "numpy-2.1.3/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_neon.c" 2024-11-22 23:52:31.835906993 +0100
@@ -0,0 +1,19 @@
+#ifdef _MSC_VER
+ #include <Intrin.h>
+#endif
+#include <arm_neon.h>
+
+int main(int argc, char **argv)
+{
+ // passing from untraced pointers to avoid optimizing out any constants
+ // so we can test against the linker.
+ float *src = (float*)argv[argc-1];
+ float32x4_t v1 = vdupq_n_f32(src[0]), v2 = vdupq_n_f32(src[1]);
+ int ret = (int)vgetq_lane_f32(vmulq_f32(v1, v2), 0);
+#ifdef __aarch64__
+ double *src2 = (double*)argv[argc-2];
+ float64x2_t vd1 = vdupq_n_f64(src2[0]), vd2 = vdupq_n_f64(src2[1]);
+ ret += (int)vgetq_lane_f64(vmulq_f64(vd1, vd2), 0);
+#endif
+ return ret;
+}
diff -uNr "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_neon_fp16.c" "numpy-2.1.3/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_neon_fp16.c"
--- "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_neon_fp16.c" 1970-01-01 01:00:00.000000000 +0100
+++ "numpy-2.1.3/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_neon_fp16.c" 2024-11-22 23:52:31.835906993 +0100
@@ -0,0 +1,11 @@
+#ifdef _MSC_VER
+ #include <Intrin.h>
+#endif
+#include <arm_neon.h>
+
+int main(int argc, char **argv)
+{
+ short *src = (short*)argv[argc-1];
+ float32x4_t v_z4 = vcvt_f32_f16((float16x4_t)vld1_s16(src));
+ return (int)vgetq_lane_f32(v_z4, 0);
+}
diff -uNr "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_neon_vfpv4.c" "numpy-2.1.3/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_neon_vfpv4.c"
--- "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_neon_vfpv4.c" 1970-01-01 01:00:00.000000000 +0100
+++ "numpy-2.1.3/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_neon_vfpv4.c" 2024-11-22 23:52:31.835906993 +0100
@@ -0,0 +1,21 @@
+#ifdef _MSC_VER
+ #include <Intrin.h>
+#endif
+#include <arm_neon.h>
+
+int main(int argc, char **argv)
+{
+ float *src = (float*)argv[argc-1];
+ float32x4_t v1 = vdupq_n_f32(src[0]);
+ float32x4_t v2 = vdupq_n_f32(src[1]);
+ float32x4_t v3 = vdupq_n_f32(src[2]);
+ int ret = (int)vgetq_lane_f32(vfmaq_f32(v1, v2, v3), 0);
+#ifdef __aarch64__
+ double *src2 = (double*)argv[argc-2];
+ float64x2_t vd1 = vdupq_n_f64(src2[0]);
+ float64x2_t vd2 = vdupq_n_f64(src2[1]);
+ float64x2_t vd3 = vdupq_n_f64(src2[2]);
+ ret += (int)vgetq_lane_f64(vfmaq_f64(vd1, vd2, vd3), 0);
+#endif
+ return ret;
+}
diff -uNr "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_sse.c" "numpy-2.1.3/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_sse.c"
--- "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_sse.c" 1970-01-01 01:00:00.000000000 +0100
+++ "numpy-2.1.3/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_sse.c" 2024-11-22 23:52:31.835906993 +0100
@@ -0,0 +1,7 @@
+#include <xmmintrin.h>
+
+int main(void)
+{
+ __m128 a = _mm_add_ps(_mm_setzero_ps(), _mm_setzero_ps());
+ return (int)_mm_cvtss_f32(a);
+}
diff -uNr "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_sse2.c" "numpy-2.1.3/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_sse2.c"
--- "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_sse2.c" 1970-01-01 01:00:00.000000000 +0100
+++ "numpy-2.1.3/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_sse2.c" 2024-11-22 23:52:31.835906993 +0100
@@ -0,0 +1,7 @@
+#include <emmintrin.h>
+
+int main(void)
+{
+ __m128i a = _mm_add_epi16(_mm_setzero_si128(), _mm_setzero_si128());
+ return _mm_cvtsi128_si32(a);
+}
diff -uNr "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_sse3.c" "numpy-2.1.3/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_sse3.c"
--- "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_sse3.c" 1970-01-01 01:00:00.000000000 +0100
+++ "numpy-2.1.3/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_sse3.c" 2024-11-22 23:52:31.835906993 +0100
@@ -0,0 +1,7 @@
+#include <pmmintrin.h>
+
+int main(void)
+{
+ __m128 a = _mm_hadd_ps(_mm_setzero_ps(), _mm_setzero_ps());
+ return (int)_mm_cvtss_f32(a);
+}
diff -uNr "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_sse41.c" "numpy-2.1.3/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_sse41.c"
--- "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_sse41.c" 1970-01-01 01:00:00.000000000 +0100
+++ "numpy-2.1.3/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_sse41.c" 2024-11-22 23:52:31.835906993 +0100
@@ -0,0 +1,7 @@
+#include <smmintrin.h>
+
+int main(void)
+{
+ __m128 a = _mm_floor_ps(_mm_setzero_ps());
+ return (int)_mm_cvtss_f32(a);
+}
diff -uNr "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_ssse3.c" "numpy-2.1.3/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_ssse3.c"
--- "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_ssse3.c" 1970-01-01 01:00:00.000000000 +0100
+++ "numpy-2.1.3/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_ssse3.c" 2024-11-22 23:52:31.835906993 +0100
@@ -0,0 +1,7 @@
+#include <tmmintrin.h>
+
+int main(void)
+{
+ __m128i a = _mm_hadd_epi16(_mm_setzero_si128(), _mm_setzero_si128());
+ return (int)_mm_cvtsi128_si32(a);
+}
diff -uNr "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/2 multi_targets/init_features/meson.build" "numpy-2.1.3/vendored-meson/meson/test cases/features/2 multi_targets/init_features/meson.build"
--- "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/2 multi_targets/init_features/meson.build" 1970-01-01 01:00:00.000000000 +0100
+++ "numpy-2.1.3/vendored-meson/meson/test cases/features/2 multi_targets/init_features/meson.build" 2024-11-22 23:52:31.835906993 +0100
@@ -0,0 +1,98 @@
+#project('test-features', 'c')
+mod_features = import('features')
+cpu_family = host_machine.cpu_family()
+compiler_id = meson.get_compiler('c').get_id()
+source_root = meson.project_source_root() + '/../init_features/'
+# Basic X86 Features
+# ------------------
+SSE = mod_features.new(
+ 'SSE', 1, args: '-msse',
+ test_code: files(source_root + 'checks/cpu_sse.c')[0]
+)
+SSE2 = mod_features.new(
+ 'SSE2', 2, implies: SSE,
+ args: '-msse2',
+ test_code: files(source_root + 'checks/cpu_sse2.c')[0]
+)
+# enabling SSE without SSE2 is useless also
+# it's non-optional for x86_64
+SSE.update(implies: SSE2)
+SSE3 = mod_features.new(
+ 'SSE3', 3, implies: SSE2,
+ args: '-msse3',
+ test_code: files(source_root + 'checks/cpu_sse3.c')[0]
+)
+SSSE3 = mod_features.new(
+ 'SSSE3', 4, implies: SSE3,
+ args: '-mssse3',
+ test_code: files(source_root + 'checks/cpu_ssse3.c')[0]
+)
+SSE41 = mod_features.new(
+ 'SSE41', 5, implies: SSSE3,
+ args: '-msse4.1',
+ test_code: files(source_root + 'checks/cpu_sse41.c')[0]
+)
+if cpu_family not in ['x86', 'x86_64']
+ # should disable any prevalent features
+ SSE.update(disable: 'not supported by the current platform')
+endif
+# Specializations for non unix-like compilers
+if compiler_id == 'intel-cl'
+ foreach fet : [SSE, SSE2, SSE3, SSSE3]
+ fet.update(args: {'val': '/arch:' + fet.get('name'), 'match': '/arch:.*'})
+ endforeach
+ SSE41.update(args: {'val': '/arch:SSE4.1', 'match': '/arch:.*'})
+elif compiler_id == 'msvc'
+ # only available on 32-bit. Its enabled by default on 64-bit mode
+ foreach fet : [SSE, SSE2]
+ if cpu_family == 'x86'
+ fet.update(args: {'val': '/arch:' + fet.get('name'), 'match': clear_arch})
+ else
+ fet.update(args: '')
+ endif
+ endforeach
+ # The following features don't own private FLAGS still
+ # the compiler provides ISA capability for them.
+ foreach fet : [SSE3, SSSE3, SSE41]
+ fet.update(args: '')
+ endforeach
+endif
+
+# Basic ARM Features
+# ------------------
+NEON = mod_features.new(
+ 'NEON', 200,
+ test_code: files(source_root + 'checks/cpu_neon.c')[0]
+)
+NEON_FP16 = mod_features.new(
+ 'NEON_FP16', 201, implies: NEON,
+ test_code: files(source_root + 'checks/cpu_neon_fp16.c')[0]
+)
+# FMA
+NEON_VFPV4 = mod_features.new(
+ 'NEON_VFPV4', 202, implies: NEON_FP16,
+ test_code: files(source_root + 'checks/cpu_neon_vfpv4.c')[0]
+)
+# Advanced SIMD
+ASIMD = mod_features.new(
+ 'ASIMD', 203, implies: NEON_VFPV4, detect: {'val': 'ASIMD', 'match': 'NEON.*'},
+ test_code: files(source_root + 'checks/cpu_asimd.c')[0]
+)
+if cpu_family == 'aarch64'
+ # hardware baseline, they can't be enabled independently
+ NEON.update(implies: [NEON_FP16, NEON_VFPV4, ASIMD])
+ NEON_FP16.update(implies: [NEON, NEON_VFPV4, ASIMD])
+ NEON_VFPV4.update(implies: [NEON, NEON_FP16, ASIMD])
+elif cpu_family == 'arm'
+ NEON.update(args: '-mfpu=neon')
+ NEON_FP16.update(args: ['-mfp16-format=ieee', {'val': '-mfpu=neon-fp16', 'match': '-mfpu=.*'}])
+ NEON_VFPV4.update(args: {'val': '-mfpu=neon-vfpv4', 'match': '-mfpu=.*'})
+ ASIMD.update(args: [
+ {'val': '-mfpu=neon-fp-armv8', 'match': '-mfpu=.*'},
+ '-march=armv8-a+simd'
+ ])
+else
+ # should disable any prevalent features
+ NEON.update(disable: 'not supported by the current platform')
+endif
+
diff -uNr "numpy-2.1.3.orig/vendored-meson/meson/test cases/frameworks/35 boost symlinks/boost/include/boost/version.hpp" "numpy-2.1.3/vendored-meson/meson/test cases/frameworks/35 boost symlinks/boost/include/boost/version.hpp"
--- "numpy-2.1.3.orig/vendored-meson/meson/test cases/frameworks/35 boost symlinks/boost/include/boost/version.hpp" 1970-01-01 01:00:00.000000000 +0100
+++ "numpy-2.1.3/vendored-meson/meson/test cases/frameworks/35 boost symlinks/boost/include/boost/version.hpp" 2024-11-22 23:52:31.849240411 +0100
@@ -0,0 +1,3 @@
+#define BOOST_VERSION 300
+
+#error This is not a real version of boost
diff -uNr "numpy-2.1.3.orig/vendored-meson/meson/test cases/unit/78 user options for subproject/.gitignore" "numpy-2.1.3/vendored-meson/meson/test cases/unit/78 user options for subproject/.gitignore"
--- "numpy-2.1.3.orig/vendored-meson/meson/test cases/unit/78 user options for subproject/.gitignore" 1970-01-01 01:00:00.000000000 +0100
+++ "numpy-2.1.3/vendored-meson/meson/test cases/unit/78 user options for subproject/.gitignore" 2024-11-22 23:52:31.889240666 +0100
@@ -0,0 +1 @@
+/subprojects
diff -uNr "numpy-2.1.3.orig/vendored-meson/meson/test cases/unit/78 user options for subproject/75 user options for subproject/.gitignore" "numpy-2.1.3/vendored-meson/meson/test cases/unit/78 user options for subproject/75 user options for subproject/.gitignore"
--- "numpy-2.1.3.orig/vendored-meson/meson/test cases/unit/78 user options for subproject/75 user options for subproject/.gitignore" 1970-01-01 01:00:00.000000000 +0100
+++ "numpy-2.1.3/vendored-meson/meson/test cases/unit/78 user options for subproject/75 user options for subproject/.gitignore" 2024-11-22 23:52:31.889240666 +0100
@@ -0,0 +1 @@
+subprojects/*
diff -uNr "numpy-2.1.3.orig/vendored-meson/meson/test cases/unit/98 link full name/.gitignore" "numpy-2.1.3/vendored-meson/meson/test cases/unit/98 link full name/.gitignore"
--- "numpy-2.1.3.orig/vendored-meson/meson/test cases/unit/98 link full name/.gitignore" 1970-01-01 01:00:00.000000000 +0100
+++ "numpy-2.1.3/vendored-meson/meson/test cases/unit/98 link full name/.gitignore" 2024-11-22 23:52:31.892574021 +0100
@@ -0,0 +1,5 @@
+*.a
+*.o
+a.out
+libtestprovider.a
+build
diff -uNr "numpy-2.1.3.orig/vendored-meson/meson/test cases/windows/22 msvc library argument order/lib/.gitignore" "numpy-2.1.3/vendored-meson/meson/test cases/windows/22 msvc library argument order/lib/.gitignore"
--- "numpy-2.1.3.orig/vendored-meson/meson/test cases/windows/22 msvc library argument order/lib/.gitignore" 1970-01-01 01:00:00.000000000 +0100
+++ "numpy-2.1.3/vendored-meson/meson/test cases/windows/22 msvc library argument order/lib/.gitignore" 2024-11-22 23:52:31.902574084 +0100
@@ -0,0 +1,2 @@
+*.obj
+*.lib