From a0cef402c1bf22938ca6e59c12c7f38fb07b6f6b32c3e44eeff44a72a9aae750 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Fri, 15 May 2020 17:37:54 +0000 Subject: [PATCH] Accepting request 805848 from home:pgajdos:python submit OBS-URL: https://build.opensuse.org/request/show/805848 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-xerox?expand=0&rev=3 --- python-xerox.changes | 5 +++++ python-xerox.spec | 23 ++++++++++++++++------- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/python-xerox.changes b/python-xerox.changes index bf67549..dc5d630 100644 --- a/python-xerox.changes +++ b/python-xerox.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri May 15 12:57:05 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Wed Jul 10 02:45:15 AM UTC 2019 - John Vandenberg diff --git a/python-xerox.spec b/python-xerox.spec index 0581a39..f619eb6 100644 --- a/python-xerox.spec +++ b/python-xerox.spec @@ -1,7 +1,7 @@ # # spec file for package python-xerox # -# 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 @@ -12,7 +12,8 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# %{?!python_module:%define python_module() python-%{**} python3-%{**}} @@ -20,20 +21,21 @@ Name: python-xerox Version: 0.4.1 Release: 0 -License: MIT Summary: Simple Copy + Paste in Python -Url: http://github.com/kennethreitz/xerox +License: MIT Group: Development/Languages/Python +URL: https://github.com/kennethreitz/xerox Source: https://files.pythonhosted.org/packages/source/x/xerox/xerox-%{version}.tar.gz -BuildRequires: python-rpm-macros BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: fdupes +BuildRequires: python-rpm-macros BuildRequires: xclip BuildRequires: xvfb-run Requires: xclip +Requires(post): update-alternatives +Requires(postun): update-alternatives BuildArch: noarch - %python_subpackages %description @@ -47,15 +49,22 @@ Python copy and paste library supporting OS X, X11 (Linux, BSD, etc.), and Windo %install %python_install +%python_clone -a %{buildroot}%{_bindir}/xerox %python_expand %fdupes %{buildroot}%{$python_sitelib} %check %python_expand xvfb-run $python -m pytest +%post +%python_install_alternative xerox + +%postun +%python_uninstall_alternative xerox + %files %{python_files} %doc README.rst %license LICENSE -%python3_only %{_bindir}/xerox +%python_alternative %{_bindir}/xerox %{python_sitelib}/* %changelog