From 8daedb198b2d3b8f38f6a050f166a8b07ebd7aedc65753db813f6c590a87e031 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Tue, 8 Jul 2025 08:32:45 +0000 Subject: [PATCH] - Convert to libalternatives OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-dateparser?expand=0&rev=41 --- python-dateparser.changes | 5 +++++ python-dateparser.spec | 14 ++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/python-dateparser.changes b/python-dateparser.changes index 3853475..8e62ae8 100644 --- a/python-dateparser.changes +++ b/python-dateparser.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Jul 8 08:32:18 UTC 2025 - Markéta Machová + +- Convert to libalternatives + ------------------------------------------------------------------- Thu Dec 7 20:46:37 UTC 2023 - Dirk Müller diff --git a/python-dateparser.spec b/python-dateparser.spec index 2e72756..0032326 100644 --- a/python-dateparser.spec +++ b/python-dateparser.spec @@ -1,7 +1,7 @@ # # spec file for package python-dateparser # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2025 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,6 +16,7 @@ # +%bcond_without libalternatives %{?sle15_python_module_pythons} Name: python-dateparser Version: 1.2.0 @@ -29,14 +30,14 @@ Source: https://files.pythonhosted.org/packages/source/d/dateparser/date Patch1: mark-network-tests.patch BuildRequires: %{python_module pip} BuildRequires: %{python_module wheel} +BuildRequires: alts BuildRequires: fdupes BuildRequires: python-rpm-macros +Requires: alts Requires: python-python-dateutil Requires: python-pytz Requires: python-regex Requires: python-tzlocal -Requires(post): update-alternatives -Requires(postun):update-alternatives Recommends: convertdate Recommends: python-fasttext Recommends: python-langdetect @@ -87,11 +88,8 @@ ignoretestfiles="$ignoretestfiles --ignore tests/test_search.py" donttest="(not test_timezone_offset_calculation)" %pytest -k "$donttest" $ignoretestfiles -%post -%python_install_alternative dateparser-download - -%postun -%python_uninstall_alternative dateparser-download +%pre +%python_libalternatives_reset_alternative dateparser-download %files %{python_files} %doc AUTHORS.rst README.rst