File 002_kodi_python313_interpreter.patch of Package kodi-hdr
diff -ruN xbmc/addons/service.xbmc.versioncheck/resources/lib/version_check/viewer.py xbmc.patch/addons/service.xbmc.versioncheck/resources/lib/version_check/viewer.py
--- xbmc/addons/service.xbmc.versioncheck/resources/lib/version_check/viewer.py 2025-03-09 10:17:52.570423254 -0400
+++ xbmc.patch/addons/service.xbmc.versioncheck/resources/lib/version_check/viewer.py 2025-03-09 10:19:08.800043041 -0400
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3.13
# -*- coding: utf-8 -*-
"""
diff -ruN xbmc/cmake/scripts/linux/Install.cmake xbmc.patch/cmake/scripts/linux/Install.cmake
--- xbmc/cmake/scripts/linux/Install.cmake 2025-03-09 10:17:52.673760591 -0400
+++ xbmc.patch/cmake/scripts/linux/Install.cmake 2025-03-09 10:19:08.803376503 -0400
@@ -199,7 +199,7 @@
if(ENABLE_EVENTCLIENTS)
find_package(PythonInterpreter REQUIRED)
- execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "from sysconfig import get_path; print(get_path('platlib', scheme='posix_prefix', vars={'platbase':'${CMAKE_INSTALL_PREFIX}'}))"
+ execute_process(COMMAND /usr/bin/python3.13 -c "from sysconfig import get_path; print(get_path('platlib', scheme='posix_prefix', vars={'platbase':'${CMAKE_INSTALL_PREFIX}'}))"
OUTPUT_VARIABLE PYTHON_LIB_PATH OUTPUT_STRIP_TRAILING_WHITESPACE)
# Install kodi-eventclients-common BT python files
install(PROGRAMS ${CMAKE_SOURCE_DIR}/tools/EventClients/lib/python/bt/__init__.py
diff -ruN xbmc/tools/EventClients/Clients/KodiSend/kodi-send.py xbmc.patch/tools/EventClients/Clients/KodiSend/kodi-send.py
--- xbmc/tools/EventClients/Clients/KodiSend/kodi-send.py 2025-03-09 10:17:52.840433714 -0400
+++ xbmc.patch/tools/EventClients/Clients/KodiSend/kodi-send.py 2025-03-09 10:19:08.806709965 -0400
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3.13
#
# XBMC Media Center
# XBMC Send
diff -ruN xbmc/tools/EventClients/Clients/PS3BDRemote/ps3_remote.py xbmc.patch/tools/EventClients/Clients/PS3BDRemote/ps3_remote.py
--- xbmc/tools/EventClients/Clients/PS3BDRemote/ps3_remote.py 2025-03-09 10:17:52.840433714 -0400
+++ xbmc.patch/tools/EventClients/Clients/PS3BDRemote/ps3_remote.py 2025-03-09 10:19:08.810043428 -0400
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3.13
# -*- coding: utf-8 -*-
# Copyright (C) 2008-2013 Team XBMC
diff -ruN xbmc/tools/EventClients/Clients/PS3SixaxisController/ps3d.py xbmc.patch/tools/EventClients/Clients/PS3SixaxisController/ps3d.py
--- xbmc/tools/EventClients/Clients/PS3SixaxisController/ps3d.py 2025-03-09 10:17:52.840433714 -0400
+++ xbmc.patch/tools/EventClients/Clients/PS3SixaxisController/ps3d.py 2025-03-09 10:19:08.810043428 -0400
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3.13
# -*- coding: utf-8 -*-
# Copyright (C) 2008-2013 Team XBMC
diff -ruN xbmc/tools/EventClients/examples/python/example_action.py xbmc.patch/tools/EventClients/examples/python/example_action.py
--- xbmc/tools/EventClients/examples/python/example_action.py 2025-03-09 10:17:52.847100639 -0400
+++ xbmc.patch/tools/EventClients/examples/python/example_action.py 2025-03-09 10:19:08.810043428 -0400
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3.13
# This is a simple example showing how you can send a key press event
# to XBMC using the XBMCClient class
diff -ruN xbmc/tools/EventClients/examples/python/example_button1.py xbmc.patch/tools/EventClients/examples/python/example_button1.py
--- xbmc/tools/EventClients/examples/python/example_button1.py 2025-03-09 10:17:52.847100639 -0400
+++ xbmc.patch/tools/EventClients/examples/python/example_button1.py 2025-03-09 10:19:08.810043428 -0400
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3.13
# This is a simple example showing how you can send 2 button events
# to XBMC in a queued fashion to shut it down.
diff -ruN xbmc/tools/EventClients/examples/python/example_button2.py xbmc.patch/tools/EventClients/examples/python/example_button2.py
--- xbmc/tools/EventClients/examples/python/example_button2.py 2025-03-09 10:17:52.847100639 -0400
+++ xbmc.patch/tools/EventClients/examples/python/example_button2.py 2025-03-09 10:19:08.810043428 -0400
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3.13
# This is a simple example showing how you can send a key press event
# to XBMC in a non-queued fashion to achieve a button pressed down
diff -ruN xbmc/tools/EventClients/examples/python/example_mouse.py xbmc.patch/tools/EventClients/examples/python/example_mouse.py
--- xbmc/tools/EventClients/examples/python/example_mouse.py 2025-03-09 10:17:52.847100639 -0400
+++ xbmc.patch/tools/EventClients/examples/python/example_mouse.py 2025-03-09 10:19:08.813376890 -0400
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3.13
# This is a simple example showing how you can send mouse movement
# events to XBMC.
diff -ruN xbmc/tools/EventClients/examples/python/example_notification.py xbmc.patch/tools/EventClients/examples/python/example_notification.py
--- xbmc/tools/EventClients/examples/python/example_notification.py 2025-03-09 10:17:52.847100639 -0400
+++ xbmc.patch/tools/EventClients/examples/python/example_notification.py 2025-03-09 10:19:08.813376890 -0400
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3.13
# This is a simple example showing how you can show a notification
# window with a custom icon inside XBMC. It could be used by mail
diff -ruN xbmc/tools/EventClients/examples/python/example_simple.py xbmc.patch/tools/EventClients/examples/python/example_simple.py
--- xbmc/tools/EventClients/examples/python/example_simple.py 2025-03-09 10:17:52.847100639 -0400
+++ xbmc.patch/tools/EventClients/examples/python/example_simple.py 2025-03-09 10:19:08.813376890 -0400
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3.13
# This is a simple example showing how you can send a key press event
# to XBMC using the XBMCClient class
diff -ruN xbmc/tools/EventClients/lib/python/ps3/sixaxis.py xbmc.patch/tools/EventClients/lib/python/ps3/sixaxis.py
--- xbmc/tools/EventClients/lib/python/ps3/sixaxis.py 2025-03-09 10:17:52.847100639 -0400
+++ xbmc.patch/tools/EventClients/lib/python/ps3/sixaxis.py 2025-03-09 10:19:08.813376890 -0400
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3.13
# -*- coding: utf-8 -*-
# Copyright (C) 2008-2013 Team XBMC
diff -ruN xbmc/tools/EventClients/lib/python/ps3/sixpair.py xbmc.patch/tools/EventClients/lib/python/ps3/sixpair.py
--- xbmc/tools/EventClients/lib/python/ps3/sixpair.py 2025-03-09 10:17:52.847100639 -0400
+++ xbmc.patch/tools/EventClients/lib/python/ps3/sixpair.py 2025-03-09 10:19:08.813376890 -0400
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3.13
# -*- coding: utf-8 -*-
import sys
diff -ruN xbmc/tools/EventClients/lib/python/ps3/sixwatch.py xbmc.patch/tools/EventClients/lib/python/ps3/sixwatch.py
--- xbmc/tools/EventClients/lib/python/ps3/sixwatch.py 2025-03-09 10:17:52.847100639 -0400
+++ xbmc.patch/tools/EventClients/lib/python/ps3/sixwatch.py 2025-03-09 10:19:08.813376890 -0400
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3.13
# -*- coding: utf-8 -*-
import pyudev
diff -ruN xbmc/tools/EventClients/lib/python/xbmcclient.py xbmc.patch/tools/EventClients/lib/python/xbmcclient.py
--- xbmc/tools/EventClients/lib/python/xbmcclient.py 2025-03-09 10:17:52.847100639 -0400
+++ xbmc.patch/tools/EventClients/lib/python/xbmcclient.py 2025-03-09 10:19:08.813376890 -0400
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3.13
# -*- coding: utf-8 -*-
# Copyright (C) 2008-2013 Team XBMC
diff -ruN xbmc/tools/EventClients/lib/python/zeroconf.py xbmc.patch/tools/EventClients/lib/python/zeroconf.py
--- xbmc/tools/EventClients/lib/python/zeroconf.py 2025-03-09 10:17:52.847100639 -0400
+++ xbmc.patch/tools/EventClients/lib/python/zeroconf.py 2025-03-09 10:19:08.816710353 -0400
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3.13
# -*- coding: utf-8 -*-
# Copyright (C) 2008-2013 Team XBMC
diff -ruN xbmc/tools/darwin/Support/GenerateMissingImages-tvos.py xbmc.patch/tools/darwin/Support/GenerateMissingImages-tvos.py
--- xbmc/tools/darwin/Support/GenerateMissingImages-tvos.py 2025-03-09 10:17:52.863767951 -0400
+++ xbmc.patch/tools/darwin/Support/GenerateMissingImages-tvos.py 2025-03-09 10:19:08.803376503 -0400
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3.13
import sys, os, json
from subprocess import call
diff -ruN xbmc/tools/depends/native/meson/Makefile xbmc.patch/tools/depends/native/meson/Makefile
--- xbmc/tools/depends/native/meson/Makefile 2025-03-09 10:17:52.877101802 -0400
+++ xbmc.patch/tools/depends/native/meson/Makefile 2025-03-09 10:19:08.803376503 -0400
@@ -8,11 +8,11 @@
$(PLATFORM): $(DEPS) | $(TARBALLS_LOCATION)/$(ARCHIVE).$(HASH_TYPE)
rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
cd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
- cd $(PLATFORM); $(NATIVEPREFIX)/bin/python3 setup.py config
+ cd $(PLATFORM); $(NATIVEPREFIX)/bin/python3.13 setup.py config
.installed-$(PLATFORM): $(PLATFORM)
- cd $(PLATFORM); $(NATIVEPREFIX)/bin/python3 setup.py build
- cd $(PLATFORM); $(NATIVEPREFIX)/bin/python3 setup.py install --prefix="$(NATIVEPREFIX)"
+ cd $(PLATFORM); $(NATIVEPREFIX)/bin/python3.13 setup.py build
+ cd $(PLATFORM); $(NATIVEPREFIX)/bin/python3.13 setup.py install --prefix="$(NATIVEPREFIX)"
touch $@
clean:
diff -ruN xbmc/tools/depends/target/python3/Makefile xbmc.patch/tools/depends/target/python3/Makefile
--- xbmc/tools/depends/target/python3/Makefile 2025-03-09 10:17:52.887102189 -0400
+++ xbmc.patch/tools/depends/target/python3/Makefile 2025-03-09 10:19:08.803376503 -0400
@@ -84,7 +84,7 @@
--disable-framework \
--without-pymalloc \
--enable-ipv6 \
- --with-build-python=$(NATIVEPREFIX)/bin/python3 \
+ --with-build-python=$(NATIVEPREFIX)/bin/python3.13 \
--with-system-expat=yes \
--disable-test-modules \
MODULE_BUILDTYPE=static \
diff -ruN xbmc/tools/depends/target/pythonmodule-setuptools/Makefile xbmc.patch/tools/depends/target/pythonmodule-setuptools/Makefile
--- xbmc/tools/depends/target/pythonmodule-setuptools/Makefile 2025-03-09 10:17:52.887102189 -0400
+++ xbmc.patch/tools/depends/target/pythonmodule-setuptools/Makefile 2025-03-09 10:19:08.803376503 -0400
@@ -10,7 +10,7 @@
cd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
.installed-$(PLATFORM): $(PLATFORM)
- cd $(PLATFORM); PYTHONPATH="$(PYTHON_SITE_PKG)" $(NATIVEPREFIX)/bin/python3 setup.py install --prefix=$(PREFIX)
+ cd $(PLATFORM); PYTHONPATH="$(PYTHON_SITE_PKG)" $(NATIVEPREFIX)/bin/python3.13 setup.py install --prefix=$(PREFIX)
find $(PYTHON_SITE_PKG)/*setuptools* -type f -name "*.exe" -exec rm -f {} \;
touch $@
diff -ruN xbmc/xbmc/addons/kodi-dev-kit/tools/code-generator/code_generator.py xbmc.patch/xbmc/addons/kodi-dev-kit/tools/code-generator/code_generator.py
--- xbmc/xbmc/addons/kodi-dev-kit/tools/code-generator/code_generator.py 2025-03-09 10:17:52.927103739 -0400
+++ xbmc.patch/xbmc/addons/kodi-dev-kit/tools/code-generator/code_generator.py 2025-03-09 10:19:08.816710353 -0400
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3.13
# -*- coding: utf-8 -*-
# Copyright (C) 2021 Team Kodi
diff -ruN xbmc/xbmc/addons/kodi-dev-kit/tools/doxygen-header-class-list-creator.py xbmc.patch/xbmc/addons/kodi-dev-kit/tools/doxygen-header-class-list-creator.py
--- xbmc/xbmc/addons/kodi-dev-kit/tools/doxygen-header-class-list-creator.py 2025-03-09 10:17:52.927103739 -0400
+++ xbmc.patch/xbmc/addons/kodi-dev-kit/tools/doxygen-header-class-list-creator.py 2025-03-09 10:19:08.816710353 -0400
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3.13
from optparse import OptionParser
import glob