SHA256
1
0
forked from pool/python-numpy

Accepting request 923254 from home:schubi2

- Use libalternatives instead of update-alternatives.

OBS-URL: https://build.opensuse.org/request/show/923254
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-numpy?expand=0&rev=96
This commit is contained in:
2021-10-06 00:24:58 +00:00
committed by Git OBS Bridge
parent 0b4f6d23fe
commit c96fc808a3
2 changed files with 23 additions and 2 deletions

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Sep 30 10:05:18 UTC 2021 - Stefan Schubert <schubi@suse.de>
- Use libalternatives instead of update-alternatives.
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Sep 20 16:51:56 UTC 2021 - Ben Greiner <code@bnavigator.de> Mon Sep 20 16:51:56 UTC 2021 - Ben Greiner <code@bnavigator.de>

View File

@@ -1,5 +1,5 @@
# #
# spec file # spec file for package python-numpy
# #
# Copyright (c) 2021 SUSE LLC # Copyright (c) 2021 SUSE LLC
# #
@@ -16,6 +16,13 @@
# #
#
%if 0%{?suse_version} > 1500
%bcond_without libalternatives
%else
%bcond_with libalternatives
%endif
%global flavor @BUILD_FLAVOR@%{nil} %global flavor @BUILD_FLAVOR@%{nil}
%define ver 1.21.2 %define ver 1.21.2
%define _ver 1_21_2 %define _ver 1_21_2
@@ -86,7 +93,7 @@ BuildRequires: %{python_module pytest >= 6.2.4}
BuildRequires: %{python_module pytest-xdist} BuildRequires: %{python_module pytest-xdist}
BuildRequires: %{python_module setuptools} BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module testsuite} BuildRequires: %{python_module testsuite}
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros >= 20210929
BuildRequires: unzip BuildRequires: unzip
%if 0%{?suse_version} %if 0%{?suse_version}
BuildRequires: fdupes BuildRequires: fdupes
@@ -116,9 +123,14 @@ BuildRequires: libopenblas%{?hpc_ext}-%{compiler_family}%{?c_f_ver}-hpc-devel
BuildRequires: lua-lmod BuildRequires: lua-lmod
BuildRequires: suse-hpc BuildRequires: suse-hpc
Requires: libopenblas%{?hpc_ext}-%{compiler_family}%{?c_f_ver}-hpc Requires: libopenblas%{?hpc_ext}-%{compiler_family}%{?c_f_ver}-hpc
%if %{with libalternatives}
Requires: alts
BuildRequires: alts
%else
Requires(post): update-alternatives Requires(post): update-alternatives
Requires(postun):update-alternatives Requires(postun):update-alternatives
%endif %endif
%endif
%python_subpackages %python_subpackages
%description %description
@@ -279,6 +291,10 @@ rm -Rf %{buildroot}%{$python_sitearch}/numpy/.pytest_cache
popd popd
%endif %endif
%pre
# If libalternatives is used: Removing old update-alternatives entries.
%python_libalternatives_reset_alternative f2py
%if %{without hpc} %if %{without hpc}
%post %post
%python_install_alternative f2py %python_install_alternative f2py