From 738e375000d156e465fac9a16644fa38b67d4c4c1af6f8568bd475f6d5941eed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 18 May 2020 13:02:02 +0000 Subject: [PATCH] Accepting request 806912 from home:pgajdos:python submit OBS-URL: https://build.opensuse.org/request/show/806912 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-tld?expand=0&rev=33 --- python-tld.changes | 5 +++++ python-tld.spec | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/python-tld.changes b/python-tld.changes index 9bd3657..7615d17 100644 --- a/python-tld.changes +++ b/python-tld.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon May 18 09:10:31 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Sun May 3 13:19:42 UTC 2020 - Sebastian Wagner diff --git a/python-tld.spec b/python-tld.spec index 6bbb1a1..63a1c0f 100644 --- a/python-tld.spec +++ b/python-tld.spec @@ -33,6 +33,8 @@ BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-setuptools Requires: python-six >= 1.9 +Requires(post): update-alternatives +Requires(postun): update-alternatives BuildArch: noarch # SECTION test requirements BuildRequires: %{python_module Faker} @@ -57,15 +59,22 @@ A list of TLD names is taken from Mozillas public suffix list: %install %python_install +%python_clone -a %{buildroot}%{_bindir}/update-tld-names %python_expand %fdupes %{buildroot}%{$python_sitelib} %check %pytest +%post +%python_install_alternative update-tld-names + +%postun +%python_uninstall_alternative update-tld-names + %files %{python_files} %doc README.rst CHANGELOG.rst %license LICENSE_GPL2.0.txt LICENSE_LGPL_2.1.txt -%python3_only %{_bindir}/update-tld-names +%python_alternative %{_bindir}/update-tld-names %{python_sitelib}/* %changelog