From ad4c01baa51f4828722040b3182d293d752a2f7d6c3ecce782580a41e7c42ef6 Mon Sep 17 00:00:00 2001 From: Daniel Garcia Date: Mon, 5 Feb 2024 11:50:48 +0000 Subject: [PATCH 1/2] - Fix shebang path for "pip3.XX" binaries OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pip?expand=0&rev=117 --- python-pip.changes | 5 +++++ python-pip.spec | 11 ++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/python-pip.changes b/python-pip.changes index 7291501..a66d238 100644 --- a/python-pip.changes +++ b/python-pip.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Feb 5 11:50:28 UTC 2024 - Daniel Garcia + +- Fix shebang path for "pip3.XX" binaries + ------------------------------------------------------------------- Fri Dec 22 16:06:25 UTC 2023 - Ben Greiner diff --git a/python-pip.spec b/python-pip.spec index de40c23..574d460 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -1,7 +1,7 @@ # -# spec file +# spec file for package python-pip # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -61,7 +61,7 @@ BuildRequires: alts Requires: alts %else Requires(post): update-alternatives -Requires(postun):update-alternatives +Requires(postun): update-alternatives %endif %if %{with test} # Test requirements: @@ -134,6 +134,11 @@ export PYTHONPATH=build/env/lib/python%{$python_bin_suffix}/site-packages install -D -m 0644 -t %{buildroot}%{$python_sitelib}/../wheels dist/*.whl %fdupes %{buildroot}%{$python_sitelib} } + +%{python_expand # Fix shebang path for "pip3.XX" binaries +%{$python_fix_shebang_path %{buildroot}%{_bindir}/pip%{$python_bin_suffix}} +} + %python_clone -a %{buildroot}%{_bindir}/pip %python_clone -a %{buildroot}%{_bindir}/pip3 %python_expand %fdupes %{buildroot}%{_bindir} From fd35a26ee19764ddc1e26c9eb9af3712f351208bb755c6bcd0602b66cc3240db Mon Sep 17 00:00:00 2001 From: Daniel Garcia Date: Mon, 5 Feb 2024 12:46:46 +0000 Subject: [PATCH 2/2] - Don't use %python_fix_shebang_path, not available on leap yet OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pip?expand=0&rev=118 --- python-pip.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-pip.spec b/python-pip.spec index 574d460..6313937 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -136,7 +136,7 @@ install -D -m 0644 -t %{buildroot}%{$python_sitelib}/../wheels dist/*.whl } %{python_expand # Fix shebang path for "pip3.XX" binaries -%{$python_fix_shebang_path %{buildroot}%{_bindir}/pip%{$python_bin_suffix}} +sed -i "1s|#\!.*python.*|#\!/usr/bin/$python|" %{buildroot}%{_bindir}/pip%{$python_bin_suffix} } %python_clone -a %{buildroot}%{_bindir}/pip