From fa5ef35aed8361de2bd7924b493e60172f624bf9476798ab6cd743dbf647d9e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 18 May 2020 08:12:07 +0000 Subject: [PATCH] Accepting request 806792 from home:pgajdos:python submit OBS-URL: https://build.opensuse.org/request/show/806792 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-watchdog?expand=0&rev=18 --- python-watchdog.changes | 5 +++++ python-watchdog.spec | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/python-watchdog.changes b/python-watchdog.changes index 36135b9..f7c3840 100644 --- a/python-watchdog.changes +++ b/python-watchdog.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon May 18 07:25:34 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Tue Mar 10 10:24:35 UTC 2020 - pgajdos@suse.com diff --git a/python-watchdog.spec b/python-watchdog.spec index 29e00b0..7680283 100644 --- a/python-watchdog.spec +++ b/python-watchdog.spec @@ -34,6 +34,8 @@ BuildRequires: python3-Sphinx Requires: python-PyYAML Requires: python-argh Requires: python-pathtools >= 0.1.1 +Requires(post): update-alternatives +Requires(postun): update-alternatives BuildArch: noarch %python_subpackages @@ -58,6 +60,7 @@ cd docs && make html && rm -r build/html/.buildinfo build/html/objects.inv # Bui %install %python_install +%python_clone -a %{buildroot}%{_bindir}/watchmedo %python_expand %fdupes %{buildroot}%{$python_sitelib} %check @@ -65,10 +68,16 @@ sed -i '/--cov/d' setup.cfg export LANG=en_US.UTF-8 %pytest +%post +%python_install_alternative watchmedo + +%postun +%python_uninstall_alternative watchmedo + %files %{python_files} %license COPYING LICENSE %doc AUTHORS changelog.rst MANIFEST.in README.rst -%python3_only %{_bindir}/watchmedo +%python_alternative %{_bindir}/watchmedo %{python_sitelib}/watchdog %{python_sitelib}/watchdog-%{version}-py%{python_version}.egg-info