From 2ab5eeffc152c45e7896d75af44659759fa63bfcf2ba7bba88304e4ce4ea47d1 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:33:26 +0000 Subject: [PATCH] Accepting request 807638 from home:pgajdos:python submit OBS-URL: https://build.opensuse.org/request/show/807638 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-python-slugify?expand=0&rev=16 --- python-python-slugify.changes | 5 +++++ python-python-slugify.spec | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/python-python-slugify.changes b/python-python-slugify.changes index ac52ad8..119fbf6 100644 --- a/python-python-slugify.changes +++ b/python-python-slugify.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed May 20 07:26:54 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Fri Mar 20 11:17:22 UTC 2020 - pgajdos@suse.com diff --git a/python-python-slugify.spec b/python-python-slugify.spec index 86ab78e..fd1cbbe 100644 --- a/python-python-slugify.spec +++ b/python-python-slugify.spec @@ -31,6 +31,8 @@ BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-setuptools Requires: python-text-unidecode >= 1.3 +Requires(post): update-alternatives +Requires(postun): update-alternatives Suggests: python-Unidecode >= 1.1.1 Conflicts: python-awesome-slugify BuildArch: noarch @@ -48,15 +50,22 @@ sed -i 's/==/>=/' setup.py %install %python_install +%python_clone -a %{buildroot}%{_bindir}/slugify %python_expand %fdupes %{buildroot}%{$python_sitelib} %check %python_exec ./test.py +%post +%python_install_alternative slugify + +%postun +%python_uninstall_alternative slugify + %files %{python_files} %doc CHANGELOG.md README.md %license LICENSE -%python3_only %{_bindir}/slugify +%python_alternative %{_bindir}/slugify %{python_sitelib}/python_slugify-%{version}-py*.egg-info %{python_sitelib}/slugify/