14
0

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

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Markdown?expand=0&rev=112
This commit is contained in:
2025-08-21 09:31:19 +00:00
committed by Git OBS Bridge
parent 71afb60f39
commit 2be378eccf
2 changed files with 23 additions and 2 deletions

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Aug 21 09:30:43 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Convert to libalternatives on SLE-16-based and newer systems only
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Aug 12 18:28:43 UTC 2025 - Matej Cepl <mcepl@cepl.eu> Tue Aug 12 18:28:43 UTC 2025 - Matej Cepl <mcepl@cepl.eu>

View File

@@ -1,6 +1,7 @@
# #
# spec file for package python-Markdown # spec file for package python-Markdown
# #
# Copyright (c) 2025 SUSE LLC
# Copyright (c) 2025 SUSE LLC and contributors # 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
@@ -25,7 +26,11 @@
%define psuffix %{nil} %define psuffix %{nil}
%bcond_with test %bcond_with test
%endif %endif
%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-Markdown%{psuffix} Name: python-Markdown%{psuffix}
Version: 3.8.2 Version: 3.8.2
@@ -44,12 +49,17 @@ BuildRequires: %{python_module importlib-metadata >= 4.4 if %python-base < 3.10
BuildRequires: %{python_module pip} BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools >= 77.0} BuildRequires: %{python_module setuptools >= 77.0}
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-importlib-metadata >= 4.4 if python-base < 3.10) Requires: (python-importlib-metadata >= 4.4 if python-base < 3.10)
BuildArch: noarch BuildArch: noarch
%if %{with libalternatives}
BuildRequires: alts
Requires: alts
%else
Requires(post): update-alternatives
Requires(postun): update-alternatives
%endif
%if %{with test} %if %{with test}
BuildRequires: %{python_module Markdown = %{version}} BuildRequires: %{python_module Markdown = %{version}}
BuildRequires: %{python_module PyYAML} BuildRequires: %{python_module PyYAML}
@@ -85,6 +95,12 @@ supported by the [Available Extensions][].
%endif %endif
%if %{without test} %if %{without test}
%post
%python_install_alternative markdown_py
%postun
%python_uninstall_alternative markdown_py
%pre %pre
%python_libalternatives_reset_alternative markdown_py %python_libalternatives_reset_alternative markdown_py