15
0

1 Commits

Author SHA256 Message Date
2ae7b92ed9 Convert to libalternatives, bsc#1245883 2025-11-03 14:44:02 +01:00
2 changed files with 25 additions and 3 deletions

View File

@@ -1,3 +1,13 @@
-------------------------------------------------------------------
Thu Aug 14 13:08:59 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Convert to libalternatives on SLE-16-based and newer systems only
-------------------------------------------------------------------
Tue Jul 8 13:13:57 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Convert to libalternatives
-------------------------------------------------------------------
Fri Apr 21 12:24:41 UTC 2023 - Dirk Müller <dmueller@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-ephemeral-port-reserve
#
# Copyright (c) 2023 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,8 +16,12 @@
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define modname ephemeral-port-reserve
%if 0%{?suse_version} > 1500
%bcond_without libalternatives
%else
%bcond_with libalternatives
%endif
%{?sle15_python_module_pythons}
Name: python-ephemeral-port-reserve
Version: 1.1.4
@@ -33,8 +37,13 @@ BuildRequires: %{python_module setuptools}
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
Requires(postun): update-alternatives
%endif
BuildArch: noarch
%python_subpackages
@@ -57,6 +66,9 @@ sed -i -e '1{/env python/d}' ephemeral_port_reserve.py
%check
%pytest
%pre
%python_libalternatives_reset_alternative ephemeral-port-reserve
%post
%python_install_alternative ephemeral-port-reserve