From 3385631a2ee7caad0c319953053c893972297d694e5eea3584aa32594dc126b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Wed, 20 May 2020 11:29:30 +0000 Subject: [PATCH] Accepting request 807615 from home:pgajdos:python submit OBS-URL: https://build.opensuse.org/request/show/807615 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyftpdlib?expand=0&rev=23 --- python-pyftpdlib.changes | 5 +++++ python-pyftpdlib.spec | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/python-pyftpdlib.changes b/python-pyftpdlib.changes index 3e5864c..763fbba 100644 --- a/python-pyftpdlib.changes +++ b/python-pyftpdlib.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed May 20 07:26:27 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Mon Apr 20 10:41:55 UTC 2020 - Tomáš Chvátal diff --git a/python-pyftpdlib.spec b/python-pyftpdlib.spec index 78f0fa0..51c0859 100644 --- a/python-pyftpdlib.spec +++ b/python-pyftpdlib.spec @@ -37,6 +37,8 @@ BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-pyOpenSSL +Requires(post): update-alternatives +Requires(postun): update-alternatives Recommends: python-pysendfile BuildArch: noarch %if %{with python2} @@ -60,6 +62,7 @@ write very asynchronous FTP servers with Python. %install %python_install +%python_clone -a %{buildroot}%{_bindir}/ftpbench %python_expand %fdupes %{buildroot}%{$python_sitelib} # Note: Do not remove tests. Other packages import them @@ -69,10 +72,16 @@ export PYTHONPATH=$PWD %python_exec pyftpdlib/test/runner.py %endif +%post +%python_install_alternative ftpbench + +%postun +%python_uninstall_alternative ftpbench + %files %{python_files} %license LICENSE %doc README.rst -%python3_only %{_bindir}/ftpbench +%python_alternative %{_bindir}/ftpbench %{python_sitelib}/* %changelog