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-pyftpdlib?expand=0&rev=52
This commit is contained in:
2025-08-19 14:27:32 +00:00
committed by Git OBS Bridge
parent 0753440220
commit eea53f9f16
2 changed files with 23 additions and 3 deletions

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Aug 19 14:26:32 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Convert to libalternatives on SLE-16-based and newer systems only
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Jul 10 08:53:50 UTC 2025 - Andreas Schwab <schwab@suse.de> Thu Jul 10 08:53:50 UTC 2025 - Andreas Schwab <schwab@suse.de>

View File

@@ -17,7 +17,11 @@
# #
%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-pyftpdlib Name: python-pyftpdlib
Version: 1.5.10 Version: 1.5.10
@@ -34,13 +38,18 @@ BuildRequires: %{python_module pysendfile}
BuildRequires: %{python_module pytest} BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools} BuildRequires: %{python_module setuptools}
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-pyOpenSSL Requires: python-pyOpenSSL
Recommends: python-pysendfile Recommends: python-pysendfile
BuildArch: noarch BuildArch: noarch
%if %{with libalternatives}
BuildRequires: alts
Requires: alts
%else
Requires(post): update-alternatives
Requires(postun): update-alternatives
%endif
%python_subpackages %python_subpackages
%description %description
@@ -64,7 +73,7 @@ cp %{SOURCE1} pyftpdlib/test
%check %check
export CIBUILDWHEEL=1 export CIBUILDWHEEL=1
ignorebuild="--ignore build" 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_ builddir=_build.$python_
ignorebuild+=" --ignore ${builddir%%_}" ignorebuild+=" --ignore ${builddir%%_}"
} }
@@ -84,6 +93,12 @@ export TZ=GMT+1
$python -m pytest $python -m pytest
} }
%post
%python_install_alternative ftpbench
%postun
%python_uninstall_alternative ftpbench
%pre %pre
%python_libalternatives_reset_alternative ftpbench %python_libalternatives_reset_alternative ftpbench