forked from pool/python-cbor2
Convert to libalternatives, bsc#1245883
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-cbor2
|
||||
#
|
||||
# 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,6 +16,11 @@
|
||||
#
|
||||
|
||||
|
||||
%if 0%{?suse_version} > 1500
|
||||
%bcond_without libalternatives
|
||||
%else
|
||||
%bcond_with libalternatives
|
||||
%endif
|
||||
%{?sle15_python_module_pythons}
|
||||
Name: python-cbor2
|
||||
Version: 5.6.5
|
||||
@@ -33,8 +38,13 @@ BuildRequires: %{python_module setuptools_scm >= 6.4}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
%if %{with libalternatives}
|
||||
BuildRequires: alts
|
||||
Requires: alts
|
||||
%else
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
%endif
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
@@ -60,6 +70,9 @@ export LANG=en_US.UTF8
|
||||
export LANG=en_US.UTF8
|
||||
%pytest_arch
|
||||
|
||||
%pre
|
||||
%python_libalternatives_reset_alternative cbor2
|
||||
|
||||
%post
|
||||
%python_install_alternative cbor2
|
||||
|
||||
|
||||
Reference in New Issue
Block a user