From df10128ec6b31407c564bc394707a5f6001bb1726665815b1f70ef1aa7db0798 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:28:46 +0000 Subject: [PATCH] Accepting request 807606 from home:pgajdos:python submit OBS-URL: https://build.opensuse.org/request/show/807606 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pingparsing?expand=0&rev=11 --- python-pingparsing.changes | 5 +++++ python-pingparsing.spec | 27 ++++++++++++++++++--------- 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/python-pingparsing.changes b/python-pingparsing.changes index b81854c..9cafe51 100644 --- a/python-pingparsing.changes +++ b/python-pingparsing.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed May 20 07:26:14 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Sun Apr 26 09:26:51 UTC 2020 - Martin Hauke diff --git a/python-pingparsing.spec b/python-pingparsing.spec index 4e5338a..ffa78ee 100644 --- a/python-pingparsing.spec +++ b/python-pingparsing.spec @@ -29,6 +29,16 @@ Source: https://github.com/thombashi/pingparsing/archive/v%{version}.tar BuildRequires: %{python_module setuptools >= 38.3.0} BuildRequires: fdupes BuildRequires: python-rpm-macros +Requires: python-humanreadable >= 0.1.0 +Requires: python-loguru >= 0.4.1 +Requires: python-pyparsing >= 2.0.3 +Requires: python-setuptools >= 38.3.0 +Requires: python-simplejson +Requires: python-subprocrunner >= 1.2.1 +Requires: python-typepy >= 1.1.0 +Requires(post): update-alternatives +Requires(postun): update-alternatives +BuildArch: noarch # SECTION test requirements BuildRequires: %{python_module humanreadable >= 0.1.0} BuildRequires: %{python_module pyparsing >= 2.0.3} @@ -37,14 +47,6 @@ BuildRequires: %{python_module simplejson} BuildRequires: %{python_module subprocrunner >= 1.2.1} BuildRequires: %{python_module typepy >= 1.1.0} # /SECTION -Requires: python-humanreadable >= 0.1.0 -Requires: python-loguru >= 0.4.1 -Requires: python-pyparsing >= 2.0.3 -Requires: python-setuptools >= 38.3.0 -Requires: python-simplejson -Requires: python-subprocrunner >= 1.2.1 -Requires: python-typepy >= 1.1.0 -BuildArch: noarch %python_subpackages %description @@ -59,16 +61,23 @@ sed -i -e '/^#!\//, 1d' pingparsing/__main__.py %install %python_install +%python_clone -a %{buildroot}%{_bindir}/pingparsing %python_expand rm -rf %{buildroot}%{$python_sitelib}/examples %python_expand %fdupes %{buildroot}%{$python_sitelib} %check %pytest +%post +%python_install_alternative pingparsing + +%postun +%python_uninstall_alternative pingparsing + %files %{python_files} %license LICENSE %doc README.rst -%python3_only %{_bindir}/pingparsing +%python_alternative %{_bindir}/pingparsing %{python_sitelib}/pingparsing* %changelog