From aa1bd196f3480a322b87ddc925c01bd26f00f81ac70e2ab5a68264ef2e907a54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 18 May 2020 13:00:57 +0000 Subject: [PATCH] Accepting request 806924 from home:pgajdos:python submit OBS-URL: https://build.opensuse.org/request/show/806924 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-vdirsyncer?expand=0&rev=22 --- python-vdirsyncer.changes | 5 +++++ python-vdirsyncer.spec | 12 +++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/python-vdirsyncer.changes b/python-vdirsyncer.changes index 2ba678c..6eedfff 100644 --- a/python-vdirsyncer.changes +++ b/python-vdirsyncer.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon May 18 09:10:46 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Wed Apr 29 12:51:49 UTC 2020 - Tomáš Chvátal diff --git a/python-vdirsyncer.spec b/python-vdirsyncer.spec index 10ea302..c98c4b6 100644 --- a/python-vdirsyncer.spec +++ b/python-vdirsyncer.spec @@ -35,6 +35,7 @@ Patch0: python-vdirsyncer-fix-tests.patch Patch1: python-vdirsyncer-shift-deadline.patch BuildRequires: %{python_module setuptools_scm} BuildRequires: fdupes +BuildRequires: pkgconfig BuildRequires: python-rpm-macros BuildRequires: systemd-rpm-macros BuildRequires: pkgconfig(systemd) @@ -48,6 +49,8 @@ Requires: python-python-dateutil Requires: python-pytz Requires: python-requests >= 2.4.1 Requires: python-requests-toolbelt >= 0.4.0 +Requires(post): update-alternatives +Requires(postun): update-alternatives Recommends: python-requests-oauthlib BuildArch: noarch # SECTION test requirements @@ -84,6 +87,7 @@ rm -rf vdirsyncer.egg-info %install %python_install +%python_clone -a %{buildroot}%{_bindir}/vdirsyncer %python_expand %fdupes %{buildroot}/%{$python_sitelib} mkdir -p %{buildroot}%{_userunitdir} @@ -95,10 +99,16 @@ export DETERMINISTIC_TESTS=true # test_verbosity - click changed syntax and returns different quotes %pytest -k 'not test_legacy_status and not test_open_graphical_browser and not test_verbosity' +%post +%python_install_alternative vdirsyncer + +%postun +%python_uninstall_alternative vdirsyncer + %files %{python_files} %doc README.rst %license LICENSE -%python3_only %{_bindir}/vdirsyncer +%python_alternative %{_bindir}/vdirsyncer %{python_sitelib}/* %{_userunitdir}/vdirsyncer.service %{_userunitdir}/vdirsyncer.timer