From 77ea3d3bfba680829cd08eced92a0d086b035d1b306e74178787e8a99c443abf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Sat, 19 Jul 2025 07:27:11 +0000 Subject: [PATCH] - Convert to libalternatives OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pipreqs?expand=0&rev=11 --- python-pipreqs.changes | 5 +++++ python-pipreqs.spec | 14 ++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/python-pipreqs.changes b/python-pipreqs.changes index 828cac8..4f8840d 100644 --- a/python-pipreqs.changes +++ b/python-pipreqs.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Jul 19 07:26:50 UTC 2025 - Markéta Machová + +- Convert to libalternatives + ------------------------------------------------------------------- Mon Jul 10 05:12:03 UTC 2023 - Steve Kowalik diff --git a/python-pipreqs.spec b/python-pipreqs.spec index 76f2732..455fdc9 100644 --- a/python-pipreqs.spec +++ b/python-pipreqs.spec @@ -1,7 +1,7 @@ # # spec file for package python-pipreqs # -# 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-pipreqs Version: 0.4.13 @@ -28,12 +29,12 @@ BuildRequires: %{python_module pip} BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module wheel} +BuildRequires: alts BuildRequires: fdupes BuildRequires: python-rpm-macros +Requires: alts Requires: python-docopt Requires: python-yarg -Requires(post): update-alternatives -Requires(postun):update-alternatives BuildArch: noarch # SECTION test requirements BuildRequires: %{python_module docopt} @@ -60,11 +61,8 @@ chmod a-x pipreqs/pipreqs.py # Ignore tests that require network access %pytest -k 'not (test_get_imports_info or test_ignored_directory or test_init or test_init_overwrite or teset_init_savepath or test_omit_version or test_clean or test_dynamic_version)' -%post -%python_install_alternative pipreqs - -%postun -%python_uninstall_alternative pipreqs +%pre +%python_libalternatives_reset_alternative pipreqs %files %{python_files} %doc AUTHORS.rst README.rst