From f54a75f813a7c152b0823bcc7b4415ddd64985e43bb7775137c023353dfd4df4 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:39 +0000 Subject: [PATCH] Accepting request 807616 from home:pgajdos:python submit OBS-URL: https://build.opensuse.org/request/show/807616 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-PyFxA?expand=0&rev=16 --- python-PyFxA.changes | 5 +++++ python-PyFxA.spec | 15 ++++++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/python-PyFxA.changes b/python-PyFxA.changes index 2d97cfc..41e6459 100644 --- a/python-PyFxA.changes +++ b/python-PyFxA.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed May 20 07:26:28 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Fri Jul 26 07:07:23 UTC 2019 - Antoine Belvire diff --git a/python-PyFxA.spec b/python-PyFxA.spec index 2b4ad8a..2ed4b18 100644 --- a/python-PyFxA.spec +++ b/python-PyFxA.spec @@ -1,7 +1,7 @@ # # spec file for package python-PyFxA # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # Copyright (c) 2017-2018 The openSUSE Project. # # All modifications and additions to the file contributed by third parties @@ -42,6 +42,8 @@ Requires: python-PyBrowserID Requires: python-cryptography Requires: python-requests >= 2.4.2 Requires: python-six +Requires(post): update-alternatives +Requires(postun): update-alternatives BuildArch: noarch %ifpython3 Requires: python-setuptools @@ -63,15 +65,22 @@ find ./ -type f -exec chmod -x {} + %install %python_install +%python_clone -a %{buildroot}%{_bindir}/fxa-client %python_expand %fdupes %{buildroot}%{$python_sitelib} %check # test_monkey_patch_for_gevent gevent no longer packaged as it is deprecated -%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} py.test-%{$python_bin_suffix} -v -k 'not test_monkey_patch_for_gevent' fxa/tests/ +%pytest -k 'not test_monkey_patch_for_gevent' fxa/tests/ + +%post +%python_install_alternative fxa-client + +%postun +%python_uninstall_alternative fxa-client %files %{python_files} %doc CHANGES.txt README.rst -%python3_only %{_bindir}/fxa-client +%python_alternative %{_bindir}/fxa-client %{python_sitelib}/* %changelog