forked from pool/python-pybind11
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:
@@ -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>
|
||||
|
||||
|
@@ -16,6 +16,12 @@
|
||||
#
|
||||
|
||||
|
||||
%if 0%{?suse_version} > 1500
|
||||
%bcond_without libalternatives
|
||||
%else
|
||||
%bcond_with libalternatives
|
||||
%endif
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
Name: python-pybind11
|
||||
Version: 2.8.0
|
||||
@@ -30,10 +36,15 @@ BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: cmake
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: python-rpm-macros >= 20210929
|
||||
BuildRequires: %{python_module numpy if (%python-base without python36-base)}
|
||||
%if %{with libalternatives}
|
||||
Requires: alts
|
||||
BuildRequires: alts
|
||||
%else
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun):update-alternatives
|
||||
%endif
|
||||
BuildArch: noarch
|
||||
%python_subpackages
|
||||
|
||||
@@ -91,6 +102,10 @@ rm tests/test_embed/test_interpreter.py
|
||||
export PYTHONPATH=${PWD}/build/tests/
|
||||
%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
|
||||
%python_install_alternative pybind11-config
|
||||
|
||||
|
Reference in New Issue
Block a user