14
0

Accepting request 1300744 from devel:languages:python

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

OBS-URL: https://build.opensuse.org/request/show/1300744
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-Markdown?expand=0&rev=56
This commit is contained in:
2025-08-22 15:46:57 +00:00
committed by Git OBS Bridge
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>

View File

@@ -1,6 +1,7 @@
#
# spec file for package python-Markdown
#
# Copyright (c) 2025 SUSE LLC
# Copyright (c) 2025 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
@@ -25,7 +26,11 @@
%define psuffix %{nil}
%bcond_with test
%endif
%if 0%{?suse_version} > 1500
%bcond_without libalternatives
%else
%bcond_with libalternatives
%endif
%{?sle15_python_module_pythons}
Name: python-Markdown%{psuffix}
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 setuptools >= 77.0}
BuildRequires: %{python_module wheel}
BuildRequires: alts
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: alts
Requires: (python-importlib-metadata >= 4.4 if python-base < 3.10)
BuildArch: noarch
%if %{with libalternatives}
BuildRequires: alts
Requires: alts
%else
Requires(post): update-alternatives
Requires(postun): update-alternatives
%endif
%if %{with test}
BuildRequires: %{python_module Markdown = %{version}}
BuildRequires: %{python_module PyYAML}
@@ -85,6 +95,12 @@ supported by the [Available Extensions][].
%endif
%if %{without test}
%post
%python_install_alternative markdown_py
%postun
%python_uninstall_alternative markdown_py
%pre
%python_libalternatives_reset_alternative markdown_py