14
0
forked from pool/python-semver

- Convert to libalternatives on SLE-16-based and newer systems

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-semver?expand=0&rev=46
This commit is contained in:
2025-08-25 11:39:34 +00:00
committed by Git OBS Bridge
parent d2fd1f4d76
commit fd034461f5
2 changed files with 24 additions and 6 deletions

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Mon Aug 25 11:39:05 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Convert to libalternatives on SLE-16-based and newer systems
-------------------------------------------------------------------
Sat Jan 25 08:44:46 UTC 2025 - Sebastian Wagner <sebix@sebix.at>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-semver
#
# Copyright (c) 2025 SUSE LLC
# Copyright (c) 2025 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,6 +17,11 @@
%bcond_without test
%if 0%{?suse_version} > 1500
%bcond_without libalternatives
%else
%bcond_with libalternatives
%endif
%{?sle15_python_module_pythons}
Name: python-semver
Version: 3.0.4
@@ -32,14 +37,19 @@ BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
# SECTION tests
BuildRequires: %{python_module pytest}
# /SECTIOn
Requires(post): update-alternatives
Requires(postun): update-alternatives
# See https://github.com/k-bx/python-semver/issues/67 for why conflicts is needed
Conflicts: python-node-semver
BuildArch: noarch
# SECTION tests
BuildRequires: %{python_module pytest}
# /SECTIOn
%if %{with libalternatives}
BuildRequires: alts
Requires: alts
%else
Requires(post): update-alternatives
Requires(postun): update-alternatives
%endif
%python_subpackages
%description
@@ -68,6 +78,9 @@ sed -i 's/--[^ ]*cov[^ ]*//g' .pytest.ini
%postun
%python_uninstall_alternative pysemver
%pre
%python_libalternatives_reset_alternative pysemver
%files %{python_files}
%doc README.rst
%{python_sitelib}/semver*