From 1dfe34a6c6edbe6013e5e0726d497b5df58a2d247cf5dbdd0e84b31a69bb73bd Mon Sep 17 00:00:00 2001 From: Daniel Garcia Moreno Date: Thu, 23 Oct 2025 11:47:16 +0200 Subject: [PATCH] Convert to libalternatives, bsc#1245883 --- python-smartypants.changes | 5 +++++ python-smartypants.spec | 21 ++++++++++----------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/python-smartypants.changes b/python-smartypants.changes index 5746e53..89acc48 100644 --- a/python-smartypants.changes +++ b/python-smartypants.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Jun 12 12:07:46 UTC 2025 - Markéta Machová + +- Convert to pip-based build and libalternatives + ------------------------------------------------------------------- Mon Sep 25 08:24:56 UTC 2023 - Ondřej Súkup diff --git a/python-smartypants.spec b/python-smartypants.spec index bb8a81c..fa0a51a 100644 --- a/python-smartypants.spec +++ b/python-smartypants.spec @@ -1,7 +1,7 @@ # # spec file for package python-smartypants # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2025 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,6 +16,7 @@ # +%bcond_without libalternatives %{?sle15_python_module_pythons} Name: python-smartypants Version: 2.0.1 @@ -28,14 +29,15 @@ Source: https://github.com/leohemsted/smartypants.py/archive/v%{version} Patch0: use-sys-executable.patch Patch1: fix-312.patch BuildRequires: %{python_module docutils} +BuildRequires: %{python_module pip} BuildRequires: %{python_module pygments} BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +BuildRequires: alts BuildRequires: fdupes BuildRequires: python-rpm-macros -Requires(post): update-alternatives -Requires(postun):update-alternatives +Requires: alts BuildArch: noarch - %python_subpackages %description @@ -47,20 +49,17 @@ typographic punctuation HTML entities. %autosetup -p1 -n smartypants.py-%{version} %build -%python_build +%pyproject_wheel %install -%python_install +%pyproject_install %{python_expand sed -i '1{/^#!/d}' %{buildroot}%{$python_sitelib}/smartypants.py %fdupes %{buildroot}%{$python_sitelib} } %python_clone -a %{buildroot}%{_bindir}/smartypants -%post -%python_install_alternative smartypants - -%postun -%python_uninstall_alternative smartypants +%pre +%python_libalternatives_reset_alternative smartypants %check %pyunittest discover -v tests