diff --git a/packages/addons/tools/system-tools/package.mk b/packages/addons/tools/system-tools/package.mk index 5a5de5f11b..b0134986e9 100644 --- a/packages/addons/tools/system-tools/package.mk +++ b/packages/addons/tools/system-tools/package.mk @@ -120,7 +120,7 @@ addon() { # i2c-tools cp -P $(get_install_dir i2c-tools)/usr/sbin/{i2cdetect,i2cdump,i2cget,i2cset} ${ADDON_BUILD}/${PKG_ADDON_ID}/bin - cp -P $(get_install_dir i2c-tools)/usr/lib/${PKG_PYTHON_VERSION}/site-packages/smbus.so ${ADDON_BUILD}/${PKG_ADDON_ID}/lib + cp -P $(get_install_dir i2c-tools)/usr/lib/${PKG_PYTHON_VERSION}/site-packages/smbus-*.egg ${ADDON_BUILD}/${PKG_ADDON_ID}/lib cp -P $(get_install_dir i2c-tools)/usr/lib/libi2c.so.0.1.1 ${ADDON_BUILD}/${PKG_ADDON_ID}/lib/libi2c.so cp -P $(get_install_dir i2c-tools)/usr/lib/libi2c.so.0.1.1 ${ADDON_BUILD}/${PKG_ADDON_ID}/lib/libi2c.so.0 cp -P $(get_install_dir i2c-tools)/usr/lib/libi2c.so.0.1.1 ${ADDON_BUILD}/${PKG_ADDON_ID}/lib/libi2c.so.0.1.1 diff --git a/packages/lang/Python3/package.mk b/packages/lang/Python3/package.mk index a8f65a935a..f078d5293c 100644 --- a/packages/lang/Python3/package.mk +++ b/packages/lang/Python3/package.mk @@ -42,7 +42,7 @@ PKG_CONFIGURE_OPTS_HOST="ac_cv_prog_HAS_HG=/bin/false --with-doc-strings --with-system-ffi --without-pymalloc - --without-ensurepip + --with-ensurepip=no " PKG_CONFIGURE_OPTS_TARGET="ac_cv_prog_HAS_HG=/bin/false @@ -89,6 +89,10 @@ pre_configure_host() { export PYTHON_MODULES_INCLUDE="${HOST_INCDIR}" export PYTHON_MODULES_LIB="${HOST_LIBDIR}" export DISABLED_EXTENSIONS="readline _curses _curses_panel ${PKG_PY_DISABLED_MODULES}" + # control patch Python3-0300-generate-legacy-pyc-bytecode + # this needs to be set when building host based py file + # do not set this for py compiles being done for target use + export DONT_BUILD_LEGACY_PYC=1 } post_make_host() { @@ -99,8 +103,9 @@ post_make_host() { post_makeinstall_host() { ln -sf ${PKG_PYTHON_VERSION} ${TOOLCHAIN}/bin/python + ${TOOLCHAIN}/bin/python -m ensurepip --altinstall + rm -f ${TOOLCHAIN}/bin/smtpd.py* - rm -f ${TOOLCHAIN}/bin/pyvenv rm -f ${TOOLCHAIN}/bin/pydoc* rm -fr ${PKG_BUILD}/.${HOST_NAME}/build/temp.* diff --git a/packages/lang/Python3/patches/Python3-0300-generate-legacy-pyc-bytecode.patch b/packages/lang/Python3/patches/Python3-0300-generate-legacy-pyc-bytecode.patch index b4cc4ba3a9..37c9e8d82c 100644 --- a/packages/lang/Python3/patches/Python3-0300-generate-legacy-pyc-bytecode.patch +++ b/packages/lang/Python3/patches/Python3-0300-generate-legacy-pyc-bytecode.patch @@ -19,18 +19,19 @@ generates legacy bytecode. https://www.python.org/dev/peps/pep-3147/#case-4-legacy-pyc-files-and-source-less-imports --- - Lib/py_compile.py | 4 ++++ - 1 file changed, 4 insertions(+) + Lib/py_compile.py | 5 +++++ + 1 file changed, 5 insertions(+) --- a/Lib/py_compile.py +++ b/Lib/py_compile.py -@@ -121,6 +121,10 @@ def compile(file, cfile=None, dfile=None +@@ -121,6 +121,11 @@ def compile(file, cfile=None, dfile=None the resulting file would be regular and thus not the same type of file as it was previously. """ + -+ if cfile: -+ cfile = file + 'c' ++ if os.environ.get('DONT_BUILD_LEGACY_PYC') is None: ++ if cfile: ++ cfile = file + 'c' + if invalidation_mode is None: invalidation_mode = _get_default_invalidation_mode() diff --git a/packages/python/devel/Jinja2/package.mk b/packages/python/devel/Jinja2/package.mk index da418455ff..d3a47c7ade 100644 --- a/packages/python/devel/Jinja2/package.mk +++ b/packages/python/devel/Jinja2/package.mk @@ -7,10 +7,11 @@ PKG_SHA256="31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852" PKG_LICENSE="BSD" PKG_SITE="https://pypi.org/project/Jinja2/" PKG_URL="https://files.pythonhosted.org/packages/source/${PKG_NAME:0:1}/${PKG_NAME}/${PKG_NAME}-${PKG_VERSION}.tar.gz" -PKG_DEPENDS_HOST="Python3:host setuptools:host MarkupSafe:host" +PKG_DEPENDS_HOST="Python3:host MarkupSafe:host" PKG_LONGDESC="Jinja is a fast, expressive, extensible templating engine." PKG_TOOLCHAIN="manual" makeinstall_host() { + export DONT_BUILD_LEGACY_PYC=1 exec_thread_safe python3 setup.py install --prefix=${TOOLCHAIN} } diff --git a/packages/python/devel/Mako/package.mk b/packages/python/devel/Mako/package.mk index ff5f4b3080..b322931282 100644 --- a/packages/python/devel/Mako/package.mk +++ b/packages/python/devel/Mako/package.mk @@ -8,10 +8,11 @@ PKG_SHA256="d60a3903dc3bb01a18ad6a89cdbe2e4eadc69c0bc8ef1e3773ba53d44c3f7a34" PKG_LICENSE="GPL" PKG_SITE="https://pypi.org/project/Mako" PKG_URL="https://files.pythonhosted.org/packages/source/${PKG_NAME:0:1}/${PKG_NAME}/${PKG_NAME}-${PKG_VERSION}.tar.gz" -PKG_DEPENDS_HOST="Python3:host setuptools:host MarkupSafe:host" +PKG_DEPENDS_HOST="Python3:host MarkupSafe:host" PKG_LONGDESC="Mako is a super-fast templating language that borrows the best ideas from the existing templating languages." PKG_TOOLCHAIN="manual" makeinstall_host() { + export DONT_BUILD_LEGACY_PYC=1 exec_thread_safe python3 setup.py install --prefix=${TOOLCHAIN} } diff --git a/packages/python/devel/MarkupSafe/package.mk b/packages/python/devel/MarkupSafe/package.mk index 1f6722a490..5137f15bab 100644 --- a/packages/python/devel/MarkupSafe/package.mk +++ b/packages/python/devel/MarkupSafe/package.mk @@ -8,10 +8,11 @@ PKG_SHA256="af598ed32d6ae86f1b747b82783958b1a4ab8f617b06fe68795c7f026abbdcad" PKG_LICENSE="GPL" PKG_SITE="https://pypi.org/project/MarkupSafe/" PKG_URL="https://files.pythonhosted.org/packages/source/${PKG_NAME:0:1}/${PKG_NAME}/${PKG_NAME}-${PKG_VERSION}.tar.gz" -PKG_DEPENDS_HOST="Python3:host setuptools:host" +PKG_DEPENDS_HOST="Python3:host" PKG_LONGDESC="MarkupSafe implements a XML/HTML/XHTML Markup safe string for Python" PKG_TOOLCHAIN="manual" makeinstall_host() { + export DONT_BUILD_LEGACY_PYC=1 exec_thread_safe python3 setup.py install --prefix=${TOOLCHAIN} } diff --git a/packages/python/devel/distutilscross/package.mk b/packages/python/devel/distutilscross/package.mk index 69ea5b28a2..7392a9b522 100644 --- a/packages/python/devel/distutilscross/package.mk +++ b/packages/python/devel/distutilscross/package.mk @@ -8,10 +8,11 @@ PKG_SHA256="4ed3fb427708c8a3ed5fe9c599532480f581078a1e0aec0e50f40eb58e9f0015" PKG_LICENSE="GPL" PKG_SITE="https://pypi.org/project/distutilscross/" PKG_URL="https://files.pythonhosted.org/packages/source/${PKG_NAME:0:1}/${PKG_NAME}/${PKG_NAME}-${PKG_VERSION}.tar.gz" -PKG_DEPENDS_HOST="Python3:host setuptools:host" +PKG_DEPENDS_HOST="Python3:host" PKG_LONGDESC="distutilscross enhances distutils to support Cross Compile of Python extensions" PKG_TOOLCHAIN="manual" makeinstall_host() { + export DONT_BUILD_LEGACY_PYC=1 exec_thread_safe python setup.py install --prefix=${TOOLCHAIN} } diff --git a/packages/python/devel/meson/package.mk b/packages/python/devel/meson/package.mk index f8ec6cc937..16edd16d7d 100644 --- a/packages/python/devel/meson/package.mk +++ b/packages/python/devel/meson/package.mk @@ -7,11 +7,12 @@ PKG_SHA256="b1db3a153087549497ee52b1c938d2134e0338214fe14f7efd16fecd57b639f5" PKG_LICENSE="Apache" PKG_SITE="http://mesonbuild.com" PKG_URL="https://github.com/mesonbuild/meson/releases/download/${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.gz" -PKG_DEPENDS_HOST="Python3:host setuptools:host" +PKG_DEPENDS_HOST="Python3:host" PKG_LONGDESC="High productivity build system" PKG_TOOLCHAIN="manual" -make_host() { +makeinstall_host() { + export DONT_BUILD_LEGACY_PYC=1 python3 setup.py build } diff --git a/packages/python/devel/setuptools/package.mk b/packages/python/devel/setuptools/package.mk deleted file mode 100644 index f91679b31c..0000000000 --- a/packages/python/devel/setuptools/package.mk +++ /dev/null @@ -1,21 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-or-later -# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv) -# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv) - -PKG_NAME="setuptools" -PKG_VERSION="52.0.0" -PKG_SHA256="ff0c74d1b905a224d647f99c6135eacbec2620219992186b81aa20012bc7f882" -PKG_LICENSE="OSS" -PKG_SITE="https://pypi.org/project/setuptools" -PKG_URL="https://github.com/pypa/setuptools/archive/v${PKG_VERSION}.tar.gz" -PKG_DEPENDS_HOST="Python3:host" -PKG_LONGDESC="Replaces Setuptools as the standard method for working with Python module distributions." -PKG_TOOLCHAIN="manual" - -make_host() { - python3 bootstrap.py -} - -makeinstall_host() { - exec_thread_safe python3 setup.py install --prefix=${TOOLCHAIN} -} diff --git a/packages/python/graphics/Pillow/package.mk b/packages/python/graphics/Pillow/package.mk index ee8ba88449..76c0610755 100644 --- a/packages/python/graphics/Pillow/package.mk +++ b/packages/python/graphics/Pillow/package.mk @@ -18,7 +18,7 @@ pre_make_target() { } make_target() { - python3 setup.py build --cross-compile + python3 setup.py build } makeinstall_target() { diff --git a/packages/python/security/pycryptodome/package.mk b/packages/python/security/pycryptodome/package.mk index fe6557b194..4af979bc6d 100644 --- a/packages/python/security/pycryptodome/package.mk +++ b/packages/python/security/pycryptodome/package.mk @@ -20,7 +20,7 @@ pre_configure_target() { } make_target() { - python3 setup.py build --cross-compile + python3 setup.py build } makeinstall_target() { diff --git a/packages/python/system/simplejson/package.mk b/packages/python/system/simplejson/package.mk index 9b9a44566f..84083d141b 100644 --- a/packages/python/system/simplejson/package.mk +++ b/packages/python/system/simplejson/package.mk @@ -17,7 +17,7 @@ pre_make_target() { } make_target() { - python3 setup.py build --cross-compile + python3 setup.py build } makeinstall_target() { diff --git a/packages/tools/qemu/package.mk b/packages/tools/qemu/package.mk index a248d60313..2f188c7101 100644 --- a/packages/tools/qemu/package.mk +++ b/packages/tools/qemu/package.mk @@ -2,8 +2,8 @@ # Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv) PKG_NAME="qemu" -PKG_VERSION="8.0.3" -PKG_SHA256="ecf4d32cbef9d397bfc8cc50e4d1e92a1b30253bf32e8ee73c7a8dcf9a232b09" +PKG_VERSION="8.1.0" +PKG_SHA256="710c101198e334d4762eef65f649bc43fa8a5dd75303554b8acfec3eb25f0e55" PKG_LICENSE="GPL" PKG_SITE="https://www.qemu.org" PKG_URL="https://download.qemu.org/qemu-${PKG_VERSION}.tar.xz" diff --git a/packages/tools/qemu/patches/python.patch b/packages/tools/qemu/patches/python.patch new file mode 100644 index 0000000000..5f09d08e55 --- /dev/null +++ b/packages/tools/qemu/patches/python.patch @@ -0,0 +1,11 @@ +--- a/configure 2023-07-27 09:58:05.337334830 +0000 ++++ b/configure 2023-07-27 09:57:58.300630393 +0000 +@@ -950,6 +950,8 @@ + mkvenv_flags="--online" + fi + ++ln -s ${source_path}/../../toolchain/bin/meson pyvenv/bin/meson ++ + if ! $mkvenv ensure \ + $mkvenv_flags \ + --dir "${source_path}/python/wheels" \