Accepting request 923309 from home:schubi2

- Use libalternatives instead of update-alternatives.

OBS-URL: https://build.opensuse.org/request/show/923309
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-nbformat?expand=0&rev=19
This commit is contained in:
Benjamin Greiner 2021-10-06 09:12:54 +00:00 committed by Git OBS Bridge
parent 92338ede14
commit a9296b5348
2 changed files with 21 additions and 1 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed Sep 8 14:22:22 UTC 2021 - Stefan Schubert <schubi@suse.de>
- Use libalternatives instead of update-alternatives.
-------------------------------------------------------------------
Sat Apr 10 20:48:39 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-%{**}}
%define doc_ver 5.0.4
Name: python-nbformat
@ -29,10 +35,15 @@ URL: https://github.com/jupyter/nbformat
Source: %{url}/archive/%{version}.tar.gz#/nbformat-%{version}.tar.gz
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: python-rpm-macros >= 20210929
BuildRequires: unzip
%if %{with libalternatives}
Requires: alts
BuildRequires: alts
%else
Requires(post): update-alternatives
Requires(postun):update-alternatives
%endif
Requires: jupyter-nbformat = %{version}
Requires: python-ipython_genutils
Requires: python-jsonschema > 2.5.0
@ -89,6 +100,10 @@ This package provides the jupyter components.
# we don't have the alternative validator, cannot fallback from it
%pytest -k "not (fastjsonschema or test_fallback_validator_with_iter_errors_using_ref)"
%pre
# If libalternatives is used: Removing old update-alternatives entries.
%python_libalternatives_reset_alternative jupyter-trust
%post
%python_install_alternative jupyter-trust