From cfb46c483674b865ce9481eb217638fa8187c39fac17ebb7808d7e2e4b520363 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Wed, 27 May 2020 14:17:42 +0000 Subject: [PATCH] Accepting request 809549 from home:pgajdos:python submit OBS-URL: https://build.opensuse.org/request/show/809549 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-abimap?expand=0&rev=11 --- python-abimap.changes | 5 +++++ python-abimap.spec | 19 +++++++++++++++---- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/python-abimap.changes b/python-abimap.changes index 0530150..15d736b 100644 --- a/python-abimap.changes +++ b/python-abimap.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed May 27 09:35:56 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Thu Aug 22 08:35:33 UTC 2019 - Tomáš Chvátal diff --git a/python-abimap.spec b/python-abimap.spec index 54ac3fb..7b963a5 100644 --- a/python-abimap.spec +++ b/python-abimap.spec @@ -1,7 +1,7 @@ # # spec file for package python-abimap # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -31,6 +31,8 @@ BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-setuptools +Requires(post): update-alternatives +Requires(postun): update-alternatives BuildArch: noarch # SECTION test requirements BuildRequires: %{python_module PyYAML} @@ -70,17 +72,26 @@ rm -rf html/.{doctrees,buildinfo} install -d -m 0755 %{buildroot}%{_mandir}/man1 install -m 0644 man/abimap.1 %{buildroot}%{_mandir}/man1/ +%python_clone -a %{buildroot}%{_mandir}/man1/abimap.1 +%python_clone -a %{buildroot}%{_bindir}/abimap + %python_expand %fdupes %{buildroot}%{$python_sitelib} %check -make -j1 -C tests ABIMAP_NAME_VERSION="abimap-%{version}" ABIMAP_VERSION="%{version}" +%make_build -j1 -C tests ABIMAP_NAME_VERSION="abimap-%{version}" ABIMAP_VERSION="%{version}" %python_expand PYTHONPATH=%{buildroot}%{$python_sitelib}:${PWD}/tests py.test-%{$python_version} -vv tests -k 'not test_main' +%post +%python_install_alternative abimap abimap.1 + +%postun +%python_uninstall_alternative abimap + %files %{python_files} %doc AUTHORS.rst CHANGELOG.rst README.rst %license LICENSE -%python3_only %{_bindir}/abimap -%python3_only %{_mandir}/man1/abimap.1* +%python_alternative %{_bindir}/abimap +%python_alternative %{_mandir}/man1/abimap.1%{?ext_man} %{python_sitelib}/* %files %{python_files doc}