This series bumps python3 version to 3.10.4 which adds support for the Linux kernel-based J1939 CAN protocol stack among many other worthwhile improvements and speed enhancements. David Jander (2): cython3: version bump 0.29.14 -> 0.29.28 python3: version bump 3.7.10 -> 3.10.4 ...-don-t-leak-host-path-into-target-binaries.patch | 2 +- .../0002-python3-prevent-host-path-leakage.patch | 13 +++++++------ patches/{Python-3.7.10 => Python-3.10.4}/series | 0 rules/host-cython3.make | 4 ++-- rules/python3.make | 10 +++++----- scripts/lib/ptxd_make_world_install.sh | 2 +- 6 files changed, 16 insertions(+), 15 deletions(-) rename patches/{Python-3.7.10 => Python-3.10.4}/0001-python3-don-t-leak-host-path-into-target-binaries.patch (94%) rename patches/{Python-3.7.10 => Python-3.10.4}/0002-python3-prevent-host-path-leakage.patch (84%) rename patches/{Python-3.7.10 => Python-3.10.4}/series (100%) -- 2.32.0
Needed for newer version of python3 Signed-off-by: David Jander <david@protonic.nl> --- rules/host-cython3.make | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rules/host-cython3.make b/rules/host-cython3.make index 50a497c52..55cbf5c3c 100644 --- a/rules/host-cython3.make +++ b/rules/host-cython3.make @@ -14,8 +14,8 @@ HOST_PACKAGES-$(PTXCONF_HOST_CYTHON3) += host-cython3 # # Paths and names # -HOST_CYTHON3_VERSION := 0.29.14 -HOST_CYTHON3_MD5 := 6e2f139e30bb08d68366f9370d87964c +HOST_CYTHON3_VERSION := 0.29.28 +HOST_CYTHON3_MD5 := 0e98543dca816300a27e7d76146a6280 HOST_CYTHON3 := Cython-$(HOST_CYTHON3_VERSION) HOST_CYTHON3_SUFFIX := tar.gz HOST_CYTHON3_URL := $(call ptx/mirror-pypi, cython, $(HOST_CYTHON3).$(HOST_CYTHON3_SUFFIX)) -- 2.32.0
Besides version 3.7.10 being quite outdated, it lacks support for the Linux kernel-based j1939 CAN protocol stack. Signed-off-by: David Jander <david@protonic.nl> --- ...-don-t-leak-host-path-into-target-binaries.patch | 2 +- .../0002-python3-prevent-host-path-leakage.patch | 13 +++++++------ patches/{Python-3.7.10 => Python-3.10.4}/series | 0 rules/python3.make | 10 +++++----- scripts/lib/ptxd_make_world_install.sh | 2 +- 5 files changed, 14 insertions(+), 13 deletions(-) rename patches/{Python-3.7.10 => Python-3.10.4}/0001-python3-don-t-leak-host-path-into-target-binaries.patch (94%) rename patches/{Python-3.7.10 => Python-3.10.4}/0002-python3-prevent-host-path-leakage.patch (84%) rename patches/{Python-3.7.10 => Python-3.10.4}/series (100%) diff --git a/patches/Python-3.7.10/0001-python3-don-t-leak-host-path-into-target-binaries.patch b/patches/Python-3.10.4/0001-python3-don-t-leak-host-path-into-target-binaries.patch similarity index 94% rename from patches/Python-3.7.10/0001-python3-don-t-leak-host-path-into-target-binaries.patch rename to patches/Python-3.10.4/0001-python3-don-t-leak-host-path-into-target-binaries.patch index ac5e64d48..e59f7c649 100644 --- a/patches/Python-3.7.10/0001-python3-don-t-leak-host-path-into-target-binaries.patch +++ b/patches/Python-3.10.4/0001-python3-don-t-leak-host-path-into-target-binaries.patch @@ -13,7 +13,7 @@ diff --git a/setup.py b/setup.py index bf90600eaad3..9250f5a1b691 100644 --- a/setup.py +++ b/setup.py -@@ -1344,7 +1344,6 @@ class PyBuildExt(build_ext): +@@ -1516,7 +1516,6 @@ class PyBuildExt(build_ext): if dbm_setup_debug: print("building dbm using bdb") dbmext = Extension('_dbm', ['_dbmmodule.c'], library_dirs=dblib_dir, diff --git a/patches/Python-3.7.10/0002-python3-prevent-host-path-leakage.patch b/patches/Python-3.10.4/0002-python3-prevent-host-path-leakage.patch similarity index 84% rename from patches/Python-3.7.10/0002-python3-prevent-host-path-leakage.patch rename to patches/Python-3.10.4/0002-python3-prevent-host-path-leakage.patch index 36ece1f85..e4d5eed17 100644 --- a/patches/Python-3.7.10/0002-python3-prevent-host-path-leakage.patch +++ b/patches/Python-3.10.4/0002-python3-prevent-host-path-leakage.patch @@ -26,17 +26,18 @@ diff --git a/setup.py b/setup.py index 9250f5a1b691..3278aaf6e677 100644 --- a/setup.py +++ b/setup.py -@@ -587,10 +587,12 @@ class PyBuildExt(build_ext): - if not cross_compiling: +@@ -829,10 +829,12 @@ class PyBuildExt(build_ext): + if not CROSS_COMPILING: add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') + + self.add_multiarch_paths() + # only change this for cross builds for 3.3, issues on Mageia - if cross_compiling: - self.add_gcc_paths() + if CROSS_COMPILING: + self.add_cross_compiling_paths() - self.add_multiarch_paths() + self.add_ldflags_cppflags() - # Add paths specified in the environment variables LDFLAGS and - # CPPFLAGS for header and library files. + def init_inc_lib_dirs(self): + diff --git a/patches/Python-3.7.10/series b/patches/Python-3.10.4/series similarity index 100% rename from patches/Python-3.7.10/series rename to patches/Python-3.10.4/series diff --git a/rules/python3.make b/rules/python3.make index abf82e1eb..dcc6235c0 100644 --- a/rules/python3.make +++ b/rules/python3.make @@ -15,8 +15,8 @@ PACKAGES-$(PTXCONF_PYTHON3) += python3 # # Paths and names # -PYTHON3_VERSION := 3.7.10 -PYTHON3_MD5 := 9e34914bc804ab2e7d955b49c5e1e391 +PYTHON3_VERSION := 3.10.4 +PYTHON3_MD5 := 21f2e113e087083a1e8cf10553d93599 PYTHON3_MAJORMINOR := $(basename $(PYTHON3_VERSION)) PYTHON3_SITEPACKAGES := /usr/lib/python$(PYTHON3_MAJORMINOR)/site-packages PYTHON3 := Python-$(PYTHON3_VERSION) @@ -116,8 +116,8 @@ $(STATEDIR)/python3.install.post: d=`cat $(PYTHON3_DIR)/pybuilddir.txt` && \ cross_dir="$(PTXDIST_SYSROOT_CROSS)/lib/python$(PYTHON3_MAJORMINOR)" && \ mkdir -p "$${cross_dir}" && \ - cp "$(PYTHON3_DIR)/$$d/_sysconfigdata_m_linux_$${m}.py" "$${cross_dir}" && \ - echo "_PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_m_linux_$$m" >> "$(CROSS_PYTHON3)" && \ + cp "$(PYTHON3_DIR)/$$d/_sysconfigdata__linux_$${m}.py" "$${cross_dir}" && \ + echo "_PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata__linux_$$m" >> "$(CROSS_PYTHON3)" && \ echo "PYTHONPATH=$${cross_dir}" >> "$(CROSS_PYTHON3)" @echo 'PYTHONHASHSEED=0' >> "$(CROSS_PYTHON3)" @echo 'export _PYTHON_PROJECT_BASE _PYTHON_HOST_PLATFORM' >> "$(CROSS_PYTHON3)" @@ -165,7 +165,7 @@ $(STATEDIR)/python3.targetinstall: @$(call install_copy, python3, 0, 0, 0755, -, /usr/bin/python$(PYTHON3_MAJORMINOR)) @$(call install_link, python3, python$(PYTHON3_MAJORMINOR), /usr/bin/python3) - @$(call install_lib, python3, 0, 0, 0644, libpython$(PYTHON3_MAJORMINOR)m) + @$(call install_lib, python3, 0, 0, 0644, libpython$(PYTHON3_MAJORMINOR)) @$(call install_copy, python3, 0, 0, 0644, -, /usr/lib/python$(PYTHON3_MAJORMINOR)/venv/scripts/common/activate) diff --git a/scripts/lib/ptxd_make_world_install.sh b/scripts/lib/ptxd_make_world_install.sh index 89dde2227..92cdcadfa 100644 --- a/scripts/lib/ptxd_make_world_install.sh +++ b/scripts/lib/ptxd_make_world_install.sh @@ -37,7 +37,7 @@ ptxd_make_world_install_python_cleanup() { # not python3 or already handled continue fi - cp -v "$(dirname "${file}")/__pycache__/$(basename "${file%py}")"cpython-??.pyc "${file}c" || return + cp -v "$(dirname "${file}")/__pycache__/$(basename "${file%py}")"cpython-???.pyc "${file}c" || return done && check_pipe_status && find "${pkg_pkg_dir}" -type d -name __pycache__ -print0 | xargs -0 rm -rf && -- 2.32.0
Thanks, applied as aa3d464776c5573b8bcfe9953682db715ed6f375.
Michael
[sent from post-receive hook]
On Mon, 09 May 2022 08:29:16 +0200, David Jander <david@protonic.nl> wrote:
> Needed for newer version of python3
>
> Signed-off-by: David Jander <david@protonic.nl>
> Message-Id: <20220503075029.1429521-2-david@protonic.nl>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
>
> diff --git a/rules/host-cython3.make b/rules/host-cython3.make
> index 50a497c52045..55cbf5c3cb69 100644
> --- a/rules/host-cython3.make
> +++ b/rules/host-cython3.make
> @@ -14,8 +14,8 @@ HOST_PACKAGES-$(PTXCONF_HOST_CYTHON3) += host-cython3
> #
> # Paths and names
> #
> -HOST_CYTHON3_VERSION := 0.29.14
> -HOST_CYTHON3_MD5 := 6e2f139e30bb08d68366f9370d87964c
> +HOST_CYTHON3_VERSION := 0.29.28
> +HOST_CYTHON3_MD5 := 0e98543dca816300a27e7d76146a6280
> HOST_CYTHON3 := Cython-$(HOST_CYTHON3_VERSION)
> HOST_CYTHON3_SUFFIX := tar.gz
> HOST_CYTHON3_URL := $(call ptx/mirror-pypi, cython, $(HOST_CYTHON3).$(HOST_CYTHON3_SUFFIX))
Thanks, applied as 7d53d288fbfc7eb237d5149fac393f11e042e3de.
Michael
[sent from post-receive hook]
On Mon, 09 May 2022 08:29:17 +0200, David Jander <david@protonic.nl> wrote:
> Besides version 3.7.10 being quite outdated, it lacks support for the
> Linux kernel-based j1939 CAN protocol stack.
>
> Signed-off-by: David Jander <david@protonic.nl>
> Message-Id: <20220503075029.1429521-3-david@protonic.nl>
> [mol: $(PYTHON3_MAJORMINOR)m -> $(PYTHON3_MAJORMINOR) in other rules as well]
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
>
> diff --git a/patches/Python-3.7.10/0001-python3-don-t-leak-host-path-into-target-binaries.patch b/patches/Python-3.10.4/0001-python3-don-t-leak-host-path-into-target-binaries.patch
> similarity index 94%
> rename from patches/Python-3.7.10/0001-python3-don-t-leak-host-path-into-target-binaries.patch
> rename to patches/Python-3.10.4/0001-python3-don-t-leak-host-path-into-target-binaries.patch
> index ac5e64d484b2..e59f7c64936a 100644
> --- a/patches/Python-3.7.10/0001-python3-don-t-leak-host-path-into-target-binaries.patch
> +++ b/patches/Python-3.10.4/0001-python3-don-t-leak-host-path-into-target-binaries.patch
> @@ -13,7 +13,7 @@ diff --git a/setup.py b/setup.py
> index bf90600eaad3..9250f5a1b691 100644
> --- a/setup.py
> +++ b/setup.py
> -@@ -1344,7 +1344,6 @@ class PyBuildExt(build_ext):
> +@@ -1516,7 +1516,6 @@ class PyBuildExt(build_ext):
> if dbm_setup_debug: print("building dbm using bdb")
> dbmext = Extension('_dbm', ['_dbmmodule.c'],
> library_dirs=dblib_dir,
> diff --git a/patches/Python-3.7.10/0002-python3-prevent-host-path-leakage.patch b/patches/Python-3.10.4/0002-python3-prevent-host-path-leakage.patch
> similarity index 84%
> rename from patches/Python-3.7.10/0002-python3-prevent-host-path-leakage.patch
> rename to patches/Python-3.10.4/0002-python3-prevent-host-path-leakage.patch
> index 36ece1f859db..e4d5eed17758 100644
> --- a/patches/Python-3.7.10/0002-python3-prevent-host-path-leakage.patch
> +++ b/patches/Python-3.10.4/0002-python3-prevent-host-path-leakage.patch
> @@ -26,17 +26,18 @@ diff --git a/setup.py b/setup.py
> index 9250f5a1b691..3278aaf6e677 100644
> --- a/setup.py
> +++ b/setup.py
> -@@ -587,10 +587,12 @@ class PyBuildExt(build_ext):
> - if not cross_compiling:
> +@@ -829,10 +829,12 @@ class PyBuildExt(build_ext):
> + if not CROSS_COMPILING:
> add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
> add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
> +
> + self.add_multiarch_paths()
> +
> # only change this for cross builds for 3.3, issues on Mageia
> - if cross_compiling:
> - self.add_gcc_paths()
> + if CROSS_COMPILING:
> + self.add_cross_compiling_paths()
> - self.add_multiarch_paths()
> + self.add_ldflags_cppflags()
>
> - # Add paths specified in the environment variables LDFLAGS and
> - # CPPFLAGS for header and library files.
> + def init_inc_lib_dirs(self):
> +
> diff --git a/patches/Python-3.7.10/series b/patches/Python-3.10.4/series
> similarity index 100%
> rename from patches/Python-3.7.10/series
> rename to patches/Python-3.10.4/series
> diff --git a/rules/boost.make b/rules/boost.make
> index c18c290e87b3..e15c8891afb2 100644
> --- a/rules/boost.make
> +++ b/rules/boost.make
> @@ -129,10 +129,10 @@ ifdef PTXCONF_BOOST_MPI
> endif
>
> ifdef PTXCONF_BOOST_PYTHON3
> - @echo "using python : $(PYTHON3_MAJORMINOR) : $(PTXDIST_SYSROOT_CROSS)/bin/python : $(SYSROOT)/usr/include/python$(PYTHON3_MAJORMINOR)m : $(SYSROOT)/usr/lib/python$(PYTHON3_MAJORMINOR) ;" >> $(BOOST_DIR)/user-config.jam
> + @echo "using python : $(PYTHON3_MAJORMINOR) : $(PTXDIST_SYSROOT_CROSS)/bin/python : $(SYSROOT)/usr/include/python$(PYTHON3_MAJORMINOR) : $(SYSROOT)/usr/lib/python$(PYTHON3_MAJORMINOR) ;" >> $(BOOST_DIR)/user-config.jam
> endif
> ifdef PTXCONF_BOOST_PYTHON2
> - @echo "using python : $(PYTHON_MAJORMINOR) : $(PTXDIST_SYSROOT_CROSS)/bin/python : $(SYSROOT)/usr/include/python$(PYTHON_MAJORMINOR)m : $(SYSROOT)/usr/lib/python$(PYTHON_MAJORMINOR) ;" >> $(BOOST_DIR)/user-config.jam
> + @echo "using python : $(PYTHON_MAJORMINOR) : $(PTXDIST_SYSROOT_CROSS)/bin/python : $(SYSROOT)/usr/include/python$(PYTHON_MAJORMINOR) : $(SYSROOT)/usr/lib/python$(PYTHON_MAJORMINOR) ;" >> $(BOOST_DIR)/user-config.jam
> endif
>
> @echo "all:" > $(BOOST_DIR)/Makefile
> diff --git a/rules/opencv.make b/rules/opencv.make
> index e0ab3143d794..476f6007a0a3 100644
> --- a/rules/opencv.make
> +++ b/rules/opencv.make
> @@ -218,7 +218,7 @@ OPENCV_CONF_OPT := \
> \
> -DCMAKE_SKIP_RPATH=ON \
> -DBUILD_opencv_python2=OFF \
> - -DPYTHON_INCLUDE_DIR=$(PTXDIST_SYSROOT_TARGET)/usr/include/python$(PYTHON3_MAJORMINOR)m \
> + -DPYTHON_INCLUDE_DIR=$(PTXDIST_SYSROOT_TARGET)/usr/include/python$(PYTHON3_MAJORMINOR) \
> -DPYTHON_LIBRARY=$(PTXDIST_SYSROOT_TARGET)/bin/python$(PYTHON3_MAJORMINOR) \
> -DOPENCV_PYTHON3_INSTALL_PATH=$(PYTHON3_SITEPACKAGES) \
> -DOPENCV_SKIP_PYTHON_LOADER=ON
> diff --git a/rules/python3.make b/rules/python3.make
> index abf82e1ebb46..09b1756adf71 100644
> --- a/rules/python3.make
> +++ b/rules/python3.make
> @@ -15,8 +15,8 @@ PACKAGES-$(PTXCONF_PYTHON3) += python3
> #
> # Paths and names
> #
> -PYTHON3_VERSION := 3.7.10
> -PYTHON3_MD5 := 9e34914bc804ab2e7d955b49c5e1e391
> +PYTHON3_VERSION := 3.10.4
> +PYTHON3_MD5 := 21f2e113e087083a1e8cf10553d93599
> PYTHON3_MAJORMINOR := $(basename $(PYTHON3_VERSION))
> PYTHON3_SITEPACKAGES := /usr/lib/python$(PYTHON3_MAJORMINOR)/site-packages
> PYTHON3 := Python-$(PYTHON3_VERSION)
> @@ -94,7 +94,7 @@ $(STATEDIR)/python3.install:
>
> @$(call install, PYTHON3)
>
> - @rm -vrf $(PYTHON3_PKGDIR)/usr/lib/python$(PYTHON3_MAJORMINOR)/config-$(PYTHON3_MAJORMINOR)m
> + @rm -vrf $(PYTHON3_PKGDIR)/usr/lib/python$(PYTHON3_MAJORMINOR)/config-$(PYTHON3_MAJORMINOR)*
> @$(call world/env, PYTHON3) ptxd_make_world_install_python_cleanup
>
> @$(call touch)
> @@ -116,8 +116,8 @@ $(STATEDIR)/python3.install.post:
> d=`cat $(PYTHON3_DIR)/pybuilddir.txt` && \
> cross_dir="$(PTXDIST_SYSROOT_CROSS)/lib/python$(PYTHON3_MAJORMINOR)" && \
> mkdir -p "$${cross_dir}" && \
> - cp "$(PYTHON3_DIR)/$$d/_sysconfigdata_m_linux_$${m}.py" "$${cross_dir}" && \
> - echo "_PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_m_linux_$$m" >> "$(CROSS_PYTHON3)" && \
> + cp "$(PYTHON3_DIR)/$$d/_sysconfigdata__linux_$${m}.py" "$${cross_dir}" && \
> + echo "_PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata__linux_$$m" >> "$(CROSS_PYTHON3)" && \
> echo "PYTHONPATH=$${cross_dir}" >> "$(CROSS_PYTHON3)"
> @echo 'PYTHONHASHSEED=0' >> "$(CROSS_PYTHON3)"
> @echo 'export _PYTHON_PROJECT_BASE _PYTHON_HOST_PLATFORM' >> "$(CROSS_PYTHON3)"
> @@ -165,7 +165,7 @@ $(STATEDIR)/python3.targetinstall:
>
> @$(call install_copy, python3, 0, 0, 0755, -, /usr/bin/python$(PYTHON3_MAJORMINOR))
> @$(call install_link, python3, python$(PYTHON3_MAJORMINOR), /usr/bin/python3)
> - @$(call install_lib, python3, 0, 0, 0644, libpython$(PYTHON3_MAJORMINOR)m)
> + @$(call install_lib, python3, 0, 0, 0644, libpython$(PYTHON3_MAJORMINOR))
>
> @$(call install_copy, python3, 0, 0, 0644, -, /usr/lib/python$(PYTHON3_MAJORMINOR)/venv/scripts/common/activate)
>
> diff --git a/scripts/lib/ptxd_make_world_install.sh b/scripts/lib/ptxd_make_world_install.sh
> index 89dde2227ea8..92cdcadfac11 100644
> --- a/scripts/lib/ptxd_make_world_install.sh
> +++ b/scripts/lib/ptxd_make_world_install.sh
> @@ -37,7 +37,7 @@ ptxd_make_world_install_python_cleanup() {
> # not python3 or already handled
> continue
> fi
> - cp -v "$(dirname "${file}")/__pycache__/$(basename "${file%py}")"cpython-??.pyc "${file}c" || return
> + cp -v "$(dirname "${file}")/__pycache__/$(basename "${file%py}")"cpython-???.pyc "${file}c" || return
> done &&
> check_pipe_status &&
> find "${pkg_pkg_dir}" -type d -name __pycache__ -print0 | xargs -0 rm -rf &&