From 666a05a4682c68586a617fefbbee1db8c28e85a37908728c2790aa935c372039 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Mon, 3 Feb 2025 14:13:15 +0000 Subject: [PATCH] - Configure externally_managed with a bcond https://en.opensuse.org/openSUSE:Python:Externally_managed bsc#1228165 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python314?expand=0&rev=33 --- python314.changes | 7 +++++++ python314.spec | 12 ++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/python314.changes b/python314.changes index d607303..61ea1d9 100644 --- a/python314.changes +++ b/python314.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Jan 27 09:16:22 UTC 2025 - Daniel Garcia + +- Configure externally_managed with a bcond + https://en.opensuse.org/openSUSE:Python:Externally_managed + bsc#1228165 + ------------------------------------------------------------------- Fri Jan 17 21:21:42 UTC 2025 - Matej Cepl diff --git a/python314.spec b/python314.spec index 555caf0..94001ef 100644 --- a/python314.spec +++ b/python314.spec @@ -73,6 +73,14 @@ %endif %endif +# Only for Tumbleweed +# https://en.opensuse.org/openSUSE:Python:Externally_managed +%if 0%{?suse_version} > 1600 +%bcond_without externally_managed +%else +%bcond_with externally_managed +%endif + %define python_pkg_name python314 %if %{without GIL} %define python_pkg_name python314-nogil @@ -794,7 +802,7 @@ rm %{buildroot}%{_libdir}/libpython3.so rm %{buildroot}%{_libdir}/pkgconfig/{python3,python3-embed}.pc %endif -%if %{suse_version} > 1550 +%if %{with externally_managed} # PEP-0668 mark this as a distro maintained python sed -e 's,__PYTHONPREFIX__,%{python_pkg_name},' -e 's,__PYTHON__,python%{python_version},' < %{SOURCE4} > %{buildroot}%{sitedir}/EXTERNALLY-MANAGED %endif @@ -996,7 +1004,7 @@ fi %{_mandir}/man1/python%{python_version}.1%{?ext_man} %endif -%if %{suse_version} > 1550 +%if %{with externally_managed} # PEP-0668 %{sitedir}/EXTERNALLY-MANAGED %endif