From 67114aec5eeb900d972ae63db4b86058a781773f9e07005958f9ee3f453d9b44 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Thu, 30 Jan 2025 17:34:53 +0000 Subject: [PATCH] Accepting request 1240510 from home:dgarcia:branches:devel:languages:python:Factory - Configure externally_managed with a bcond https://en.opensuse.org/openSUSE:Python:Externally_managed bsc#1228165 OBS-URL: https://build.opensuse.org/request/show/1240510 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python312?expand=0&rev=92 --- python312.changes | 7 +++++++ python312.spec | 14 +++++++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/python312.changes b/python312.changes index 10e66c3..433450a 100644 --- a/python312.changes +++ b/python312.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Jan 27 09:02:35 UTC 2025 - Daniel Garcia + +- Configure externally_managed with a bcond + https://en.opensuse.org/openSUSE:Python:Externally_managed + bsc#1228165 + ------------------------------------------------------------------- Fri Dec 6 20:39:56 UTC 2024 - Matej Cepl diff --git a/python312.spec b/python312.spec index 9b098ab..0764181 100644 --- a/python312.spec +++ b/python312.spec @@ -1,7 +1,7 @@ # # spec file for package python312 # -# Copyright (c) 2024 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 @@ -42,6 +42,14 @@ %bcond_with profileopt %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 python312 %if "%{python_pkg_name}" == "%{primary_python}" %define primary_interpreter 1 @@ -727,7 +735,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 @@ -925,7 +933,7 @@ fi %{_mandir}/man1/python3.1%{?ext_man} %endif %{_mandir}/man1/python%{python_version}.1%{?ext_man} -%if %{suse_version} > 1550 +%if %{with externally_managed} # PEP-0668 %{sitedir}/EXTERNALLY-MANAGED %endif