summaryrefslogtreecommitdiffstats
path: root/meta-python
diff options
context:
space:
mode:
Diffstat (limited to 'meta-python')
-rw-r--r--meta-python/classes/distutils-common-base.bbclass28
-rw-r--r--meta-python/classes/distutils3-base.bbclass9
-rw-r--r--meta-python/classes/distutils3.bbclass71
-rw-r--r--meta-python/recipes-devtools/python/python3-pillow-heif/0001-setup.py-support-cross-compiling.patch56
-rw-r--r--meta-python/recipes-devtools/python/python3-pillow-heif_0.22.0.bb20
-rw-r--r--meta-python/recipes-devtools/python/python3-pychromecast/0001-Update-setuptools-requirement-from-79.0-65.6-to-65.6.patch42
-rw-r--r--meta-python/recipes-devtools/python/python3-pychromecast/0001-Update-setuptools-requirement-from-80.0-65.6-to-65.6.patch42
-rw-r--r--meta-python/recipes-devtools/python/python3-pychromecast_14.0.7.bb7
8 files changed, 90 insertions, 185 deletions
diff --git a/meta-python/classes/distutils-common-base.bbclass b/meta-python/classes/distutils-common-base.bbclass
deleted file mode 100644
index 59c750a3cf..0000000000
--- a/meta-python/classes/distutils-common-base.bbclass
+++ /dev/null
@@ -1,28 +0,0 @@
1export STAGING_INCDIR
2export STAGING_LIBDIR
3
4# LDSHARED is the ld *command* used to create shared library
5export LDSHARED = "${CCLD} -shared"
6# LDXXSHARED is the ld *command* used to create shared library of C++
7# objects
8export LDCXXSHARED = "${CXX} -shared"
9# CCSHARED are the C *flags* used to create objects to go into a shared
10# library (module)
11export CCSHARED = "-fPIC -DPIC"
12# LINKFORSHARED are the flags passed to the $(CC) command that links
13# the python executable
14export LINKFORSHARED = "${SECURITY_CFLAGS} -Xlinker -export-dynamic"
15
16FILES:${PN} += "${libdir}/* ${libdir}/${PYTHON_DIR}/*"
17
18FILES:${PN}-staticdev += "\
19 ${PYTHON_SITEPACKAGES_DIR}/*.a \
20"
21FILES:${PN}-dev += "\
22 ${datadir}/pkgconfig \
23 ${libdir}/pkgconfig \
24 ${PYTHON_SITEPACKAGES_DIR}/*.la \
25"
26python __anonymous() {
27 bb.warn("distutils-common-base.bbclass is deprecated, please use setuptools3-base.bbclass instead")
28}
diff --git a/meta-python/classes/distutils3-base.bbclass b/meta-python/classes/distutils3-base.bbclass
deleted file mode 100644
index d36b4c4a3e..0000000000
--- a/meta-python/classes/distutils3-base.bbclass
+++ /dev/null
@@ -1,9 +0,0 @@
1DEPENDS:append:class-target = " python3-native python3"
2DEPENDS:append:class-nativesdk = " python3-native python3"
3RDEPENDS:${PN} += "${@['', 'python3-core']['${CLASSOVERRIDE}' == 'class-target']}"
4
5inherit distutils-common-base python3native python3targetconfig
6
7python __anonymous() {
8 bb.warn("distutils3-base.bbclass is deprecated, please use setuptools3-base.bbclass instead")
9}
diff --git a/meta-python/classes/distutils3.bbclass b/meta-python/classes/distutils3.bbclass
deleted file mode 100644
index 909415efa0..0000000000
--- a/meta-python/classes/distutils3.bbclass
+++ /dev/null
@@ -1,71 +0,0 @@
1inherit distutils3-base
2
3B = "${WORKDIR}/build"
4distutils_do_configure[cleandirs] = "${B}"
5
6DISTUTILS_BUILD_ARGS ?= ""
7DISTUTILS_INSTALL_ARGS ?= "--root=${D} \
8 --prefix=${prefix} \
9 --install-lib=${PYTHON_SITEPACKAGES_DIR} \
10 --install-data=${datadir}"
11
12DISTUTILS_PYTHON = "python3"
13DISTUTILS_PYTHON:class-native = "nativepython3"
14
15DISTUTILS_SETUP_PATH ?= "${S}"
16
17python __anonymous() {
18 bb.warn("distutils3.bbclass is deprecated, please use setuptools3.bbclass instead")
19}
20
21distutils3_do_configure() {
22 :
23}
24
25distutils3_do_compile() {
26 cd ${DISTUTILS_SETUP_PATH}
27 NO_FETCH_BUILD=1 \
28 STAGING_INCDIR=${STAGING_INCDIR} \
29 STAGING_LIBDIR=${STAGING_LIBDIR} \
30 ${STAGING_BINDIR_NATIVE}/python3-native/python3 setup.py \
31 build --build-base=${B} ${DISTUTILS_BUILD_ARGS} || \
32 bbfatal_log "'python3 setup.py build ${DISTUTILS_BUILD_ARGS}' execution failed."
33}
34distutils3_do_compile[vardepsexclude] = "MACHINE"
35
36distutils3_do_install() {
37 cd ${DISTUTILS_SETUP_PATH}
38 install -d ${D}${PYTHON_SITEPACKAGES_DIR}
39 STAGING_INCDIR=${STAGING_INCDIR} \
40 STAGING_LIBDIR=${STAGING_LIBDIR} \
41 PYTHONPATH=${D}${PYTHON_SITEPACKAGES_DIR} \
42 ${STAGING_BINDIR_NATIVE}/python3-native/python3 setup.py \
43 build --build-base=${B} install --skip-build ${DISTUTILS_INSTALL_ARGS} || \
44 bbfatal_log "'python3 setup.py install ${DISTUTILS_INSTALL_ARGS}' execution failed."
45
46 # support filenames with *spaces*
47 find ${D} -name "*.py" -exec grep -q ${D} {} \; \
48 -exec sed -i -e s:${D}::g {} \;
49
50 for i in ${D}${bindir}/* ${D}${sbindir}/*; do
51 if [ -f "$i" ]; then
52 sed -i -e s:${PYTHON}:${USRBINPATH}/env\ ${DISTUTILS_PYTHON}:g $i
53 sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i
54 fi
55 done
56
57 rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/easy-install.pth
58
59 #
60 # FIXME: Bandaid against wrong datadir computation
61 #
62 if [ -e ${D}${datadir}/share ]; then
63 mv -f ${D}${datadir}/share/* ${D}${datadir}/
64 rmdir ${D}${datadir}/share
65 fi
66}
67distutils3_do_install[vardepsexclude] = "MACHINE"
68
69EXPORT_FUNCTIONS do_configure do_compile do_install
70
71export LDSHARED="${CCLD} -shared"
diff --git a/meta-python/recipes-devtools/python/python3-pillow-heif/0001-setup.py-support-cross-compiling.patch b/meta-python/recipes-devtools/python/python3-pillow-heif/0001-setup.py-support-cross-compiling.patch
deleted file mode 100644
index 66cf7a9244..0000000000
--- a/meta-python/recipes-devtools/python/python3-pillow-heif/0001-setup.py-support-cross-compiling.patch
+++ /dev/null
@@ -1,56 +0,0 @@
1From 98e6831754712221ce030ce8b27e100a3926c543 Mon Sep 17 00:00:00 2001
2From: Leon Anavi <leon.anavi@konsulko.com>
3Date: Mon, 5 May 2025 16:08:37 +0000
4Subject: [PATCH] setup.py: support cross compiling
5
6Upstream-Status: Inappropriate [oe specific]
7
8Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
9---
10 setup.py | 19 +++++++++++--------
11 1 file changed, 11 insertions(+), 8 deletions(-)
12
13diff --git a/setup.py b/setup.py
14index 68945e4..67566e8 100644
15--- a/setup.py
16+++ b/setup.py
17@@ -125,12 +125,12 @@ class PillowHeifBuildExt(build_ext):
18 self._add_directory(library_dirs, match.group(1))
19
20 # include, rpath, if set as environment variables
21- for k in ("C_INCLUDE_PATH", "CPATH", "INCLUDE"):
22+ for k in ("C_INCLUDE_PATH", "CPATH", "INCLUDE", "STAGING_INCDIR"):
23 if k in os.environ:
24 for d in os.environ[k].split(os.path.pathsep):
25 self._add_directory(include_dirs, d)
26
27- for k in ("LD_RUN_PATH", "LIBRARY_PATH", "LIB"):
28+ for k in ("LD_RUN_PATH", "LIBRARY_PATH", "LIB", "STAGING_LIBDIR"):
29 if k in os.environ:
30 for d in os.environ[k].split(os.path.pathsep):
31 self._add_directory(library_dirs, d)
32@@ -199,12 +199,15 @@ class PillowHeifBuildExt(build_ext):
33 self._update_extension("_pillow_heif", ["heif"], extra_compile_args=["-O3", "-Werror"])
34 else: # let's assume it's some kind of linux
35 # this old code waiting for refactoring, when time comes.
36- self._add_directory(include_dirs, "/usr/local/include")
37- self._add_directory(include_dirs, "/usr/include")
38- self._add_directory(library_dirs, "/usr/local/lib")
39- self._add_directory(library_dirs, "/usr/lib64")
40- self._add_directory(library_dirs, "/usr/lib")
41- self._add_directory(library_dirs, "/lib")
42+ include_os_path = os.environ.get("STAGING_INCDIR")
43+ if include_os_path:
44+ for path in include_os_path.split(os.pathsep):
45+ self._add_directory(include_dirs, path)
46+
47+ lib_os_path = os.environ.get("STAGING_LIBDIR")
48+ if lib_os_path:
49+ for path in lib_os_path.split(os.pathsep):
50+ self._add_directory(library_dirs, path)
51
52 self._update_extension("_pillow_heif", ["heif"], extra_compile_args=["-O3", "-Werror"])
53
54--
552.39.5
56
diff --git a/meta-python/recipes-devtools/python/python3-pillow-heif_0.22.0.bb b/meta-python/recipes-devtools/python/python3-pillow-heif_0.22.0.bb
deleted file mode 100644
index 7f5dfac702..0000000000
--- a/meta-python/recipes-devtools/python/python3-pillow-heif_0.22.0.bb
+++ /dev/null
@@ -1,20 +0,0 @@
1DESCRIPTION = "Python interface for libheif library"
2HOMEPAGE = "https://github.com/bigcat88/pillow_heif"
3LICENSE = "BSD-3-Clause"
4LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=b6c07a92aed67c33bc346748d7c7e991"
5
6# While this item does not require it, it depends on libheif which does
7LICENSE_FLAGS = "commercial"
8
9PYPI_PACKAGE = "pillow_heif"
10
11inherit pypi python_setuptools_build_meta
12
13SRC_URI += "file://0001-setup.py-support-cross-compiling.patch"
14SRC_URI[sha256sum] = "61d473929340d3073722f6316b7fbbdb11132faa6bac0242328e8436cc55b39a"
15
16DEPENDS += "libheif"
17
18RDEPENDS:${PN} += "python3-pillow"
19
20BBCLASSEXTEND = "native nativesdk"
diff --git a/meta-python/recipes-devtools/python/python3-pychromecast/0001-Update-setuptools-requirement-from-79.0-65.6-to-65.6.patch b/meta-python/recipes-devtools/python/python3-pychromecast/0001-Update-setuptools-requirement-from-79.0-65.6-to-65.6.patch
new file mode 100644
index 0000000000..b0d4a88c8e
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-pychromecast/0001-Update-setuptools-requirement-from-79.0-65.6-to-65.6.patch
@@ -0,0 +1,42 @@
1From ef27075e087e139921b99729a4ec7683e42c5c4a Mon Sep 17 00:00:00 2001
2From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
3Date: Mon, 21 Apr 2025 16:34:55 +0200
4Subject: [PATCH] Update setuptools requirement from <79.0,>=65.6 to
5 >=65.6,<80.0 (#1056)
6
7Upstream-Status: Backport [https://github.com/home-assistant-libs/pychromecast/commit/ef27075e087e139921b99729a4ec7683e42c5c4a]
8
9Updates the requirements on [setuptools](https://github.com/pypa/setuptools) to permit the latest version.
10- [Release notes](https://github.com/pypa/setuptools/releases)
11- [Changelog](https://github.com/pypa/setuptools/blob/main/NEWS.rst)
12- [Commits](https://github.com/pypa/setuptools/compare/v65.6.0...v79.0.0)
13
14---
15updated-dependencies:
16- dependency-name: setuptools
17 dependency-version: 79.0.0
18 dependency-type: direct:production
19...
20
21Signed-off-by: dependabot[bot] <support@github.com>
22Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
23
24Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
25---
26 pyproject.toml | 2 +-
27 1 file changed, 1 insertion(+), 1 deletion(-)
28
29diff --git a/pyproject.toml b/pyproject.toml
30index 34f5dc0..88d67fe 100644
31--- a/pyproject.toml
32+++ b/pyproject.toml
33@@ -1,5 +1,5 @@
34 [build-system]
35-requires = ["setuptools>=65.6,<79.0", "wheel>=0.37.1,<0.46.0"]
36+requires = ["setuptools>=65.6,<80.0", "wheel>=0.37.1,<0.46.0"]
37 build-backend = "setuptools.build_meta"
38
39 [project]
40--
412.39.5
42
diff --git a/meta-python/recipes-devtools/python/python3-pychromecast/0001-Update-setuptools-requirement-from-80.0-65.6-to-65.6.patch b/meta-python/recipes-devtools/python/python3-pychromecast/0001-Update-setuptools-requirement-from-80.0-65.6-to-65.6.patch
new file mode 100644
index 0000000000..8630c1632d
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-pychromecast/0001-Update-setuptools-requirement-from-80.0-65.6-to-65.6.patch
@@ -0,0 +1,42 @@
1From 7017a1db10a21ed97b79800e31a2f7c70abbffc3 Mon Sep 17 00:00:00 2001
2From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
3Date: Mon, 28 Apr 2025 16:43:13 +0200
4Subject: [PATCH] Update setuptools requirement from <80.0,>=65.6 to
5 >=65.6,<81.0 (#1060)
6
7Upstream-Status: Backport [https://github.com/home-assistant-libs/pychromecast/commit/7017a1db10a21ed97b79800e31a2f7c70abbffc3]
8
9Updates the requirements on [setuptools](https://github.com/pypa/setuptools) to permit the latest version.
10- [Release notes](https://github.com/pypa/setuptools/releases)
11- [Changelog](https://github.com/pypa/setuptools/blob/main/NEWS.rst)
12- [Commits](https://github.com/pypa/setuptools/compare/v65.6.0...v80.0.0)
13
14---
15updated-dependencies:
16- dependency-name: setuptools
17 dependency-version: 80.0.0
18 dependency-type: direct:production
19...
20
21Signed-off-by: dependabot[bot] <support@github.com>
22Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
23
24Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
25---
26 pyproject.toml | 2 +-
27 1 file changed, 1 insertion(+), 1 deletion(-)
28
29diff --git a/pyproject.toml b/pyproject.toml
30index 88d67fe..d5a518c 100644
31--- a/pyproject.toml
32+++ b/pyproject.toml
33@@ -1,5 +1,5 @@
34 [build-system]
35-requires = ["setuptools>=65.6,<80.0", "wheel>=0.37.1,<0.46.0"]
36+requires = ["setuptools>=65.6,<81.0", "wheel>=0.37.1,<0.46.0"]
37 build-backend = "setuptools.build_meta"
38
39 [project]
40--
412.39.5
42
diff --git a/meta-python/recipes-devtools/python/python3-pychromecast_14.0.7.bb b/meta-python/recipes-devtools/python/python3-pychromecast_14.0.7.bb
index 7bae0721db..260f6395b7 100644
--- a/meta-python/recipes-devtools/python/python3-pychromecast_14.0.7.bb
+++ b/meta-python/recipes-devtools/python/python3-pychromecast_14.0.7.bb
@@ -3,7 +3,12 @@ HOMEPAGE = "https://github.com/balloob/pychromecast"
3LICENSE = "MIT" 3LICENSE = "MIT"
4LIC_FILES_CHKSUM = "file://LICENSE;md5=b1dbd4e85f47b389bdadee9c694669f5" 4LIC_FILES_CHKSUM = "file://LICENSE;md5=b1dbd4e85f47b389bdadee9c694669f5"
5 5
6SRC_URI += "file://0001-Update-setuptools-requirement-from-78.0-65.6-to-65.6.patch" 6SRC_URI += "\
7 file://0001-Update-setuptools-requirement-from-78.0-65.6-to-65.6.patch \
8 file://0001-Update-setuptools-requirement-from-79.0-65.6-to-65.6.patch \
9 file://0001-Update-setuptools-requirement-from-80.0-65.6-to-65.6.patch \
10"
11
7SRC_URI[sha256sum] = "7abbae80a2c9e05b93b1a7b8b4d771bbc764d88fd5e56a566f46ac1bd3f93848" 12SRC_URI[sha256sum] = "7abbae80a2c9e05b93b1a7b8b4d771bbc764d88fd5e56a566f46ac1bd3f93848"
8 13
9inherit pypi python_setuptools_build_meta 14inherit pypi python_setuptools_build_meta