14
0

Accepting request 930181 from home:schubi2

- Use libalternatives instead of update-alternatives.

OBS-URL: https://build.opensuse.org/request/show/930181
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pybind11?expand=0&rev=29
This commit is contained in:
2021-11-08 13:31:49 +00:00
committed by Git OBS Bridge
parent 6d403635e7
commit 0e85bb0e5f
2 changed files with 21 additions and 1 deletions

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Sat Oct 16 20:47:43 UTC 2021 - Stefan Schubert <schubi@suse.de>
- Use libalternatives instead of update-alternatives.
------------------------------------------------------------------- -------------------------------------------------------------------
Sat Oct 16 19:47:43 UTC 2021 - Ben Greiner <code@bnavigator.de> Sat Oct 16 19:47:43 UTC 2021 - Ben Greiner <code@bnavigator.de>

View File

@@ -16,6 +16,12 @@
# #
%if 0%{?suse_version} > 1500
%bcond_without libalternatives
%else
%bcond_with libalternatives
%endif
%{?!python_module:%define python_module() python-%{**} python3-%{**}} %{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-pybind11 Name: python-pybind11
Version: 2.8.0 Version: 2.8.0
@@ -30,10 +36,15 @@ BuildRequires: %{python_module setuptools}
BuildRequires: cmake BuildRequires: cmake
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros >= 20210929
BuildRequires: %{python_module numpy if (%python-base without python36-base)} BuildRequires: %{python_module numpy if (%python-base without python36-base)}
%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
BuildArch: noarch BuildArch: noarch
%python_subpackages %python_subpackages
@@ -91,6 +102,10 @@ rm tests/test_embed/test_interpreter.py
export PYTHONPATH=${PWD}/build/tests/ export PYTHONPATH=${PWD}/build/tests/
%pytest -k 'not (tests_build_wheel or tests_build_global_wheel)' %pytest -k 'not (tests_build_wheel or tests_build_global_wheel)'
%pre
# If libalternatives is used: Removing old update-alternatives entries.
%python_libalternatives_reset_alternative pybind11-config
%post %post
%python_install_alternative pybind11-config %python_install_alternative pybind11-config