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:
@@ -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>
|
Sat Jan 25 08:44:46 UTC 2025 - Sebastian Wagner <sebix@sebix.at>
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-semver
|
# 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
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@@ -17,6 +17,11 @@
|
|||||||
|
|
||||||
|
|
||||||
%bcond_without test
|
%bcond_without test
|
||||||
|
%if 0%{?suse_version} > 1500
|
||||||
|
%bcond_without libalternatives
|
||||||
|
%else
|
||||||
|
%bcond_with libalternatives
|
||||||
|
%endif
|
||||||
%{?sle15_python_module_pythons}
|
%{?sle15_python_module_pythons}
|
||||||
Name: python-semver
|
Name: python-semver
|
||||||
Version: 3.0.4
|
Version: 3.0.4
|
||||||
@@ -32,14 +37,19 @@ BuildRequires: %{python_module setuptools}
|
|||||||
BuildRequires: %{python_module wheel}
|
BuildRequires: %{python_module wheel}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
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
|
# See https://github.com/k-bx/python-semver/issues/67 for why conflicts is needed
|
||||||
Conflicts: python-node-semver
|
Conflicts: python-node-semver
|
||||||
BuildArch: noarch
|
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
|
%python_subpackages
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@@ -68,6 +78,9 @@ sed -i 's/--[^ ]*cov[^ ]*//g' .pytest.ini
|
|||||||
%postun
|
%postun
|
||||||
%python_uninstall_alternative pysemver
|
%python_uninstall_alternative pysemver
|
||||||
|
|
||||||
|
%pre
|
||||||
|
%python_libalternatives_reset_alternative pysemver
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%doc README.rst
|
%doc README.rst
|
||||||
%{python_sitelib}/semver*
|
%{python_sitelib}/semver*
|
||||||
|
Reference in New Issue
Block a user