From 8dbd1aefef61b790d54fce1804bea901e16c322a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20Sch=C3=A4fer?= Date: Thu, 10 Oct 2024 00:15:04 +0200 Subject: [PATCH] Fix packaging for Leap Use the right python interpreter for Leap --- doc/source/conf.py | 2 +- .../python-kiwi_boxed_plugin-spec-template | 21 +++++++++++++------ 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index a6b2916..69f90bb 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -83,7 +83,7 @@ html_theme = "sphinx_rtd_theme" -html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] +# html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] html_theme_options = { 'collapse_navigation': False, diff --git a/package/python-kiwi_boxed_plugin-spec-template b/package/python-kiwi_boxed_plugin-spec-template index a2b3636..b770546 100644 --- a/package/python-kiwi_boxed_plugin-spec-template +++ b/package/python-kiwi_boxed_plugin-spec-template @@ -19,16 +19,25 @@ # If they aren't provided by a system installed macro, define them %{!?_defaultdocdir: %global _defaultdocdir %{_datadir}/doc} + +%if 0%{?suse_version} && 0%{?suse_version} < 1600 +%global __python3 /usr/bin/python3.11 +%global python3_pkgversion 311 +%else %{!?__python3: %global __python3 /usr/bin/python3} +%{!?python3_pkgversion:%global python3_pkgversion 3} +%endif %if %{undefined python3_sitelib} %global python3_sitelib %(%{__python3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") %endif -%if 0%{?el7} -%global python3_pkgversion 36 -%else -%{!?python3_pkgversion:%global python3_pkgversion 3} +%if %{undefined python3_version} +%global python3_version %(%{__python3} -Esc "import sys; sys.stdout.write('{0.major}.{0.minor}'.format(sys.version_info))") +%endif + +%if %{undefined python3_version_nodots} +%global python3_version_nodots %(%{__python3} -Esc "import sys; sys.stdout.write('{0.major}{0.minor}'.format(sys.version_info))") %endif %if 0%{?debian} || 0%{?ubuntu} @@ -97,11 +106,11 @@ of images based on fast booting VM images %build # Build Python 3 version -python3 setup.py build +%{__python3} setup.py build %install # Install Python 3 version -python3 setup.py install --prefix=%{_prefix} --root=%{buildroot} %{?is_deb:--install-layout=deb} +%{__python3} setup.py install --prefix=%{_prefix} --root=%{buildroot} %{?is_deb:--install-layout=deb} # Install man pages and package documentation make buildroot=%{buildroot}/ docdir=%{_defaultdocdir}/ install