14
0

- Convert to libalternatives on SLE-16-based and newer systems only

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pip-run?expand=0&rev=15
This commit is contained in:
2025-08-21 10:16:01 +00:00
committed by Git OBS Bridge
parent 01424bbe5a
commit 9b2bb3f990
2 changed files with 24 additions and 4 deletions

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Aug 21 10:15:31 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Convert to libalternatives on SLE-16-based and newer systems only
------------------------------------------------------------------- -------------------------------------------------------------------
Sat Jul 19 07:23:16 UTC 2025 - Markéta Machová <mmachova@suse.com> Sat Jul 19 07:23:16 UTC 2025 - Markéta Machová <mmachova@suse.com>

View File

@@ -24,13 +24,17 @@
%define psuffix %{nil} %define psuffix %{nil}
%bcond_with test %bcond_with test
%endif %endif
# Disables installing nbformat for tests in Ring1 (see also Patch1)
%bcond_with ringdisabled
# Do not depend on nbformat for SLES or SLFO:Main # Do not depend on nbformat for SLES or SLFO:Main
%if ( 0%{?suse_version} == 1500 && 0%{?sle_version} >= 150400 ) || 0%{?suse_version} == 1600 %if ( 0%{?suse_version} == 1500 && 0%{?sle_version} >= 150400 ) || 0%{?suse_version} == 1600
%bcond_without ringdisabled %bcond_without ringdisabled
%endif %endif
%if 0%{?suse_version} > 1500
%bcond_without libalternatives %bcond_without libalternatives
%else
%bcond_with libalternatives
%endif
# Disables installing nbformat for tests in Ring1 (see also Patch1)
%bcond_with ringdisabled
%{?sle15_python_module_pythons} %{?sle15_python_module_pythons}
Name: python-pip-run%{psuffix} Name: python-pip-run%{psuffix}
Version: 8.8.2 Version: 8.8.2
@@ -49,15 +53,20 @@ BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools >= 56} BuildRequires: %{python_module setuptools >= 56}
BuildRequires: %{python_module setuptools_scm >= 3.4.1} BuildRequires: %{python_module setuptools_scm >= 3.4.1}
BuildRequires: %{python_module wheel} BuildRequires: %{python_module wheel}
BuildRequires: alts
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
Requires: alts
Requires: python-autocommand Requires: python-autocommand
Requires: python-packaging Requires: python-packaging
Requires: python-path >= 15.1 Requires: python-path >= 15.1
Requires: python-pip >= 19.3 Requires: python-pip >= 19.3
BuildArch: noarch BuildArch: noarch
%if %{with libalternatives}
BuildRequires: alts
Requires: alts
%else
Requires(post): update-alternatives
Requires(postun): update-alternatives
%endif
%if 0%{?python_version_nodots} < 38 %if 0%{?python_version_nodots} < 38
Requires: python-importlib-metadata Requires: python-importlib-metadata
%endif %endif
@@ -113,6 +122,12 @@ dont_test=""
%pytest -k "$dont_test" %pytest -k "$dont_test"
%endif %endif
%post
%python_install_alternative pip-run
%postun
%python_uninstall_alternative pip-run
%pre %pre
%python_libalternatives_reset_alternative pip-run %python_libalternatives_reset_alternative pip-run