From eea53f9f169ccd3ea4061778b812964c6e132b0caf15513b68216b8eeea9ff4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Tue, 19 Aug 2025 14:27:32 +0000 Subject: [PATCH 1/2] - Convert to libalternatives on SLE-16-based and newer systems only OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyftpdlib?expand=0&rev=52 --- python-pyftpdlib.changes | 5 +++++ python-pyftpdlib.spec | 21 ++++++++++++++++++--- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/python-pyftpdlib.changes b/python-pyftpdlib.changes index 6a210ee..842541a 100644 --- a/python-pyftpdlib.changes +++ b/python-pyftpdlib.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Aug 19 14:26:32 UTC 2025 - Markéta Machová + +- Convert to libalternatives on SLE-16-based and newer systems only + ------------------------------------------------------------------- Thu Jul 10 08:53:50 UTC 2025 - Andreas Schwab diff --git a/python-pyftpdlib.spec b/python-pyftpdlib.spec index cdfd035..ec03f73 100644 --- a/python-pyftpdlib.spec +++ b/python-pyftpdlib.spec @@ -17,7 +17,11 @@ # +%if 0%{?suse_version} > 1500 %bcond_without libalternatives +%else +%bcond_with libalternatives +%endif %{?sle15_python_module_pythons} Name: python-pyftpdlib Version: 1.5.10 @@ -34,13 +38,18 @@ BuildRequires: %{python_module pysendfile} BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module wheel} -BuildRequires: alts BuildRequires: fdupes BuildRequires: python-rpm-macros -Requires: alts Requires: python-pyOpenSSL Recommends: python-pysendfile BuildArch: noarch +%if %{with libalternatives} +BuildRequires: alts +Requires: alts +%else +Requires(post): update-alternatives +Requires(postun): update-alternatives +%endif %python_subpackages %description @@ -64,7 +73,7 @@ cp %{SOURCE1} pyftpdlib/test %check export CIBUILDWHEEL=1 ignorebuild="--ignore build" -%{python_expand # expand to python flavor, not to the binary name, then strip the trailing _ +%{python_expand # expand to $python flavor, not to the binary name, then strip the trailing _ builddir=_build.$python_ ignorebuild+=" --ignore ${builddir%%_}" } @@ -84,6 +93,12 @@ export TZ=GMT+1 $python -m pytest } +%post +%python_install_alternative ftpbench + +%postun +%python_uninstall_alternative ftpbench + %pre %python_libalternatives_reset_alternative ftpbench From 490cb8f479bb6956d3930fba6ed7d112ca2bc748199f83d7afc0ec605daf06fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Tue, 19 Aug 2025 14:28:28 +0000 Subject: [PATCH 2/2] OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyftpdlib?expand=0&rev=53 --- python-pyftpdlib.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-pyftpdlib.spec b/python-pyftpdlib.spec index ec03f73..f5a661f 100644 --- a/python-pyftpdlib.spec +++ b/python-pyftpdlib.spec @@ -73,7 +73,7 @@ cp %{SOURCE1} pyftpdlib/test %check export CIBUILDWHEEL=1 ignorebuild="--ignore build" -%{python_expand # expand to $python flavor, not to the binary name, then strip the trailing _ +%{python_expand # expand to python flavor, not to the binary name, then strip the trailing _ builddir=_build.$python_ ignorebuild+=" --ignore ${builddir%%_}" }