From c65a49f092d818f7e704754fbe7c889bd38d367cff3a424194ce138aeb8862f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Thu, 21 May 2020 18:33:47 +0000 Subject: [PATCH] Accepting request 807987 from home:pgajdos:python submit OBS-URL: https://build.opensuse.org/request/show/807987 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-nox?expand=0&rev=7 --- python-nox.changes | 5 +++++ python-nox.spec | 16 ++++++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/python-nox.changes b/python-nox.changes index 3b3b496..42c6541 100644 --- a/python-nox.changes +++ b/python-nox.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu May 21 10:56:38 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Mon Mar 30 10:05:56 UTC 2020 - pgajdos@suse.com diff --git a/python-nox.spec b/python-nox.spec index 8725113..9165539 100644 --- a/python-nox.spec +++ b/python-nox.spec @@ -35,6 +35,8 @@ Requires: python-colorlog >= 2.6.1 Requires: python-py >= 1.4.0 Requires: python-setuptools Requires: python-virtualenv >= 14.0.0 +Requires(post): update-alternatives +Requires(postun): update-alternatives Suggests: python-Jinja2 Suggests: python-tox BuildArch: noarch @@ -64,16 +66,26 @@ sed -Ei 's/,? ?<=?[0-9][0-9.]*//' setup.py %install %python_install +%python_clone -a %{buildroot}%{_bindir}/tox-to-nox +%python_clone -a %{buildroot}%{_bindir}/nox %python_expand %fdupes %{buildroot}%{$python_sitelib} %check %pytest +%post +%python_install_alternative tox-to-nox +%python_install_alternative nox + +%postun +%python_uninstall_alternative tox-to-nox +%python_uninstall_alternative nox + %files %{python_files} %doc README.rst %license LICENSE -%python3_only %{_bindir}/nox -%python3_only %{_bindir}/tox-to-nox +%python_alternative %{_bindir}/nox +%python_alternative %{_bindir}/tox-to-nox %{python_sitelib}/* %changelog