14
0

- Make the libalternatives transition conditional

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-convertdate?expand=0&rev=23
This commit is contained in:
2025-08-12 08:17:55 +00:00
committed by Git OBS Bridge
parent a4e61b85fb
commit 07c3bbfee2
2 changed files with 22 additions and 3 deletions

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Aug 12 08:17:05 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Make the libalternatives transition conditional
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Jun 25 12:06:07 UTC 2025 - Markéta Machová <mmachova@suse.com> Wed Jun 25 12:06:07 UTC 2025 - Markéta Machová <mmachova@suse.com>

View File

@@ -16,8 +16,11 @@
# #
%{?!python_module:%define python_module() python-%{**} python3-%{**}} %if 0%{?suse_version} > 1500
%bcond_without libalternatives %bcond_without libalternatives
%else
%bcond_with libalternatives
%endif
%{?sle15_python_module_pythons} %{?sle15_python_module_pythons}
Name: python-convertdate Name: python-convertdate
Version: 2.4.0 Version: 2.4.0
@@ -28,12 +31,17 @@ URL: https://github.com/fitnr/convertdate
Source: https://github.com/fitnr/convertdate/archive/v%{version}.tar.gz Source: https://github.com/fitnr/convertdate/archive/v%{version}.tar.gz
BuildRequires: %{python_module pip} BuildRequires: %{python_module pip}
BuildRequires: %{python_module wheel} BuildRequires: %{python_module wheel}
BuildRequires: alts
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
Requires: alts
Requires: python-PyMeeus >= 0.3.6 Requires: python-PyMeeus >= 0.3.6
BuildArch: noarch BuildArch: noarch
%if %{with libalternatives}
BuildRequires: alts
Requires: alts
%else
Requires(post): update-alternatives
Requires(postun): update-alternatives
%endif
# SECTION test requirements # SECTION test requirements
BuildRequires: %{python_module PyMeeus >= 0.3.6} BuildRequires: %{python_module PyMeeus >= 0.3.6}
BuildRequires: %{python_module pytest-xdist} BuildRequires: %{python_module pytest-xdist}
@@ -67,6 +75,12 @@ export LC_ALL="en_US.UTF8"
%pre %pre
%python_libalternatives_reset_alternative censusgeocode %python_libalternatives_reset_alternative censusgeocode
%post
%python_install_alternative censusgeocode
%postun
%python_uninstall_alternative censusgeocode
%files %{python_files} %files %{python_files}
%doc README.md %doc README.md
%license LICENSE %license LICENSE