From a9a5a5da9eda66eed4a4b0bc99e42da898547735 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Mon, 14 Oct 2024 19:54:45 +0000 Subject: [PATCH 001/130] python311: Remove optional wheels (to be migrated to its own spk) --- spk/python311/Makefile | 154 ------------------ spk/python311/src/requirements-abi3.txt | 12 -- .../src/requirements-crossenv-greenlet-v1.txt | 9 - .../src/requirements-crossenv-greenlet-v2.txt | 9 - .../requirements-crossenv-numpy-armv7l.txt | 12 -- .../src/requirements-crossenv-numpy-gcc4.txt | 13 -- .../src/requirements-crossenv-numpy.txt | 14 -- .../src/requirements-crossenv-rpds-py.txt | 13 -- spk/python311/src/requirements-crossenv.txt | 101 ------------ 9 files changed, 337 deletions(-) delete mode 100644 spk/python311/src/requirements-abi3.txt delete mode 100644 spk/python311/src/requirements-crossenv-greenlet-v1.txt delete mode 100644 spk/python311/src/requirements-crossenv-greenlet-v2.txt delete mode 100644 spk/python311/src/requirements-crossenv-numpy-armv7l.txt delete mode 100644 spk/python311/src/requirements-crossenv-numpy-gcc4.txt delete mode 100644 spk/python311/src/requirements-crossenv-numpy.txt delete mode 100644 spk/python311/src/requirements-crossenv-rpds-py.txt delete mode 100644 spk/python311/src/requirements-crossenv.txt diff --git a/spk/python311/Makefile b/spk/python311/Makefile index 87eba19e7ee..32488bc30ea 100644 --- a/spk/python311/Makefile +++ b/spk/python311/Makefile @@ -27,9 +27,6 @@ LICENSE = PSF WHEELS_PURE_PYTHON_PACKAGING_ENABLE = 1 WHEELS = src/requirements-pure.txt -# Force testing all wheel builds -WHEELS_TEST_ALL = 0 - SERVICE_SETUP = src/service-setup.sh PYTHON_LIB_DIR = lib/python$(SPK_VERS_MAJOR_MINOR) @@ -38,159 +35,8 @@ POST_STRIP_TARGET = python311_extra_install SPK_USR_LOCAL_LINKS = bin:bin/python3.11 -## -## All configurations below are optional and -## are provided to demonstrate how to build -## various wheels. Uncoment to enable. -## -## WHEELS_TEST_ALL: Force testing all wheel building -ifeq ($(strip $(WHEELS_TEST_ALL)),1) -WHEELS += src/requirements-crossenv.txt -WHEELS += src/requirements-abi3.txt - -# [cryptography] -# Use cross/cryptography to generate py36-abi3 limited API -# NOTE: It's not possible to build py36-abi3 limited API using pip due to PEP517 -# To generate py311-py311 regular build use src/requirements-crossenv.txt -DEPENDS += cross/cryptography - -# [gevent] -DEPENDS += cross/libev cross/c-ares -ENV += GEVENTSETUP_EMBED_CARES=FALSE -ENV += GEVENTSETUP_EMBED_LIBEV=FALSE - -# [lxml] -DEPENDS += cross/libxml2 -DEPENDS += cross/libxslt - -# [mysqlclient] -DEPENDS += cross/mysql-connector-c -DEPENDS += cross/mariadb-connector-c -ENV += MYSQLCLIENT_CFLAGS="$(CFLAGS) -I$(STAGING_INSTALL_PREFIX)/include/mysql -I$(STAGING_INSTALL_PREFIX)/include/mariadb -I$(STAGING_INSTALL_PREFIX)/$(PYTHON_INC_DIR)" -ENV += MYSQLCLIENT_LDFLAGS="$(LDFLAGS)" - -# [Pillow] -DEPENDS += cross/freetype cross/libjpeg cross/zlib -WHEELS_BUILD_ARGS += [Pillow] -WHEELS_BUILD_ARGS += build_ext -WHEELS_BUILD_ARGS += --disable-platform-guessing -WHEELS_BUILD_ARGS += --enable-freetype -WHEELS_BUILD_ARGS += --enable-jpeg -WHEELS_BUILD_ARGS += --enable-zlib - -# [pycares] -DEPENDS += cross/c-ares -ENV += PYCARES_USE_SYSTEM_LIB=1 - -# [pycurl] -DEPENDS += cross/curl -ENV += PYCURL_CURL_CONFIG=$(STAGING_INSTALL_PREFIX)/bin/curl-config - -# [PyNaCl] -DEPENDS += cross/libsodium -ENV += SODIUM_INSTALL=system - -# [PyYAML] -DEPENDS += cross/libyaml - -# WHEELS_TEST_ALL: Force testing all wheel building -endif - -include ../../mk/spksrc.common.mk - -# Enable debug_info symgols for all archs -#GCC_DEBUG_INFO := 1 - -# Force compiler LTO optimizations except: -# - when testing all wheels -# - when including debug_info symbols -# - when using OLD_PPC_ARCHS arch -ifneq ($(strip $(WHEELS_TEST_ALL)),1) -ifneq ($(strip $(GCC_DEBUG_INFO)),1) -ifneq ($(findstring $(ARCH),$(OLD_PPC_ARCHS)),$(ARCH)) -ENV += PYTHON_OPTIMIZE=1 -endif -endif -endif - -## WHEELS_TEST_ALL: Force testing all wheel building -ifeq ($(strip $(WHEELS_TEST_ALL)),1) - -# [rpds-py] -# maturin canot be built as pre-requisite crossenv -ifneq ($(findstring $(ARCH),$(ARMv5_ARCHS)),$(ARCH)) -WHEELS += src/requirements-crossenv-rpds-py.txt -# Requires path to maturin from crossenv -ENV += PATH=$(WORK_DIR)/crossenv/build/bin:$(PATH) -endif - -# WHEELS_TEST_ALL: Force testing all wheel building -endif - include ../../mk/spksrc.spk.mk -## WHEELS_TEST_ALL: Force testing all wheel building -ifeq ($(strip $(WHEELS_TEST_ALL)),1) - -# [greenlet] -ifeq ($(call version_ge, $(TC_GCC), 4.9),1) -WHEELS += src/requirements-crossenv-greenlet-v2.txt -ifeq ($(call version_lt, $(TC_GCC), 5.0),1) -WHEELS_CPPFLAGS += [greenlet] -std=c++11 -fpermissive -endif -else -WHEELS += src/requirements-crossenv-greenlet-v1.txt -endif - -# [numpy] <= 1.21.6 (armv5) -# This version is now unsupported using py311 -ifneq ($(findstring $(ARCH),$(ARMv5_ARCHS)),$(ARCH)) -# [numpy] <= 1.22.4 (armv7l) -ifeq ($(findstring $(ARCH),$(ARMv7L_ARCHS)),$(ARCH)) -WHEELS += src/requirements-crossenv-numpy-armv7l.txt -# [numpy] <= 1.24.4 last working version with gcc-4.9 -else ifeq ($(call version_le, $(TC_GCC), 5.0),1) -WHEELS += src/requirements-crossenv-numpy-gcc4.txt -# [numpy] >= 1.25.0 requires c++17 -else ifeq ($(call version_gt, $(TC_GCC), 5.0),1) -WHEELS += src/requirements-crossenv-numpy.txt -endif -endif - -# workaround for compiler bug: -# https://github.com/numpy/numpy/issues/13622 -ifeq ($(call version_le, $(TC_GCC), 5.0),1) -ifeq ($(findstring $(ARCH),$(ARMv8_ARCHS)),$(ARCH)) -WHEELS_CFLAGS += [numpy] -O0 -endif -endif - -# [pycryptodome] -ifeq ($(call version_ge, $(TC_GCC), 4.9),1) -WHEELS_CFLAGS += [pycryptodome] -std=c11 -else -WHEELS_CFLAGS += [pycryptodome] -std=c99 -endif - -# [pycryptodomex] -ifeq ($(call version_ge, $(TC_GCC), 4.9),1) -WHEELS_CFLAGS += [pycryptodomex] -std=c11 -else -WHEELS_CFLAGS += [pycryptodomex] -std=c99 -endif - -# [pydantic_core] -ifeq ($(call version_ge, $(TC_GCC), 4.9),1) -WHEELS_CFLAGS += [pydantic_core] -std=c11 -else -WHEELS_CFLAGS += [pydantic_core] -std=c99 -endif -# Requires path to maturin from crossenv -ENV += PATH=$(WORK_DIR)/crossenv/build/bin:$(PATH) - -# WHEELS_TEST_ALL: Force testing all wheel building -endif - .PHONY: python311_extra_install python311_extra_install: @$(MSG) - Remove test folder diff --git a/spk/python311/src/requirements-abi3.txt b/spk/python311/src/requirements-abi3.txt deleted file mode 100644 index 4e50951c5f1..00000000000 --- a/spk/python311/src/requirements-abi3.txt +++ /dev/null @@ -1,12 +0,0 @@ -## -## All configurations below are optional and -## are provided to demonstrate how to build -## various wheels. Uncoment to enable. -## - -# [pycryptodome] + [pycryptodomex] -# Require: -# - CFLAGS=-sdt=c99 < gcc-4.9 -# - CFLAGS=-sdt=c11 >= gcc-4.9 -pycryptodome==3.20.0 -pycryptodomex==3.20.0 diff --git a/spk/python311/src/requirements-crossenv-greenlet-v1.txt b/spk/python311/src/requirements-crossenv-greenlet-v1.txt deleted file mode 100644 index eab2e8a8b4f..00000000000 --- a/spk/python311/src/requirements-crossenv-greenlet-v1.txt +++ /dev/null @@ -1,9 +0,0 @@ -## -## All configurations below are optional and -## are provided to demonstrate how to build -## various wheels. Uncoment to enable. -## - -# [greenlet] -# - gcc < 5.0 (DSM6) Last known working version -greenlet==1.1.3 diff --git a/spk/python311/src/requirements-crossenv-greenlet-v2.txt b/spk/python311/src/requirements-crossenv-greenlet-v2.txt deleted file mode 100644 index c2b4802c7ad..00000000000 --- a/spk/python311/src/requirements-crossenv-greenlet-v2.txt +++ /dev/null @@ -1,9 +0,0 @@ -## -## All configurations below are optional and -## are provided to demonstrate how to build -## various wheels. Uncoment to enable. -## - -# [greenlet] -# - Mandatory require full c++11 support -greenlet==3.0.3 diff --git a/spk/python311/src/requirements-crossenv-numpy-armv7l.txt b/spk/python311/src/requirements-crossenv-numpy-armv7l.txt deleted file mode 100644 index 243383864b9..00000000000 --- a/spk/python311/src/requirements-crossenv-numpy-armv7l.txt +++ /dev/null @@ -1,12 +0,0 @@ -## -## All configurations below are optional and -## are provided to demonstrate how to build -## various wheels. Uncoment to enable. -## - -# [numpy] -# - armv7L (hi3535-6.1) Last known working version -# - Require Cython in cross/python311 crossenv -# - numpy.distutils is deprecated since NumPy 1.23.0 -# Recommend to use `setuptools < 60.0` for Python >= 3.12 -numpy==1.22.4 diff --git a/spk/python311/src/requirements-crossenv-numpy-gcc4.txt b/spk/python311/src/requirements-crossenv-numpy-gcc4.txt deleted file mode 100644 index 296f605e160..00000000000 --- a/spk/python311/src/requirements-crossenv-numpy-gcc4.txt +++ /dev/null @@ -1,13 +0,0 @@ -## -## All configurations below are optional and -## are provided to demonstrate how to build -## various wheels. Uncoment to enable. -## - -# [numpy] -# - Require Cython in cross/python311 crossenv -# - aarch64-6.1 require workaround WHEELS_CFLAGS=-O0 -# ref: https://github.com/numpy/numpy/issues/13622 -# - numpy.distutils is deprecated since NumPy 1.23.0 -# Recommend to use `setuptools < 60.0` for Python >= 3.12 -numpy==1.24.4 diff --git a/spk/python311/src/requirements-crossenv-numpy.txt b/spk/python311/src/requirements-crossenv-numpy.txt deleted file mode 100644 index 8ee5a285e37..00000000000 --- a/spk/python311/src/requirements-crossenv-numpy.txt +++ /dev/null @@ -1,14 +0,0 @@ -## -## All configurations below are optional and -## are provided to demonstrate how to build -## various wheels. Uncoment to enable. -## - -# [numpy] -# - Require Cython in cross/python310 crossenv -# - Numpy 1.25.x require c++17 -# - Numpy 1.26.x requires: -# c++17, meson-python, scikit-build-core -#numpy==1.25.2 -# - Temp. reverted to 1.24.x -numpy==1.24.4 diff --git a/spk/python311/src/requirements-crossenv-rpds-py.txt b/spk/python311/src/requirements-crossenv-rpds-py.txt deleted file mode 100644 index dbe0de961fc..00000000000 --- a/spk/python311/src/requirements-crossenv-rpds-py.txt +++ /dev/null @@ -1,13 +0,0 @@ -## -## All configurations below are optional and -## are provided to demonstrate how to build -## various wheels. Uncoment to enable. -## - -# [rpds-py] -# Require environment variables -# PYO3_CROSS_LIB_DIR=$(STAGING_INSTALL_PREFIX)/lib/ -# PYO3_CROSS_INCLUDE_DIR=$(STAGING_INSTALL_PREFIX)/include/ -# Requires path to maturin from crossenv -# ENV += PATH=$(WORK_DIR)/crossenv/build/bin:$(PATH) -rpds-py==0.20.0 diff --git a/spk/python311/src/requirements-crossenv.txt b/spk/python311/src/requirements-crossenv.txt deleted file mode 100644 index 40c49bdcdb1..00000000000 --- a/spk/python311/src/requirements-crossenv.txt +++ /dev/null @@ -1,101 +0,0 @@ -## -## All configurations below are optional and -## are provided to demonstrate how to build -## various wheels. Uncoment to enable. -## - -# [bcrypt] -# Require environment variables -# PYO3_CROSS_LIB_DIR=$(STAGING_INSTALL_PREFIX)/lib/ -# PYO3_CROSS_INCLUDE_DIR=$(STAGING_INSTALL_PREFIX)/include/ -bcrypt==4.2.0 - -# [cryptography] -# Mandatory of using OPENSSL_*_DIR starting with version >= 40 -# https://docs.rs/openssl/latest/openssl/#automatic -# ENV += OPENSSL_LIB_DIR=$(STAGING_INSTALL_PREFIX)/lib/ -# ENV += OPENSSL_INCLUDE_DIR=$(STAGING_INSTALL_PREFIX)/include/ -cryptography==43.0.1 - -# Requirement for cryptography -cffi==1.17.0 - -# commonly used cross-compiled wheels -# All tested and can be enabled but may conflict -# with local python apps requirements - -immutables==0.20 -MarkupSafe==2.1.5 -msgpack-python==0.5.6 -netifaces==0.11.0 -psutil==6.0.0 -regex==2024.7.24 -SQLAlchemy==2.0.32 -zope.interface==7.0.2 - -# [gevent] -# Depends: libev, c-ares -# Require environment variables -# GEVENTSETUP_EMBED_CARES=FALSE -# GEVENTSETUP_EMBED_LIBEV=FALSE -gevent==24.2.1 - -# [lxml] -# Depends: libxml2, libxslt -lxml==5.3.0 - -# [mysqlclient] -# Depends: mysql-connector-c, mariadb-connector-c -# Require environment variables -# MYSQLCLIENT_CFLAGS -# MYSQLCLIENT_LDFLAGS -mysqlclient==2.2.4 - -# [Pillow] -# Require --global-options arguments -# WHEELS_BUILD_ARGS = [Pillow] build_ext --disable-platform-guessing -Pillow==9.5.0 - -# [pycares] -# Depends: c-ares -# Require environment variables -# PYCARES_USE_SYSTEM_LIB=1 -pycares==4.4.0 - -# [pycurl] -# Depends: curl -# Require environment variables -# PYCURL_CURL_CONFIG -pycurl==7.45.3 - -# [pydantic_core] -# Requires path to maturin from crossenv -# Requires WHEELS_CFLAGS = -std=c11 for = gcc-4.9 -# Requires WHEELS_CFLAGS = -std=c99 for < gcc-4.9 -# Require environment variables -# PYO3_CROSS_LIB_DIR=$(STAGING_INSTALL_PREFIX)/lib/ -# PYO3_CROSS_INCLUDE_DIR=$(STAGING_INSTALL_PREFIX)/include/ -pydantic_core==2.23.0 - -# [PyNaCl] -# Depends: cross/libsodium -# Require environment variables -# SODIUM_INSTALL=system -PyNaCl==1.5.0 - -# [PyYAML] -# Depends: libyaml -PyYAML==6.0.2 - -# [rencode] -# Updated fork of the project -# rencode==1.0.6 <<-- unsupported -git+https://github.com/totaam/rencode.git@f6254ab26161f90b9c5e97915b9193fee805fc1f#egg=rencode==1.0.7 - -# [ujson] -# - Require setuptools-scm in cross/python3* crossenv -ujson==5.10.0 - -# [webrtcvad] -# webrtcvad==2.0.10 # requires unreleased version at specific commit for qoriq arch -git+https://github.com/wiseman/py-webrtcvad@3bd761332a9404f5c9276105070ee814c4428342#egg=webrtcvad==2.0.10 From 483bf8f9a875f28729f621e7993edebe93c23507 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Mon, 14 Oct 2024 19:56:04 +0000 Subject: [PATCH 002/130] python313: Initial commit, fails to build on readline --- cross/python313/Makefile | 192 +++++++++++++ cross/python313/digests | 3 + cross/python313/patches/001-mimetypes.patch | 26 ++ ...static_assert_undefined-fix-GH-94766.patch | 39 +++ ...05-configure.ac-remove-unknown-flags.patch | 25 ++ .../001-avoid_static_assert_undefined.patch | 16 ++ ...05-configure.ac-remove-unknown-flags.patch | 24 ++ ...05-configure.ac-remove-unknown-flags.patch | 14 + native/python313/Makefile | 51 ++++ native/python313/digests | 3 + spk/python313/Makefile | 45 +++ spk/python313/src/python3.png | Bin 0 -> 24676 bytes spk/python313/src/python3.svg | 261 ++++++++++++++++++ 13 files changed, 699 insertions(+) create mode 100644 cross/python313/Makefile create mode 100644 cross/python313/digests create mode 100644 cross/python313/patches/001-mimetypes.patch create mode 100644 cross/python313/patches/88f6281/001-revert-static_assert_undefined-fix-GH-94766.patch create mode 100644 cross/python313/patches/88f6281/005-configure.ac-remove-unknown-flags.patch create mode 100644 cross/python313/patches/ppc853x-5.2/001-avoid_static_assert_undefined.patch create mode 100644 cross/python313/patches/ppc853x-5.2/005-configure.ac-remove-unknown-flags.patch create mode 100644 cross/python313/patches/x86-5.2/005-configure.ac-remove-unknown-flags.patch create mode 100644 native/python313/Makefile create mode 100644 native/python313/digests create mode 100644 spk/python313/Makefile create mode 100644 spk/python313/src/python3.png create mode 100644 spk/python313/src/python3.svg diff --git a/cross/python313/Makefile b/cross/python313/Makefile new file mode 100644 index 00000000000..4fe6d35f7e4 --- /dev/null +++ b/cross/python313/Makefile @@ -0,0 +1,192 @@ +PKG_NAME = python313 +PKG_VERS = 3.13.0 +PKG_VERS_MAJOR_MINOR = $(word 1,$(subst ., ,$(PKG_VERS))).$(word 2,$(subst ., ,$(PKG_VERS))) +PKG_EXT = tar.xz +PKG_DIST_NAME = Python-$(PKG_VERS).$(PKG_EXT) +PKG_DIST_SITE = https://www.python.org/ftp/python/$(PKG_VERS) +PKG_DIR = Python-$(PKG_VERS) + +# Platform "powerpc-none-linux-gnuspe" with compiler "gcc" is not supported by the +# CPython core team, see https://peps.python.org/pep-0011/ for more information. +# And compiler must support std=c++11 (OlD_PPC_ARCHS fail, but ARMv5_ARCHS have no issue). +UNSUPPORTED_ARCHS = $(OLD_PPC_ARCHS) + +BUILD_DEPENDS = native/$(PKG_NAME) + +DEPENDS = cross/zlib cross/sqlite cross/readline cross/ncursesw cross/bzip2 cross/xz +# required for Sleepycat^WOracle Berkeley DB interface +DEPENDS += cross/berkeleydb +# required for uuid module +DEPENDS += cross/libuuid + +HOMEPAGE = https://www.python.org/ +COMMENT = Python Programming Language +LICENSE = PSF + +GNU_CONFIGURE = 1 + +CONFIGURE_ARGS = --enable-shared +CONFIGURE_ARGS += --without-static-libpython +CONFIGURE_ARGS += --enable-ipv6 +# installed pip is not on PATH +CONFIGURE_ARGS += --without-ensurepip +CONFIGURE_ARGS += --enable-loadable-sqlite-extensions +CONFIGURE_ARGS += --with-computed-gotos=yes +CONFIGURE_ARGS += --with-build-python +CONFIGURE_ARGS += --with-readline=readline + +include ../../mk/spksrc.archs.mk + +# optionally generate optimized code +ifeq ($(strip $(PYTHON_OPTIMIZE)),1) +CONFIGURE_ARGS += --enable-optimizations +# Some tests (like test_base64) must find libpython shared library at runtime. +# python: error while loading shared libraries: libpython3.13.so.1.0: cannot open shared object file: No such file or directory +ENV += LD_LIBRARY_PATH=$(WORK_DIR)/$(PKG_DIR) +# Enable Link-Time Optimization +CONFIGURE_ARGS += --with-lto +else +# test modules are required for optimization only +CONFIGURE_ARGS += --disable-test-modules +endif + +CONFIGURE_ARGS += ac_cv_buggy_getaddrinfo=no +CONFIGURE_ARGS += ac_cv_file__dev_ptmx=no +CONFIGURE_ARGS += ac_cv_file__dev_ptc=no +CONFIGURE_ARGS += ac_cv_have_long_long_format=yes + +DEPENDS += cross/openssl3 +CONFIGURE_ARGS += --with-ssl-default-suites=openssl + +DEPENDS += cross/gdbm +CONFIGURE_ARGS += --with-dbmliborder=gdbm:ndbm:bdb + +DEPENDS += cross/libexpat +CONFIGURE_ARGS += --with-system-expat + +# libffi is no longer bundled with python +DEPENDS += cross/libffi +CONFIGURE_ARGS += --with-system-ffi + +# Mandatory PYO3_* variables for rust cross-compiling +ENV += PYO3_CROSS_LIB_DIR=$(STAGING_INSTALL_PREFIX)/lib/ +ENV += PYO3_CROSS_INCLUDE_DIR=$(STAGING_INSTALL_PREFIX)/include/ +# Mandatory of using OPENSSL_*_DIR starting with +# cryptography version >= 40 +# https://docs.rs/openssl/latest/openssl/#automatic +ENV += OPENSSL_LIB_DIR=$(STAGING_INSTALL_PREFIX)/lib/ +ENV += OPENSSL_INCLUDE_DIR=$(STAGING_INSTALL_PREFIX)/include/ + + +ADDITIONAL_CFLAGS = -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -L $(STAGING_INSTALL_PREFIX)/lib -I $(STAGING_INSTALL_PREFIX)/include + +POST_PATCH_TARGET = python313_post_patch +PRE_CONFIGURE_TARGET = python313_pre_configure +COMPILE_TARGET = python313_compile +INSTALL_TARGET = python313_install +POST_INSTALL_TARGET = python313_post_install + +include ../../mk/spksrc.cross-cc.mk + +HOST_ARCH = $(shell uname -m) +BUILD_ARCH = $(shell expr "$(TC_TARGET)" : '\([^-]*\)' ) +PYTHON_NATIVE = $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/bin/python3 +PIP_NATIVE = $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/bin/pip +HOSTPYTHON = $(WORK_DIR)/$(PKG_DIR)/hostpython +HOSTPYTHON_LIB_NATIVE = $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/$(PKG_DIR)/build/lib.linux-$(HOST_ARCH)-$(PKG_VERS_MAJOR_MINOR) +PYTHON_LIB_NATIVE = $(WORK_DIR)/$(PKG_DIR)/build/lib.linux-$(HOST_ARCH)-$(PKG_VERS_MAJOR_MINOR) +PYTHON_SITE_PACKAGES_NATIVE = $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/lib/python$(PKG_VERS_MAJOR_MINOR)/site-packages +PYTHON_LIB_CROSS = $(WORK_DIR)/$(PKG_DIR)/build/lib.linux-$(BUILD_ARCH)-$(PKG_VERS_MAJOR_MINOR) +PYTHON_LIB_DIR = lib/python$(PKG_VERS_MAJOR_MINOR) +PYTHON_INC_DIR = include/python$(PKG_VERS_MAJOR_MINOR) + +# Required so that the python3 binaries and libraries generated by native compilation +# take precedence over current environment python3 when generating +# target architecture resources +PATH := $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/bin:$(PATH) +LD_LIBRARY_PATH := $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/lib:$(LD_LIBRARY_PATH) +export PATH LD_LIBRARY_PATH + +.PHONY: python313_post_patch +python313_post_patch: + $(RUN) sed -e 's#@INSTALL_PREFIX@#$(INSTALL_PREFIX)#' -i Lib/mimetypes.py + +.PHONY: python313_pre_configure +python313_pre_configure: + cp $(PYTHON_NATIVE) $(HOSTPYTHON) + $(RUN) autoreconf -ivf -Werror + # create phantom header and library to succeed add_dir_to_list in setup.py + # so that future-promised libsqlite3.so and sqlite3.h will be used. Yep, + # it's a bit hokey, but avoids editing upstream pristine source + mkdir -p $(STAGING_INSTALL_PREFIX)/lib $(STAGING_INSTALL_PREFIX)/include + mkdir -p $(WORK_DIR)/Python-$(PKG_VERS)/Include $(WORK_DIR)/Python-$(PKG_VERS)/lib + test -h $(WORK_DIR)/Python-$(PKG_VERS)/Include/sqlite3.h || ln -fs $(STAGING_INSTALL_PREFIX)/include/sqlite3.h $(WORK_DIR)/Python-$(PKG_VERS)/Include/sqlite3.h + test -h $(WORK_DIR)/Python-$(PKG_VERS)/lib/libsqlite3.so || ln -fs $(STAGING_INSTALL_PREFIX)/lib/libsqlite3.so $(WORK_DIR)/Python-$(PKG_VERS)/lib/ + +.PHONY: python313_compile +python313_compile: + $(RUN) _PYTHON_HOST_PLATFORM=$(TC_TARGET) $(MAKE) -j $(NCPUS) + +.PHONY: python313_install +python313_install: + @install -m 755 -d $(STAGING_INSTALL_PREFIX)/etc + @install -m 644 src/mime.types $(STAGING_INSTALL_PREFIX)/etc/ + $(RUN) _PYTHON_HOST_PLATFORM=$(TC_TARGET) $(MAKE) install prefix=$(STAGING_INSTALL_PREFIX) + +# default wheels to install in crossenv +CROSSENV_WHEELS = cffi==1.17.1 +CROSSENV_WHEELS += cryptography==43.0.1 +# +# Cython version >= 3.x breaks PyYAML wheel +# https://github.com/yaml/pyyaml/issues/601 +# +# It also breaks numpy at crossenv creation time using github-action +# https://numpy.org/devdocs/reference/distutils_status_migration.html +# Python 3.12 considerations: scikit-build-core, meson-python +#CROSSENV_WHEELS += Cython==3.0.2 +CROSSENV_WHEELS += Cython==0.29.37 +CROSSENV_WHEELS += flit==3.9.0 +CROSSENV_WHEELS += maturin==1.7.4 +CROSSENV_WHEELS += poetry==1.8.3 +CROSSENV_WHEELS += scikit-build==0.18.1 +CROSSENV_WHEELS += setuptools-rust==1.10.2 +CROSSENV_WHEELS += setuptools-scm==8.1.0 +# For future use when building numpy >= 1.26 +#CROSSENV_WHEELS += meson-python==1.5.2 +#CROSSENV_WHEELS += scikit-build-core==0.10.7 +# For pydantic_core==2.23.0: (typing-extensions >=4.6.0,!=4.7.0) +CROSSENV_WHEELS += typing_extensions==4.12.2 + + +# Create the crossenv in preparation for +# cross-compiling all the necessary wheels +.PHONY: python313_post_install +python313_post_install: $(WORK_DIR)/python-cc.mk + mkdir -p $(PYTHON_LIB_CROSS) + cp -R $(HOSTPYTHON_LIB_NATIVE) $(PYTHON_LIB_CROSS)/../ + @$(RUN) $(PYTHON_NATIVE) -m crossenv $(STAGING_INSTALL_PREFIX)/bin/python$(PKG_VERS_MAJOR_MINOR) --cc $(TC_PATH)$(TC_PREFIX)gcc --cxx $(TC_PATH)$(TC_PREFIX)c++ --ar $(TC_PATH)$(TC_PREFIX)ar --sysroot $(TC_SYSROOT) --env LIBRARY_PATH= --manylinux manylinux2014 $(WORK_DIR)/crossenv/ + . $(WORK_DIR)/crossenv/bin/activate && $(RUN) wget --no-verbose https://bootstrap.pypa.io/get-pip.py + . $(WORK_DIR)/crossenv/bin/activate && $(RUN) build-python get-pip.py "pip==24.2" --no-setuptools --no-wheel --disable-pip-version-check + . $(WORK_DIR)/crossenv/bin/activate && $(RUN) python get-pip.py "pip==24.2" --no-setuptools --no-wheel --disable-pip-version-check + . $(WORK_DIR)/crossenv/bin/activate && $(RUN) build-pip --disable-pip-version-check install "setuptools==68.1.2" "wheel==0.44.0" "pip-tools==7.4.1" + . $(WORK_DIR)/crossenv/bin/activate && $(RUN) pip --disable-pip-version-check install "setuptools==68.1.2" "wheel==0.44.0" "pip-tools==7.4.1" + . $(WORK_DIR)/crossenv/bin/activate && $(RUN) build-pip --disable-pip-version-check install $(CROSSENV_WHEELS) + . $(WORK_DIR)/crossenv/bin/activate && $(RUN) pip --disable-pip-version-check install $(CROSSENV_WHEELS) +ifneq ($(PYTHON_LIB_NATIVE),$(PYTHON_LIB_CROSS)) + cp $(PYTHON_LIB_CROSS)/_sysconfigdata_*.py $(PYTHON_LIB_NATIVE)/_sysconfigdata.py +endif + +$(WORK_DIR)/python-cc.mk: + @echo HOSTPYTHON=$(HOSTPYTHON) > $@ + @echo CROSSENV=$(WORK_DIR)/crossenv/bin/activate >> $@ + @echo HOSTPYTHON_LIB_NATIVE=$(HOSTPYTHON_LIB_NATIVE) >> $@ + @echo PYTHON_LIB_NATIVE=$(PYTHON_LIB_NATIVE) >> $@ + @echo PYTHON_SITE_PACKAGES_NATIVE=$(PYTHON_SITE_PACKAGES_NATIVE) >> $@ + @echo PYTHON_INTERPRETER=$(INSTALL_PREFIX)/bin/python$(PKG_VERS_MAJOR_MINOR) >> $@ + @echo PYTHON_VERSION=$(PKG_VERS_MAJOR_MINOR) >> $@ + @echo PYTHON_LIB_CROSS=$(PYTHON_LIB_CROSS) >> $@ + @echo PYTHON_LIB_DIR=$(PYTHON_LIB_DIR) >> $@ + @echo PYTHON_INC_DIR=$(PYTHON_INC_DIR) >> $@ + @echo PIP=$(PIP_NATIVE) >> $@ + @echo CROSS_COMPILE_WHEELS=1 >> $@ + @echo ADDITIONAL_WHEEL_BUILD_ARGS=--no-build-isolation >> $@ diff --git a/cross/python313/digests b/cross/python313/digests new file mode 100644 index 00000000000..e04149813c9 --- /dev/null +++ b/cross/python313/digests @@ -0,0 +1,3 @@ +Python-3.13.0.tar.xz SHA1 0f71dce4a3251460985a944bbd1d1b7db1660a91 +Python-3.13.0.tar.xz SHA256 086de5882e3cb310d4dca48457522e2e48018ecd43da9cdf827f6a0759efb07d +Python-3.13.0.tar.xz MD5 726e5b829fcf352326874c1ae599abaa diff --git a/cross/python313/patches/001-mimetypes.patch b/cross/python313/patches/001-mimetypes.patch new file mode 100644 index 00000000000..804b3e1f0b1 --- /dev/null +++ b/cross/python313/patches/001-mimetypes.patch @@ -0,0 +1,26 @@ + +DSM does not have the default mime-type files available, +need to bring our own for the module to work. + +Equivalent of cross/python/patches/004-mimetypes.patch +Added by Diaoul 2013-03-24_23:25:49+0100 + +--- Lib/mimetypes.py.orig 2011-10-16 21:07:51.000000000 +0200 ++++ Lib/mimetypes.py 2011-10-16 21:07:58.000000000 +0200 +@@ -40,15 +40,7 @@ + ] + + knownfiles = [ +- "/etc/mime.types", +- "/etc/httpd/mime.types", # Mac OS X +- "/etc/httpd/conf/mime.types", # Apache +- "/etc/apache/mime.types", # Apache 1 +- "/etc/apache2/mime.types", # Apache 2 +- "/usr/local/etc/httpd/conf/mime.types", +- "/usr/local/lib/netscape/mime.types", +- "/usr/local/etc/httpd/conf/mime.types", # Apache 1.2 +- "/usr/local/etc/mime.types", # Apache 1.3 ++ "@INSTALL_PREFIX@/etc/mime.types", + ] + + inited = False diff --git a/cross/python313/patches/88f6281/001-revert-static_assert_undefined-fix-GH-94766.patch b/cross/python313/patches/88f6281/001-revert-static_assert_undefined-fix-GH-94766.patch new file mode 100644 index 00000000000..3b2c36f60c8 --- /dev/null +++ b/cross/python313/patches/88f6281/001-revert-static_assert_undefined-fix-GH-94766.patch @@ -0,0 +1,39 @@ +--- Include/pymacro.h-orig 2023-06-06 22:00:27.000000000 +0000 ++++ Include/pymacro.h 2023-07-03 19:36:57.974496974 +0000 +@@ -3,23 +3,20 @@ + + // gh-91782: On FreeBSD 12, if the _POSIX_C_SOURCE and _XOPEN_SOURCE macros are + // defined, disables C11 support and does not define +-// the static_assert() macro. ++// the static_assert() macro. Define the static_assert() macro in Python until ++// suports C11: + // https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=255290 +-// +-// macOS <= 10.10 doesn't define static_assert in assert.h at all despite +-// having C11 compiler support. +-// +-// static_assert is defined in glibc from version 2.16. Compiler support for +-// the C11 _Static_assert keyword is in gcc >= 4.6. +-// +-// MSVC makes static_assert a keyword in C11-17, contrary to the standards. +-// +-// In C++11 and C2x, static_assert is a keyword, redefining is undefined +-// behaviour. So only define if building as C (if __STDC_VERSION__ is defined), +-// not C++, and only for C11-17. +-#if !defined(static_assert) && (defined(__GNUC__) || defined(__clang__)) \ +- && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L \ +- && __STDC_VERSION__ <= 201710L ++#if defined(__FreeBSD__) && !defined(static_assert) ++# define static_assert _Static_assert ++#endif ++ ++// static_assert is defined in glibc from version 2.16. Before it requires ++// compiler support (gcc >= 4.6) and is called _Static_assert. ++// In C++ 11 static_assert is a keyword, redefining is undefined behaviour. ++#if (defined(__GLIBC__) \ ++ && (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ <= 16)) \ ++ && !(defined(__cplusplus) && __cplusplus >= 201103L) \ ++ && !defined(static_assert)) + # define static_assert _Static_assert + #endif + diff --git a/cross/python313/patches/88f6281/005-configure.ac-remove-unknown-flags.patch b/cross/python313/patches/88f6281/005-configure.ac-remove-unknown-flags.patch new file mode 100644 index 00000000000..6e379adf32d --- /dev/null +++ b/cross/python313/patches/88f6281/005-configure.ac-remove-unknown-flags.patch @@ -0,0 +1,25 @@ +# remove flags unknown by gcc 4.6.4 of ARMv5 toolchain +# - remove -ffat-lto-objects +# - replace -std=c11 by -std=c99 +# +--- configure.ac.orig 2022-06-06 11:53:30.000000000 +0000 ++++ configure.ac 2022-06-19 15:36:23.019811638 +0000 +@@ -1872,7 +1872,7 @@ if test "$Py_LTO" = 'true' ; then + LTOCFLAGS="-flto" + ;; + *) +- LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none" ++ LTOFLAGS="-flto -fuse-linker-plugin -flto-partition=none" + ;; + esac + ;; +@@ -2157,7 +2157,7 @@ AC_DEFUN([PY_CHECK_CC_WARNING], [ + # tweak BASECFLAGS based on compiler and platform + case $GCC in + yes) +- CFLAGS_NODIST="$CFLAGS_NODIST -std=c11" ++ CFLAGS_NODIST="$CFLAGS_NODIST -std=c99" + + PY_CHECK_CC_WARNING([enable], [extra], [if we can add -Wextra]) + AS_VAR_IF([ac_cv_enable_extra_warning], [yes], + diff --git a/cross/python313/patches/ppc853x-5.2/001-avoid_static_assert_undefined.patch b/cross/python313/patches/ppc853x-5.2/001-avoid_static_assert_undefined.patch new file mode 100644 index 00000000000..33eea81d2af --- /dev/null +++ b/cross/python313/patches/ppc853x-5.2/001-avoid_static_assert_undefined.patch @@ -0,0 +1,16 @@ +# gcc 4.3.2 is lacking static_assert for c code (available for c++ code only). +# +# Since static_assert acts at compile time only, it does not affect the runtime +# behaviour when omitting the implementation. +# +--- Include/pymacro.h.orig 2023-08-24 12:09:18.000000000 +0000 ++++ Include/pymacro.h 2024-03-02 18:15:00.033365138 +0000 +@@ -21,6 +21,8 @@ + && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L \ + && __STDC_VERSION__ <= 201710L + # define static_assert _Static_assert ++#else ++# define static_assert + #endif + + /* Minimum value between x and y */ diff --git a/cross/python313/patches/ppc853x-5.2/005-configure.ac-remove-unknown-flags.patch b/cross/python313/patches/ppc853x-5.2/005-configure.ac-remove-unknown-flags.patch new file mode 100644 index 00000000000..8196eef030c --- /dev/null +++ b/cross/python313/patches/ppc853x-5.2/005-configure.ac-remove-unknown-flags.patch @@ -0,0 +1,24 @@ +# remove flags unknown by gcc 4.3.2 (lto optimization is disabled at all for ppc853x arch) +# - remove -fprofile-correction +# - replace -std=c11 by -std=c99 +# +--- configure.ac.orig 2023-08-24 12:09:18.000000000 +0000 ++++ configure.ac 2024-03-02 20:17:15.812508858 +0000 +@@ -1989,7 +1989,7 @@ + ;; + *) + PGO_PROF_GEN_FLAG="-fprofile-generate" +- PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction" ++ PGO_PROF_USE_FLAG="-fprofile-use" + LLVM_PROF_MERGER="true" + LLVM_PROF_FILE="" + ;; +@@ -2195,7 +2195,7 @@ + # tweak BASECFLAGS based on compiler and platform + case $GCC in + yes) +- CFLAGS_NODIST="$CFLAGS_NODIST -std=c11" ++ CFLAGS_NODIST="$CFLAGS_NODIST -std=c99" + + PY_CHECK_CC_WARNING([enable], [extra], [if we can add -Wextra]) + AS_VAR_IF([ac_cv_enable_extra_warning], [yes], diff --git a/cross/python313/patches/x86-5.2/005-configure.ac-remove-unknown-flags.patch b/cross/python313/patches/x86-5.2/005-configure.ac-remove-unknown-flags.patch new file mode 100644 index 00000000000..3843affc1d4 --- /dev/null +++ b/cross/python313/patches/x86-5.2/005-configure.ac-remove-unknown-flags.patch @@ -0,0 +1,14 @@ +# remove lto optimization flags unknown by older gcc +# - remove -fuse-linker-plugin +# +--- configure.ac.orig 2022-06-06 11:53:30.000000000 +0000 ++++ configure.ac 2022-06-19 15:36:23.019811638 +0000 +@@ -1427,7 +1427,7 @@ + LTOCFLAGS="-flto" + ;; + *) +- LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none" ++ LTOFLAGS="-flto -ffat-lto-objects -flto-partition=none" + ;; + esac + ;; diff --git a/native/python313/Makefile b/native/python313/Makefile new file mode 100644 index 00000000000..da494613967 --- /dev/null +++ b/native/python313/Makefile @@ -0,0 +1,51 @@ +PKG_NAME = python313 +PKG_VERS = 3.13.0 +PKG_EXT = tar.xz +PKG_DIST_NAME = Python-$(PKG_VERS).$(PKG_EXT) +PKG_DIST_SITE = https://www.python.org/ftp/python/$(PKG_VERS) +PKG_DIR = Python-$(PKG_VERS) + +HOMEPAGE = https://www.python.org/ +COMMENT = Python Programming Language +LICENSE = PSF + +GNU_CONFIGURE = 1 +CONFIGURE_ARGS = --enable-ipv6 +CONFIGURE_ARGS += --without-static-libpython +# installed pip is not on PATH +CONFIGURE_ARGS += --with-ensurepip=no +# test modules are required for optimization only +CONFIGURE_ARGS += --disable-test-modules +# Uses system default libffi-dev +CONFIGURE_ARGS += --with-system-ffi +# Uses system default libssl-dev +CONFIGURE_ARGS += --with-ssl-default-suites=openssl + +COMPILE_MAKE_OPTIONS += all + +POST_INSTALL_TARGET = python311_native_post_install + +include ../../mk/spksrc.native-cc.mk + +PYTHON = $(WORK_DIR)/install/usr/local/bin/python3 +PIP = $(WORK_DIR)/install/usr/local/bin/pip +PIP_NATIVE = $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/bin/pip + +PIP_VERSION = "24.2" +PIP_WHEELS = setuptools==75.1.0 +PIP_WHEELS += setuptools-rust==1.10.2 +PIP_WHEELS += maturin==1.7.4 +PIP_WHEELS += wheel==0.44.0 +PIP_WHEELS += cffi==1.17.1 +PIP_WHEELS += crossenv==1.5.0 + +.PHONY: python311_native_post_install +python311_native_post_install: $(WORK_DIR)/python-native.mk + @$(MSG) Installing pip + @$(RUN) wget https://bootstrap.pypa.io/get-pip.py + @$(RUN) $(PYTHON) get-pip.py "pip==$(PIP_VERSION)" --no-setuptools --no-wheel --disable-pip-version-check + @$(MSG) Installing setuptools, wheel, cffi and crossenv + @$(PIP) --disable-pip-version-check install $(PIP_WHEELS) + +$(WORK_DIR)/python-native.mk: + @echo PIP=$(PIP_NATIVE) >> $@ diff --git a/native/python313/digests b/native/python313/digests new file mode 100644 index 00000000000..e04149813c9 --- /dev/null +++ b/native/python313/digests @@ -0,0 +1,3 @@ +Python-3.13.0.tar.xz SHA1 0f71dce4a3251460985a944bbd1d1b7db1660a91 +Python-3.13.0.tar.xz SHA256 086de5882e3cb310d4dca48457522e2e48018ecd43da9cdf827f6a0759efb07d +Python-3.13.0.tar.xz MD5 726e5b829fcf352326874c1ae599abaa diff --git a/spk/python313/Makefile b/spk/python313/Makefile new file mode 100644 index 00000000000..cee3b6066c9 --- /dev/null +++ b/spk/python313/Makefile @@ -0,0 +1,45 @@ +SPK_NAME = python313 +SPK_VERS = 3.13.0 +SPK_VERS_MAJOR_MINOR = $(word 1,$(subst ., ,$(SPK_VERS))).$(word 2,$(subst ., ,$(SPK_VERS))) +SPK_REV = 1 +SPK_ICON = src/python3.png + +# Platform "powerpc-none-linux-gnuspe" with compiler "gcc" is not supported by the +# CPython core team, see https://peps.python.org/pep-0011/ for more information. +# And compiler must support std=c++11 (OlD_PPC_ARCHS fail, but ARMv5_ARCHS have no issue). +UNSUPPORTED_ARCHS = $(OLD_PPC_ARCHS) + +DEPENDS = cross/$(SPK_NAME) +DEPENDS += cross/pip + +MAINTAINER = SynoCommunity +DESCRIPTION = Python Programming Language. +DESCRIPTION_FRE = Language de programmation Python. +DESCRIPTION_SPN = Lenguaje de programación Python. +STARTABLE = no +DISPLAY_NAME = Python 3.13 +CHANGELOG = "1. Initial Python 3.13.0 package release" + +HOMEPAGE = https://www.python.org +LICENSE = PSF + +# Force building pure-python wheels +WHEELS_PURE_PYTHON_PACKAGING_ENABLE = 1 +WHEELS = src/requirements-pure.txt + +SERVICE_SETUP = src/service-setup.sh + +PYTHON_LIB_DIR = lib/python$(SPK_VERS_MAJOR_MINOR) + +POST_STRIP_TARGET = python313_extra_install + +SPK_USR_LOCAL_LINKS = bin:bin/python3.11 + +include ../../mk/spksrc.spk.mk + +.PHONY: python313_extra_install +python313_extra_install: + @$(MSG) - Remove test folder + rm -rf $(STAGING_DIR)/$(PYTHON_LIB_DIR)/test/ + @$(MSG) - Remove compiled files from __pycache__ + find $(STAGING_DIR)/$(PYTHON_LIB_DIR) -type f -regex '.*\.py[co]' -delete diff --git a/spk/python313/src/python3.png b/spk/python313/src/python3.png new file mode 100644 index 0000000000000000000000000000000000000000..1d3d99794ded99ed8179c19a5d7d58566d9f5a20 GIT binary patch literal 24676 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 NAzP + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + From d4286603a354d93ec9b9de32f0c597ca03544ce4 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Mon, 14 Oct 2024 19:56:39 +0000 Subject: [PATCH 003/130] python-wheels: First attempt, to be further developed --- spk/python-wheels/Makefile | 160 ++++++++++++++++++ spk/python-wheels/src/python3-pip.png | Bin 0 -> 4832 bytes spk/python-wheels/src/requirements-abi3.txt | 12 ++ .../src/requirements-crossenv-greenlet-v1.txt | 9 + .../src/requirements-crossenv-greenlet-v2.txt | 9 + .../requirements-crossenv-numpy-armv7l.txt | 12 ++ .../src/requirements-crossenv-numpy-gcc4.txt | 13 ++ .../src/requirements-crossenv-numpy.txt | 14 ++ .../src/requirements-crossenv-rpds-py.txt | 13 ++ .../src/requirements-crossenv.txt | 101 +++++++++++ spk/python-wheels/src/requirements-pure.txt | 31 ++++ 11 files changed, 374 insertions(+) create mode 100644 spk/python-wheels/Makefile create mode 100644 spk/python-wheels/src/python3-pip.png create mode 100644 spk/python-wheels/src/requirements-abi3.txt create mode 100644 spk/python-wheels/src/requirements-crossenv-greenlet-v1.txt create mode 100644 spk/python-wheels/src/requirements-crossenv-greenlet-v2.txt create mode 100644 spk/python-wheels/src/requirements-crossenv-numpy-armv7l.txt create mode 100644 spk/python-wheels/src/requirements-crossenv-numpy-gcc4.txt create mode 100644 spk/python-wheels/src/requirements-crossenv-numpy.txt create mode 100644 spk/python-wheels/src/requirements-crossenv-rpds-py.txt create mode 100644 spk/python-wheels/src/requirements-crossenv.txt create mode 100644 spk/python-wheels/src/requirements-pure.txt diff --git a/spk/python-wheels/Makefile b/spk/python-wheels/Makefile new file mode 100644 index 00000000000..4e121440ca9 --- /dev/null +++ b/spk/python-wheels/Makefile @@ -0,0 +1,160 @@ +SPK_NAME = python-wheels +SPK_VERS = 1.0 +SPK_VERS_MAJOR_MINOR = $(word 1,$(subst ., ,$(SPK_VERS))).$(word 2,$(subst ., ,$(SPK_VERS))) +SPK_REV = 1 +SPK_ICON = src/python3-pip.png + +# Platform "powerpc-none-linux-gnuspe" with compiler "gcc" is not supported by the +# CPython core team, see https://peps.python.org/pep-0011/ for more information. +# And compiler must support std=c++11 (OlD_PPC_ARCHS fail, but ARMv5_ARCHS have no issue). +UNSUPPORTED_ARCHS = $(OLD_PPC_ARCHS) + +PYTHON_PACKAGE = python311 + +MAINTAINER = SynoCommunity +DESCRIPTION = Collection of programs for the Python programming language. +DESCRIPTION_FRE = Collection of programs for the Python programming language. +DESCRIPTION_SPN = Colección de programas para el lenguaje de programación Python. +STARTABLE = no +DISPLAY_NAME = Python Wheels Collection +CHANGELOG = "1. Initial package" + +HOMEPAGE = https://www.python.org +LICENSE = PSF + +# Enable debug_info symgols for all archs +#GCC_DEBUG_INFO := 1 + +# Force building pure-python wheels +WHEELS_PURE_PYTHON_PACKAGING_ENABLE = 1 +WHEELS = src/requirements-pure.txt +WHEELS += src/requirements-crossenv.txt +WHEELS += src/requirements-abi3.txt + +# [cryptography] +# Use cross/cryptography to generate py36-abi3 limited API +# NOTE: It's not possible to build py36-abi3 limited API using pip due to PEP517 +# To generate py311-py311 regular build use src/requirements-crossenv.txt +DEPENDS += cross/cryptography + +# [gevent] +DEPENDS += cross/libev cross/c-ares +ENV += GEVENTSETUP_EMBED_CARES=FALSE +ENV += GEVENTSETUP_EMBED_LIBEV=FALSE + +# [lxml] +DEPENDS += cross/libxml2 +DEPENDS += cross/libxslt + +# [mysqlclient] +DEPENDS += cross/mysql-connector-c +DEPENDS += cross/mariadb-connector-c +ENV += MYSQLCLIENT_CFLAGS="$(CFLAGS) -I$(STAGING_INSTALL_PREFIX)/include/mysql -I$(STAGING_INSTALL_PREFIX)/include/mariadb -I$(STAGING_INSTALL_PREFIX)/$(PYTHON_INC_DIR)" +ENV += MYSQLCLIENT_LDFLAGS="$(LDFLAGS)" + +# [Pillow] +DEPENDS += cross/freetype cross/libjpeg cross/zlib +WHEELS_BUILD_ARGS += [Pillow] +WHEELS_BUILD_ARGS += build_ext +WHEELS_BUILD_ARGS += --disable-platform-guessing +WHEELS_BUILD_ARGS += --enable-freetype +WHEELS_BUILD_ARGS += --enable-jpeg +WHEELS_BUILD_ARGS += --enable-zlib + +# [pycares] +DEPENDS += cross/c-ares +ENV += PYCARES_USE_SYSTEM_LIB=1 + +# [pycurl] +DEPENDS += cross/curl +ENV += PYCURL_CURL_CONFIG=$(STAGING_INSTALL_PREFIX)/bin/curl-config + +# [PyNaCl] +DEPENDS += cross/libsodium +ENV += SODIUM_INSTALL=system + +# [PyYAML] +DEPENDS += cross/libyaml + +include ../../mk/spksrc.common.mk + +# Force compiler LTO optimizations except: +# - when testing all wheels +# - when including debug_info symbols +# - when using OLD_PPC_ARCHS arch +ifneq ($(strip $(WHEELS_TEST_ALL)),1) +ifneq ($(strip $(GCC_DEBUG_INFO)),1) +ifneq ($(findstring $(ARCH),$(OLD_PPC_ARCHS)),$(ARCH)) +ENV += PYTHON_OPTIMIZE=1 +endif +endif +endif + +## WHEELS_TEST_ALL: Force testing all wheel building +ifeq ($(strip $(WHEELS_TEST_ALL)),1) + +# [rpds-py] +# maturin canot be built as pre-requisite crossenv +ifneq ($(findstring $(ARCH),$(ARMv5_ARCHS)),$(ARCH)) +WHEELS += src/requirements-crossenv-rpds-py.txt +# Requires path to maturin from crossenv +ENV += PATH=$(WORK_DIR)/crossenv/build/bin:$(PATH) +endif + +include ../../mk/spksrc.python.mk + +# [greenlet] +ifeq ($(call version_ge, $(TC_GCC), 4.9),1) +WHEELS += src/requirements-crossenv-greenlet-v2.txt +ifeq ($(call version_lt, $(TC_GCC), 5.0),1) +WHEELS_CPPFLAGS += [greenlet] -std=c++11 -fpermissive +endif +else +WHEELS += src/requirements-crossenv-greenlet-v1.txt +endif + +# [numpy] <= 1.21.6 (armv5) +# This version is now unsupported using py311 +ifneq ($(findstring $(ARCH),$(ARMv5_ARCHS)),$(ARCH)) +# [numpy] <= 1.22.4 (armv7l) +ifeq ($(findstring $(ARCH),$(ARMv7L_ARCHS)),$(ARCH)) +WHEELS += src/requirements-crossenv-numpy-armv7l.txt +# [numpy] <= 1.24.4 last working version with gcc-4.9 +else ifeq ($(call version_le, $(TC_GCC), 5.0),1) +WHEELS += src/requirements-crossenv-numpy-gcc4.txt +# [numpy] >= 1.25.0 requires c++17 +else ifeq ($(call version_gt, $(TC_GCC), 5.0),1) +WHEELS += src/requirements-crossenv-numpy.txt +endif +endif + +# workaround for compiler bug: +# https://github.com/numpy/numpy/issues/13622 +ifeq ($(call version_le, $(TC_GCC), 5.0),1) +ifeq ($(findstring $(ARCH),$(ARMv8_ARCHS)),$(ARCH)) +WHEELS_CFLAGS += [numpy] -O0 +endif +endif + +# [pycryptodome] +ifeq ($(call version_ge, $(TC_GCC), 4.9),1) +WHEELS_CFLAGS += [pycryptodome] -std=c11 +else +WHEELS_CFLAGS += [pycryptodome] -std=c99 +endif + +# [pycryptodomex] +ifeq ($(call version_ge, $(TC_GCC), 4.9),1) +WHEELS_CFLAGS += [pycryptodomex] -std=c11 +else +WHEELS_CFLAGS += [pycryptodomex] -std=c99 +endif + +# [pydantic_core] +ifeq ($(call version_ge, $(TC_GCC), 4.9),1) +WHEELS_CFLAGS += [pydantic_core] -std=c11 +else +WHEELS_CFLAGS += [pydantic_core] -std=c99 +endif +# Requires path to maturin from crossenv +ENV += PATH=$(WORK_DIR)/crossenv/build/bin:$(PATH) diff --git a/spk/python-wheels/src/python3-pip.png b/spk/python-wheels/src/python3-pip.png new file mode 100644 index 0000000000000000000000000000000000000000..d195821833d57b8973f0d12950054c679edb48f4 GIT binary patch literal 4832 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 literal 0 HcmV?d00001 diff --git a/spk/python-wheels/src/requirements-abi3.txt b/spk/python-wheels/src/requirements-abi3.txt new file mode 100644 index 00000000000..4e50951c5f1 --- /dev/null +++ b/spk/python-wheels/src/requirements-abi3.txt @@ -0,0 +1,12 @@ +## +## All configurations below are optional and +## are provided to demonstrate how to build +## various wheels. Uncoment to enable. +## + +# [pycryptodome] + [pycryptodomex] +# Require: +# - CFLAGS=-sdt=c99 < gcc-4.9 +# - CFLAGS=-sdt=c11 >= gcc-4.9 +pycryptodome==3.20.0 +pycryptodomex==3.20.0 diff --git a/spk/python-wheels/src/requirements-crossenv-greenlet-v1.txt b/spk/python-wheels/src/requirements-crossenv-greenlet-v1.txt new file mode 100644 index 00000000000..eab2e8a8b4f --- /dev/null +++ b/spk/python-wheels/src/requirements-crossenv-greenlet-v1.txt @@ -0,0 +1,9 @@ +## +## All configurations below are optional and +## are provided to demonstrate how to build +## various wheels. Uncoment to enable. +## + +# [greenlet] +# - gcc < 5.0 (DSM6) Last known working version +greenlet==1.1.3 diff --git a/spk/python-wheels/src/requirements-crossenv-greenlet-v2.txt b/spk/python-wheels/src/requirements-crossenv-greenlet-v2.txt new file mode 100644 index 00000000000..c2b4802c7ad --- /dev/null +++ b/spk/python-wheels/src/requirements-crossenv-greenlet-v2.txt @@ -0,0 +1,9 @@ +## +## All configurations below are optional and +## are provided to demonstrate how to build +## various wheels. Uncoment to enable. +## + +# [greenlet] +# - Mandatory require full c++11 support +greenlet==3.0.3 diff --git a/spk/python-wheels/src/requirements-crossenv-numpy-armv7l.txt b/spk/python-wheels/src/requirements-crossenv-numpy-armv7l.txt new file mode 100644 index 00000000000..243383864b9 --- /dev/null +++ b/spk/python-wheels/src/requirements-crossenv-numpy-armv7l.txt @@ -0,0 +1,12 @@ +## +## All configurations below are optional and +## are provided to demonstrate how to build +## various wheels. Uncoment to enable. +## + +# [numpy] +# - armv7L (hi3535-6.1) Last known working version +# - Require Cython in cross/python311 crossenv +# - numpy.distutils is deprecated since NumPy 1.23.0 +# Recommend to use `setuptools < 60.0` for Python >= 3.12 +numpy==1.22.4 diff --git a/spk/python-wheels/src/requirements-crossenv-numpy-gcc4.txt b/spk/python-wheels/src/requirements-crossenv-numpy-gcc4.txt new file mode 100644 index 00000000000..296f605e160 --- /dev/null +++ b/spk/python-wheels/src/requirements-crossenv-numpy-gcc4.txt @@ -0,0 +1,13 @@ +## +## All configurations below are optional and +## are provided to demonstrate how to build +## various wheels. Uncoment to enable. +## + +# [numpy] +# - Require Cython in cross/python311 crossenv +# - aarch64-6.1 require workaround WHEELS_CFLAGS=-O0 +# ref: https://github.com/numpy/numpy/issues/13622 +# - numpy.distutils is deprecated since NumPy 1.23.0 +# Recommend to use `setuptools < 60.0` for Python >= 3.12 +numpy==1.24.4 diff --git a/spk/python-wheels/src/requirements-crossenv-numpy.txt b/spk/python-wheels/src/requirements-crossenv-numpy.txt new file mode 100644 index 00000000000..8ee5a285e37 --- /dev/null +++ b/spk/python-wheels/src/requirements-crossenv-numpy.txt @@ -0,0 +1,14 @@ +## +## All configurations below are optional and +## are provided to demonstrate how to build +## various wheels. Uncoment to enable. +## + +# [numpy] +# - Require Cython in cross/python310 crossenv +# - Numpy 1.25.x require c++17 +# - Numpy 1.26.x requires: +# c++17, meson-python, scikit-build-core +#numpy==1.25.2 +# - Temp. reverted to 1.24.x +numpy==1.24.4 diff --git a/spk/python-wheels/src/requirements-crossenv-rpds-py.txt b/spk/python-wheels/src/requirements-crossenv-rpds-py.txt new file mode 100644 index 00000000000..dbe0de961fc --- /dev/null +++ b/spk/python-wheels/src/requirements-crossenv-rpds-py.txt @@ -0,0 +1,13 @@ +## +## All configurations below are optional and +## are provided to demonstrate how to build +## various wheels. Uncoment to enable. +## + +# [rpds-py] +# Require environment variables +# PYO3_CROSS_LIB_DIR=$(STAGING_INSTALL_PREFIX)/lib/ +# PYO3_CROSS_INCLUDE_DIR=$(STAGING_INSTALL_PREFIX)/include/ +# Requires path to maturin from crossenv +# ENV += PATH=$(WORK_DIR)/crossenv/build/bin:$(PATH) +rpds-py==0.20.0 diff --git a/spk/python-wheels/src/requirements-crossenv.txt b/spk/python-wheels/src/requirements-crossenv.txt new file mode 100644 index 00000000000..40c49bdcdb1 --- /dev/null +++ b/spk/python-wheels/src/requirements-crossenv.txt @@ -0,0 +1,101 @@ +## +## All configurations below are optional and +## are provided to demonstrate how to build +## various wheels. Uncoment to enable. +## + +# [bcrypt] +# Require environment variables +# PYO3_CROSS_LIB_DIR=$(STAGING_INSTALL_PREFIX)/lib/ +# PYO3_CROSS_INCLUDE_DIR=$(STAGING_INSTALL_PREFIX)/include/ +bcrypt==4.2.0 + +# [cryptography] +# Mandatory of using OPENSSL_*_DIR starting with version >= 40 +# https://docs.rs/openssl/latest/openssl/#automatic +# ENV += OPENSSL_LIB_DIR=$(STAGING_INSTALL_PREFIX)/lib/ +# ENV += OPENSSL_INCLUDE_DIR=$(STAGING_INSTALL_PREFIX)/include/ +cryptography==43.0.1 + +# Requirement for cryptography +cffi==1.17.0 + +# commonly used cross-compiled wheels +# All tested and can be enabled but may conflict +# with local python apps requirements + +immutables==0.20 +MarkupSafe==2.1.5 +msgpack-python==0.5.6 +netifaces==0.11.0 +psutil==6.0.0 +regex==2024.7.24 +SQLAlchemy==2.0.32 +zope.interface==7.0.2 + +# [gevent] +# Depends: libev, c-ares +# Require environment variables +# GEVENTSETUP_EMBED_CARES=FALSE +# GEVENTSETUP_EMBED_LIBEV=FALSE +gevent==24.2.1 + +# [lxml] +# Depends: libxml2, libxslt +lxml==5.3.0 + +# [mysqlclient] +# Depends: mysql-connector-c, mariadb-connector-c +# Require environment variables +# MYSQLCLIENT_CFLAGS +# MYSQLCLIENT_LDFLAGS +mysqlclient==2.2.4 + +# [Pillow] +# Require --global-options arguments +# WHEELS_BUILD_ARGS = [Pillow] build_ext --disable-platform-guessing +Pillow==9.5.0 + +# [pycares] +# Depends: c-ares +# Require environment variables +# PYCARES_USE_SYSTEM_LIB=1 +pycares==4.4.0 + +# [pycurl] +# Depends: curl +# Require environment variables +# PYCURL_CURL_CONFIG +pycurl==7.45.3 + +# [pydantic_core] +# Requires path to maturin from crossenv +# Requires WHEELS_CFLAGS = -std=c11 for = gcc-4.9 +# Requires WHEELS_CFLAGS = -std=c99 for < gcc-4.9 +# Require environment variables +# PYO3_CROSS_LIB_DIR=$(STAGING_INSTALL_PREFIX)/lib/ +# PYO3_CROSS_INCLUDE_DIR=$(STAGING_INSTALL_PREFIX)/include/ +pydantic_core==2.23.0 + +# [PyNaCl] +# Depends: cross/libsodium +# Require environment variables +# SODIUM_INSTALL=system +PyNaCl==1.5.0 + +# [PyYAML] +# Depends: libyaml +PyYAML==6.0.2 + +# [rencode] +# Updated fork of the project +# rencode==1.0.6 <<-- unsupported +git+https://github.com/totaam/rencode.git@f6254ab26161f90b9c5e97915b9193fee805fc1f#egg=rencode==1.0.7 + +# [ujson] +# - Require setuptools-scm in cross/python3* crossenv +ujson==5.10.0 + +# [webrtcvad] +# webrtcvad==2.0.10 # requires unreleased version at specific commit for qoriq arch +git+https://github.com/wiseman/py-webrtcvad@3bd761332a9404f5c9276105070ee814c4428342#egg=webrtcvad==2.0.10 diff --git a/spk/python-wheels/src/requirements-pure.txt b/spk/python-wheels/src/requirements-pure.txt new file mode 100644 index 00000000000..5dedc5cf9b8 --- /dev/null +++ b/spk/python-wheels/src/requirements-pure.txt @@ -0,0 +1,31 @@ +# basic default wheels +# ==> Always install latest version (service-setup.sh:install_python_virtualenv) +pip==24.2 + +# Always match what's in cross/python311/Makefile +setuptools==68.1.2 +wheel==0.44.0 + +# Always use latest version available +# certifi==2024.8.30 +certifi + +# Mandatory for python application +# to create their local virtualenv +# in order to install wheels within +# their running environment +virtualenv==20.26.6 + +# Other mandatory wheels that +# gets install by default as +# basic dependencies of above +distlib==0.3.8 +filelock==3.16.1 +platformdirs==4.3.6 +six==1.16.0 + +## +## All configurations below are optional and +## are provided to demonstrate how to build +## various wheels. Uncoment to enable. +## From 1a1b27ace70c4e09f29b71f3848d38059108a471 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Mon, 14 Oct 2024 23:09:51 +0000 Subject: [PATCH 004/130] py311: Re-enable lto --- spk/python311/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spk/python311/Makefile b/spk/python311/Makefile index 32488bc30ea..61a902c88d2 100644 --- a/spk/python311/Makefile +++ b/spk/python311/Makefile @@ -23,6 +23,9 @@ CHANGELOG = "1. Update to Python 3.11.10
2. Update all mandatory wheels" HOMEPAGE = https://www.python.org LICENSE = PSF +# Force compiler LTO optimizations +ENV += PYTHON_OPTIMIZE=1 + # Force building pure-python wheels WHEELS_PURE_PYTHON_PACKAGING_ENABLE = 1 WHEELS = src/requirements-pure.txt From fc5208a33ce75c52e183406af70a005b528e3ab3 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Mon, 14 Oct 2024 23:25:05 +0000 Subject: [PATCH 005/130] python313: First working build --- cross/python313/Makefile | 2 +- cross/python313/PLIST | 14 + cross/python313/src/mime.types | 788 +++++++++++++++++++++++++++++ spk/python313/Makefile | 7 +- spk/python313/src/service-setup.sh | 16 + 5 files changed, 823 insertions(+), 4 deletions(-) create mode 100644 cross/python313/PLIST create mode 100644 cross/python313/src/mime.types create mode 100644 spk/python313/src/service-setup.sh diff --git a/cross/python313/Makefile b/cross/python313/Makefile index 4fe6d35f7e4..7083ed67904 100644 --- a/cross/python313/Makefile +++ b/cross/python313/Makefile @@ -34,6 +34,7 @@ CONFIGURE_ARGS += --enable-loadable-sqlite-extensions CONFIGURE_ARGS += --with-computed-gotos=yes CONFIGURE_ARGS += --with-build-python CONFIGURE_ARGS += --with-readline=readline +CONFIGURE_ARGS += --disable-test-modules include ../../mk/spksrc.archs.mk @@ -66,7 +67,6 @@ CONFIGURE_ARGS += --with-system-expat # libffi is no longer bundled with python DEPENDS += cross/libffi -CONFIGURE_ARGS += --with-system-ffi # Mandatory PYO3_* variables for rust cross-compiling ENV += PYO3_CROSS_LIB_DIR=$(STAGING_INSTALL_PREFIX)/lib/ diff --git a/cross/python313/PLIST b/cross/python313/PLIST new file mode 100644 index 00000000000..39039e01ea1 --- /dev/null +++ b/cross/python313/PLIST @@ -0,0 +1,14 @@ +lnk:bin/idle3 +rsc:bin/idle3.13 +lnk:bin/pydoc3 +rsc:bin/pydoc3.13 +lnk:bin/python3 +bin:bin/python3.13 +rsc:bin/python3.13-config +lnk:bin/python3-config +rsc:etc/mime.types +rsc:include/python3.13/pyconfig.h +lnk:lib/libpython3.13.so +lib:lib/libpython3.13.so.1.0 +lib:lib/libpython3.so +rsc:lib/python3.13 diff --git a/cross/python313/src/mime.types b/cross/python313/src/mime.types new file mode 100644 index 00000000000..893622137dd --- /dev/null +++ b/cross/python313/src/mime.types @@ -0,0 +1,788 @@ +############################################################################### +# +# MIME-TYPES and the extensions that represent them +# +# This file is part of the "mime-support" package. Please send email (not a +# bug report) to mime-support@packages.debian.org if you would like new types +# and/or extensions to be added. +# +# The reason that all types are managed by the mime-support package instead +# allowing individual packages to install types in much the same way as they +# add entries in to the mailcap file is so these types can be referenced by +# other programs (such as a web server) even if the specific support package +# for that type is not installed. +# +# Users can add their own types if they wish by creating a ".mime.types" +# file in their home directory. Definitions included there will take +# precedence over those listed here. +# +# Note: Compression schemes like "gzip", "bzip", and "compress" are not +# actually "mime-types". They are "encodings" and hence must _not_ have +# entries in this file to map their extensions. The "mime-type" of an +# encoded file refers to the type of data that has been encoded, not the +# type of encoding. +# +############################################################################### + + +application/activemessage +application/andrew-inset ez +application/annodex anx +application/applefile +application/atom+xml atom +application/atomcat+xml atomcat +application/atomserv+xml atomsrv +application/atomicmail +application/batch-SMTP +application/beep+xml +application/bbolin lin +application/cals-1840 +application/cap cap pcap +application/commonground +application/cu-seeme cu +application/cybercash +application/davmount+xml davmount +application/dca-rft +application/dec-dx +application/docbook+xml +application/dsptype tsp +application/dvcs +application/ecmascript es +application/edi-consent +application/edi-x12 +application/edifact +application/eshop +application/font-tdpfr +application/futuresplash spl +application/ghostview +application/hta hta +application/http +application/hyperstudio +application/iges +application/index +application/index.cmd +application/index.obj +application/index.response +application/index.vnd +application/iotp +application/ipp +application/isup +application/java-archive jar +application/java-serialized-object ser +application/java-vm class +application/javascript js +application/m3g m3g +application/mac-binhex40 hqx +application/mac-compactpro cpt +application/macwriteii +application/marc +application/mathematica nb nbp +application/ms-tnef +application/msaccess mdb +application/msword doc dot +application/mxf mxf +application/news-message-id +application/news-transmission +application/ocsp-request +application/ocsp-response +application/octet-stream bin +application/oda oda +application/ogg ogx +application/parityfec +application/pdf pdf +application/pgp-encrypted +application/pgp-keys key +application/pgp-signature pgp +application/pics-rules prf +application/pkcs10 +application/pkcs7-mime +application/pkcs7-signature +application/pkix-cert +application/pkix-crl +application/pkixcmp +application/postscript ps ai eps epsi epsf eps2 eps3 +application/prs.alvestrand.titrax-sheet +application/prs.cww +application/prs.nprend +application/qsig +application/rar rar +application/rdf+xml rdf +application/remote-printing +application/riscos +application/rss+xml rss +application/rtf rtf +application/sdp +application/set-payment +application/set-payment-initiation +application/set-registration +application/set-registration-initiation +application/sgml +application/sgml-open-catalog +application/sieve +application/slate +application/smil smi smil +application/timestamp-query +application/timestamp-reply +application/vemmi +application/whoispp-query +application/whoispp-response +application/wita +application/x400-bp +application/xhtml+xml xhtml xht +application/xml xml xsl xsd +application/xml-dtd +application/xml-external-parsed-entity +application/xspf+xml xspf +application/zip zip +application/vnd.3M.Post-it-Notes +application/vnd.accpac.simply.aso +application/vnd.accpac.simply.imp +application/vnd.acucobol +application/vnd.aether.imp +application/vnd.android.package-archive apk +application/vnd.anser-web-certificate-issue-initiation +application/vnd.anser-web-funds-transfer-initiation +application/vnd.audiograph +application/vnd.bmi +application/vnd.businessobjects +application/vnd.canon-cpdl +application/vnd.canon-lips +application/vnd.cinderella cdy +application/vnd.claymore +application/vnd.commerce-battelle +application/vnd.commonspace +application/vnd.comsocaller +application/vnd.contact.cmsg +application/vnd.cosmocaller +application/vnd.ctc-posml +application/vnd.cups-postscript +application/vnd.cups-raster +application/vnd.cups-raw +application/vnd.cybank +application/vnd.dna +application/vnd.dpgraph +application/vnd.dxr +application/vnd.ecdis-update +application/vnd.ecowin.chart +application/vnd.ecowin.filerequest +application/vnd.ecowin.fileupdate +application/vnd.ecowin.series +application/vnd.ecowin.seriesrequest +application/vnd.ecowin.seriesupdate +application/vnd.enliven +application/vnd.epson.esf +application/vnd.epson.msf +application/vnd.epson.quickanime +application/vnd.epson.salt +application/vnd.epson.ssf +application/vnd.ericsson.quickcall +application/vnd.eudora.data +application/vnd.fdf +application/vnd.ffsns +application/vnd.flographit +application/vnd.framemaker +application/vnd.fsc.weblaunch +application/vnd.fujitsu.oasys +application/vnd.fujitsu.oasys2 +application/vnd.fujitsu.oasys3 +application/vnd.fujitsu.oasysgp +application/vnd.fujitsu.oasysprs +application/vnd.fujixerox.ddd +application/vnd.fujixerox.docuworks +application/vnd.fujixerox.docuworks.binder +application/vnd.fut-misnet +application/vnd.google-earth.kml+xml kml +application/vnd.google-earth.kmz kmz +application/vnd.grafeq +application/vnd.groove-account +application/vnd.groove-identity-message +application/vnd.groove-injector +application/vnd.groove-tool-message +application/vnd.groove-tool-template +application/vnd.groove-vcard +application/vnd.hhe.lesson-player +application/vnd.hp-HPGL +application/vnd.hp-PCL +application/vnd.hp-PCLXL +application/vnd.hp-hpid +application/vnd.hp-hps +application/vnd.httphone +application/vnd.hzn-3d-crossword +application/vnd.ibm.MiniPay +application/vnd.ibm.afplinedata +application/vnd.ibm.modcap +application/vnd.informix-visionary +application/vnd.intercon.formnet +application/vnd.intertrust.digibox +application/vnd.intertrust.nncp +application/vnd.intu.qbo +application/vnd.intu.qfx +application/vnd.irepository.package+xml +application/vnd.is-xpr +application/vnd.japannet-directory-service +application/vnd.japannet-jpnstore-wakeup +application/vnd.japannet-payment-wakeup +application/vnd.japannet-registration +application/vnd.japannet-registration-wakeup +application/vnd.japannet-setstore-wakeup +application/vnd.japannet-verification +application/vnd.japannet-verification-wakeup +application/vnd.koan +application/vnd.lotus-1-2-3 +application/vnd.lotus-approach +application/vnd.lotus-freelance +application/vnd.lotus-notes +application/vnd.lotus-organizer +application/vnd.lotus-screencam +application/vnd.lotus-wordpro +application/vnd.mcd +application/vnd.mediastation.cdkey +application/vnd.meridian-slingshot +application/vnd.mif +application/vnd.minisoft-hp3000-save +application/vnd.mitsubishi.misty-guard.trustweb +application/vnd.mobius.daf +application/vnd.mobius.dis +application/vnd.mobius.msl +application/vnd.mobius.plc +application/vnd.mobius.txf +application/vnd.motorola.flexsuite +application/vnd.motorola.flexsuite.adsi +application/vnd.motorola.flexsuite.fis +application/vnd.motorola.flexsuite.gotap +application/vnd.motorola.flexsuite.kmr +application/vnd.motorola.flexsuite.ttc +application/vnd.motorola.flexsuite.wem +application/vnd.mozilla.xul+xml xul +application/vnd.ms-artgalry +application/vnd.ms-asf +application/vnd.ms-excel xls xlb xlt +application/vnd.ms-lrm +application/vnd.ms-pki.seccat cat +application/vnd.ms-pki.stl stl +application/vnd.ms-powerpoint ppt pps +application/vnd.ms-project +application/vnd.ms-tnef +application/vnd.ms-works +application/vnd.mseq +application/vnd.msign +application/vnd.music-niff +application/vnd.musician +application/vnd.netfpx +application/vnd.noblenet-directory +application/vnd.noblenet-sealer +application/vnd.noblenet-web +application/vnd.novadigm.EDM +application/vnd.novadigm.EDX +application/vnd.novadigm.EXT +application/vnd.oasis.opendocument.chart odc +application/vnd.oasis.opendocument.database odb +application/vnd.oasis.opendocument.formula odf +application/vnd.oasis.opendocument.graphics odg +application/vnd.oasis.opendocument.graphics-template otg +application/vnd.oasis.opendocument.image odi +application/vnd.oasis.opendocument.presentation odp +application/vnd.oasis.opendocument.presentation-template otp +application/vnd.oasis.opendocument.spreadsheet ods +application/vnd.oasis.opendocument.spreadsheet-template ots +application/vnd.oasis.opendocument.text odt +application/vnd.oasis.opendocument.text-master odm +application/vnd.oasis.opendocument.text-template ott +application/vnd.oasis.opendocument.text-web oth +application/vnd.osa.netdeploy +application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx +application/vnd.openxmlformats-officedocument.spreadsheetml.template xltx +application/vnd.openxmlformats-officedocument.presentationml.presentation pptx +application/vnd.openxmlformats-officedocument.presentationml.slideshow ppsx +application/vnd.openxmlformats-officedocument.presentationml.template potx +application/vnd.openxmlformats-officedocument.wordprocessingml.document docx +application/vnd.openxmlformats-officedocument.wordprocessingml.template dotx +application/vnd.palm +application/vnd.pg.format +application/vnd.pg.osasli +application/vnd.powerbuilder6 +application/vnd.powerbuilder6-s +application/vnd.powerbuilder7 +application/vnd.powerbuilder7-s +application/vnd.powerbuilder75 +application/vnd.powerbuilder75-s +application/vnd.previewsystems.box +application/vnd.publishare-delta-tree +application/vnd.pvi.ptid1 +application/vnd.pwg-xhtml-print+xml +application/vnd.rapid +application/vnd.rim.cod cod +application/vnd.s3sms +application/vnd.seemail +application/vnd.shana.informed.formdata +application/vnd.shana.informed.formtemplate +application/vnd.shana.informed.interchange +application/vnd.shana.informed.package +application/vnd.smaf mmf +application/vnd.sss-cod +application/vnd.sss-dtf +application/vnd.sss-ntf +application/vnd.stardivision.calc sdc +application/vnd.stardivision.chart sds +application/vnd.stardivision.draw sda +application/vnd.stardivision.impress sdd +application/vnd.stardivision.math sdf +application/vnd.stardivision.writer sdw +application/vnd.stardivision.writer-global sgl +application/vnd.street-stream +application/vnd.sun.xml.calc sxc +application/vnd.sun.xml.calc.template stc +application/vnd.sun.xml.draw sxd +application/vnd.sun.xml.draw.template std +application/vnd.sun.xml.impress sxi +application/vnd.sun.xml.impress.template sti +application/vnd.sun.xml.math sxm +application/vnd.sun.xml.writer sxw +application/vnd.sun.xml.writer.global sxg +application/vnd.sun.xml.writer.template stw +application/vnd.svd +application/vnd.swiftview-ics +application/vnd.symbian.install sis +application/vnd.triscape.mxs +application/vnd.trueapp +application/vnd.truedoc +application/vnd.tve-trigger +application/vnd.ufdl +application/vnd.uplanet.alert +application/vnd.uplanet.alert-wbxml +application/vnd.uplanet.bearer-choice +application/vnd.uplanet.bearer-choice-wbxml +application/vnd.uplanet.cacheop +application/vnd.uplanet.cacheop-wbxml +application/vnd.uplanet.channel +application/vnd.uplanet.channel-wbxml +application/vnd.uplanet.list +application/vnd.uplanet.list-wbxml +application/vnd.uplanet.listcmd +application/vnd.uplanet.listcmd-wbxml +application/vnd.uplanet.signal +application/vnd.vcx +application/vnd.vectorworks +application/vnd.vidsoft.vidconference +application/vnd.visio vsd +application/vnd.vividence.scriptfile +application/vnd.wap.sic +application/vnd.wap.slc +application/vnd.wap.wbxml wbxml +application/vnd.wap.wmlc wmlc +application/vnd.wap.wmlscriptc wmlsc +application/vnd.webturbo +application/vnd.wordperfect wpd +application/vnd.wordperfect5.1 wp5 +application/vnd.wrq-hp3000-labelled +application/vnd.wt.stf +application/vnd.xara +application/vnd.xfdl +application/vnd.yellowriver-custom-menu +application/x-123 wk +application/x-7z-compressed 7z +application/x-abiword abw +application/x-apple-diskimage dmg +application/x-bcpio bcpio +application/x-bittorrent torrent +application/x-cab cab +application/x-cbr cbr +application/x-cbz cbz +application/x-cdf cdf cda +application/x-cdlink vcd +application/x-chess-pgn pgn +application/x-core +application/x-cpio cpio +application/x-csh csh +application/x-debian-package deb udeb +application/x-director dcr dir dxr +application/x-dms dms +application/x-doom wad +application/x-dvi dvi +application/x-httpd-eruby rhtml +application/x-executable +application/x-font pfa pfb gsf pcf pcf.Z +application/x-freemind mm +application/x-futuresplash spl +application/x-gnumeric gnumeric +application/x-go-sgf sgf +application/x-graphing-calculator gcf +application/x-gtar gtar tgz taz +application/x-hdf hdf +application/x-httpd-php phtml pht php +application/x-httpd-php-source phps +application/x-httpd-php3 php3 +application/x-httpd-php3-preprocessed php3p +application/x-httpd-php4 php4 +application/x-httpd-php5 php5 +application/x-ica ica +application/x-info info +application/x-internet-signup ins isp +application/x-iphone iii +application/x-iso9660-image iso +application/x-jam jam +application/x-java-applet +application/x-java-bean +application/x-java-jnlp-file jnlp +application/x-jmol jmz +application/x-kchart chrt +application/x-kdelnk +application/x-killustrator kil +application/x-koan skp skd skt skm +application/x-kpresenter kpr kpt +application/x-kspread ksp +application/x-kword kwd kwt +application/x-latex latex +application/x-lha lha +application/x-lyx lyx +application/x-lzh lzh +application/x-lzx lzx +application/x-maker frm maker frame fm fb book fbdoc +application/x-mif mif +application/x-ms-wmd wmd +application/x-ms-wmz wmz +application/x-msdos-program com exe bat dll +application/x-msi msi +application/x-netcdf nc +application/x-ns-proxy-autoconfig pac dat +application/x-nwc nwc +application/x-object o +application/x-oz-application oza +application/x-pkcs7-certreqresp p7r +application/x-pkcs7-crl crl +application/x-python-code pyc pyo +application/x-qgis qgs shp shx +application/x-quicktimeplayer qtl +application/x-redhat-package-manager rpm +application/x-ruby rb +application/x-rx +application/x-sh sh +application/x-shar shar +application/x-shellscript +application/x-shockwave-flash swf swfl +application/x-silverlight scr +application/x-stuffit sit sitx +application/x-sv4cpio sv4cpio +application/x-sv4crc sv4crc +application/x-tar tar +application/x-tcl tcl +application/x-tex-gf gf +application/x-tex-pk pk +application/x-texinfo texinfo texi +application/x-trash ~ % bak old sik +application/x-troff t tr roff +application/x-troff-man man +application/x-troff-me me +application/x-troff-ms ms +application/x-ustar ustar +application/x-videolan +application/x-wais-source src +application/x-wingz wz +application/x-x509-ca-cert crt +application/x-xcf xcf +application/x-xfig fig +application/x-xpinstall xpi + +audio/32kadpcm +audio/3gpp +audio/amr amr +audio/amr-wb awb +audio/amr amr +audio/amr-wb awb +audio/annodex axa +audio/basic au snd +audio/flac flac +audio/g.722.1 +audio/l16 +audio/midi mid midi kar +audio/mp4a-latm +audio/mpa-robust +audio/mpeg mpga mpega mp2 mp3 m4a +audio/mpegurl m3u +audio/ogg oga ogg spx +audio/parityfec +audio/prs.sid sid +audio/telephone-event +audio/tone +audio/vnd.cisco.nse +audio/vnd.cns.anp1 +audio/vnd.cns.inf1 +audio/vnd.digital-winds +audio/vnd.everad.plj +audio/vnd.lucent.voice +audio/vnd.nortel.vbk +audio/vnd.nuera.ecelp4800 +audio/vnd.nuera.ecelp7470 +audio/vnd.nuera.ecelp9600 +audio/vnd.octel.sbc +audio/vnd.qcelp +audio/vnd.rhetorex.32kadpcm +audio/vnd.vmx.cvsd +audio/x-aiff aif aiff aifc +audio/x-gsm gsm +audio/x-mpegurl m3u +audio/x-ms-wma wma +audio/x-ms-wax wax +audio/x-pn-realaudio-plugin +audio/x-pn-realaudio ra rm ram +audio/x-realaudio ra +audio/x-scpls pls +audio/x-sd2 sd2 +audio/x-wav wav + +chemical/x-alchemy alc +chemical/x-cache cac cache +chemical/x-cache-csf csf +chemical/x-cactvs-binary cbin cascii ctab +chemical/x-cdx cdx +chemical/x-cerius cer +chemical/x-chem3d c3d +chemical/x-chemdraw chm +chemical/x-cif cif +chemical/x-cmdf cmdf +chemical/x-cml cml +chemical/x-compass cpa +chemical/x-crossfire bsd +chemical/x-csml csml csm +chemical/x-ctx ctx +chemical/x-cxf cxf cef +#chemical/x-daylight-smiles smi +chemical/x-embl-dl-nucleotide emb embl +chemical/x-galactic-spc spc +chemical/x-gamess-input inp gam gamin +chemical/x-gaussian-checkpoint fch fchk +chemical/x-gaussian-cube cub +chemical/x-gaussian-input gau gjc gjf +chemical/x-gaussian-log gal +chemical/x-gcg8-sequence gcg +chemical/x-genbank gen +chemical/x-hin hin +chemical/x-isostar istr ist +chemical/x-jcamp-dx jdx dx +chemical/x-kinemage kin +chemical/x-macmolecule mcm +chemical/x-macromodel-input mmd mmod +chemical/x-mdl-molfile mol +chemical/x-mdl-rdfile rd +chemical/x-mdl-rxnfile rxn +chemical/x-mdl-sdfile sd sdf +chemical/x-mdl-tgf tgf +#chemical/x-mif mif +chemical/x-mmcif mcif +chemical/x-mol2 mol2 +chemical/x-molconn-Z b +chemical/x-mopac-graph gpt +chemical/x-mopac-input mop mopcrt mpc zmt +chemical/x-mopac-out moo +chemical/x-mopac-vib mvb +chemical/x-ncbi-asn1 asn +chemical/x-ncbi-asn1-ascii prt ent +chemical/x-ncbi-asn1-binary val aso +chemical/x-ncbi-asn1-spec asn +chemical/x-pdb pdb ent +chemical/x-rosdal ros +chemical/x-swissprot sw +chemical/x-vamas-iso14976 vms +chemical/x-vmd vmd +chemical/x-xtel xtel +chemical/x-xyz xyz + +image/cgm +image/g3fax +image/gif gif +image/ief ief +image/jpeg jpeg jpg jpe +image/naplps +image/pcx pcx +image/png png +image/prs.btif +image/prs.pti +image/svg+xml svg svgz +image/tiff tiff tif +image/vnd.cns.inf2 +image/vnd.djvu djvu djv +image/vnd.dwg +image/vnd.dxf +image/vnd.fastbidsheet +image/vnd.fpx +image/vnd.fst +image/vnd.fujixerox.edmics-mmr +image/vnd.fujixerox.edmics-rlc +image/vnd.mix +image/vnd.net-fpx +image/vnd.svf +image/vnd.wap.wbmp wbmp +image/vnd.xiff +image/x-canon-cr2 cr2 +image/x-canon-crw crw +image/x-cmu-raster ras +image/x-coreldraw cdr +image/x-coreldrawpattern pat +image/x-coreldrawtemplate cdt +image/x-corelphotopaint cpt +image/x-epson-erf erf +image/x-icon ico +image/x-jg art +image/x-jng jng +image/x-ms-bmp bmp +image/x-nikon-nef nef +image/x-olympus-orf orf +image/x-photoshop psd +image/x-portable-anymap pnm +image/x-portable-bitmap pbm +image/x-portable-graymap pgm +image/x-portable-pixmap ppm +image/x-rgb rgb +image/x-xbitmap xbm +image/x-xpixmap xpm +image/x-xwindowdump xwd + +inode/chardevice +inode/blockdevice +inode/directory-locked +inode/directory +inode/fifo +inode/socket + +message/delivery-status +message/disposition-notification +message/external-body +message/http +message/s-http +message/news +message/partial +message/rfc822 eml + +model/iges igs iges +model/mesh msh mesh silo +model/vnd.dwf +model/vnd.flatland.3dml +model/vnd.gdl +model/vnd.gs-gdl +model/vnd.gtw +model/vnd.mts +model/vnd.vtu +model/vrml wrl vrml +model/x3d+vrml x3dv +model/x3d+xml x3d +model/x3d+binary x3db + +multipart/alternative +multipart/appledouble +multipart/byteranges +multipart/digest +multipart/encrypted +multipart/form-data +multipart/header-set +multipart/mixed +multipart/parallel +multipart/related +multipart/report +multipart/signed +multipart/voice-message + +text/cache-manifest manifest +text/calendar ics icz +text/css css +text/csv csv +text/directory +text/english +text/enriched +text/h323 323 +text/html html htm shtml +text/iuls uls +text/mathml mml +text/parityfec +text/plain asc txt text pot brf +text/prs.lines.tag +text/rfc822-headers +text/richtext rtx +text/rtf +text/scriptlet sct wsc +text/t140 +text/texmacs tm ts +text/tab-separated-values tsv +text/uri-list +text/vnd.abc +text/vnd.curl +text/vnd.DMClientScript +text/vnd.flatland.3dml +text/vnd.fly +text/vnd.fmi.flexstor +text/vnd.in3d.3dml +text/vnd.in3d.spot +text/vnd.IPTC.NewsML +text/vnd.IPTC.NITF +text/vnd.latex-z +text/vnd.motorola.reflex +text/vnd.ms-mediapackage +text/vnd.sun.j2me.app-descriptor jad +text/vnd.wap.si +text/vnd.wap.sl +text/vnd.wap.wml wml +text/vnd.wap.wmlscript wmls +text/x-bibtex bib +text/x-boo boo +text/x-c++hdr h++ hpp hxx hh +text/x-c++src c++ cpp cxx cc +text/x-chdr h +text/x-component htc +text/x-crontab +text/x-csh csh +text/x-csrc c +text/x-dsrc d +text/x-diff diff patch +text/x-haskell hs +text/x-java java +text/x-literate-haskell lhs +text/x-makefile +text/x-moc moc +text/x-pascal p pas +text/x-pcs-gcd gcd +text/x-perl pl pm +text/x-python py +text/x-scala scala +text/x-server-parsed-html +text/x-setext etx +text/x-sh sh +text/x-tcl tcl tk +text/x-tex tex ltx sty cls +text/x-vcalendar vcs +text/x-vcard vcf + +video/3gpp 3gp +video/annodex axv +video/dl dl +video/dv dif dv +video/fli fli +video/gl gl +video/mpeg mpeg mpg mpe +video/mp4 mp4 +video/quicktime qt mov +video/mp4v-es +video/ogg ogv +video/parityfec +video/pointer +video/vnd.fvt +video/vnd.motorola.video +video/vnd.motorola.videop +video/vnd.mpegurl mxu +video/vnd.mts +video/vnd.nokia.interleaved-multimedia +video/vnd.vivo +video/x-flv flv +video/x-la-asf lsf lsx +video/x-mng mng +video/x-ms-asf asf asx +video/x-ms-wm wm +video/x-ms-wmv wmv +video/x-ms-wmx wmx +video/x-ms-wvx wvx +video/x-msvideo avi +video/x-sgi-movie movie +video/x-matroska mpv mkv + +x-conference/x-cooltalk ice + +x-epoc/x-sisx-app sisx +x-world/x-vrml vrm vrml wrl diff --git a/spk/python313/Makefile b/spk/python313/Makefile index cee3b6066c9..7b175d86068 100644 --- a/spk/python313/Makefile +++ b/spk/python313/Makefile @@ -9,7 +9,7 @@ SPK_ICON = src/python3.png # And compiler must support std=c++11 (OlD_PPC_ARCHS fail, but ARMv5_ARCHS have no issue). UNSUPPORTED_ARCHS = $(OLD_PPC_ARCHS) -DEPENDS = cross/$(SPK_NAME) +DEPENDS = cross/python313 DEPENDS += cross/pip MAINTAINER = SynoCommunity @@ -23,6 +23,9 @@ CHANGELOG = "1. Initial Python 3.13.0 package release" HOMEPAGE = https://www.python.org LICENSE = PSF +# Force compiler LTO optimizations +ENV += PYTHON_OPTIMIZE=1 + # Force building pure-python wheels WHEELS_PURE_PYTHON_PACKAGING_ENABLE = 1 WHEELS = src/requirements-pure.txt @@ -39,7 +42,5 @@ include ../../mk/spksrc.spk.mk .PHONY: python313_extra_install python313_extra_install: - @$(MSG) - Remove test folder - rm -rf $(STAGING_DIR)/$(PYTHON_LIB_DIR)/test/ @$(MSG) - Remove compiled files from __pycache__ find $(STAGING_DIR)/$(PYTHON_LIB_DIR) -type f -regex '.*\.py[co]' -delete diff --git a/spk/python313/src/service-setup.sh b/spk/python313/src/service-setup.sh new file mode 100644 index 00000000000..bd7b2c47850 --- /dev/null +++ b/spk/python313/src/service-setup.sh @@ -0,0 +1,16 @@ +PATH="${SYNOPKG_PKGDEST}/bin:$PATH" + +service_postinst () +{ + # Install the wheels + install_python_wheels + + # Log installation informations + echo "Installed version: $( ${SYNOPKG_PKGDEST}/bin/python3 --version 2>&1 )" + + # Byte-compile in background + PYTHON_SHORT_VER=$(${SYNOPKG_PKGDEST}/bin/python3 -c 'import sys; print("{0}.{1}".format(*sys.version_info[:2]))') + ${SYNOPKG_PKGDEST}/bin/python3 -m compileall -q -f ${SYNOPKG_PKGDEST}/lib/python${PYTHON_SHORT_VER} /dev/null & + ${SYNOPKG_PKGDEST}/bin/python3 -OO -m compileall -q -f ${SYNOPKG_PKGDEST}/lib/python${PYTHON_SHORT_VER} /dev/null & +} + From 30be5aecb0795260fd07b6515773f2558599acfb Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Tue, 15 Oct 2024 21:07:12 +0000 Subject: [PATCH 006/130] python313: Remove pgo optimizations as non-functional in cross-builds --- cross/python313/Makefile | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/cross/python313/Makefile b/cross/python313/Makefile index 7083ed67904..3930daa74bd 100644 --- a/cross/python313/Makefile +++ b/cross/python313/Makefile @@ -40,15 +40,14 @@ include ../../mk/spksrc.archs.mk # optionally generate optimized code ifeq ($(strip $(PYTHON_OPTIMIZE)),1) -CONFIGURE_ARGS += --enable-optimizations -# Some tests (like test_base64) must find libpython shared library at runtime. -# python: error while loading shared libraries: libpython3.13.so.1.0: cannot open shared object file: No such file or directory -ENV += LD_LIBRARY_PATH=$(WORK_DIR)/$(PKG_DIR) +# # Enable Link-Time Optimization CONFIGURE_ARGS += --with-lto -else -# test modules are required for optimization only -CONFIGURE_ARGS += --disable-test-modules +# +# pgo optimization can only be run native platform and now +# exit on errors which had no impact (and effects) previously. +# https://github.com/python/cpython/pull/111950 +#CONFIGURE_ARGS += --enable-optimizations endif CONFIGURE_ARGS += ac_cv_buggy_getaddrinfo=no From cd6446d588574e4da213500971290cbbf3761e13 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Tue, 15 Oct 2024 22:03:02 +0000 Subject: [PATCH 007/130] python-wheels: First integration of additional wheels for testing --- spk/python-wheels/Makefile | 35 ++++++++----------- .../src/requirements-crossenv-greenlet-v2.txt | 1 + .../src/requirements-crossenv.txt | 15 ++++++++ spk/python-wheels/src/requirements-pure.txt | 31 ---------------- 4 files changed, 31 insertions(+), 51 deletions(-) delete mode 100644 spk/python-wheels/src/requirements-pure.txt diff --git a/spk/python-wheels/Makefile b/spk/python-wheels/Makefile index 4e121440ca9..0a773a6f3c0 100644 --- a/spk/python-wheels/Makefile +++ b/spk/python-wheels/Makefile @@ -22,15 +22,21 @@ CHANGELOG = "1. Initial package" HOMEPAGE = https://www.python.org LICENSE = PSF -# Enable debug_info symgols for all archs +# Enable debug_info symgols #GCC_DEBUG_INFO := 1 -# Force building pure-python wheels -WHEELS_PURE_PYTHON_PACKAGING_ENABLE = 1 -WHEELS = src/requirements-pure.txt -WHEELS += src/requirements-crossenv.txt +WHEELS = src/requirements-crossenv.txt WHEELS += src/requirements-abi3.txt +# [borgbackup] +# Use OpenSSL path as defined by either +# spksrc.wheel-env.mk or spksrc.python.mk +ENV += BORG_OPENSSL_PREFIX="$(OPENSSL_STAGING_PREFIX)" +ENV += BORG_LIBLZ4_PREFIX="$(STAGING_INSTALL_PREFIX)" +ENV += BORG_LIBZSTD_PREFIX="$(STAGING_INSTALL_PREFIX)" +ENV += BORG_LIBB2_PREFIX="$(STAGING_INSTALL_PREFIX)" +DEPENDS += cross/attr cross/acl cross/openssl3 cross/lz4 cross/zstd cross/libb2 cross/fuse + # [cryptography] # Use cross/cryptography to generate py36-abi3 limited API # NOTE: It's not possible to build py36-abi3 limited API using pip due to PEP517 @@ -78,21 +84,6 @@ DEPENDS += cross/libyaml include ../../mk/spksrc.common.mk -# Force compiler LTO optimizations except: -# - when testing all wheels -# - when including debug_info symbols -# - when using OLD_PPC_ARCHS arch -ifneq ($(strip $(WHEELS_TEST_ALL)),1) -ifneq ($(strip $(GCC_DEBUG_INFO)),1) -ifneq ($(findstring $(ARCH),$(OLD_PPC_ARCHS)),$(ARCH)) -ENV += PYTHON_OPTIMIZE=1 -endif -endif -endif - -## WHEELS_TEST_ALL: Force testing all wheel building -ifeq ($(strip $(WHEELS_TEST_ALL)),1) - # [rpds-py] # maturin canot be built as pre-requisite crossenv ifneq ($(findstring $(ARCH),$(ARMv5_ARCHS)),$(ARCH)) @@ -158,3 +149,7 @@ WHEELS_CFLAGS += [pydantic_core] -std=c99 endif # Requires path to maturin from crossenv ENV += PATH=$(WORK_DIR)/crossenv/build/bin:$(PATH) + +# [rpds-py] +# Requires path to maturin from crossenv +ENV += PATH=$(WORK_DIR)/crossenv/build/bin:$(PATH) diff --git a/spk/python-wheels/src/requirements-crossenv-greenlet-v2.txt b/spk/python-wheels/src/requirements-crossenv-greenlet-v2.txt index c2b4802c7ad..8a8c42e83ad 100644 --- a/spk/python-wheels/src/requirements-crossenv-greenlet-v2.txt +++ b/spk/python-wheels/src/requirements-crossenv-greenlet-v2.txt @@ -6,4 +6,5 @@ # [greenlet] # - Mandatory require full c++11 support +greenlet==2.0.2 greenlet==3.0.3 diff --git a/spk/python-wheels/src/requirements-crossenv.txt b/spk/python-wheels/src/requirements-crossenv.txt index 40c49bdcdb1..1d239a2e534 100644 --- a/spk/python-wheels/src/requirements-crossenv.txt +++ b/spk/python-wheels/src/requirements-crossenv.txt @@ -24,12 +24,18 @@ cffi==1.17.0 # All tested and can be enabled but may conflict # with local python apps requirements +borgbackup==1.2.6 +charset-normalizer==3.2.0 immutables==0.20 +llfuse==1.5.0 MarkupSafe==2.1.5 +msgpack==1.0.5 # used compiled verrsion for performance msgpack-python==0.5.6 netifaces==0.11.0 psutil==6.0.0 +pyrsistent==0.19.3 regex==2024.7.24 +ruamel.yaml.clib==0.2.7 SQLAlchemy==2.0.32 zope.interface==7.0.2 @@ -42,6 +48,7 @@ gevent==24.2.1 # [lxml] # Depends: libxml2, libxslt +lxml==4.9.3 lxml==5.3.0 # [mysqlclient] @@ -92,6 +99,14 @@ PyYAML==6.0.2 # rencode==1.0.6 <<-- unsupported git+https://github.com/totaam/rencode.git@f6254ab26161f90b9c5e97915b9193fee805fc1f#egg=rencode==1.0.7 +# [rpds-py] +# Require environment variables +# PYO3_CROSS_LIB_DIR=$(STAGING_INSTALL_PREFIX)/lib/ +# PYO3_CROSS_INCLUDE_DIR=$(STAGING_INSTALL_PREFIX)/include/ +# Requires path to maturin from crossenv +# ENV += PATH=$(WORK_DIR)/crossenv/build/bin:$(PATH) +rpds-py==0.10.2 + # [ujson] # - Require setuptools-scm in cross/python3* crossenv ujson==5.10.0 diff --git a/spk/python-wheels/src/requirements-pure.txt b/spk/python-wheels/src/requirements-pure.txt deleted file mode 100644 index 5dedc5cf9b8..00000000000 --- a/spk/python-wheels/src/requirements-pure.txt +++ /dev/null @@ -1,31 +0,0 @@ -# basic default wheels -# ==> Always install latest version (service-setup.sh:install_python_virtualenv) -pip==24.2 - -# Always match what's in cross/python311/Makefile -setuptools==68.1.2 -wheel==0.44.0 - -# Always use latest version available -# certifi==2024.8.30 -certifi - -# Mandatory for python application -# to create their local virtualenv -# in order to install wheels within -# their running environment -virtualenv==20.26.6 - -# Other mandatory wheels that -# gets install by default as -# basic dependencies of above -distlib==0.3.8 -filelock==3.16.1 -platformdirs==4.3.6 -six==1.16.0 - -## -## All configurations below are optional and -## are provided to demonstrate how to build -## various wheels. Uncoment to enable. -## From a91b4f02a1cc7ef010e3b2d35eb2ad0051023f37 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Tue, 15 Oct 2024 22:06:08 +0000 Subject: [PATCH 008/130] mariadb-connector-c: Update from version 3.3.5 to 3.3.11 and fix build failure --- cross/mariadb-connector-c/Makefile | 5 ++--- cross/mariadb-connector-c/digests | 6 +++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/cross/mariadb-connector-c/Makefile b/cross/mariadb-connector-c/Makefile index b238ff086b6..1aafc5cbb39 100644 --- a/cross/mariadb-connector-c/Makefile +++ b/cross/mariadb-connector-c/Makefile @@ -1,5 +1,5 @@ PKG_NAME = mariadb-connector-c -PKG_VERS = 3.3.5 +PKG_VERS = 3.3.11 PKG_EXT = tar.gz PKG_DIST_NAME = v$(PKG_VERS).$(PKG_EXT) PKG_DIST_FILE = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT) @@ -10,8 +10,7 @@ HOMEPAGE = https://mariadb.com/kb/en/mariadb-connector-c/ COMMENT = MariaDB C Connector LICENSE = LGPL -#USE_NATIVE_CMAKE_LEGACY = 1 -#CMAKE_USE_TOOLCHAIN_FILE = OFF +CMAKE_USE_TOOLCHAIN_FILE = OFF CMAKE_DISABLE_EXE_LINKER_FLAGS = 1 include ../../mk/spksrc.cross-cmake.mk diff --git a/cross/mariadb-connector-c/digests b/cross/mariadb-connector-c/digests index b1dfa14f61b..9df33d5aa3b 100644 --- a/cross/mariadb-connector-c/digests +++ b/cross/mariadb-connector-c/digests @@ -1,3 +1,3 @@ -mariadb-connector-c-3.3.5.tar.gz SHA1 29ad65e81a87e41a93e8984f2c3d1662dcec7c1c -mariadb-connector-c-3.3.5.tar.gz SHA256 c0fda1fa6e52dc85de27156cd847088a72d40d9de6514f7efa57c8d93134a54c -mariadb-connector-c-3.3.5.tar.gz MD5 b8967cf63d4fc5660f230762c0e39ee2 +mariadb-connector-c-3.3.11.tar.gz SHA1 2fa1fe042bcc65297d6d22196685701faf3e96d1 +mariadb-connector-c-3.3.11.tar.gz SHA256 6ecada1f3fc32ad95efcd2c982b319191f5e6479f3f521bc4b714e6158f5e415 +mariadb-connector-c-3.3.11.tar.gz MD5 700afe8ebff69bdf66b3c37747d1d527 From 4d1da1dd11b549abe590e03df8cda268afe87d8e Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Wed, 16 Oct 2024 00:29:18 +0000 Subject: [PATCH 009/130] python313: No longer support armv5 arch due to c++11 support needed --- ...static_assert_undefined-fix-GH-94766.patch | 39 ------------------- ...05-configure.ac-remove-unknown-flags.patch | 25 ------------ .../001-avoid_static_assert_undefined.patch | 16 -------- ...05-configure.ac-remove-unknown-flags.patch | 24 ------------ ...05-configure.ac-remove-unknown-flags.patch | 14 ------- spk/python313/Makefile | 4 +- 6 files changed, 2 insertions(+), 120 deletions(-) delete mode 100644 cross/python313/patches/88f6281/001-revert-static_assert_undefined-fix-GH-94766.patch delete mode 100644 cross/python313/patches/88f6281/005-configure.ac-remove-unknown-flags.patch delete mode 100644 cross/python313/patches/ppc853x-5.2/001-avoid_static_assert_undefined.patch delete mode 100644 cross/python313/patches/ppc853x-5.2/005-configure.ac-remove-unknown-flags.patch delete mode 100644 cross/python313/patches/x86-5.2/005-configure.ac-remove-unknown-flags.patch diff --git a/cross/python313/patches/88f6281/001-revert-static_assert_undefined-fix-GH-94766.patch b/cross/python313/patches/88f6281/001-revert-static_assert_undefined-fix-GH-94766.patch deleted file mode 100644 index 3b2c36f60c8..00000000000 --- a/cross/python313/patches/88f6281/001-revert-static_assert_undefined-fix-GH-94766.patch +++ /dev/null @@ -1,39 +0,0 @@ ---- Include/pymacro.h-orig 2023-06-06 22:00:27.000000000 +0000 -+++ Include/pymacro.h 2023-07-03 19:36:57.974496974 +0000 -@@ -3,23 +3,20 @@ - - // gh-91782: On FreeBSD 12, if the _POSIX_C_SOURCE and _XOPEN_SOURCE macros are - // defined, disables C11 support and does not define --// the static_assert() macro. -+// the static_assert() macro. Define the static_assert() macro in Python until -+// suports C11: - // https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=255290 --// --// macOS <= 10.10 doesn't define static_assert in assert.h at all despite --// having C11 compiler support. --// --// static_assert is defined in glibc from version 2.16. Compiler support for --// the C11 _Static_assert keyword is in gcc >= 4.6. --// --// MSVC makes static_assert a keyword in C11-17, contrary to the standards. --// --// In C++11 and C2x, static_assert is a keyword, redefining is undefined --// behaviour. So only define if building as C (if __STDC_VERSION__ is defined), --// not C++, and only for C11-17. --#if !defined(static_assert) && (defined(__GNUC__) || defined(__clang__)) \ -- && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L \ -- && __STDC_VERSION__ <= 201710L -+#if defined(__FreeBSD__) && !defined(static_assert) -+# define static_assert _Static_assert -+#endif -+ -+// static_assert is defined in glibc from version 2.16. Before it requires -+// compiler support (gcc >= 4.6) and is called _Static_assert. -+// In C++ 11 static_assert is a keyword, redefining is undefined behaviour. -+#if (defined(__GLIBC__) \ -+ && (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ <= 16)) \ -+ && !(defined(__cplusplus) && __cplusplus >= 201103L) \ -+ && !defined(static_assert)) - # define static_assert _Static_assert - #endif - diff --git a/cross/python313/patches/88f6281/005-configure.ac-remove-unknown-flags.patch b/cross/python313/patches/88f6281/005-configure.ac-remove-unknown-flags.patch deleted file mode 100644 index 6e379adf32d..00000000000 --- a/cross/python313/patches/88f6281/005-configure.ac-remove-unknown-flags.patch +++ /dev/null @@ -1,25 +0,0 @@ -# remove flags unknown by gcc 4.6.4 of ARMv5 toolchain -# - remove -ffat-lto-objects -# - replace -std=c11 by -std=c99 -# ---- configure.ac.orig 2022-06-06 11:53:30.000000000 +0000 -+++ configure.ac 2022-06-19 15:36:23.019811638 +0000 -@@ -1872,7 +1872,7 @@ if test "$Py_LTO" = 'true' ; then - LTOCFLAGS="-flto" - ;; - *) -- LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none" -+ LTOFLAGS="-flto -fuse-linker-plugin -flto-partition=none" - ;; - esac - ;; -@@ -2157,7 +2157,7 @@ AC_DEFUN([PY_CHECK_CC_WARNING], [ - # tweak BASECFLAGS based on compiler and platform - case $GCC in - yes) -- CFLAGS_NODIST="$CFLAGS_NODIST -std=c11" -+ CFLAGS_NODIST="$CFLAGS_NODIST -std=c99" - - PY_CHECK_CC_WARNING([enable], [extra], [if we can add -Wextra]) - AS_VAR_IF([ac_cv_enable_extra_warning], [yes], - diff --git a/cross/python313/patches/ppc853x-5.2/001-avoid_static_assert_undefined.patch b/cross/python313/patches/ppc853x-5.2/001-avoid_static_assert_undefined.patch deleted file mode 100644 index 33eea81d2af..00000000000 --- a/cross/python313/patches/ppc853x-5.2/001-avoid_static_assert_undefined.patch +++ /dev/null @@ -1,16 +0,0 @@ -# gcc 4.3.2 is lacking static_assert for c code (available for c++ code only). -# -# Since static_assert acts at compile time only, it does not affect the runtime -# behaviour when omitting the implementation. -# ---- Include/pymacro.h.orig 2023-08-24 12:09:18.000000000 +0000 -+++ Include/pymacro.h 2024-03-02 18:15:00.033365138 +0000 -@@ -21,6 +21,8 @@ - && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L \ - && __STDC_VERSION__ <= 201710L - # define static_assert _Static_assert -+#else -+# define static_assert - #endif - - /* Minimum value between x and y */ diff --git a/cross/python313/patches/ppc853x-5.2/005-configure.ac-remove-unknown-flags.patch b/cross/python313/patches/ppc853x-5.2/005-configure.ac-remove-unknown-flags.patch deleted file mode 100644 index 8196eef030c..00000000000 --- a/cross/python313/patches/ppc853x-5.2/005-configure.ac-remove-unknown-flags.patch +++ /dev/null @@ -1,24 +0,0 @@ -# remove flags unknown by gcc 4.3.2 (lto optimization is disabled at all for ppc853x arch) -# - remove -fprofile-correction -# - replace -std=c11 by -std=c99 -# ---- configure.ac.orig 2023-08-24 12:09:18.000000000 +0000 -+++ configure.ac 2024-03-02 20:17:15.812508858 +0000 -@@ -1989,7 +1989,7 @@ - ;; - *) - PGO_PROF_GEN_FLAG="-fprofile-generate" -- PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction" -+ PGO_PROF_USE_FLAG="-fprofile-use" - LLVM_PROF_MERGER="true" - LLVM_PROF_FILE="" - ;; -@@ -2195,7 +2195,7 @@ - # tweak BASECFLAGS based on compiler and platform - case $GCC in - yes) -- CFLAGS_NODIST="$CFLAGS_NODIST -std=c11" -+ CFLAGS_NODIST="$CFLAGS_NODIST -std=c99" - - PY_CHECK_CC_WARNING([enable], [extra], [if we can add -Wextra]) - AS_VAR_IF([ac_cv_enable_extra_warning], [yes], diff --git a/cross/python313/patches/x86-5.2/005-configure.ac-remove-unknown-flags.patch b/cross/python313/patches/x86-5.2/005-configure.ac-remove-unknown-flags.patch deleted file mode 100644 index 3843affc1d4..00000000000 --- a/cross/python313/patches/x86-5.2/005-configure.ac-remove-unknown-flags.patch +++ /dev/null @@ -1,14 +0,0 @@ -# remove lto optimization flags unknown by older gcc -# - remove -fuse-linker-plugin -# ---- configure.ac.orig 2022-06-06 11:53:30.000000000 +0000 -+++ configure.ac 2022-06-19 15:36:23.019811638 +0000 -@@ -1427,7 +1427,7 @@ - LTOCFLAGS="-flto" - ;; - *) -- LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none" -+ LTOFLAGS="-flto -ffat-lto-objects -flto-partition=none" - ;; - esac - ;; diff --git a/spk/python313/Makefile b/spk/python313/Makefile index 7b175d86068..a8740e0d9e5 100644 --- a/spk/python313/Makefile +++ b/spk/python313/Makefile @@ -6,8 +6,8 @@ SPK_ICON = src/python3.png # Platform "powerpc-none-linux-gnuspe" with compiler "gcc" is not supported by the # CPython core team, see https://peps.python.org/pep-0011/ for more information. -# And compiler must support std=c++11 (OlD_PPC_ARCHS fail, but ARMv5_ARCHS have no issue). -UNSUPPORTED_ARCHS = $(OLD_PPC_ARCHS) +# And compiler must support std=c++11 (both OLD_PPC_ARCHS and ARMv5_ARCHS now fails). +UNSUPPORTED_ARCHS = $(OLD_PPC_ARCHS) $(ARMv5_ARCHS) DEPENDS = cross/python313 DEPENDS += cross/pip From 595ce438bf09b8964a167181d1dd9b0142d3d4e5 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Wed, 30 Oct 2024 22:30:05 +0000 Subject: [PATCH 010/130] spksrc.crossenv.mk: First iteration of on-demand crossenv creation --- mk/crossenv/requirements-aiohttp.txt | 7 + mk/crossenv/requirements-aiohttp==3.8.5.txt | 6 + mk/crossenv/requirements-default.txt | 17 +++ mk/spksrc.crossenv.mk | 160 ++++++++++++++++++++ 4 files changed, 190 insertions(+) create mode 100644 mk/crossenv/requirements-aiohttp.txt create mode 100644 mk/crossenv/requirements-aiohttp==3.8.5.txt create mode 100644 mk/crossenv/requirements-default.txt create mode 100644 mk/spksrc.crossenv.mk diff --git a/mk/crossenv/requirements-aiohttp.txt b/mk/crossenv/requirements-aiohttp.txt new file mode 100644 index 00000000000..a6e2fe8b2e9 --- /dev/null +++ b/mk/crossenv/requirements-aiohttp.txt @@ -0,0 +1,7 @@ +pip==23.2.1 +pip-tools==7.4.1 +setuptools==63.4.3 +wheel==0.41.2 +# +cffi==1.17.1 +Cython==0.29.37 diff --git a/mk/crossenv/requirements-aiohttp==3.8.5.txt b/mk/crossenv/requirements-aiohttp==3.8.5.txt new file mode 100644 index 00000000000..d60d22c31f5 --- /dev/null +++ b/mk/crossenv/requirements-aiohttp==3.8.5.txt @@ -0,0 +1,6 @@ +pip==23.2.1 +setuptools==63.4.3 +wheel==0.41.2 +# +cffi==1.16.0 +Cython==0.29.37 diff --git a/mk/crossenv/requirements-default.txt b/mk/crossenv/requirements-default.txt new file mode 100644 index 00000000000..6f8b374e388 --- /dev/null +++ b/mk/crossenv/requirements-default.txt @@ -0,0 +1,17 @@ +pip==24.3.1 +pip-tools==7.4.1 +setuptools==75.3.0 +wheel==0.44.0 +# +cffi==1.17.1 +cryptography==43.0.1 +Cython==3.0.11 +flit==3.9.0 +maturin==1.7.4 +meson-python==0.17.1 +poetry==1.8.4 +scikit-build==0.18.1 +scikit-build-core==0.10.7 +setuptools-rust==1.10.2 +setuptools-scm==8.1.0 +typing_extensions==4.12.2 diff --git a/mk/spksrc.crossenv.mk b/mk/spksrc.crossenv.mk new file mode 100644 index 00000000000..ef2b9999b97 --- /dev/null +++ b/mk/spksrc.crossenv.mk @@ -0,0 +1,160 @@ +# Set default sheel to bash +SHELL = /bin/bash + +### + +# where the wheel crossenv definitions are located +CROSSENV_CONFIG_PATH = $(abspath $(WORK_DIR)/../../../mk/crossenv) +CROSSENV_CONFIG_DEFAULT = $(CROSSENV_CONFIG_PATH)/requirements-default.txt +CROSSENV_PATH = $(abspath $(WORK_DIR)/crossenv-$(CROSSENV_BUILD_WHEEL)/) + +ifeq ($(strip $(WHEEL)),) +CROSSENV_BUILD_WHEEL = default +CROSSENV_BUILD_REQUIREMENTS = $(CROSSENV_CONFIG_DEFAULT) +else ifneq ($(wildcard $(CROSSENV_CONFIG_PATH)/requirements-$(WHEEL).txt),) +CROSSENV_BUILD_WHEEL = $(WHEEL) +CROSSENV_BUILD_REQUIREMENTS = $(CROSSENV_CONFIG_PATH)/requirements-$(WHEEL).txt +else ifneq ($(wildcard $(CROSSENV_CONFIG_PATH)/requirements-$(shell echo $${WHEEL%%[<>=]=*}).txt),) +CROSSENV_BUILD_WHEEL = $(shell echo $${WHEEL%%[<>=]=*}) +CROSSENV_BUILD_REQUIREMENTS = $(CROSSENV_CONFIG_PATH)/requirements-$(shell echo $${WHEEL%%[<>=]=*}).txt +else +CROSSENV_BUILD_WHEEL = error-crossenv_build_wheel +endif + + +#### + +.PHONY: error-crossenv_build_wheel +error-crossenv_build_wheel: + @$(MSG) ######################################################## + @$(MSG) ERROR - No definition for: + @$(MSG) mk/crossenv/requirements-$(WHEEL).txt +ifneq ($(WHEEL),$(shell echo $${WHEEL%%[<>=]=*})) + @$(MSG) mk/crossenv/requirements-$(shell echo $${WHEEL%%[<>=]=*}).txt +endif + @$(MSG) ######################################################## + +### + +.PHONY: crossenv_msg_target + +crossenv_msg_target: + @$(MSG) "Preparing crossenv for $(NAME)" + +### + +# default wheel packages to install in crossenv +CROSSENV_DEFAULT_PIP_VERSION = $(shell read version < <(grep -hnm 1 '^pip[<>=]=' $(wildcard $(CROSSENV_CONFIG_PATH)/requirements-$(WHEEL).txt $(CROSSENV_CONFIG_DEFAULT)) | head -1) && echo $${version#*[<>=]=}) +CROSSENV_DEFAULT_SETUPTOOLS_VERSION = $(shell read version < <(grep -hnm 1 '^setuptools[<>=]=' $(wildcard $(CROSSENV_CONFIG_PATH)/requirements-$(WHEEL).txt $(CROSSENV_CONFIG_DEFAULT)) | head -1) && echo $${version#*[<>=]=}) +CROSSENV_DEFAULT_WHEEL_VERSION = $(shell read version < <(grep -hnm 1 '^wheel[<>=]=' $(wildcard $(CROSSENV_CONFIG_PATH)/requirements-$(WHEEL).txt $(CROSSENV_CONFIG_DEFAULT)) | head -1) && echo $${version#*[<>=]=}) + +ifneq ($(CROSSENV_DEFAULT_PIP_VERSION),) +CROSSENV_DEFAULT_PIP = pip==$(CROSSENV_DEFAULT_PIP_VERSION) +else +CROSSENV_DEFAULT_PIP = pip +endif + +ifneq ($(CROSSENV_DEFAULT_SETUPTOOLS_VERSION),) +CROSSENV_DEFAULT_SETUPTOOLS = setuptools==$(CROSSENV_DEFAULT_SETUPTOOLS_VERSION) +else +CROSSENV_DEFAULT_SETUPTOOLS = setuptools +endif + +ifneq ($(CROSSENV_DEFAULT_WHEEL_VERSION),) +CROSSENV_DEFAULT_WHEEL = wheel==$(CROSSENV_DEFAULT_WHEEL_VERSION) +else +CROSSENV_DEFAULT_WHEEL = wheel +endif + +### + +crossenv-%: +ifneq ($(filter error-%, $(CROSSENV_BUILD_WHEEL)),) + $(MAKE) $(CROSSENV_BUILD_WHEEL) +else + $(MAKE) ARCH=$(firstword $(subst -, ,$*)) TCVERSION=$(lastword $(subst -, ,$*)) WHEEL=$(CROSSENV_BUILD_WHEEL) build-crossenv +endif + +#### + +# python-cc.mk +PYTHON_PKG_VERS = $(lastword $(subst -, ,$(wildcard $(WORK_DIR)/Python-*))) +PYTHON_PKG_VERS_MAJOR_MINOR = $(word 1,$(subst ., ,$(PYTHON_PKG_VERS))).$(word 2,$(subst ., ,$(PYTHON_PKG_VERS))) +PYTHON_PKG_NAME = python$(subst .,,$(PYTHON_PKG_VERS_MAJOR_MINOR)) +PYTHON_PKG_DIR = Python-$(PYTHON_PKG_VERS) +HOST_ARCH = $(shell uname -m) +BUILD_ARCH = $(shell expr "$(TC_TARGET)" : '\([^-]*\)' ) +PYTHON_NATIVE = $(abspath $(WORK_DIR)/../../../native/$(PYTHON_PKG_NAME)/work-native/install/usr/local/bin/python3) +PIP_NATIVE = $(abspath $(WORK_DIR)/../../../native/$(PYTHON_PKG_NAME)/work-native/install/usr/local/bin/pip) +HOSTPYTHON = $(abspath $(WORK_DIR)/$(PYTHON_PKG_DIR)/hostpython) +HOSTPYTHON_LIB_NATIVE = $(abspath $(WORK_DIR)/../../../native/$(PYTHON_PKG_NAME)/work-native/$(PYTHON_PKG_DIR)/build/lib.linux-$(HOST_ARCH)-$(PYTHON_PKG_VERS_MAJOR_MINOR)) +PYTHON_LIB_NATIVE = $(abspath $(WORK_DIR)/$(PYTHON_PKG_DIR)/build/lib.linux-$(HOST_ARCH)-$(PYTHON_PKG_VERS_MAJOR_MINOR)) +PYTHON_SITE_PACKAGES_NATIVE = $(abspath $(WORK_DIR)/../../../native/$(PYTHON_PKG_NAME)/work-native/install/usr/local/lib/python$(PYTHON_PKG_VERS_MAJOR_MINOR)/site-packages) +PYTHON_LIB_CROSS = $(CROSSENV_PATH)/build/lib.linux-$(BUILD_ARCH)-$(PYTHON_PKG_VERS_MAJOR_MINOR) +PYTHON_LIB_DIR = lib/python$(PYTHON_PKG_VERS_MAJOR_MINOR) +PYTHON_INC_DIR = include/python$(PYTHON_PKG_VERS_MAJOR_MINOR) + +### + +# Create the crossenv in preparation for +# cross-compiling all the necessary wheels +.PHONY: crossenv +build-crossenv: SHELL:=/bin/bash +build-crossenv: $(CROSSENV_PATH)/build/python-cc.mk + @$(MSG) crossenv wheel packages: $(CROSSENV_DEFAULT_PIP), $(CROSSENV_DEFAULT_SETUPTOOLS), $(CROSSENV_DEFAULT_WHEEL) + @$(MSG) crossenv requirements file = $(CROSSENV_BUILD_REQUIREMENTS) + mkdir -p "$(PYTHON_LIB_CROSS)" + cp -RL $(HOSTPYTHON_LIB_NATIVE) "$(abspath $(PYTHON_LIB_CROSS)/../)" + @echo $(PYTHON_NATIVE) -m crossenv $(STAGING_INSTALL_PREFIX)/bin/python$(PYTHON_PKG_VERS_MAJOR_MINOR) \ + --cc $(TC_PATH)$(TC_PREFIX)gcc \ + --cxx $(TC_PATH)$(TC_PREFIX)c++ \ + --ar $(TC_PATH)$(TC_PREFIX)ar \ + --sysroot $(TC_SYSROOT) \ + --env LIBRARY_PATH= \ + --manylinux manylinux2014 \ + "$(CROSSENV_PATH)" + @$(RUN) $(PYTHON_NATIVE) -m crossenv $(STAGING_INSTALL_PREFIX)/bin/python$(PYTHON_PKG_VERS_MAJOR_MINOR) \ + --cc $(TC_PATH)$(TC_PREFIX)gcc \ + --cxx $(TC_PATH)$(TC_PREFIX)c++ \ + --ar $(TC_PATH)$(TC_PREFIX)ar \ + --sysroot $(TC_SYSROOT) \ + --env LIBRARY_PATH= \ + --manylinux manylinux2014 \ + "$(CROSSENV_PATH)" + . $(CROSSENV_PATH)/bin/activate && wget --no-verbose https://bootstrap.pypa.io/get-pip.py + @. $(CROSSENV_PATH)/bin/activate ; \ + build-python get-pip.py $(CROSSENV_DEFAULT_PIP) --no-setuptools --no-wheel --disable-pip-version-check ; \ + python get-pip.py $(CROSSENV_DEFAULT_PIP) --no-setuptools --no-wheel --disable-pip-version-check + @. $(CROSSENV_PATH)/bin/activate ; \ + build-pip --disable-pip-version-check install $(CROSSENV_DEFAULT_SETUPTOOLS) $(CROSSENV_DEFAULT_WHEEL) ; \ + pip --disable-pip-version-check install $(CROSSENV_DEFAULT_SETUPTOOLS) $(CROSSENV_DEFAULT_WHEEL) + @. $(CROSSENV_PATH)/bin/activate ; \ + while IFS= read -r requirement ; do \ + $(MSG) [$(CROSSENV_PATH)] Processing $${requirement} ; \ + build-pip --disable-pip-version-check install $${requirement} ; \ + pip --disable-pip-version-check install $${requirement} ; \ + done < <(grep -sv -e "^\#" -e "^\$$" $(CROSSENV_BUILD_REQUIREMENTS)) +#ifneq ($(PYTHON_LIB_NATIVE),$(PYTHON_LIB_CROSS)) +# cp $(PYTHON_LIB_CROSS)/_sysconfigdata_*.py $(PYTHON_LIB_NATIVE)/_sysconfigdata.py +#endif + +$(CROSSENV_PATH)/build/python-cc.mk: + mkdir -p $(CROSSENV_PATH)/build + @echo CROSSENV=$(CROSSENV_PATH)/bin/activate >> $@ + @echo HOSTPYTHON=$(HOSTPYTHON) > $@ + @echo HOSTPYTHON_LIB_NATIVE=$(HOSTPYTHON_LIB_NATIVE) >> $@ + @echo PYTHON_LIB_NATIVE=$(PYTHON_LIB_NATIVE) >> $@ + @echo PYTHON_LIB_CROSS=$(PYTHON_LIB_CROSS) >> $@ + @echo PYTHON_SITE_PACKAGES_NATIVE=$(PYTHON_SITE_PACKAGES_NATIVE) >> $@ + @echo PYTHON_INTERPRETER=$(INSTALL_PREFIX)/bin/python$(PYTHON_PKG_VERS_MAJOR_MINOR) >> $@ + @echo PYTHON_VERSION=$(PYTHON_PKG_VERS_MAJOR_MINOR) >> $@ + @echo PYTHON_LIB_DIR=$(PYTHON_LIB_DIR) >> $@ + @echo PYTHON_INC_DIR=$(PYTHON_INC_DIR) >> $@ + @echo PIP=$(PIP_NATIVE) >> $@ + @echo CROSS_COMPILE_WHEELS=1 >> $@ + @echo ADDITIONAL_WHEEL_BUILD_ARGS=--no-build-isolation >> $@ + @echo CROSSENV_DEFAULT_PIP = $(CROSSENV_DEFAULT_PIP) >> $@ + @echo CROSSENV_DEFAULT_SETUPTOOLS = $(CROSSENV_DEFAULT_SETUPTOOLS) >> $@ + @echo CROSSENV_DEFAULT_WHEEL = $(CROSSENV_DEFAULT_WHEEL) >> $@ + @echo TATA = $(TATA) >> $@ + @echo TOTO = $(TOTO) >> $@ From be25d31dc6059e7bc9ef908f3afaa7a98c4c3e2f Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Wed, 30 Oct 2024 22:41:50 +0000 Subject: [PATCH 011/130] spksrc.crossenv.mk: Print crossenv resulting package list --- mk/spksrc.crossenv.mk | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/mk/spksrc.crossenv.mk b/mk/spksrc.crossenv.mk index ef2b9999b97..01785f66f6c 100644 --- a/mk/spksrc.crossenv.mk +++ b/mk/spksrc.crossenv.mk @@ -121,10 +121,10 @@ build-crossenv: $(CROSSENV_PATH)/build/python-cc.mk --env LIBRARY_PATH= \ --manylinux manylinux2014 \ "$(CROSSENV_PATH)" - . $(CROSSENV_PATH)/bin/activate && wget --no-verbose https://bootstrap.pypa.io/get-pip.py + @. $(CROSSENV_PATH)/bin/activate && $(RUN) wget --no-verbose https://bootstrap.pypa.io/get-pip.py @. $(CROSSENV_PATH)/bin/activate ; \ - build-python get-pip.py $(CROSSENV_DEFAULT_PIP) --no-setuptools --no-wheel --disable-pip-version-check ; \ - python get-pip.py $(CROSSENV_DEFAULT_PIP) --no-setuptools --no-wheel --disable-pip-version-check + $(RUN) build-python get-pip.py $(CROSSENV_DEFAULT_PIP) --no-setuptools --no-wheel --disable-pip-version-check ; \ + $(RUN) python get-pip.py $(CROSSENV_DEFAULT_PIP) --no-setuptools --no-wheel --disable-pip-version-check @. $(CROSSENV_PATH)/bin/activate ; \ build-pip --disable-pip-version-check install $(CROSSENV_DEFAULT_SETUPTOOLS) $(CROSSENV_DEFAULT_WHEEL) ; \ pip --disable-pip-version-check install $(CROSSENV_DEFAULT_SETUPTOOLS) $(CROSSENV_DEFAULT_WHEEL) @@ -134,6 +134,9 @@ build-crossenv: $(CROSSENV_PATH)/build/python-cc.mk build-pip --disable-pip-version-check install $${requirement} ; \ pip --disable-pip-version-check install $${requirement} ; \ done < <(grep -sv -e "^\#" -e "^\$$" $(CROSSENV_BUILD_REQUIREMENTS)) + @. $(CROSSENV_PATH)/bin/activate ; \ + $(MSG) "Package list for $(CROSSENV_PATH):" ; \ + pip freeze #ifneq ($(PYTHON_LIB_NATIVE),$(PYTHON_LIB_CROSS)) # cp $(PYTHON_LIB_CROSS)/_sysconfigdata_*.py $(PYTHON_LIB_NATIVE)/_sysconfigdata.py #endif @@ -153,8 +156,7 @@ $(CROSSENV_PATH)/build/python-cc.mk: @echo PIP=$(PIP_NATIVE) >> $@ @echo CROSS_COMPILE_WHEELS=1 >> $@ @echo ADDITIONAL_WHEEL_BUILD_ARGS=--no-build-isolation >> $@ - @echo CROSSENV_DEFAULT_PIP = $(CROSSENV_DEFAULT_PIP) >> $@ - @echo CROSSENV_DEFAULT_SETUPTOOLS = $(CROSSENV_DEFAULT_SETUPTOOLS) >> $@ - @echo CROSSENV_DEFAULT_WHEEL = $(CROSSENV_DEFAULT_WHEEL) >> $@ - @echo TATA = $(TATA) >> $@ - @echo TOTO = $(TOTO) >> $@ + @echo CROSSENV_BUILD_REQUIREMENTS=$(CROSSENV_BUILD_REQUIREMENTS) >> $@ + @echo CROSSENV_DEFAULT_PIP=$(CROSSENV_DEFAULT_PIP_VERSION) >> $@ + @echo CROSSENV_DEFAULT_SETUPTOOLS=$(CROSSENV_DEFAULT_SETUPTOOLS_VERSION) >> $@ + @echo CROSSENV_DEFAULT_WHEEL=$(CROSSENV_DEFAULT_WHEEL_VERSION) >> $@ From d2c26cacbf6d93617ee48a008852da4f308cc123 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Sat, 2 Nov 2024 20:54:11 +0000 Subject: [PATCH 012/130] py310-311-313: Remove crossenv creation --- cross/python310/Makefile | 67 --------------------------------------- cross/python311/Makefile | 68 ---------------------------------------- cross/python313/Makefile | 68 ---------------------------------------- 3 files changed, 203 deletions(-) diff --git a/cross/python310/Makefile b/cross/python310/Makefile index ed197df55b5..dce9003446d 100644 --- a/cross/python310/Makefile +++ b/cross/python310/Makefile @@ -86,21 +86,11 @@ POST_PATCH_TARGET = python310_post_patch PRE_CONFIGURE_TARGET = python310_pre_configure COMPILE_TARGET = python310_compile INSTALL_TARGET = python310_install -POST_INSTALL_TARGET = python310_post_install include ../../mk/spksrc.cross-cc.mk -HOST_ARCH = $(shell uname -m) -BUILD_ARCH = $(shell expr "$(TC_TARGET)" : '\([^-]*\)' ) PYTHON_NATIVE = $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/bin/python3 -PIP_NATIVE = $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/bin/pip HOSTPYTHON = $(WORK_DIR)/$(PKG_DIR)/hostpython -HOSTPYTHON_LIB_NATIVE = $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/$(PKG_DIR)/build/lib.linux-$(HOST_ARCH)-$(PKG_VERS_MAJOR_MINOR) -PYTHON_LIB_NATIVE = $(WORK_DIR)/$(PKG_DIR)/build/lib.linux-$(HOST_ARCH)-$(PKG_VERS_MAJOR_MINOR) -PYTHON_SITE_PACKAGES_NATIVE = $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/lib/python$(PKG_VERS_MAJOR_MINOR)/site-packages -PYTHON_LIB_CROSS = $(WORK_DIR)/$(PKG_DIR)/build/lib.linux-$(BUILD_ARCH)-$(PKG_VERS_MAJOR_MINOR) -PYTHON_LIB_DIR = lib/python$(PKG_VERS_MAJOR_MINOR) -PYTHON_INC_DIR = include/python$(PKG_VERS_MAJOR_MINOR) # Required so that the python3 binaries and libraries generated by native compilation # take precedence over current environment python3 when generating @@ -134,60 +124,3 @@ python310_install: @install -m 755 -d $(STAGING_INSTALL_PREFIX)/etc @install -m 644 src/mime.types $(STAGING_INSTALL_PREFIX)/etc/ $(RUN) _PYTHON_HOST_PLATFORM=$(TC_TARGET) $(MAKE) install prefix=$(STAGING_INSTALL_PREFIX) - -# default wheels to install in crossenv -CROSSENV_WHEELS = cffi==1.17.0 -# -# Cython version >= 3.x breaks PyYAML wheel -# https://github.com/yaml/pyyaml/issues/601 -# -# It also breaks numpy at crossenv creation time using github-action -# https://numpy.org/devdocs/reference/distutils_status_migration.html -# Python 3.12 considerations: scikit-build-core, meson-python -#CROSSENV_WHEELS += Cython==3.0.2 -CROSSENV_WHEELS += Cython==0.29.37 -CROSSENV_WHEELS += flit==3.9.0 -CROSSENV_WHEELS += scikit-build==0.18.1 -CROSSENV_WHEELS += setuptools-rust==1.10.2 -CROSSENV_WHEELS += setuptools-scm==8.1.0 -# For future use when building numpy >= 1.26 -#CROSSENV_WHEELS += meson-python==1.5.2 -#CROSSENV_WHEELS += scikit-build-core==0.10.7 -ifneq ($(findstring $(ARCH),$(OLD_PPC_ARCHS)),$(ARCH)) -CROSSENV_WHEELS += cryptography==43.0.1 -CROSSENV_WHEELS += maturin==1.7.4 -CROSSENV_WHEELS += poetry==1.8.3 -endif - -# Create the crossenv in preparation for -# cross-compiling all the necessary wheels -.PHONY: python310_post_install -python310_post_install: $(WORK_DIR)/python-cc.mk - mkdir -p $(PYTHON_LIB_CROSS) - cp -R $(HOSTPYTHON_LIB_NATIVE) $(PYTHON_LIB_CROSS)/../ - @$(RUN) $(PYTHON_NATIVE) -m crossenv $(STAGING_INSTALL_PREFIX)/bin/python$(PKG_VERS_MAJOR_MINOR) --cc $(TC_PATH)$(TC_PREFIX)gcc --cxx $(TC_PATH)$(TC_PREFIX)c++ --ar $(TC_PATH)$(TC_PREFIX)ar --sysroot $(TC_SYSROOT) --env LIBRARY_PATH= --manylinux manylinux2014 $(WORK_DIR)/crossenv/ - . $(WORK_DIR)/crossenv/bin/activate && $(RUN) wget --no-verbose https://bootstrap.pypa.io/get-pip.py - . $(WORK_DIR)/crossenv/bin/activate && $(RUN) build-python get-pip.py "pip==24.2" --no-setuptools --no-wheel --disable-pip-version-check - . $(WORK_DIR)/crossenv/bin/activate && $(RUN) python get-pip.py "pip==24.2" --no-setuptools --no-wheel --disable-pip-version-check - . $(WORK_DIR)/crossenv/bin/activate && $(RUN) build-pip --disable-pip-version-check install "setuptools==68.1.2" "wheel==0.44.0" "pip-tools==7.4.1" - . $(WORK_DIR)/crossenv/bin/activate && $(RUN) pip --disable-pip-version-check install "setuptools==68.1.2" "wheel==0.44.0" "pip-tools==7.4.1" - . $(WORK_DIR)/crossenv/bin/activate && $(RUN) build-pip --disable-pip-version-check install $(CROSSENV_WHEELS) - . $(WORK_DIR)/crossenv/bin/activate && $(RUN) pip --disable-pip-version-check install $(CROSSENV_WHEELS) -ifneq ($(PYTHON_LIB_NATIVE),$(PYTHON_LIB_CROSS)) - cp $(PYTHON_LIB_CROSS)/_sysconfigdata_*.py $(PYTHON_LIB_NATIVE)/_sysconfigdata.py -endif - -$(WORK_DIR)/python-cc.mk: - @echo HOSTPYTHON=$(HOSTPYTHON) > $@ - @echo CROSSENV=$(WORK_DIR)/crossenv/bin/activate >> $@ - @echo HOSTPYTHON_LIB_NATIVE=$(HOSTPYTHON_LIB_NATIVE) >> $@ - @echo PYTHON_LIB_NATIVE=$(PYTHON_LIB_NATIVE) >> $@ - @echo PYTHON_SITE_PACKAGES_NATIVE=$(PYTHON_SITE_PACKAGES_NATIVE) >> $@ - @echo PYTHON_INTERPRETER=$(INSTALL_PREFIX)/bin/python$(PKG_VERS_MAJOR_MINOR) >> $@ - @echo PYTHON_VERSION=$(PKG_VERS_MAJOR_MINOR) >> $@ - @echo PYTHON_LIB_CROSS=$(PYTHON_LIB_CROSS) >> $@ - @echo PYTHON_LIB_DIR=$(PYTHON_LIB_DIR) >> $@ - @echo PYTHON_INC_DIR=$(PYTHON_INC_DIR) >> $@ - @echo PIP=$(PIP_NATIVE) >> $@ - @echo CROSS_COMPILE_WHEELS=1 >> $@ - @echo ADDITIONAL_WHEEL_BUILD_ARGS=--no-build-isolation >> $@ diff --git a/cross/python311/Makefile b/cross/python311/Makefile index 540bae4a5b2..45e88dd1b2c 100644 --- a/cross/python311/Makefile +++ b/cross/python311/Makefile @@ -83,21 +83,11 @@ POST_PATCH_TARGET = python311_post_patch PRE_CONFIGURE_TARGET = python311_pre_configure COMPILE_TARGET = python311_compile INSTALL_TARGET = python311_install -POST_INSTALL_TARGET = python311_post_install include ../../mk/spksrc.cross-cc.mk -HOST_ARCH = $(shell uname -m) -BUILD_ARCH = $(shell expr "$(TC_TARGET)" : '\([^-]*\)' ) PYTHON_NATIVE = $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/bin/python3 -PIP_NATIVE = $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/bin/pip HOSTPYTHON = $(WORK_DIR)/$(PKG_DIR)/hostpython -HOSTPYTHON_LIB_NATIVE = $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/$(PKG_DIR)/build/lib.linux-$(HOST_ARCH)-$(PKG_VERS_MAJOR_MINOR) -PYTHON_LIB_NATIVE = $(WORK_DIR)/$(PKG_DIR)/build/lib.linux-$(HOST_ARCH)-$(PKG_VERS_MAJOR_MINOR) -PYTHON_SITE_PACKAGES_NATIVE = $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/lib/python$(PKG_VERS_MAJOR_MINOR)/site-packages -PYTHON_LIB_CROSS = $(WORK_DIR)/$(PKG_DIR)/build/lib.linux-$(BUILD_ARCH)-$(PKG_VERS_MAJOR_MINOR) -PYTHON_LIB_DIR = lib/python$(PKG_VERS_MAJOR_MINOR) -PYTHON_INC_DIR = include/python$(PKG_VERS_MAJOR_MINOR) # Required so that the python3 binaries and libraries generated by native compilation # take precedence over current environment python3 when generating @@ -131,61 +121,3 @@ python311_install: @install -m 755 -d $(STAGING_INSTALL_PREFIX)/etc @install -m 644 src/mime.types $(STAGING_INSTALL_PREFIX)/etc/ $(RUN) _PYTHON_HOST_PLATFORM=$(TC_TARGET) $(MAKE) install prefix=$(STAGING_INSTALL_PREFIX) - -# default wheels to install in crossenv -CROSSENV_WHEELS = cffi==1.17.1 -CROSSENV_WHEELS += cryptography==43.0.1 -# -# Cython version >= 3.x breaks PyYAML wheel -# https://github.com/yaml/pyyaml/issues/601 -# -# It also breaks numpy at crossenv creation time using github-action -# https://numpy.org/devdocs/reference/distutils_status_migration.html -# Python 3.12 considerations: scikit-build-core, meson-python -#CROSSENV_WHEELS += Cython==3.0.2 -CROSSENV_WHEELS += Cython==0.29.37 -CROSSENV_WHEELS += flit==3.9.0 -CROSSENV_WHEELS += maturin==1.7.4 -CROSSENV_WHEELS += poetry==1.8.3 -CROSSENV_WHEELS += scikit-build==0.18.1 -CROSSENV_WHEELS += setuptools-rust==1.10.2 -CROSSENV_WHEELS += setuptools-scm==8.1.0 -# For future use when building numpy >= 1.26 -#CROSSENV_WHEELS += meson-python==1.5.2 -#CROSSENV_WHEELS += scikit-build-core==0.10.7 -# For pydantic_core==2.23.0: (typing-extensions >=4.6.0,!=4.7.0) -CROSSENV_WHEELS += typing_extensions==4.12.2 - - -# Create the crossenv in preparation for -# cross-compiling all the necessary wheels -.PHONY: python311_post_install -python311_post_install: $(WORK_DIR)/python-cc.mk - mkdir -p $(PYTHON_LIB_CROSS) - cp -R $(HOSTPYTHON_LIB_NATIVE) $(PYTHON_LIB_CROSS)/../ - @$(RUN) $(PYTHON_NATIVE) -m crossenv $(STAGING_INSTALL_PREFIX)/bin/python$(PKG_VERS_MAJOR_MINOR) --cc $(TC_PATH)$(TC_PREFIX)gcc --cxx $(TC_PATH)$(TC_PREFIX)c++ --ar $(TC_PATH)$(TC_PREFIX)ar --sysroot $(TC_SYSROOT) --env LIBRARY_PATH= --manylinux manylinux2014 $(WORK_DIR)/crossenv/ - . $(WORK_DIR)/crossenv/bin/activate && $(RUN) wget --no-verbose https://bootstrap.pypa.io/get-pip.py - . $(WORK_DIR)/crossenv/bin/activate && $(RUN) build-python get-pip.py "pip==24.2" --no-setuptools --no-wheel --disable-pip-version-check - . $(WORK_DIR)/crossenv/bin/activate && $(RUN) python get-pip.py "pip==24.2" --no-setuptools --no-wheel --disable-pip-version-check - . $(WORK_DIR)/crossenv/bin/activate && $(RUN) build-pip --disable-pip-version-check install "setuptools==68.1.2" "wheel==0.44.0" "pip-tools==7.4.1" - . $(WORK_DIR)/crossenv/bin/activate && $(RUN) pip --disable-pip-version-check install "setuptools==68.1.2" "wheel==0.44.0" "pip-tools==7.4.1" - . $(WORK_DIR)/crossenv/bin/activate && $(RUN) build-pip --disable-pip-version-check install $(CROSSENV_WHEELS) - . $(WORK_DIR)/crossenv/bin/activate && $(RUN) pip --disable-pip-version-check install $(CROSSENV_WHEELS) -ifneq ($(PYTHON_LIB_NATIVE),$(PYTHON_LIB_CROSS)) - cp $(PYTHON_LIB_CROSS)/_sysconfigdata_*.py $(PYTHON_LIB_NATIVE)/_sysconfigdata.py -endif - -$(WORK_DIR)/python-cc.mk: - @echo HOSTPYTHON=$(HOSTPYTHON) > $@ - @echo CROSSENV=$(WORK_DIR)/crossenv/bin/activate >> $@ - @echo HOSTPYTHON_LIB_NATIVE=$(HOSTPYTHON_LIB_NATIVE) >> $@ - @echo PYTHON_LIB_NATIVE=$(PYTHON_LIB_NATIVE) >> $@ - @echo PYTHON_SITE_PACKAGES_NATIVE=$(PYTHON_SITE_PACKAGES_NATIVE) >> $@ - @echo PYTHON_INTERPRETER=$(INSTALL_PREFIX)/bin/python$(PKG_VERS_MAJOR_MINOR) >> $@ - @echo PYTHON_VERSION=$(PKG_VERS_MAJOR_MINOR) >> $@ - @echo PYTHON_LIB_CROSS=$(PYTHON_LIB_CROSS) >> $@ - @echo PYTHON_LIB_DIR=$(PYTHON_LIB_DIR) >> $@ - @echo PYTHON_INC_DIR=$(PYTHON_INC_DIR) >> $@ - @echo PIP=$(PIP_NATIVE) >> $@ - @echo CROSS_COMPILE_WHEELS=1 >> $@ - @echo ADDITIONAL_WHEEL_BUILD_ARGS=--no-build-isolation >> $@ diff --git a/cross/python313/Makefile b/cross/python313/Makefile index 3930daa74bd..285ad45f2cc 100644 --- a/cross/python313/Makefile +++ b/cross/python313/Makefile @@ -83,21 +83,11 @@ POST_PATCH_TARGET = python313_post_patch PRE_CONFIGURE_TARGET = python313_pre_configure COMPILE_TARGET = python313_compile INSTALL_TARGET = python313_install -POST_INSTALL_TARGET = python313_post_install include ../../mk/spksrc.cross-cc.mk -HOST_ARCH = $(shell uname -m) -BUILD_ARCH = $(shell expr "$(TC_TARGET)" : '\([^-]*\)' ) PYTHON_NATIVE = $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/bin/python3 -PIP_NATIVE = $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/bin/pip HOSTPYTHON = $(WORK_DIR)/$(PKG_DIR)/hostpython -HOSTPYTHON_LIB_NATIVE = $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/$(PKG_DIR)/build/lib.linux-$(HOST_ARCH)-$(PKG_VERS_MAJOR_MINOR) -PYTHON_LIB_NATIVE = $(WORK_DIR)/$(PKG_DIR)/build/lib.linux-$(HOST_ARCH)-$(PKG_VERS_MAJOR_MINOR) -PYTHON_SITE_PACKAGES_NATIVE = $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/lib/python$(PKG_VERS_MAJOR_MINOR)/site-packages -PYTHON_LIB_CROSS = $(WORK_DIR)/$(PKG_DIR)/build/lib.linux-$(BUILD_ARCH)-$(PKG_VERS_MAJOR_MINOR) -PYTHON_LIB_DIR = lib/python$(PKG_VERS_MAJOR_MINOR) -PYTHON_INC_DIR = include/python$(PKG_VERS_MAJOR_MINOR) # Required so that the python3 binaries and libraries generated by native compilation # take precedence over current environment python3 when generating @@ -131,61 +121,3 @@ python313_install: @install -m 755 -d $(STAGING_INSTALL_PREFIX)/etc @install -m 644 src/mime.types $(STAGING_INSTALL_PREFIX)/etc/ $(RUN) _PYTHON_HOST_PLATFORM=$(TC_TARGET) $(MAKE) install prefix=$(STAGING_INSTALL_PREFIX) - -# default wheels to install in crossenv -CROSSENV_WHEELS = cffi==1.17.1 -CROSSENV_WHEELS += cryptography==43.0.1 -# -# Cython version >= 3.x breaks PyYAML wheel -# https://github.com/yaml/pyyaml/issues/601 -# -# It also breaks numpy at crossenv creation time using github-action -# https://numpy.org/devdocs/reference/distutils_status_migration.html -# Python 3.12 considerations: scikit-build-core, meson-python -#CROSSENV_WHEELS += Cython==3.0.2 -CROSSENV_WHEELS += Cython==0.29.37 -CROSSENV_WHEELS += flit==3.9.0 -CROSSENV_WHEELS += maturin==1.7.4 -CROSSENV_WHEELS += poetry==1.8.3 -CROSSENV_WHEELS += scikit-build==0.18.1 -CROSSENV_WHEELS += setuptools-rust==1.10.2 -CROSSENV_WHEELS += setuptools-scm==8.1.0 -# For future use when building numpy >= 1.26 -#CROSSENV_WHEELS += meson-python==1.5.2 -#CROSSENV_WHEELS += scikit-build-core==0.10.7 -# For pydantic_core==2.23.0: (typing-extensions >=4.6.0,!=4.7.0) -CROSSENV_WHEELS += typing_extensions==4.12.2 - - -# Create the crossenv in preparation for -# cross-compiling all the necessary wheels -.PHONY: python313_post_install -python313_post_install: $(WORK_DIR)/python-cc.mk - mkdir -p $(PYTHON_LIB_CROSS) - cp -R $(HOSTPYTHON_LIB_NATIVE) $(PYTHON_LIB_CROSS)/../ - @$(RUN) $(PYTHON_NATIVE) -m crossenv $(STAGING_INSTALL_PREFIX)/bin/python$(PKG_VERS_MAJOR_MINOR) --cc $(TC_PATH)$(TC_PREFIX)gcc --cxx $(TC_PATH)$(TC_PREFIX)c++ --ar $(TC_PATH)$(TC_PREFIX)ar --sysroot $(TC_SYSROOT) --env LIBRARY_PATH= --manylinux manylinux2014 $(WORK_DIR)/crossenv/ - . $(WORK_DIR)/crossenv/bin/activate && $(RUN) wget --no-verbose https://bootstrap.pypa.io/get-pip.py - . $(WORK_DIR)/crossenv/bin/activate && $(RUN) build-python get-pip.py "pip==24.2" --no-setuptools --no-wheel --disable-pip-version-check - . $(WORK_DIR)/crossenv/bin/activate && $(RUN) python get-pip.py "pip==24.2" --no-setuptools --no-wheel --disable-pip-version-check - . $(WORK_DIR)/crossenv/bin/activate && $(RUN) build-pip --disable-pip-version-check install "setuptools==68.1.2" "wheel==0.44.0" "pip-tools==7.4.1" - . $(WORK_DIR)/crossenv/bin/activate && $(RUN) pip --disable-pip-version-check install "setuptools==68.1.2" "wheel==0.44.0" "pip-tools==7.4.1" - . $(WORK_DIR)/crossenv/bin/activate && $(RUN) build-pip --disable-pip-version-check install $(CROSSENV_WHEELS) - . $(WORK_DIR)/crossenv/bin/activate && $(RUN) pip --disable-pip-version-check install $(CROSSENV_WHEELS) -ifneq ($(PYTHON_LIB_NATIVE),$(PYTHON_LIB_CROSS)) - cp $(PYTHON_LIB_CROSS)/_sysconfigdata_*.py $(PYTHON_LIB_NATIVE)/_sysconfigdata.py -endif - -$(WORK_DIR)/python-cc.mk: - @echo HOSTPYTHON=$(HOSTPYTHON) > $@ - @echo CROSSENV=$(WORK_DIR)/crossenv/bin/activate >> $@ - @echo HOSTPYTHON_LIB_NATIVE=$(HOSTPYTHON_LIB_NATIVE) >> $@ - @echo PYTHON_LIB_NATIVE=$(PYTHON_LIB_NATIVE) >> $@ - @echo PYTHON_SITE_PACKAGES_NATIVE=$(PYTHON_SITE_PACKAGES_NATIVE) >> $@ - @echo PYTHON_INTERPRETER=$(INSTALL_PREFIX)/bin/python$(PKG_VERS_MAJOR_MINOR) >> $@ - @echo PYTHON_VERSION=$(PKG_VERS_MAJOR_MINOR) >> $@ - @echo PYTHON_LIB_CROSS=$(PYTHON_LIB_CROSS) >> $@ - @echo PYTHON_LIB_DIR=$(PYTHON_LIB_DIR) >> $@ - @echo PYTHON_INC_DIR=$(PYTHON_INC_DIR) >> $@ - @echo PIP=$(PIP_NATIVE) >> $@ - @echo CROSS_COMPILE_WHEELS=1 >> $@ - @echo ADDITIONAL_WHEEL_BUILD_ARGS=--no-build-isolation >> $@ From c413b53155162e1f3692406639af41de485d0c72 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Sat, 2 Nov 2024 20:54:59 +0000 Subject: [PATCH 013/130] mk/crossenv: Remove aiohttp example as obsolete --- mk/crossenv/requirements-aiohttp.txt | 7 ------- mk/crossenv/requirements-aiohttp==3.8.5.txt | 6 ------ 2 files changed, 13 deletions(-) delete mode 100644 mk/crossenv/requirements-aiohttp.txt delete mode 100644 mk/crossenv/requirements-aiohttp==3.8.5.txt diff --git a/mk/crossenv/requirements-aiohttp.txt b/mk/crossenv/requirements-aiohttp.txt deleted file mode 100644 index a6e2fe8b2e9..00000000000 --- a/mk/crossenv/requirements-aiohttp.txt +++ /dev/null @@ -1,7 +0,0 @@ -pip==23.2.1 -pip-tools==7.4.1 -setuptools==63.4.3 -wheel==0.41.2 -# -cffi==1.17.1 -Cython==0.29.37 diff --git a/mk/crossenv/requirements-aiohttp==3.8.5.txt b/mk/crossenv/requirements-aiohttp==3.8.5.txt deleted file mode 100644 index d60d22c31f5..00000000000 --- a/mk/crossenv/requirements-aiohttp==3.8.5.txt +++ /dev/null @@ -1,6 +0,0 @@ -pip==23.2.1 -setuptools==63.4.3 -wheel==0.41.2 -# -cffi==1.16.0 -Cython==0.29.37 From e05f834ea6790086dce6a605486976340c04f8e3 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Sat, 2 Nov 2024 20:55:32 +0000 Subject: [PATCH 014/130] mk/crossenv: disable meson and scikit-build-core temporarily --- mk/crossenv/requirements-default.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mk/crossenv/requirements-default.txt b/mk/crossenv/requirements-default.txt index 6f8b374e388..d85e19dc3cf 100644 --- a/mk/crossenv/requirements-default.txt +++ b/mk/crossenv/requirements-default.txt @@ -8,10 +8,10 @@ cryptography==43.0.1 Cython==3.0.11 flit==3.9.0 maturin==1.7.4 -meson-python==0.17.1 +#meson-python==0.17.1 poetry==1.8.4 scikit-build==0.18.1 -scikit-build-core==0.10.7 +#scikit-build-core==0.10.7 setuptools-rust==1.10.2 setuptools-scm==8.1.0 typing_extensions==4.12.2 From ee4e8559e62bb7178693ec958651f79092a2629d Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Sat, 2 Nov 2024 20:57:24 +0000 Subject: [PATCH 015/130] spksrc.crossenv.mk: Misc fixes --- mk/spksrc.crossenv.mk | 34 +++++++++++++++------------------- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/mk/spksrc.crossenv.mk b/mk/spksrc.crossenv.mk index 01785f66f6c..d7607f47b20 100644 --- a/mk/spksrc.crossenv.mk +++ b/mk/spksrc.crossenv.mk @@ -8,31 +8,17 @@ CROSSENV_CONFIG_PATH = $(abspath $(WORK_DIR)/../../../mk/crossenv) CROSSENV_CONFIG_DEFAULT = $(CROSSENV_CONFIG_PATH)/requirements-default.txt CROSSENV_PATH = $(abspath $(WORK_DIR)/crossenv-$(CROSSENV_BUILD_WHEEL)/) -ifeq ($(strip $(WHEEL)),) -CROSSENV_BUILD_WHEEL = default -CROSSENV_BUILD_REQUIREMENTS = $(CROSSENV_CONFIG_DEFAULT) -else ifneq ($(wildcard $(CROSSENV_CONFIG_PATH)/requirements-$(WHEEL).txt),) +# Check for wheel==x.y, then wheel, then default +ifneq ($(wildcard $(CROSSENV_CONFIG_PATH)/requirements-$(WHEEL).txt),) CROSSENV_BUILD_WHEEL = $(WHEEL) CROSSENV_BUILD_REQUIREMENTS = $(CROSSENV_CONFIG_PATH)/requirements-$(WHEEL).txt else ifneq ($(wildcard $(CROSSENV_CONFIG_PATH)/requirements-$(shell echo $${WHEEL%%[<>=]=*}).txt),) CROSSENV_BUILD_WHEEL = $(shell echo $${WHEEL%%[<>=]=*}) CROSSENV_BUILD_REQUIREMENTS = $(CROSSENV_CONFIG_PATH)/requirements-$(shell echo $${WHEEL%%[<>=]=*}).txt else -CROSSENV_BUILD_WHEEL = error-crossenv_build_wheel -endif - - -#### - -.PHONY: error-crossenv_build_wheel -error-crossenv_build_wheel: - @$(MSG) ######################################################## - @$(MSG) ERROR - No definition for: - @$(MSG) mk/crossenv/requirements-$(WHEEL).txt -ifneq ($(WHEEL),$(shell echo $${WHEEL%%[<>=]=*})) - @$(MSG) mk/crossenv/requirements-$(shell echo $${WHEEL%%[<>=]=*}).txt +CROSSENV_BUILD_WHEEL = default +CROSSENV_BUILD_REQUIREMENTS = $(CROSSENV_CONFIG_DEFAULT) endif - @$(MSG) ######################################################## ### @@ -99,6 +85,10 @@ PYTHON_INC_DIR = include/python$(PYTHON_PKG_VERS_MAJOR_MINOR) # Create the crossenv in preparation for # cross-compiling all the necessary wheels .PHONY: crossenv +ifneq ($(wildcard $(CROSSENV_PATH)),) +build-crossenv: + @$(MSG) Reusing existing crossenv $(CROSSENV_PATH) +else build-crossenv: SHELL:=/bin/bash build-crossenv: $(CROSSENV_PATH)/build/python-cc.mk @$(MSG) crossenv wheel packages: $(CROSSENV_DEFAULT_PIP), $(CROSSENV_DEFAULT_SETUPTOOLS), $(CROSSENV_DEFAULT_WHEEL) @@ -121,6 +111,10 @@ build-crossenv: $(CROSSENV_PATH)/build/python-cc.mk --env LIBRARY_PATH= \ --manylinux manylinux2014 \ "$(CROSSENV_PATH)" +ifeq ($(CROSSENV_BUILD_WHEEL),default) + @$(MSG) Setting default crossenv $(CROSSENV_PATH) + @$(RUN) ln -s crossenv-default crossenv +endif @. $(CROSSENV_PATH)/bin/activate && $(RUN) wget --no-verbose https://bootstrap.pypa.io/get-pip.py @. $(CROSSENV_PATH)/bin/activate ; \ $(RUN) build-python get-pip.py $(CROSSENV_DEFAULT_PIP) --no-setuptools --no-wheel --disable-pip-version-check ; \ @@ -140,11 +134,13 @@ build-crossenv: $(CROSSENV_PATH)/build/python-cc.mk #ifneq ($(PYTHON_LIB_NATIVE),$(PYTHON_LIB_CROSS)) # cp $(PYTHON_LIB_CROSS)/_sysconfigdata_*.py $(PYTHON_LIB_NATIVE)/_sysconfigdata.py #endif +endif $(CROSSENV_PATH)/build/python-cc.mk: mkdir -p $(CROSSENV_PATH)/build + @echo CROSSENV_PATH=$(CROSSENV_PATH) > $@ @echo CROSSENV=$(CROSSENV_PATH)/bin/activate >> $@ - @echo HOSTPYTHON=$(HOSTPYTHON) > $@ + @echo HOSTPYTHON=$(HOSTPYTHON) >> $@ @echo HOSTPYTHON_LIB_NATIVE=$(HOSTPYTHON_LIB_NATIVE) >> $@ @echo PYTHON_LIB_NATIVE=$(PYTHON_LIB_NATIVE) >> $@ @echo PYTHON_LIB_CROSS=$(PYTHON_LIB_CROSS) >> $@ From 516d802a1e2be86f1204f81a14c2b8636caa757b Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Sat, 2 Nov 2024 20:57:47 +0000 Subject: [PATCH 016/130] python-module.mk: Make compatible with spksrc.crossenv.mk --- mk/spksrc.python-module.mk | 42 +++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/mk/spksrc.python-module.mk b/mk/spksrc.python-module.mk index 5881f02113d..d7a6e5b3dfe 100644 --- a/mk/spksrc.python-module.mk +++ b/mk/spksrc.python-module.mk @@ -16,32 +16,28 @@ endif # Resume with standard spksrc.cross-cc.mk include ../../mk/spksrc.cross-cc.mk -# Fetch python variables --include $(WORK_DIR)/python-cc.mk +# Define where is located the crossenv +CROSSENV_MODULE_PATH = $(firstword $(wildcard $(WORK_DIR)/crossenv-$(PKG_NAME)==$(PKG_VERS) $(WORK_DIR)/crossenv-$(PKG_NAME) $(WORK_DIR)/crossenv-default)) -# Python module variables -ifneq ($(wildcard $(PYTHONPATH)),) -PYTHONPATH = $(PYTHON_SITE_PACKAGES_NATIVE):$(PYTHON_LIB_NATIVE):$(INSTALL_DIR)$(INSTALL_PREFIX)/$(PYTHON_LIB_DIR)/site-packages/ -endif +### Prepare crossenv +build_crossenv_module: + WHEEL="$(PKG_NAME)==$(PKG_VERS)" $(MAKE) crossenv-$(ARCH)-$(TCVERSION) ### Python module rules -compile_python_module: -ifeq ($(strip $(CROSSENV)),) -# Python 2 way - @$(RUN) PYTHONPATH=$(PYTHONPATH) $(HOSTPYTHON) setup.py build_ext -I $(STAGING_INSTALL_PREFIX)/include -L $(STAGING_INSTALL_PREFIX)/lib $(BUILD_ARGS) -else -# Python 3 case: using crossenv helper - @. $(CROSSENV) && $(RUN) PYTHONPATH=$(PYTHONPATH) python setup.py build_ext -I $(STAGING_INSTALL_PREFIX)/include -L $(STAGING_INSTALL_PREFIX)/lib $(BUILD_ARGS) -endif +compile_python_module: build_crossenv_module + $(foreach e,$(shell cat $(CROSSENV_MODULE_PATH)/build/python-cc.mk),$(eval $(e))) + $(eval PYTHONPATH = $(PYTHON_SITE_PACKAGES_NATIVE):$(PYTHON_LIB_NATIVE):$(INSTALL_DIR)$(INSTALL_PREFIX)/$(PYTHON_LIB_DIR)/site-packages/) + @$(MSG) "CROSSENV: $(CROSSENV)" + @. $(CROSSENV) ; \ + $(RUN) PYTHONPATH=$(PYTHONPATH) python setup.py build_ext \ + -I $(STAGING_INSTALL_PREFIX)/include \ + -L $(STAGING_INSTALL_PREFIX)/lib $(BUILD_ARGS) install_python_module: -ifeq ($(strip $(CROSSENV)),) -# Python 2 way - @$(RUN) PYTHONPATH=$(PYTHONPATH) $(HOSTPYTHON) setup.py install --root $(INSTALL_DIR) --prefix $(INSTALL_PREFIX) $(INSTALL_ARGS) -else -# Python 3 case: using crossenv helper - @. $(CROSSENV) && $(RUN) PYTHONPATH=$(PYTHONPATH) python setup.py install --root $(INSTALL_DIR) --prefix $(INSTALL_PREFIX) $(INSTALL_ARGS) -endif + @. $(CROSSENV) ; \ + $(RUN) PYTHONPATH=$(PYTHONPATH) python setup.py install \ + --root $(INSTALL_DIR) \ + --prefix $(INSTALL_PREFIX) $(INSTALL_ARGS) fix_shebang_python_module: @cat PLIST | sed 's/:/ /' | while read type file ; do \ @@ -55,3 +51,7 @@ fix_shebang_python_module: all: install fix_shebang_python_module +### + +# Allow generating per-wheel crossenv +include ../../mk/spksrc.crossenv.mk From bc169a8c7502f0204de8fd0398bc6cbc3755f43f Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Sat, 2 Nov 2024 20:58:35 +0000 Subject: [PATCH 017/130] wheel.mk: Make compatible with spksrc.crossenv.mk --- mk/spksrc.wheel.mk | 41 ++++++++++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 15 deletions(-) diff --git a/mk/spksrc.wheel.mk b/mk/spksrc.wheel.mk index ab8a7e36633..8434c6a940b 100644 --- a/mk/spksrc.wheel.mk +++ b/mk/spksrc.wheel.mk @@ -17,6 +17,9 @@ WHEEL_COOKIE = $(WORK_DIR)/.$(COOKIE_PREFIX)wheel_done ## python wheel specific configurations include ../../mk/spksrc.wheel-env.mk +## python wheel specific configurations +include ../../mk/spksrc.crossenv.mk + ## ifeq ($(strip $(PRE_WHEEL_TARGET)),) @@ -106,7 +109,7 @@ wheel_msg_target: # building a wheel for x64-6.2.4 may look successfull while # it actually used a cache built from x64-7.1 # -pre_wheel_target: wheel_msg_target wheeldownload +pre_wheel_target: build-crossenv wheel_msg_target wheeldownload ifneq ($(strip $(WHEELS)),) @if [ -n "$(PIP_CACHE_OPT)" ] ; then \ mkdir -p $(PIP_CACHE_DIR) ; \ @@ -140,25 +143,33 @@ endif build_wheel_target: SHELL:=/bin/bash build_wheel_target: $(PRE_WHEEL_TARGET) ifneq ($(strip $(WHEELS)),) - $(foreach e,$(shell cat $(WORK_DIR)/python-cc.mk),$(eval $(e))) +# $(foreach e,$(shell cat $(WORK_DIR)/python-cc.mk),$(eval $(e))) @if [ -s $(WHEELHOUSE)/$(WHEELS_CROSSENV_COMPILE) -o -s $(WHEELHOUSE)/$(WHEELS_LIMITED_API) ]; then \ - $(MSG) "Cross-compiling wheels" ; \ - crossenvPIP=$(PIP) ; \ - if [ -s "$(CROSSENV)" ] ; then \ - crossenvPIP=$$(. $(CROSSENV) && which pip) ; \ - $(MSG) "Python crossenv found: [$(CROSSENV)]" ; \ - $(MSG) "pip crossenv found: [$${crossenvPIP}]" ; \ - elif [ "$(PYTHON_VERSION)" != "2.7" ] ; then \ - $(MSG) "WARNING: Python crossenv NOT found!" ; \ - $(MSG) "WARNING: pip crossenv NOT found!" ; \ - else \ - $(MSG) "Python $(PYTHON_VERSION) uses pip: $${crossenvPIP}" ; \ - fi ; \ while IFS= read -r requirement ; do \ wheel=$${requirement#*:} ; \ file=$$(basename $${requirement%%:*}) ; \ - [ "$${file}" = "$(WHEELS_LIMITED_API)" ] && abi3="--build-option=--py-limited-api=$(PYTHON_LIMITED_API)" || abi3="" ; \ [ "$$(grep -s egg <<< $${wheel})" ] && name=$$(echo $${wheel#*egg=} | cut -f1 -d=) || name=$${wheel%%[<>=]=*} ; \ + echo "WHEEL=\"$${wheel}\" $(MAKE) crossenv-$(ARCH)-$(TCVERSION)" ; \ + WHEEL="$${wheel}" $(MAKE) crossenv-$(ARCH)-$(TCVERSION) ; \ + for crossenv in $(WORK_DIR)/crossenv-$${wheel} $(WORK_DIR)/crossenv-$${name} $(WORK_DIR)/crossenv ; do \ + echo "DIR CHECK EN COURS: $${crossenv}" ; \ + echo "ACTIVATE EN COURS: $${crossenv}/build/python-cc.mk" ; \ + [ -d $${crossenv} ] && . $${crossenv}/build/python-cc.mk && break ; \ + done ; \ + crossenvPIP=$(PIP) ; \ + echo "CROSSENV: $${CROSSENV}" ; \ + if [ -s "$${CROSSENV}" ] ; then \ + crossenvPIP=$$(. $${CROSSENV} && which pip) ; \ + $(MSG) "Python crossenv found: [$${CROSSENV}]" ; \ + $(MSG) "pip crossenv found: [$${crossenvPIP}]" ; \ + elif [ "$${PYTHON_VERSION}" != "2.7" ] ; then \ + $(MSG) "WARNING: Python crossenv NOT found!" ; \ + $(MSG) "WARNING: pip crossenv NOT found!" ; \ + else \ + $(MSG) "Python $${PYTHON_VERSION} uses pip: $${crossenvPIP}" ; \ + fi ; \ + $(MSG) "Cross-compiling [$${wheel}] wheel using $${CROSSENV_PATH}" ; \ + [ "$${file}" = "$(WHEELS_LIMITED_API)" ] && abi3="--build-option=--py-limited-api=$(PYTHON_LIMITED_API)" || abi3="" ; \ global_options=$$(echo $(WHEELS_BUILD_ARGS) | sed -e 's/ \[/\n\[/g' | grep -i $${name} | cut -f2 -d] | xargs) ; \ localCFLAGS=($$(echo $(WHEELS_CFLAGS) | sed -e 's/ \[/\n\[/g' | grep -i $${name} | cut -f2 -d] | xargs)) ; \ localLDFLAGS=($$(echo $(WHEELS_LDFLAGS) | sed -e 's/ \[/\n\[/g' | grep -i $${name} | cut -f2 -d] | xargs)) ; \ From cef7287bc9bca2b4b99b2364d37cb4f904009674 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Mon, 4 Nov 2024 01:57:03 +0000 Subject: [PATCH 018/130] crossenv.mk: Allow building from PYTHON_PACKAGE dependend spk --- mk/spksrc.crossenv.mk | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/mk/spksrc.crossenv.mk b/mk/spksrc.crossenv.mk index d7607f47b20..6472ca713db 100644 --- a/mk/spksrc.crossenv.mk +++ b/mk/spksrc.crossenv.mk @@ -64,7 +64,13 @@ endif #### # python-cc.mk -PYTHON_PKG_VERS = $(lastword $(subst -, ,$(wildcard $(WORK_DIR)/Python-*))) +PYTHON_WORK_DIR = $(wildcard $(or $(PYTHON_PACKAGE_ROOT),$(WORK_DIR))) +ifneq ($(PYTHON_PACKAGE),) +PYTHON_INSTALL_PREFIX = $(subst $(SPK_NAME),$(PYTHON_PACKAGE),$(INSTALL_PREFIX)) +else +PYTHON_INSTALL_PREFIX = $(INSTALL_PREFIX) +endif +PYTHON_PKG_VERS = $(lastword $(subst -, ,$(wildcard $(PYTHON_WORK_DIR)/Python-*))) PYTHON_PKG_VERS_MAJOR_MINOR = $(word 1,$(subst ., ,$(PYTHON_PKG_VERS))).$(word 2,$(subst ., ,$(PYTHON_PKG_VERS))) PYTHON_PKG_NAME = python$(subst .,,$(PYTHON_PKG_VERS_MAJOR_MINOR)) PYTHON_PKG_DIR = Python-$(PYTHON_PKG_VERS) @@ -72,9 +78,9 @@ HOST_ARCH = $(shell uname -m) BUILD_ARCH = $(shell expr "$(TC_TARGET)" : '\([^-]*\)' ) PYTHON_NATIVE = $(abspath $(WORK_DIR)/../../../native/$(PYTHON_PKG_NAME)/work-native/install/usr/local/bin/python3) PIP_NATIVE = $(abspath $(WORK_DIR)/../../../native/$(PYTHON_PKG_NAME)/work-native/install/usr/local/bin/pip) -HOSTPYTHON = $(abspath $(WORK_DIR)/$(PYTHON_PKG_DIR)/hostpython) +HOSTPYTHON = $(abspath $(PYTHON_WORK_DIR)/$(PYTHON_PKG_DIR)/hostpython) HOSTPYTHON_LIB_NATIVE = $(abspath $(WORK_DIR)/../../../native/$(PYTHON_PKG_NAME)/work-native/$(PYTHON_PKG_DIR)/build/lib.linux-$(HOST_ARCH)-$(PYTHON_PKG_VERS_MAJOR_MINOR)) -PYTHON_LIB_NATIVE = $(abspath $(WORK_DIR)/$(PYTHON_PKG_DIR)/build/lib.linux-$(HOST_ARCH)-$(PYTHON_PKG_VERS_MAJOR_MINOR)) +PYTHON_LIB_NATIVE = $(abspath $(PYTHON_WORK_DIR)/$(PYTHON_PKG_DIR)/build/lib.linux-$(HOST_ARCH)-$(PYTHON_PKG_VERS_MAJOR_MINOR)) PYTHON_SITE_PACKAGES_NATIVE = $(abspath $(WORK_DIR)/../../../native/$(PYTHON_PKG_NAME)/work-native/install/usr/local/lib/python$(PYTHON_PKG_VERS_MAJOR_MINOR)/site-packages) PYTHON_LIB_CROSS = $(CROSSENV_PATH)/build/lib.linux-$(BUILD_ARCH)-$(PYTHON_PKG_VERS_MAJOR_MINOR) PYTHON_LIB_DIR = lib/python$(PYTHON_PKG_VERS_MAJOR_MINOR) @@ -95,7 +101,7 @@ build-crossenv: $(CROSSENV_PATH)/build/python-cc.mk @$(MSG) crossenv requirements file = $(CROSSENV_BUILD_REQUIREMENTS) mkdir -p "$(PYTHON_LIB_CROSS)" cp -RL $(HOSTPYTHON_LIB_NATIVE) "$(abspath $(PYTHON_LIB_CROSS)/../)" - @echo $(PYTHON_NATIVE) -m crossenv $(STAGING_INSTALL_PREFIX)/bin/python$(PYTHON_PKG_VERS_MAJOR_MINOR) \ + @echo $(PYTHON_NATIVE) -m crossenv $(PYTHON_WORK_DIR)/install/$(PYTHON_INSTALL_PREFIX)/bin/python$(PYTHON_PKG_VERS_MAJOR_MINOR) \ --cc $(TC_PATH)$(TC_PREFIX)gcc \ --cxx $(TC_PATH)$(TC_PREFIX)c++ \ --ar $(TC_PATH)$(TC_PREFIX)ar \ @@ -103,7 +109,7 @@ build-crossenv: $(CROSSENV_PATH)/build/python-cc.mk --env LIBRARY_PATH= \ --manylinux manylinux2014 \ "$(CROSSENV_PATH)" - @$(RUN) $(PYTHON_NATIVE) -m crossenv $(STAGING_INSTALL_PREFIX)/bin/python$(PYTHON_PKG_VERS_MAJOR_MINOR) \ + @$(RUN) $(PYTHON_NATIVE) -m crossenv $(PYTHON_WORK_DIR)/install/$(PYTHON_INSTALL_PREFIX)/bin/python$(PYTHON_PKG_VERS_MAJOR_MINOR) \ --cc $(TC_PATH)$(TC_PREFIX)gcc \ --cxx $(TC_PATH)$(TC_PREFIX)c++ \ --ar $(TC_PATH)$(TC_PREFIX)ar \ From 282e7426a0e38ec77ec3914efb14fb3daa636f96 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Tue, 5 Nov 2024 01:30:55 +0000 Subject: [PATCH 019/130] py310-311: Fix lto vs pgo optimizations --- cross/python310/Makefile | 17 +++++++---------- cross/python311/Makefile | 14 +++++++------- 2 files changed, 14 insertions(+), 17 deletions(-) diff --git a/cross/python310/Makefile b/cross/python310/Makefile index dce9003446d..3978e16cc09 100644 --- a/cross/python310/Makefile +++ b/cross/python310/Makefile @@ -28,23 +28,20 @@ CONFIGURE_ARGS += --without-ensurepip CONFIGURE_ARGS += --enable-loadable-sqlite-extensions CONFIGURE_ARGS += --with-computed-gotos=yes CONFIGURE_ARGS += --with-build-python +CONFIGURE_ARGS += --disable-test-modules include ../../mk/spksrc.archs.mk # optionally generate optimized code ifeq ($(strip $(PYTHON_OPTIMIZE)),1) -CONFIGURE_ARGS += --enable-optimizations -# old compilers fail with unrecognized command line options: -flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none -ifneq ($(findstring $(ARCH),$(OLD_PPC_ARCHS)),$(ARCH)) -# Some tests (like test_base64) must find libpython shared library at runtime. -# python: error while loading shared libraries: libpython3.10.so.1.0: cannot open shared object file: No such file or directory -ENV += LD_LIBRARY_PATH=$(WORK_DIR)/$(PKG_DIR) +# # Enable Link-Time Optimization CONFIGURE_ARGS += --with-lto -endif -else -# test modules are required for optimization only -CONFIGURE_ARGS += --disable-test-modules +# +# pgo optimization can only be run native platform and now +# exit on errors which had no impact (and effects) previously. +# https://github.com/python/cpython/pull/111950 +#CONFIGURE_ARGS += --enable-optimizations endif # older gcc does not know -Wno-unused-result diff --git a/cross/python311/Makefile b/cross/python311/Makefile index 45e88dd1b2c..cadec5ac71b 100644 --- a/cross/python311/Makefile +++ b/cross/python311/Makefile @@ -33,20 +33,20 @@ CONFIGURE_ARGS += --without-ensurepip CONFIGURE_ARGS += --enable-loadable-sqlite-extensions CONFIGURE_ARGS += --with-computed-gotos=yes CONFIGURE_ARGS += --with-build-python +CONFIGURE_ARGS += --disable-test-modules include ../../mk/spksrc.archs.mk # optionally generate optimized code ifeq ($(strip $(PYTHON_OPTIMIZE)),1) -CONFIGURE_ARGS += --enable-optimizations -# Some tests (like test_base64) must find libpython shared library at runtime. -# python: error while loading shared libraries: libpython3.11.so.1.0: cannot open shared object file: No such file or directory -ENV += LD_LIBRARY_PATH=$(WORK_DIR)/$(PKG_DIR) +# # Enable Link-Time Optimization CONFIGURE_ARGS += --with-lto -else -# test modules are required for optimization only -CONFIGURE_ARGS += --disable-test-modules +# +# pgo optimization can only be run native platform and now +# exit on errors which had no impact (and effects) previously. +# https://github.com/python/cpython/pull/111950 +#CONFIGURE_ARGS += --enable-optimizations endif CONFIGURE_ARGS += ac_cv_buggy_getaddrinfo=no From 4fc8e5a48c6d28b302ea80af82f1e91602f35e36 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Tue, 5 Nov 2024 02:16:40 +0000 Subject: [PATCH 020/130] wheel.mk: Use $name-$version using - instead of == for crossenv --- mk/spksrc.python-module.mk | 4 ++-- mk/spksrc.wheel.mk | 9 ++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/mk/spksrc.python-module.mk b/mk/spksrc.python-module.mk index d7a6e5b3dfe..0cbd5a72c76 100644 --- a/mk/spksrc.python-module.mk +++ b/mk/spksrc.python-module.mk @@ -17,11 +17,11 @@ endif include ../../mk/spksrc.cross-cc.mk # Define where is located the crossenv -CROSSENV_MODULE_PATH = $(firstword $(wildcard $(WORK_DIR)/crossenv-$(PKG_NAME)==$(PKG_VERS) $(WORK_DIR)/crossenv-$(PKG_NAME) $(WORK_DIR)/crossenv-default)) +CROSSENV_MODULE_PATH = $(firstword $(wildcard $(WORK_DIR)/crossenv-$(PKG_NAME)-$(PKG_VERS) $(WORK_DIR)/crossenv-$(PKG_NAME) $(WORK_DIR)/crossenv-default)) ### Prepare crossenv build_crossenv_module: - WHEEL="$(PKG_NAME)==$(PKG_VERS)" $(MAKE) crossenv-$(ARCH)-$(TCVERSION) + WHEEL="$(PKG_NAME)-$(PKG_VERS)" $(MAKE) crossenv-$(ARCH)-$(TCVERSION) ### Python module rules compile_python_module: build_crossenv_module diff --git a/mk/spksrc.wheel.mk b/mk/spksrc.wheel.mk index 8434c6a940b..58742fc4c5c 100644 --- a/mk/spksrc.wheel.mk +++ b/mk/spksrc.wheel.mk @@ -149,11 +149,10 @@ ifneq ($(strip $(WHEELS)),) wheel=$${requirement#*:} ; \ file=$$(basename $${requirement%%:*}) ; \ [ "$$(grep -s egg <<< $${wheel})" ] && name=$$(echo $${wheel#*egg=} | cut -f1 -d=) || name=$${wheel%%[<>=]=*} ; \ - echo "WHEEL=\"$${wheel}\" $(MAKE) crossenv-$(ARCH)-$(TCVERSION)" ; \ - WHEEL="$${wheel}" $(MAKE) crossenv-$(ARCH)-$(TCVERSION) ; \ - for crossenv in $(WORK_DIR)/crossenv-$${wheel} $(WORK_DIR)/crossenv-$${name} $(WORK_DIR)/crossenv ; do \ - echo "DIR CHECK EN COURS: $${crossenv}" ; \ - echo "ACTIVATE EN COURS: $${crossenv}/build/python-cc.mk" ; \ + version=$$(echo $${requirement#*[<>=]=} | cut -f1 -d' ') ; \ + echo "WHEEL=\"$${name}-$${version}\" $(MAKE) crossenv-$(ARCH)-$(TCVERSION)" ; \ + WHEEL="$${name}-$${version}" $(MAKE) crossenv-$(ARCH)-$(TCVERSION) ; \ + for crossenv in $(WORK_DIR)/crossenv-$${name}-$${version} $(WORK_DIR)/crossenv-$${name} $(WORK_DIR)/crossenv ; do \ [ -d $${crossenv} ] && . $${crossenv}/build/python-cc.mk && break ; \ done ; \ crossenvPIP=$(PIP) ; \ From 8bb28f93ccce3f033974ac78c1ea894cdf0c3aca Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Tue, 5 Nov 2024 02:17:32 +0000 Subject: [PATCH 021/130] python.mk: do not symlink crossenv and python-cc.mk --- mk/spksrc.python.mk | 5 ----- 1 file changed, 5 deletions(-) diff --git a/mk/spksrc.python.mk b/mk/spksrc.python.mk index 07b98ef7dda..588f762f535 100644 --- a/mk/spksrc.python.mk +++ b/mk/spksrc.python.mk @@ -40,9 +40,6 @@ export ADDITIONAL_LDFLAGS += -L$(OPENSSL_STAGING_PREFIX)/lib export ADDITIONAL_LDFLAGS += -Wl,--rpath-link,$(OPENSSL_STAGING_PREFIX)/lib -Wl,--rpath,$(OPENSSL_PREFIX)/lib endif -# get PYTHON_VERSION and other variables --include $(PYTHON_PACKAGE_ROOT)/python-cc.mk - # set PYTHONPATH for spksrc.python-module.mk PYTHONPATH = $(PYTHON_SITE_PACKAGES_NATIVE):$(PYTHON_LIB_NATIVE):$(PYTHON_STAGING_PREFIX)/lib/python$(PYTHON_VERSION)/site-packages/ @@ -74,8 +71,6 @@ python_pre_depend: @$(MSG) "*****************************************************" @mkdir -p $(STAGING_INSTALL_PREFIX)/lib/pkgconfig/ @$(foreach lib,$(PYTHON_LIBS),ln -sf $(lib) $(STAGING_INSTALL_PREFIX)/lib/pkgconfig/ ;) - @ln -sf $(PYTHON_PACKAGE_ROOT)/crossenv $(WORK_DIR)/crossenv - @ln -sf $(PYTHON_PACKAGE_ROOT)/python-cc.mk $(WORK_DIR)/python-cc.mk @$(foreach _done,$(PYTHON_DEPENDS), ln -sf $(_done) $(WORK_DIR) ;) @# EXCEPTION: Ensure zlib is always built locally @rm -f $(STAGING_INSTALL_PREFIX)/lib/pkgconfig/zlib.pc $(WORK_DIR)/.zlib* From 122e616435344d99572f5056b4af58b85035e868 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Mon, 11 Nov 2024 14:29:57 +0000 Subject: [PATCH 022/130] python.mk: Move mandatory PYO3_* variables for rust cross-compiling --- cross/python310/Makefile | 10 ---------- cross/python311/Makefile | 10 ---------- cross/python313/Makefile | 10 ---------- mk/spksrc.python.mk | 9 +++++++++ 4 files changed, 9 insertions(+), 30 deletions(-) diff --git a/cross/python310/Makefile b/cross/python310/Makefile index 3978e16cc09..e7a3f744f01 100644 --- a/cross/python310/Makefile +++ b/cross/python310/Makefile @@ -67,16 +67,6 @@ CONFIGURE_ARGS += --with-system-expat DEPENDS += cross/libffi CONFIGURE_ARGS += --with-system-ffi -# Mandatory PYO3_* variables for rust cross-compiling -ENV += PYO3_CROSS_LIB_DIR=$(STAGING_INSTALL_PREFIX)/lib/ -ENV += PYO3_CROSS_INCLUDE_DIR=$(STAGING_INSTALL_PREFIX)/include/ -# Mandatory of using OPENSSL_*_DIR starting with -# cryptography version >= 40 -# https://docs.rs/openssl/latest/openssl/#automatic -ENV += OPENSSL_LIB_DIR=$(STAGING_INSTALL_PREFIX)/lib/ -ENV += OPENSSL_INCLUDE_DIR=$(STAGING_INSTALL_PREFIX)/include/ - - ADDITIONAL_CFLAGS = -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -L $(STAGING_INSTALL_PREFIX)/lib -I $(STAGING_INSTALL_PREFIX)/include POST_PATCH_TARGET = python310_post_patch diff --git a/cross/python311/Makefile b/cross/python311/Makefile index cadec5ac71b..aa41f9653b4 100644 --- a/cross/python311/Makefile +++ b/cross/python311/Makefile @@ -67,16 +67,6 @@ CONFIGURE_ARGS += --with-system-expat DEPENDS += cross/libffi CONFIGURE_ARGS += --with-system-ffi -# Mandatory PYO3_* variables for rust cross-compiling -ENV += PYO3_CROSS_LIB_DIR=$(STAGING_INSTALL_PREFIX)/lib/ -ENV += PYO3_CROSS_INCLUDE_DIR=$(STAGING_INSTALL_PREFIX)/include/ -# Mandatory of using OPENSSL_*_DIR starting with -# cryptography version >= 40 -# https://docs.rs/openssl/latest/openssl/#automatic -ENV += OPENSSL_LIB_DIR=$(STAGING_INSTALL_PREFIX)/lib/ -ENV += OPENSSL_INCLUDE_DIR=$(STAGING_INSTALL_PREFIX)/include/ - - ADDITIONAL_CFLAGS = -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -L $(STAGING_INSTALL_PREFIX)/lib -I $(STAGING_INSTALL_PREFIX)/include POST_PATCH_TARGET = python311_post_patch diff --git a/cross/python313/Makefile b/cross/python313/Makefile index 285ad45f2cc..6618abad9e1 100644 --- a/cross/python313/Makefile +++ b/cross/python313/Makefile @@ -67,16 +67,6 @@ CONFIGURE_ARGS += --with-system-expat # libffi is no longer bundled with python DEPENDS += cross/libffi -# Mandatory PYO3_* variables for rust cross-compiling -ENV += PYO3_CROSS_LIB_DIR=$(STAGING_INSTALL_PREFIX)/lib/ -ENV += PYO3_CROSS_INCLUDE_DIR=$(STAGING_INSTALL_PREFIX)/include/ -# Mandatory of using OPENSSL_*_DIR starting with -# cryptography version >= 40 -# https://docs.rs/openssl/latest/openssl/#automatic -ENV += OPENSSL_LIB_DIR=$(STAGING_INSTALL_PREFIX)/lib/ -ENV += OPENSSL_INCLUDE_DIR=$(STAGING_INSTALL_PREFIX)/include/ - - ADDITIONAL_CFLAGS = -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -L $(STAGING_INSTALL_PREFIX)/lib -I $(STAGING_INSTALL_PREFIX)/include POST_PATCH_TARGET = python313_post_patch diff --git a/mk/spksrc.python.mk b/mk/spksrc.python.mk index 588f762f535..456fb93f29c 100644 --- a/mk/spksrc.python.mk +++ b/mk/spksrc.python.mk @@ -40,6 +40,15 @@ export ADDITIONAL_LDFLAGS += -L$(OPENSSL_STAGING_PREFIX)/lib export ADDITIONAL_LDFLAGS += -Wl,--rpath-link,$(OPENSSL_STAGING_PREFIX)/lib -Wl,--rpath,$(OPENSSL_PREFIX)/lib endif +# Mandatory PYO3_* variables for rust cross-compiling +export PYO3_CROSS_LIB_DIR = $(STAGING_INSTALL_PREFIX)/lib/ +export PYO3_CROSS_INCLUDE_DIR = $(STAGING_INSTALL_PREFIX)/include/ +# Mandatory of using OPENSSL_*_DIR starting with +# cryptography version >= 40 +# https://docs.rs/openssl/latest/openssl/#automatic +export OPENSSL_LIB_DIR = $(STAGING_INSTALL_PREFIX)/lib/ +export OPENSSL_INCLUDE_DIR = $(STAGING_INSTALL_PREFIX)/include/ + # set PYTHONPATH for spksrc.python-module.mk PYTHONPATH = $(PYTHON_SITE_PACKAGES_NATIVE):$(PYTHON_LIB_NATIVE):$(PYTHON_STAGING_PREFIX)/lib/python$(PYTHON_VERSION)/site-packages/ From 91ab53b0914f0edb4f80867f1d36ea87589db01e Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Mon, 11 Nov 2024 14:30:42 +0000 Subject: [PATCH 023/130] crossenv.mk: Fix crossenv creation and pip tool calls --- mk/spksrc.crossenv.mk | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/mk/spksrc.crossenv.mk b/mk/spksrc.crossenv.mk index 6472ca713db..89e7ddfe1e7 100644 --- a/mk/spksrc.crossenv.mk +++ b/mk/spksrc.crossenv.mk @@ -121,25 +121,31 @@ ifeq ($(CROSSENV_BUILD_WHEEL),default) @$(MSG) Setting default crossenv $(CROSSENV_PATH) @$(RUN) ln -s crossenv-default crossenv endif - @. $(CROSSENV_PATH)/bin/activate && $(RUN) wget --no-verbose https://bootstrap.pypa.io/get-pip.py + @$(RUN) wget --no-verbose https://bootstrap.pypa.io/get-pip.py --directory-prefix=$(CROSSENV_PATH)/build ; \ + $(RUN) chmod 755 $(CROSSENV_PATH)/build/get-pip.py @. $(CROSSENV_PATH)/bin/activate ; \ - $(RUN) build-python get-pip.py $(CROSSENV_DEFAULT_PIP) --no-setuptools --no-wheel --disable-pip-version-check ; \ - $(RUN) python get-pip.py $(CROSSENV_DEFAULT_PIP) --no-setuptools --no-wheel --disable-pip-version-check + $(MSG) $$(which build-python) $(CROSSENV_PATH)/build/get-pip.py $(CROSSENV_DEFAULT_PIP) --no-setuptools --no-wheel --disable-pip-version-check ; \ + $(RUN) $$(which build-python) $(CROSSENV_PATH)/build/get-pip.py $(CROSSENV_DEFAULT_PIP) --no-setuptools --no-wheel --disable-pip-version-check ; \ + $(MSG) $$(which python) $(CROSSENV_PATH)/build/get-pip.py $(CROSSENV_DEFAULT_PIP) --no-setuptools --no-wheel --disable-pip-version-check ; \ + $(RUN) $$(which python) $(CROSSENV_PATH)/build/get-pip.py $(CROSSENV_DEFAULT_PIP) --no-setuptools --no-wheel --disable-pip-version-check @. $(CROSSENV_PATH)/bin/activate ; \ - build-pip --disable-pip-version-check install $(CROSSENV_DEFAULT_SETUPTOOLS) $(CROSSENV_DEFAULT_WHEEL) ; \ - pip --disable-pip-version-check install $(CROSSENV_DEFAULT_SETUPTOOLS) $(CROSSENV_DEFAULT_WHEEL) + $(MSG) $$(which build-pip) --disable-pip-version-check install $(CROSSENV_DEFAULT_SETUPTOOLS) $(CROSSENV_DEFAULT_WHEEL) ; \ + $(RUN) $$(which build-pip) --disable-pip-version-check install $(CROSSENV_DEFAULT_SETUPTOOLS) $(CROSSENV_DEFAULT_WHEEL) ; \ + $(MSG) $$(which pip) --disable-pip-version-check install $(CROSSENV_DEFAULT_SETUPTOOLS) $(CROSSENV_DEFAULT_WHEEL) ; \ + $(RUN) $$(which pip) --disable-pip-version-check install $(CROSSENV_DEFAULT_SETUPTOOLS) $(CROSSENV_DEFAULT_WHEEL) + @$(MSG) [$(CROSSENV_PATH)] Processing $(CROSSENV_BUILD_REQUIREMENTS) @. $(CROSSENV_PATH)/bin/activate ; \ - while IFS= read -r requirement ; do \ - $(MSG) [$(CROSSENV_PATH)] Processing $${requirement} ; \ - build-pip --disable-pip-version-check install $${requirement} ; \ - pip --disable-pip-version-check install $${requirement} ; \ - done < <(grep -sv -e "^\#" -e "^\$$" $(CROSSENV_BUILD_REQUIREMENTS)) - @. $(CROSSENV_PATH)/bin/activate ; \ - $(MSG) "Package list for $(CROSSENV_PATH):" ; \ - pip freeze + $(MSG) $$(which build-pip) --disable-pip-version-check install -r $(CROSSENV_BUILD_REQUIREMENTS) ; \ + $(RUN) $$(which build-pip) --disable-pip-version-check install -r $(CROSSENV_BUILD_REQUIREMENTS) ; \ + $(MSG) $$(which pip) --disable-pip-version-check install -r $(CROSSENV_BUILD_REQUIREMENTS) ; \ + $(RUN) $$(which pip) --disable-pip-version-check install -r $(CROSSENV_BUILD_REQUIREMENTS) #ifneq ($(PYTHON_LIB_NATIVE),$(PYTHON_LIB_CROSS)) # cp $(PYTHON_LIB_CROSS)/_sysconfigdata_*.py $(PYTHON_LIB_NATIVE)/_sysconfigdata.py #endif + @. $(CROSSENV_PATH)/bin/activate ; \ + $(MSG) "Package list for $(CROSSENV_PATH):" ; \ + $(MSG) $$(which pip) freeze ; \ + $(RUN) $$(which pip) freeze endif $(CROSSENV_PATH)/build/python-cc.mk: From ce093fa98343719782f79e614b70fa758e9703f8 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Wed, 13 Nov 2024 01:40:14 +0000 Subject: [PATCH 024/130] crossenv/requirements-default.txt: Update to latest wheel versions --- mk/crossenv/requirements-default.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mk/crossenv/requirements-default.txt b/mk/crossenv/requirements-default.txt index d85e19dc3cf..8956b9adfc3 100644 --- a/mk/crossenv/requirements-default.txt +++ b/mk/crossenv/requirements-default.txt @@ -1,12 +1,12 @@ pip==24.3.1 pip-tools==7.4.1 -setuptools==75.3.0 -wheel==0.44.0 +setuptools==75.4.0 +wheel==0.45.0 # cffi==1.17.1 -cryptography==43.0.1 +cryptography==43.0.3 Cython==3.0.11 -flit==3.9.0 +flit==3.10.1 maturin==1.7.4 #meson-python==0.17.1 poetry==1.8.4 From 94f85b1cb4c6c9f4c6924437ac34513c5d2d1f61 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Wed, 13 Nov 2024 01:55:22 +0000 Subject: [PATCH 025/130] spk.mk: Add a crossenvclean clean-up option --- mk/spksrc.spk.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mk/spksrc.spk.mk b/mk/spksrc.spk.mk index a8ca162ecb3..25f8e6845fd 100644 --- a/mk/spksrc.spk.mk +++ b/mk/spksrc.spk.mk @@ -557,6 +557,9 @@ wheelcleancache: wheelclean wheelcleanall: wheelcleancache rm -fr ../../distrib/pip +crossenvclean: wheelcleanall + rm -fr work-*/crossenv* + pythonclean: wheelcleanall rm -fr work-*/.[Pp]ython*-install_done \ rm -fr work-*/crossenv From 3d323f84383ae28cec57e9d1fad790e99fdebf4f Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Thu, 14 Nov 2024 01:01:43 +0000 Subject: [PATCH 026/130] python.mk + crossenv.mk: Functional versions --- mk/spksrc.crossenv.mk | 63 +++++++++++++++++++++++++++++++------------ mk/spksrc.python.mk | 21 +++++---------- 2 files changed, 52 insertions(+), 32 deletions(-) diff --git a/mk/spksrc.crossenv.mk b/mk/spksrc.crossenv.mk index 89e7ddfe1e7..b02383f2ce9 100644 --- a/mk/spksrc.crossenv.mk +++ b/mk/spksrc.crossenv.mk @@ -63,13 +63,24 @@ endif #### -# python-cc.mk -PYTHON_WORK_DIR = $(wildcard $(or $(PYTHON_PACKAGE_ROOT),$(WORK_DIR))) +# Defined using PYTHON_PACKAGE_WORK_DIR from spksrc.python.mk or use local work directory +PYTHON_WORK_DIR = $(wildcard $(or $(PYTHON_PACKAGE_WORK_DIR),$(WORK_DIR))) + +# Defined using current install prefix by replacing package name using PYTHON_PACKAGE from spksrc.python.mk, else use local install prefix ifneq ($(PYTHON_PACKAGE),) PYTHON_INSTALL_PREFIX = $(subst $(SPK_NAME),$(PYTHON_PACKAGE),$(INSTALL_PREFIX)) else PYTHON_INSTALL_PREFIX = $(INSTALL_PREFIX) endif + +# Equivalent to STAGING_INSTALL_PREFIX relative to found python install +ifeq ($(PYTHON_STAGING_PREFIX),) +PYTHON_STAGING_PREFIX = $(PYTHON_WORK_DIR)/install/$(PYTHON_INSTALL_PREFIX) +endif + +## +## python-cc.mk +## PYTHON_PKG_VERS = $(lastword $(subst -, ,$(wildcard $(PYTHON_WORK_DIR)/Python-*))) PYTHON_PKG_VERS_MAJOR_MINOR = $(word 1,$(subst ., ,$(PYTHON_PKG_VERS))).$(word 2,$(subst ., ,$(PYTHON_PKG_VERS))) PYTHON_PKG_NAME = python$(subst .,,$(PYTHON_PKG_VERS_MAJOR_MINOR)) @@ -81,15 +92,28 @@ PIP_NATIVE = $(abspath $(WORK_DIR)/../../../native/$(PYTHON_PKG_NAME)/work-nativ HOSTPYTHON = $(abspath $(PYTHON_WORK_DIR)/$(PYTHON_PKG_DIR)/hostpython) HOSTPYTHON_LIB_NATIVE = $(abspath $(WORK_DIR)/../../../native/$(PYTHON_PKG_NAME)/work-native/$(PYTHON_PKG_DIR)/build/lib.linux-$(HOST_ARCH)-$(PYTHON_PKG_VERS_MAJOR_MINOR)) PYTHON_LIB_NATIVE = $(abspath $(PYTHON_WORK_DIR)/$(PYTHON_PKG_DIR)/build/lib.linux-$(HOST_ARCH)-$(PYTHON_PKG_VERS_MAJOR_MINOR)) +PYTHON_LIB_CROSS = $(abspath $(PYTHON_WORK_DIR)/$(PYTHON_PKG_DIR)/build/lib.linux-$(BUILD_ARCH)-$(PYTHON_PKG_VERS_MAJOR_MINOR)) PYTHON_SITE_PACKAGES_NATIVE = $(abspath $(WORK_DIR)/../../../native/$(PYTHON_PKG_NAME)/work-native/install/usr/local/lib/python$(PYTHON_PKG_VERS_MAJOR_MINOR)/site-packages) -PYTHON_LIB_CROSS = $(CROSSENV_PATH)/build/lib.linux-$(BUILD_ARCH)-$(PYTHON_PKG_VERS_MAJOR_MINOR) PYTHON_LIB_DIR = lib/python$(PYTHON_PKG_VERS_MAJOR_MINOR) PYTHON_INC_DIR = include/python$(PYTHON_PKG_VERS_MAJOR_MINOR) +# set PYTHONPATH for spksrc.python-module.mk +export PYTHONPATH = $(PYTHON_LIB_NATIVE):$(PYTHON_STAGING_PREFIX)/lib/python$(PYTHON_PKG_VERS_MAJOR_MINOR)/site-packages/ + +# Required so native python and maturin binaries can always be found +export PATH := $(abspath $(WORK_DIR)/../../../native/$(PYTHON_PKG_NAME)/work-native/install/usr/local/bin):$(PATH) +export LD_LIBRARY_PATH := $(abspath $(WORK_DIR)/../../../native/$(PYTHON_PKG_NAME)/work-native/install/usr/local/lib):$(LD_LIBRARY_PATH) + ### # Create the crossenv in preparation for # cross-compiling all the necessary wheels +# +# To validate crossenv parameters: +# $ work--/crossenv/cross/bin/python +# >>> import sys +# >>> sys.path +# .PHONY: crossenv ifneq ($(wildcard $(CROSSENV_PATH)),) build-crossenv: @@ -99,9 +123,9 @@ build-crossenv: SHELL:=/bin/bash build-crossenv: $(CROSSENV_PATH)/build/python-cc.mk @$(MSG) crossenv wheel packages: $(CROSSENV_DEFAULT_PIP), $(CROSSENV_DEFAULT_SETUPTOOLS), $(CROSSENV_DEFAULT_WHEEL) @$(MSG) crossenv requirements file = $(CROSSENV_BUILD_REQUIREMENTS) - mkdir -p "$(PYTHON_LIB_CROSS)" - cp -RL $(HOSTPYTHON_LIB_NATIVE) "$(abspath $(PYTHON_LIB_CROSS)/../)" - @echo $(PYTHON_NATIVE) -m crossenv $(PYTHON_WORK_DIR)/install/$(PYTHON_INSTALL_PREFIX)/bin/python$(PYTHON_PKG_VERS_MAJOR_MINOR) \ + mkdir -p $(PYTHON_LIB_CROSS) + cp -RL $(HOSTPYTHON_LIB_NATIVE) $(abspath $(PYTHON_LIB_CROSS)/../) + @echo $(PYTHON_NATIVE) -m crossenv $(abspath $(PYTHON_WORK_DIR)/install/$(PYTHON_INSTALL_PREFIX)/bin/python$(PYTHON_PKG_VERS_MAJOR_MINOR)) \ --cc $(TC_PATH)$(TC_PREFIX)gcc \ --cxx $(TC_PATH)$(TC_PREFIX)c++ \ --ar $(TC_PATH)$(TC_PREFIX)ar \ @@ -109,7 +133,7 @@ build-crossenv: $(CROSSENV_PATH)/build/python-cc.mk --env LIBRARY_PATH= \ --manylinux manylinux2014 \ "$(CROSSENV_PATH)" - @$(RUN) $(PYTHON_NATIVE) -m crossenv $(PYTHON_WORK_DIR)/install/$(PYTHON_INSTALL_PREFIX)/bin/python$(PYTHON_PKG_VERS_MAJOR_MINOR) \ + @$(RUN) $(PYTHON_NATIVE) -m crossenv $(abspath $(PYTHON_WORK_DIR)/install/$(PYTHON_INSTALL_PREFIX)/bin/python$(PYTHON_PKG_VERS_MAJOR_MINOR)) \ --cc $(TC_PATH)$(TC_PREFIX)gcc \ --cxx $(TC_PATH)$(TC_PREFIX)c++ \ --ar $(TC_PATH)$(TC_PREFIX)ar \ @@ -119,33 +143,34 @@ build-crossenv: $(CROSSENV_PATH)/build/python-cc.mk "$(CROSSENV_PATH)" ifeq ($(CROSSENV_BUILD_WHEEL),default) @$(MSG) Setting default crossenv $(CROSSENV_PATH) - @$(RUN) ln -s crossenv-default crossenv + @$(MSG) ln -sf crossenv-default $(WORK_DIR)/crossenv + @$(RUN) ln -sf crossenv-default $(WORK_DIR)/crossenv endif @$(RUN) wget --no-verbose https://bootstrap.pypa.io/get-pip.py --directory-prefix=$(CROSSENV_PATH)/build ; \ $(RUN) chmod 755 $(CROSSENV_PATH)/build/get-pip.py @. $(CROSSENV_PATH)/bin/activate ; \ $(MSG) $$(which build-python) $(CROSSENV_PATH)/build/get-pip.py $(CROSSENV_DEFAULT_PIP) --no-setuptools --no-wheel --disable-pip-version-check ; \ $(RUN) $$(which build-python) $(CROSSENV_PATH)/build/get-pip.py $(CROSSENV_DEFAULT_PIP) --no-setuptools --no-wheel --disable-pip-version-check ; \ - $(MSG) $$(which python) $(CROSSENV_PATH)/build/get-pip.py $(CROSSENV_DEFAULT_PIP) --no-setuptools --no-wheel --disable-pip-version-check ; \ - $(RUN) $$(which python) $(CROSSENV_PATH)/build/get-pip.py $(CROSSENV_DEFAULT_PIP) --no-setuptools --no-wheel --disable-pip-version-check + $(MSG) $$(which cross-python) $(CROSSENV_PATH)/build/get-pip.py $(CROSSENV_DEFAULT_PIP) --no-setuptools --no-wheel --disable-pip-version-check ; \ + $(RUN) $$(which cross-python) $(CROSSENV_PATH)/build/get-pip.py $(CROSSENV_DEFAULT_PIP) --no-setuptools --no-wheel --disable-pip-version-check @. $(CROSSENV_PATH)/bin/activate ; \ $(MSG) $$(which build-pip) --disable-pip-version-check install $(CROSSENV_DEFAULT_SETUPTOOLS) $(CROSSENV_DEFAULT_WHEEL) ; \ $(RUN) $$(which build-pip) --disable-pip-version-check install $(CROSSENV_DEFAULT_SETUPTOOLS) $(CROSSENV_DEFAULT_WHEEL) ; \ - $(MSG) $$(which pip) --disable-pip-version-check install $(CROSSENV_DEFAULT_SETUPTOOLS) $(CROSSENV_DEFAULT_WHEEL) ; \ - $(RUN) $$(which pip) --disable-pip-version-check install $(CROSSENV_DEFAULT_SETUPTOOLS) $(CROSSENV_DEFAULT_WHEEL) + $(MSG) $$(which cross-pip) --disable-pip-version-check install $(CROSSENV_DEFAULT_SETUPTOOLS) $(CROSSENV_DEFAULT_WHEEL) ; \ + $(RUN) $$(which cross-pip) --disable-pip-version-check install $(CROSSENV_DEFAULT_SETUPTOOLS) $(CROSSENV_DEFAULT_WHEEL) @$(MSG) [$(CROSSENV_PATH)] Processing $(CROSSENV_BUILD_REQUIREMENTS) @. $(CROSSENV_PATH)/bin/activate ; \ $(MSG) $$(which build-pip) --disable-pip-version-check install -r $(CROSSENV_BUILD_REQUIREMENTS) ; \ $(RUN) $$(which build-pip) --disable-pip-version-check install -r $(CROSSENV_BUILD_REQUIREMENTS) ; \ - $(MSG) $$(which pip) --disable-pip-version-check install -r $(CROSSENV_BUILD_REQUIREMENTS) ; \ - $(RUN) $$(which pip) --disable-pip-version-check install -r $(CROSSENV_BUILD_REQUIREMENTS) + $(MSG) $$(which cross-pip) --disable-pip-version-check install -r $(CROSSENV_BUILD_REQUIREMENTS) ; \ + $(RUN) $$(which cross-pip) --disable-pip-version-check install -r $(CROSSENV_BUILD_REQUIREMENTS) #ifneq ($(PYTHON_LIB_NATIVE),$(PYTHON_LIB_CROSS)) # cp $(PYTHON_LIB_CROSS)/_sysconfigdata_*.py $(PYTHON_LIB_NATIVE)/_sysconfigdata.py #endif @. $(CROSSENV_PATH)/bin/activate ; \ $(MSG) "Package list for $(CROSSENV_PATH):" ; \ - $(MSG) $$(which pip) freeze ; \ - $(RUN) $$(which pip) freeze + $(MSG) $$(which cross-pip) list ; \ + $(RUN) $$(which cross-pip) list endif $(CROSSENV_PATH)/build/python-cc.mk: @@ -157,10 +182,14 @@ $(CROSSENV_PATH)/build/python-cc.mk: @echo PYTHON_LIB_NATIVE=$(PYTHON_LIB_NATIVE) >> $@ @echo PYTHON_LIB_CROSS=$(PYTHON_LIB_CROSS) >> $@ @echo PYTHON_SITE_PACKAGES_NATIVE=$(PYTHON_SITE_PACKAGES_NATIVE) >> $@ - @echo PYTHON_INTERPRETER=$(INSTALL_PREFIX)/bin/python$(PYTHON_PKG_VERS_MAJOR_MINOR) >> $@ + @echo PYTHON_INTERPRETER=$(PYTHON_INSTALL_PREFIX)/bin/python$(PYTHON_PKG_VERS_MAJOR_MINOR) >> $@ @echo PYTHON_VERSION=$(PYTHON_PKG_VERS_MAJOR_MINOR) >> $@ @echo PYTHON_LIB_DIR=$(PYTHON_LIB_DIR) >> $@ @echo PYTHON_INC_DIR=$(PYTHON_INC_DIR) >> $@ + @echo PYO3_CROSS_LIB_DIR=$(abspath $(PYTHON_STAGING_PREFIX)/lib) >> $@ + @echo PYO3_CROSS_INCLUDE_DIR=$(abspath $(PYTHON_STAGING_PREFIX)/include) >> $@ + @echo OPENSSL_LIB_DIR=$(abspath $(PYTHON_STAGING_PREFIX)/lib) >> $@ + @echo OPENSSL_INCLUDE_DIR=$(abspath $(PYTHON_STAGING_PREFIX)/include) >> $@ @echo PIP=$(PIP_NATIVE) >> $@ @echo CROSS_COMPILE_WHEELS=1 >> $@ @echo ADDITIONAL_WHEEL_BUILD_ARGS=--no-build-isolation >> $@ diff --git a/mk/spksrc.python.mk b/mk/spksrc.python.mk index 456fb93f29c..06a19dddda4 100644 --- a/mk/spksrc.python.mk +++ b/mk/spksrc.python.mk @@ -5,11 +5,11 @@ # PYTHON_PACKAGE Must be set to the python spk folder (python310, python311, ...) # set default spk/python* path to use -PYTHON_PACKAGE_ROOT = $(realpath $(CURDIR)/../../spk/$(PYTHON_PACKAGE)/work-$(ARCH)-$(TCVERSION)) +PYTHON_PACKAGE_WORK_DIR = $(realpath $(CURDIR)/../../spk/$(PYTHON_PACKAGE)/work-$(ARCH)-$(TCVERSION)) include ../../mk/spksrc.archs.mk -ifneq ($(wildcard $(PYTHON_PACKAGE_ROOT)),) +ifneq ($(wildcard $(PYTHON_PACKAGE_WORK_DIR)),) # Export the python package variable so it is usable in cross/* export PYTHON_PACKAGE @@ -17,7 +17,7 @@ export PYTHON_PACKAGE # Set Python installtion prefix directory variables ifeq ($(strip $(PYTHON_STAGING_PREFIX)),) export PYTHON_PREFIX = /var/packages/$(PYTHON_PACKAGE)/target -export PYTHON_STAGING_PREFIX = $(realpath $(PYTHON_PACKAGE_ROOT)/install/$(PYTHON_PREFIX)) +export PYTHON_STAGING_PREFIX = $(realpath $(PYTHON_PACKAGE_WORK_DIR)/install/$(PYTHON_PREFIX)) endif # Set OpenSSL installtion prefix directory variables @@ -40,23 +40,14 @@ export ADDITIONAL_LDFLAGS += -L$(OPENSSL_STAGING_PREFIX)/lib export ADDITIONAL_LDFLAGS += -Wl,--rpath-link,$(OPENSSL_STAGING_PREFIX)/lib -Wl,--rpath,$(OPENSSL_PREFIX)/lib endif -# Mandatory PYO3_* variables for rust cross-compiling -export PYO3_CROSS_LIB_DIR = $(STAGING_INSTALL_PREFIX)/lib/ -export PYO3_CROSS_INCLUDE_DIR = $(STAGING_INSTALL_PREFIX)/include/ -# Mandatory of using OPENSSL_*_DIR starting with -# cryptography version >= 40 -# https://docs.rs/openssl/latest/openssl/#automatic -export OPENSSL_LIB_DIR = $(STAGING_INSTALL_PREFIX)/lib/ -export OPENSSL_INCLUDE_DIR = $(STAGING_INSTALL_PREFIX)/include/ - # set PYTHONPATH for spksrc.python-module.mk -PYTHONPATH = $(PYTHON_SITE_PACKAGES_NATIVE):$(PYTHON_LIB_NATIVE):$(PYTHON_STAGING_PREFIX)/lib/python$(PYTHON_VERSION)/site-packages/ +#PYTHONPATH = $(PYTHON_SITE_PACKAGES_NATIVE):$(PYTHON_LIB_NATIVE):$(PYTHON_STAGING_PREFIX)/lib/python$(PYTHON_VERSION)/site-packages/ # Re-use all default python mandatory libraries PYTHON_LIBS := $(wildcard $(PYTHON_STAGING_PREFIX)/lib/pkgconfig/*.pc) # Re-use all python dependencies and mark as already done -PYTHON_DEPENDS := $(foreach cross,$(foreach pkg_name,$(shell $(MAKE) dependency-list -C $(realpath $(PYTHON_PACKAGE_ROOT)/../) 2>/dev/null | grep ^$(PYTHON_PACKAGE) | cut -f2 -d:),$(shell sed -n 's/^PKG_NAME = \(.*\)/\1/p' $(realpath $(CURDIR)/../../$(pkg_name)/Makefile))),$(wildcard $(PYTHON_PACKAGE_ROOT)/.$(cross)-*_done)) +PYTHON_DEPENDS := $(foreach cross,$(foreach pkg_name,$(shell $(MAKE) dependency-list -C $(realpath $(PYTHON_PACKAGE_WORK_DIR)/../) 2>/dev/null | grep ^$(PYTHON_PACKAGE) | cut -f2 -d:),$(shell sed -n 's/^PKG_NAME = \(.*\)/\1/p' $(realpath $(CURDIR)/../../$(pkg_name)/Makefile))),$(wildcard $(PYTHON_PACKAGE_WORK_DIR)/.$(cross)-*_done)) # call-up pre-depend to prepare the shared python build environment PRE_DEPEND_TARGET = python_pre_depend @@ -76,7 +67,7 @@ include ../../mk/spksrc.spk.mk python_pre_depend: @$(MSG) "*****************************************************" @$(MSG) "*** Use existing shared objects from python $(PYTHON_VERSION)" - @$(MSG) "*** PATH: $(PYTHON_PACKAGE_ROOT)" + @$(MSG) "*** PATH: $(PYTHON_PACKAGE_WORK_DIR)" @$(MSG) "*****************************************************" @mkdir -p $(STAGING_INSTALL_PREFIX)/lib/pkgconfig/ @$(foreach lib,$(PYTHON_LIBS),ln -sf $(lib) $(STAGING_INSTALL_PREFIX)/lib/pkgconfig/ ;) From 7e6f9c03a14f10cbbf48e05d7d16d2737e261d43 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Thu, 14 Nov 2024 01:37:12 +0000 Subject: [PATCH 027/130] python.mk: Further clean-up and removal of duplicate variables --- mk/spksrc.crossenv.mk | 24 +++++++++++++++++------- mk/spksrc.python.mk | 22 +++++++++++----------- mk/spksrc.wheel-env.mk | 14 ++------------ 3 files changed, 30 insertions(+), 30 deletions(-) diff --git a/mk/spksrc.crossenv.mk b/mk/spksrc.crossenv.mk index b02383f2ce9..45816de21ef 100644 --- a/mk/spksrc.crossenv.mk +++ b/mk/spksrc.crossenv.mk @@ -74,8 +74,8 @@ PYTHON_INSTALL_PREFIX = $(INSTALL_PREFIX) endif # Equivalent to STAGING_INSTALL_PREFIX relative to found python install -ifeq ($(PYTHON_STAGING_PREFIX),) -PYTHON_STAGING_PREFIX = $(PYTHON_WORK_DIR)/install/$(PYTHON_INSTALL_PREFIX) +ifeq ($(PYTHON_STAGING_INSTALL_PREFIX),) +PYTHON_STAGING_INSTALL_PREFIX = $(PYTHON_WORK_DIR)/install/$(PYTHON_INSTALL_PREFIX) endif ## @@ -97,8 +97,18 @@ PYTHON_SITE_PACKAGES_NATIVE = $(abspath $(WORK_DIR)/../../../native/$(PYTHON_PKG PYTHON_LIB_DIR = lib/python$(PYTHON_PKG_VERS_MAJOR_MINOR) PYTHON_INC_DIR = include/python$(PYTHON_PKG_VERS_MAJOR_MINOR) +# Mandatory for rustc wheel building within crossenv +# --> Using python-cc.mk defined variable for cross-compiling wheels +export PYO3_CROSS_LIB_DIR = $(PYTHON_STAGING_INSTALL_PREFIX)/lib/ +export PYO3_CROSS_INCLUDE_DIR = $(PYTHON_STAGING_INSTALL_PREFIX)/include/ +# Mandatory of using OPENSSL_*_DIR starting with +# cryptography version >= 40 +# https://docs.rs/openssl/latest/openssl/#automatic +export OPENSSL_LIB_DIR = $(OPENSSL_STAGING_PREFIX)/lib/ +export OPENSSL_INCLUDE_DIR = $(OPENSSL_STAGING_PREFIX)/include/ + # set PYTHONPATH for spksrc.python-module.mk -export PYTHONPATH = $(PYTHON_LIB_NATIVE):$(PYTHON_STAGING_PREFIX)/lib/python$(PYTHON_PKG_VERS_MAJOR_MINOR)/site-packages/ +export PYTHONPATH = $(PYTHON_LIB_NATIVE):$(PYTHON_STAGING_INSTALL_PREFIX)/lib/python$(PYTHON_PKG_VERS_MAJOR_MINOR)/site-packages/ # Required so native python and maturin binaries can always be found export PATH := $(abspath $(WORK_DIR)/../../../native/$(PYTHON_PKG_NAME)/work-native/install/usr/local/bin):$(PATH) @@ -186,10 +196,10 @@ $(CROSSENV_PATH)/build/python-cc.mk: @echo PYTHON_VERSION=$(PYTHON_PKG_VERS_MAJOR_MINOR) >> $@ @echo PYTHON_LIB_DIR=$(PYTHON_LIB_DIR) >> $@ @echo PYTHON_INC_DIR=$(PYTHON_INC_DIR) >> $@ - @echo PYO3_CROSS_LIB_DIR=$(abspath $(PYTHON_STAGING_PREFIX)/lib) >> $@ - @echo PYO3_CROSS_INCLUDE_DIR=$(abspath $(PYTHON_STAGING_PREFIX)/include) >> $@ - @echo OPENSSL_LIB_DIR=$(abspath $(PYTHON_STAGING_PREFIX)/lib) >> $@ - @echo OPENSSL_INCLUDE_DIR=$(abspath $(PYTHON_STAGING_PREFIX)/include) >> $@ + @echo PYO3_CROSS_LIB_DIR=$(abspath $(PYTHON_STAGING_INSTALL_PREFIX)/lib) >> $@ + @echo PYO3_CROSS_INCLUDE_DIR=$(abspath $(PYTHON_STAGING_INSTALL_PREFIX)/include) >> $@ + @echo OPENSSL_LIB_DIR=$(abspath $(PYTHON_STAGING_INSTALL_PREFIX)/lib) >> $@ + @echo OPENSSL_INCLUDE_DIR=$(abspath $(PYTHON_STAGING_INSTALL_PREFIX)/include) >> $@ @echo PIP=$(PIP_NATIVE) >> $@ @echo CROSS_COMPILE_WHEELS=1 >> $@ @echo ADDITIONAL_WHEEL_BUILD_ARGS=--no-build-isolation >> $@ diff --git a/mk/spksrc.python.mk b/mk/spksrc.python.mk index 06a19dddda4..3092c9cf024 100644 --- a/mk/spksrc.python.mk +++ b/mk/spksrc.python.mk @@ -15,36 +15,36 @@ ifneq ($(wildcard $(PYTHON_PACKAGE_WORK_DIR)),) export PYTHON_PACKAGE # Set Python installtion prefix directory variables -ifeq ($(strip $(PYTHON_STAGING_PREFIX)),) +ifeq ($(strip $(PYTHON_STAGING_INSTALL_PREFIX)),) export PYTHON_PREFIX = /var/packages/$(PYTHON_PACKAGE)/target -export PYTHON_STAGING_PREFIX = $(realpath $(PYTHON_PACKAGE_WORK_DIR)/install/$(PYTHON_PREFIX)) +export PYTHON_STAGING_INSTALL_PREFIX = $(realpath $(PYTHON_PACKAGE_WORK_DIR)/install/$(PYTHON_PREFIX)) endif # Set OpenSSL installtion prefix directory variables ifeq ($(strip $(OPENSSL_STAGING_PREFIX)),) export OPENSSL_PREFIX = $(PYTHON_PREFIX) -export OPENSSL_STAGING_PREFIX = $(PYTHON_STAGING_PREFIX) +export OPENSSL_STAGING_PREFIX = $(PYTHON_STAGING_INSTALL_PREFIX) endif # set build flags including ld to rewrite for the library path # used to access python package provide libraries at destination -export ADDITIONAL_CFLAGS += -I$(PYTHON_STAGING_PREFIX)/include -export ADDITIONAL_CPPFLAGS += -I$(PYTHON_STAGING_PREFIX)/include -export ADDITIONAL_CXXFLAGS += -I$(PYTHON_STAGING_PREFIX)/include -export ADDITIONAL_LDFLAGS += -L$(PYTHON_STAGING_PREFIX)/lib -export ADDITIONAL_LDFLAGS += -Wl,--rpath-link,$(PYTHON_STAGING_PREFIX)/lib -Wl,--rpath,$(PYTHON_PREFIX)/lib +export ADDITIONAL_CFLAGS += -I$(PYTHON_STAGING_INSTALL_PREFIX)/include +export ADDITIONAL_CPPFLAGS += -I$(PYTHON_STAGING_INSTALL_PREFIX)/include +export ADDITIONAL_CXXFLAGS += -I$(PYTHON_STAGING_INSTALL_PREFIX)/include +export ADDITIONAL_LDFLAGS += -L$(PYTHON_STAGING_INSTALL_PREFIX)/lib +export ADDITIONAL_LDFLAGS += -Wl,--rpath-link,$(PYTHON_STAGING_INSTALL_PREFIX)/lib -Wl,--rpath,$(PYTHON_PREFIX)/lib # similarly, ld to rewrite OpenSSL library path if differs -ifneq ($(OPENSSL_STAGING_PREFIX),$(PYTHON_STAGING_PREFIX)) +ifneq ($(OPENSSL_STAGING_PREFIX),$(PYTHON_STAGING_INSTALL_PREFIX)) export ADDITIONAL_LDFLAGS += -L$(OPENSSL_STAGING_PREFIX)/lib export ADDITIONAL_LDFLAGS += -Wl,--rpath-link,$(OPENSSL_STAGING_PREFIX)/lib -Wl,--rpath,$(OPENSSL_PREFIX)/lib endif # set PYTHONPATH for spksrc.python-module.mk -#PYTHONPATH = $(PYTHON_SITE_PACKAGES_NATIVE):$(PYTHON_LIB_NATIVE):$(PYTHON_STAGING_PREFIX)/lib/python$(PYTHON_VERSION)/site-packages/ +#PYTHONPATH = $(PYTHON_SITE_PACKAGES_NATIVE):$(PYTHON_LIB_NATIVE):$(PYTHON_STAGING_INSTALL_PREFIX)/lib/python$(PYTHON_VERSION)/site-packages/ # Re-use all default python mandatory libraries -PYTHON_LIBS := $(wildcard $(PYTHON_STAGING_PREFIX)/lib/pkgconfig/*.pc) +PYTHON_LIBS := $(wildcard $(PYTHON_STAGING_INSTALL_PREFIX)/lib/pkgconfig/*.pc) # Re-use all python dependencies and mark as already done PYTHON_DEPENDS := $(foreach cross,$(foreach pkg_name,$(shell $(MAKE) dependency-list -C $(realpath $(PYTHON_PACKAGE_WORK_DIR)/../) 2>/dev/null | grep ^$(PYTHON_PACKAGE) | cut -f2 -d:),$(shell sed -n 's/^PKG_NAME = \(.*\)/\1/p' $(realpath $(CURDIR)/../../$(pkg_name)/Makefile))),$(wildcard $(PYTHON_PACKAGE_WORK_DIR)/.$(cross)-*_done)) diff --git a/mk/spksrc.wheel-env.mk b/mk/spksrc.wheel-env.mk index c1dff9b7bf6..774455fcb8c 100644 --- a/mk/spksrc.wheel-env.mk +++ b/mk/spksrc.wheel-env.mk @@ -6,8 +6,8 @@ include ../../mk/spksrc.cross-rust-env.mk # set PYTHON_*_PREFIX if unset -ifeq ($(strip $(PYTHON_STAGING_PREFIX)),) -PYTHON_STAGING_PREFIX = $(STAGING_INSTALL_PREFIX) +ifeq ($(strip $(PYTHON_STAGING_INSTALL_PREFIX)),) +PYTHON_STAGING_INSTALL_PREFIX = $(STAGING_INSTALL_PREFIX) PYTHON_PREFIX = $(INSTALL_PREFIX) endif @@ -17,16 +17,6 @@ OPENSSL_STAGING_PREFIX = $(STAGING_INSTALL_PREFIX) OPENSSL_PREFIX = $(INSTALL_PREFIX) endif -# Mandatory for rustc wheel building -ENV += PYO3_CROSS_LIB_DIR=$(PYTHON_STAGING_PREFIX)/lib/ -ENV += PYO3_CROSS_INCLUDE_DIR=$(PYTHON_STAGING_PREFIX)/include/ - -# Mandatory of using OPENSSL_*_DIR starting with -# cryptography version >= 40 -# https://docs.rs/openssl/latest/openssl/#automatic -ENV += OPENSSL_LIB_DIR=$(OPENSSL_STAGING_PREFIX)/lib/ -ENV += OPENSSL_INCLUDE_DIR=$(OPENSSL_STAGING_PREFIX)/include/ - # Enable pure-python packaging ifeq ($(strip $(WHEELS_PURE_PYTHON_PACKAGING_ENABLE)),) WHEELS_PURE_PYTHON_PACKAGING_ENABLE = FALSE From 7fd2f0bb75379c43d7256fcba79ac16e3fbba586 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Thu, 14 Nov 2024 01:42:29 +0000 Subject: [PATCH 028/130] py311-312-312: Update pure requirements to latest versions --- spk/python310/src/requirements-pure.txt | 12 +++++----- spk/python311/src/requirements-pure.txt | 12 +++++----- spk/python313/src/requirements-pure.txt | 29 +++++++++++++++++++++++++ 3 files changed, 39 insertions(+), 14 deletions(-) create mode 100644 spk/python313/src/requirements-pure.txt diff --git a/spk/python310/src/requirements-pure.txt b/spk/python310/src/requirements-pure.txt index 1fade6b6191..91569720023 100644 --- a/spk/python310/src/requirements-pure.txt +++ b/spk/python310/src/requirements-pure.txt @@ -1,10 +1,8 @@ # basic default wheels # ==> Always install latest version (service-setup.sh:install_python_virtualenv) -pip==24.2 - -# Always match what's in cross/python310/Makefile -setuptools==68.1.2 -wheel==0.44.0 +pip==24.3.1 +setuptools==75.4.0 +wheel==0.45.0 # Always use latest version available # certifi==2024.8.30 @@ -14,12 +12,12 @@ certifi # to create their local virtualenv # in order to install wheels within # their running environment -virtualenv==20.26.6 +virtualenv==20.27.1 # Other mandatory wheels that # gets install by default as # basic dependencies of above -distlib==0.3.8 +distlib==0.3.9 filelock==3.16.1 platformdirs==4.3.6 six==1.16.0 diff --git a/spk/python311/src/requirements-pure.txt b/spk/python311/src/requirements-pure.txt index 5dedc5cf9b8..91569720023 100644 --- a/spk/python311/src/requirements-pure.txt +++ b/spk/python311/src/requirements-pure.txt @@ -1,10 +1,8 @@ # basic default wheels # ==> Always install latest version (service-setup.sh:install_python_virtualenv) -pip==24.2 - -# Always match what's in cross/python311/Makefile -setuptools==68.1.2 -wheel==0.44.0 +pip==24.3.1 +setuptools==75.4.0 +wheel==0.45.0 # Always use latest version available # certifi==2024.8.30 @@ -14,12 +12,12 @@ certifi # to create their local virtualenv # in order to install wheels within # their running environment -virtualenv==20.26.6 +virtualenv==20.27.1 # Other mandatory wheels that # gets install by default as # basic dependencies of above -distlib==0.3.8 +distlib==0.3.9 filelock==3.16.1 platformdirs==4.3.6 six==1.16.0 diff --git a/spk/python313/src/requirements-pure.txt b/spk/python313/src/requirements-pure.txt new file mode 100644 index 00000000000..91569720023 --- /dev/null +++ b/spk/python313/src/requirements-pure.txt @@ -0,0 +1,29 @@ +# basic default wheels +# ==> Always install latest version (service-setup.sh:install_python_virtualenv) +pip==24.3.1 +setuptools==75.4.0 +wheel==0.45.0 + +# Always use latest version available +# certifi==2024.8.30 +certifi + +# Mandatory for python application +# to create their local virtualenv +# in order to install wheels within +# their running environment +virtualenv==20.27.1 + +# Other mandatory wheels that +# gets install by default as +# basic dependencies of above +distlib==0.3.9 +filelock==3.16.1 +platformdirs==4.3.6 +six==1.16.0 + +## +## All configurations below are optional and +## are provided to demonstrate how to build +## various wheels. Uncoment to enable. +## From 7b7a376c2474d890e72176e60a4e1bebe9642f65 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Thu, 14 Nov 2024 01:49:06 +0000 Subject: [PATCH 029/130] py310-311-313: Further clean-up Makefile from unused variables --- cross/python310/Makefile | 9 +-------- cross/python311/Makefile | 9 +-------- cross/python313/Makefile | 9 +-------- 3 files changed, 3 insertions(+), 24 deletions(-) diff --git a/cross/python310/Makefile b/cross/python310/Makefile index e7a3f744f01..d36d44d0b80 100644 --- a/cross/python310/Makefile +++ b/cross/python310/Makefile @@ -76,16 +76,9 @@ INSTALL_TARGET = python310_install include ../../mk/spksrc.cross-cc.mk -PYTHON_NATIVE = $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/bin/python3 +PYTHON_NATIVE = $(abspath $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/bin/python3) HOSTPYTHON = $(WORK_DIR)/$(PKG_DIR)/hostpython -# Required so that the python3 binaries and libraries generated by native compilation -# take precedence over current environment python3 when generating -# target architecture resources -PATH := $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/bin:$(PATH) -LD_LIBRARY_PATH := $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/lib:$(LD_LIBRARY_PATH) -export PATH LD_LIBRARY_PATH - .PHONY: python310_post_patch python310_post_patch: $(RUN) sed -e 's#@INSTALL_PREFIX@#$(INSTALL_PREFIX)#' -i Lib/mimetypes.py diff --git a/cross/python311/Makefile b/cross/python311/Makefile index aa41f9653b4..5763504679d 100644 --- a/cross/python311/Makefile +++ b/cross/python311/Makefile @@ -76,16 +76,9 @@ INSTALL_TARGET = python311_install include ../../mk/spksrc.cross-cc.mk -PYTHON_NATIVE = $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/bin/python3 +PYTHON_NATIVE = $(abspath $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/bin/python3) HOSTPYTHON = $(WORK_DIR)/$(PKG_DIR)/hostpython -# Required so that the python3 binaries and libraries generated by native compilation -# take precedence over current environment python3 when generating -# target architecture resources -PATH := $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/bin:$(PATH) -LD_LIBRARY_PATH := $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/lib:$(LD_LIBRARY_PATH) -export PATH LD_LIBRARY_PATH - .PHONY: python311_post_patch python311_post_patch: $(RUN) sed -e 's#@INSTALL_PREFIX@#$(INSTALL_PREFIX)#' -i Lib/mimetypes.py diff --git a/cross/python313/Makefile b/cross/python313/Makefile index 6618abad9e1..1428893c718 100644 --- a/cross/python313/Makefile +++ b/cross/python313/Makefile @@ -76,16 +76,9 @@ INSTALL_TARGET = python313_install include ../../mk/spksrc.cross-cc.mk -PYTHON_NATIVE = $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/bin/python3 +PYTHON_NATIVE = $(abspath $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/bin/python3) HOSTPYTHON = $(WORK_DIR)/$(PKG_DIR)/hostpython -# Required so that the python3 binaries and libraries generated by native compilation -# take precedence over current environment python3 when generating -# target architecture resources -PATH := $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/bin:$(PATH) -LD_LIBRARY_PATH := $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/lib:$(LD_LIBRARY_PATH) -export PATH LD_LIBRARY_PATH - .PHONY: python313_post_patch python313_post_patch: $(RUN) sed -e 's#@INSTALL_PREFIX@#$(INSTALL_PREFIX)#' -i Lib/mimetypes.py From 112b1ac2769362bb1d28b9c608019c5c918ca4c9 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Thu, 14 Nov 2024 01:52:57 +0000 Subject: [PATCH 030/130] py310-311: No longer need to remove test folder --- spk/python310/Makefile | 2 -- spk/python311/Makefile | 2 -- 2 files changed, 4 deletions(-) diff --git a/spk/python310/Makefile b/spk/python310/Makefile index 1ffdbc8aac3..d511f713c7e 100644 --- a/spk/python310/Makefile +++ b/spk/python310/Makefile @@ -163,7 +163,5 @@ endif .PHONY: python310_extra_install python310_extra_install: - @$(MSG) - Remove test folder - rm -rf $(STAGING_DIR)/$(PYTHON_LIB_DIR)/test/ @$(MSG) - Remove compiled files from __pycache__ find $(STAGING_DIR)/$(PYTHON_LIB_DIR) -type f -regex '.*\.py[co]' -delete diff --git a/spk/python311/Makefile b/spk/python311/Makefile index 61a902c88d2..94b3fea3f88 100644 --- a/spk/python311/Makefile +++ b/spk/python311/Makefile @@ -42,7 +42,5 @@ include ../../mk/spksrc.spk.mk .PHONY: python311_extra_install python311_extra_install: - @$(MSG) - Remove test folder - rm -rf $(STAGING_DIR)/$(PYTHON_LIB_DIR)/test/ @$(MSG) - Remove compiled files from __pycache__ find $(STAGING_DIR)/$(PYTHON_LIB_DIR) -type f -regex '.*\.py[co]' -delete From a7fcf7b54e882c3576bd1a8d6bda94789591fc4f Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Thu, 14 Nov 2024 01:53:28 +0000 Subject: [PATCH 031/130] py313: Fix symlink creation --- spk/python313/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spk/python313/Makefile b/spk/python313/Makefile index a8740e0d9e5..b2430259855 100644 --- a/spk/python313/Makefile +++ b/spk/python313/Makefile @@ -36,7 +36,7 @@ PYTHON_LIB_DIR = lib/python$(SPK_VERS_MAJOR_MINOR) POST_STRIP_TARGET = python313_extra_install -SPK_USR_LOCAL_LINKS = bin:bin/python3.11 +SPK_USR_LOCAL_LINKS = bin:bin/python3.13 include ../../mk/spksrc.spk.mk From ff0671dcf118e39a4831b1c1cd028cc16e383d87 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Thu, 14 Nov 2024 02:07:41 +0000 Subject: [PATCH 032/130] crossenv.mk: Include missing OPENSSL_*_DIR --- mk/spksrc.crossenv.mk | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mk/spksrc.crossenv.mk b/mk/spksrc.crossenv.mk index 45816de21ef..b3c07ba548c 100644 --- a/mk/spksrc.crossenv.mk +++ b/mk/spksrc.crossenv.mk @@ -78,6 +78,12 @@ ifeq ($(PYTHON_STAGING_INSTALL_PREFIX),) PYTHON_STAGING_INSTALL_PREFIX = $(PYTHON_WORK_DIR)/install/$(PYTHON_INSTALL_PREFIX) endif +# set OPENSSL_*_PREFIX if unset +ifeq ($(strip $(OPENSSL_STAGING_PREFIX)),) +OPENSSL_STAGING_PREFIX = $(PYTHON_STAGING_INSTALL_PREFIX) +OPENSSL_PREFIX = $(PYTHON_INSTALL_PREFIX) +endif + ## ## python-cc.mk ## From fcc058d87babb32a6bb200f457faf5a05de91d02 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Thu, 14 Nov 2024 02:09:11 +0000 Subject: [PATCH 033/130] spk.mk: Update crossenvclean and add crossenvcleanall --- mk/spksrc.spk.mk | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mk/spksrc.spk.mk b/mk/spksrc.spk.mk index 25f8e6845fd..68222fc8a3d 100644 --- a/mk/spksrc.spk.mk +++ b/mk/spksrc.spk.mk @@ -557,7 +557,10 @@ wheelcleancache: wheelclean wheelcleanall: wheelcleancache rm -fr ../../distrib/pip -crossenvclean: wheelcleanall +crossenvclean: wheelclean + rm -fr work-*/crossenv* + +crossenvcleanall: wheelcleanall rm -fr work-*/crossenv* pythonclean: wheelcleanall From c41fc8472e5dd7defd839dbb116177775a11af8c Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Fri, 15 Nov 2024 14:07:41 +0000 Subject: [PATCH 034/130] spk.mk: crossenvclean remove cookie file --- mk/spksrc.spk.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mk/spksrc.spk.mk b/mk/spksrc.spk.mk index 68222fc8a3d..f97e6a48721 100644 --- a/mk/spksrc.spk.mk +++ b/mk/spksrc.spk.mk @@ -559,9 +559,9 @@ wheelcleanall: wheelcleancache crossenvclean: wheelclean rm -fr work-*/crossenv* + rm -fr work-*/.crossenv-*_done -crossenvcleanall: wheelcleanall - rm -fr work-*/crossenv* +crossenvcleanall: wheelcleanall crossenvclean pythonclean: wheelcleanall rm -fr work-*/.[Pp]ython*-install_done \ From cc5814e6755b4491a03b2e951432f88aa26b1d8a Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Fri, 15 Nov 2024 14:17:01 +0000 Subject: [PATCH 035/130] crossenv: Fix python version and use status cookie --- mk/spksrc.crossenv.mk | 99 ++++++++++++++++++++++++++++---------- mk/spksrc.python-module.mk | 5 +- mk/spksrc.wheel.mk | 6 +-- 3 files changed, 80 insertions(+), 30 deletions(-) diff --git a/mk/spksrc.crossenv.mk b/mk/spksrc.crossenv.mk index b3c07ba548c..86e00ed3159 100644 --- a/mk/spksrc.crossenv.mk +++ b/mk/spksrc.crossenv.mk @@ -1,14 +1,55 @@ +### crossenv rules +# Creates a crossenv for cross-compiling wheels. +# Uses "default" as fallback and create a symlink +# between $(WORK_DIR)/crossenv -> crossenv-default. +# Otherwise uses wheel -, then +# fallback to wheel only. +# It also generates a crossenv specific python-cc.mk +# located under $(WORK_DIR)/crossenv-/build. + +# Targets are executed in the following order: +# crossenv_msg_target +# pre_crossenv_target (override with PRE_CROSSENV_TARGET) +# build_crossenv_target (override with CROSSENV_TARGET) +# post_crossenv_target (override with POST_CROSSENV_TARGET) +# Variables: +# WHEELS List of wheels to go through + # Set default sheel to bash SHELL = /bin/bash -### +# Python spk/python* related variables +PYTHON_PKG_VERS = $(or $(lastword $(subst -, ,$(wildcard $(PYTHON_WORK_DIR)/Python-*))),$(SPK_VERS)) +PYTHON_PKG_VERS_MAJOR_MINOR = $(or $(word 1,$(subst ., ,$(PYTHON_PKG_VERS))).$(word 2,$(subst ., ,$(PYTHON_PKG_VERS))),$(SPK_VERS_MAJOR_MINOR)) +PYTHON_PKG_NAME = python$(subst .,,$(PYTHON_PKG_VERS_MAJOR_MINOR)) +PYTHON_PKG_DIR = Python-$(PYTHON_PKG_VERS) -# where the wheel crossenv definitions are located +# wheel crossenv definitions CROSSENV_CONFIG_PATH = $(abspath $(WORK_DIR)/../../../mk/crossenv) CROSSENV_CONFIG_DEFAULT = $(CROSSENV_CONFIG_PATH)/requirements-default.txt CROSSENV_PATH = $(abspath $(WORK_DIR)/crossenv-$(CROSSENV_BUILD_WHEEL)/) -# Check for wheel==x.y, then wheel, then default +### + +ifeq ($(strip $(PRE_CROSSENV_TARGET)),) +PRE_CROSSENV_TARGET = pre_crossenv_target +else +$(PRE_CROSSENV_TARGET): crossenv_msg_target +endif +ifeq ($(strip $(CROSSENV_TARGET)),) +CROSSENV_TARGET = build_crossenv_target +else +$(CROSSENC_TARGET): $(CROSSENV_WHEEL_TARGET) +endif +ifeq ($(strip $(POST_CROSSENV_TARGET)),) +POST_CROSSENV_TARGET = post_crossenv_target +else +$(POST_CROSSENV_TARGET): $(CROSSENV_TARGET) +endif + +### + +# Check for wheel==x.y, then fallback to wheel, then default ifneq ($(wildcard $(CROSSENV_CONFIG_PATH)/requirements-$(WHEEL).txt),) CROSSENV_BUILD_WHEEL = $(WHEEL) CROSSENV_BUILD_REQUIREMENTS = $(CROSSENV_CONFIG_PATH)/requirements-$(WHEEL).txt @@ -20,12 +61,8 @@ CROSSENV_BUILD_WHEEL = default CROSSENV_BUILD_REQUIREMENTS = $(CROSSENV_CONFIG_DEFAULT) endif -### - -.PHONY: crossenv_msg_target - -crossenv_msg_target: - @$(MSG) "Preparing crossenv for $(NAME)" +# Completion status file +CROSSENV_COOKIE = $(WORK_DIR)/.crossenv-$(CROSSENV_BUILD_WHEEL)_done ### @@ -54,11 +91,22 @@ endif ### +crossenv_msg_target: + @$(MSG) "Preparing crossenv for $(NAME)" + +pre_crossenv_target: crossenv_msg_target + +post_crossenv_target: $(CROSSENV_TARGET) + +### + crossenv-%: ifneq ($(filter error-%, $(CROSSENV_BUILD_WHEEL)),) - $(MAKE) $(CROSSENV_BUILD_WHEEL) + @$(MSG) $(MAKE) $(CROSSENV_BUILD_WHEEL) + @$(MAKE) $(CROSSENV_BUILD_WHEEL) else - $(MAKE) ARCH=$(firstword $(subst -, ,$*)) TCVERSION=$(lastword $(subst -, ,$*)) WHEEL=$(CROSSENV_BUILD_WHEEL) build-crossenv + @$(MSG) $(MAKE) ARCH=$(firstword $(subst -, ,$*)) TCVERSION=$(lastword $(subst -, ,$*)) WHEEL=$(CROSSENV_BUILD_WHEEL) crossenv + @$(MAKE) ARCH=$(firstword $(subst -, ,$*)) TCVERSION=$(lastword $(subst -, ,$*)) WHEEL=$(CROSSENV_BUILD_WHEEL) crossenv endif #### @@ -75,7 +123,7 @@ endif # Equivalent to STAGING_INSTALL_PREFIX relative to found python install ifeq ($(PYTHON_STAGING_INSTALL_PREFIX),) -PYTHON_STAGING_INSTALL_PREFIX = $(PYTHON_WORK_DIR)/install/$(PYTHON_INSTALL_PREFIX) +PYTHON_STAGING_INSTALL_PREFIX = $(abspath $(PYTHON_WORK_DIR)/install/$(PYTHON_INSTALL_PREFIX)) endif # set OPENSSL_*_PREFIX if unset @@ -87,10 +135,6 @@ endif ## ## python-cc.mk ## -PYTHON_PKG_VERS = $(lastword $(subst -, ,$(wildcard $(PYTHON_WORK_DIR)/Python-*))) -PYTHON_PKG_VERS_MAJOR_MINOR = $(word 1,$(subst ., ,$(PYTHON_PKG_VERS))).$(word 2,$(subst ., ,$(PYTHON_PKG_VERS))) -PYTHON_PKG_NAME = python$(subst .,,$(PYTHON_PKG_VERS_MAJOR_MINOR)) -PYTHON_PKG_DIR = Python-$(PYTHON_PKG_VERS) HOST_ARCH = $(shell uname -m) BUILD_ARCH = $(shell expr "$(TC_TARGET)" : '\([^-]*\)' ) PYTHON_NATIVE = $(abspath $(WORK_DIR)/../../../native/$(PYTHON_PKG_NAME)/work-native/install/usr/local/bin/python3) @@ -130,13 +174,8 @@ export LD_LIBRARY_PATH := $(abspath $(WORK_DIR)/../../../native/$(PYTHON_PKG_NAM # >>> import sys # >>> sys.path # -.PHONY: crossenv -ifneq ($(wildcard $(CROSSENV_PATH)),) -build-crossenv: - @$(MSG) Reusing existing crossenv $(CROSSENV_PATH) -else -build-crossenv: SHELL:=/bin/bash -build-crossenv: $(CROSSENV_PATH)/build/python-cc.mk +build_crossenv_target: SHELL:=/bin/bash +build_crossenv_target: $(CROSSENV_PATH)/build/python-cc.mk @$(MSG) crossenv wheel packages: $(CROSSENV_DEFAULT_PIP), $(CROSSENV_DEFAULT_SETUPTOOLS), $(CROSSENV_DEFAULT_WHEEL) @$(MSG) crossenv requirements file = $(CROSSENV_BUILD_REQUIREMENTS) mkdir -p $(PYTHON_LIB_CROSS) @@ -187,10 +226,10 @@ endif $(MSG) "Package list for $(CROSSENV_PATH):" ; \ $(MSG) $$(which cross-pip) list ; \ $(RUN) $$(which cross-pip) list -endif $(CROSSENV_PATH)/build/python-cc.mk: - mkdir -p $(CROSSENV_PATH)/build + @$(MSG) "crossenv environment definition: $@" + @mkdir -p $(CROSSENV_PATH)/build @echo CROSSENV_PATH=$(CROSSENV_PATH) > $@ @echo CROSSENV=$(CROSSENV_PATH)/bin/activate >> $@ @echo HOSTPYTHON=$(HOSTPYTHON) >> $@ @@ -213,3 +252,13 @@ $(CROSSENV_PATH)/build/python-cc.mk: @echo CROSSENV_DEFAULT_PIP=$(CROSSENV_DEFAULT_PIP_VERSION) >> $@ @echo CROSSENV_DEFAULT_SETUPTOOLS=$(CROSSENV_DEFAULT_SETUPTOOLS_VERSION) >> $@ @echo CROSSENV_DEFAULT_WHEEL=$(CROSSENV_DEFAULT_WHEEL_VERSION) >> $@ + +ifeq ($(wildcard $(CROSSENV_COOKIE)),) +crossenv: $(CROSSENV_COOKIE) + +$(CROSSENV_COOKIE): $(POST_CROSSENV_TARGET) + $(create_target_dir) + @touch -f $@ +else +crossenv: ; +endif diff --git a/mk/spksrc.python-module.mk b/mk/spksrc.python-module.mk index 0cbd5a72c76..c260efab255 100644 --- a/mk/spksrc.python-module.mk +++ b/mk/spksrc.python-module.mk @@ -21,13 +21,14 @@ CROSSENV_MODULE_PATH = $(firstword $(wildcard $(WORK_DIR)/crossenv-$(PKG_NAME)-$ ### Prepare crossenv build_crossenv_module: - WHEEL="$(PKG_NAME)-$(PKG_VERS)" $(MAKE) crossenv-$(ARCH)-$(TCVERSION) + @$(MSG) WHEEL="$(PKG_NAME)-$(PKG_VERS)" $(MAKE) crossenv-$(ARCH)-$(TCVERSION) + @WHEEL="$(PKG_NAME)-$(PKG_VERS)" $(MAKE) crossenv-$(ARCH)-$(TCVERSION) ### Python module rules compile_python_module: build_crossenv_module $(foreach e,$(shell cat $(CROSSENV_MODULE_PATH)/build/python-cc.mk),$(eval $(e))) $(eval PYTHONPATH = $(PYTHON_SITE_PACKAGES_NATIVE):$(PYTHON_LIB_NATIVE):$(INSTALL_DIR)$(INSTALL_PREFIX)/$(PYTHON_LIB_DIR)/site-packages/) - @$(MSG) "CROSSENV: $(CROSSENV)" + @$(MSG) "activate crossenv found: $(CROSSENV)" @. $(CROSSENV) ; \ $(RUN) PYTHONPATH=$(PYTHONPATH) python setup.py build_ext \ -I $(STAGING_INSTALL_PREFIX)/include \ diff --git a/mk/spksrc.wheel.mk b/mk/spksrc.wheel.mk index 58742fc4c5c..c65396da761 100644 --- a/mk/spksrc.wheel.mk +++ b/mk/spksrc.wheel.mk @@ -109,7 +109,7 @@ wheel_msg_target: # building a wheel for x64-6.2.4 may look successfull while # it actually used a cache built from x64-7.1 # -pre_wheel_target: build-crossenv wheel_msg_target wheeldownload +pre_wheel_target: wheel_msg_target wheeldownload ifneq ($(strip $(WHEELS)),) @if [ -n "$(PIP_CACHE_OPT)" ] ; then \ mkdir -p $(PIP_CACHE_DIR) ; \ @@ -150,13 +150,13 @@ ifneq ($(strip $(WHEELS)),) file=$$(basename $${requirement%%:*}) ; \ [ "$$(grep -s egg <<< $${wheel})" ] && name=$$(echo $${wheel#*egg=} | cut -f1 -d=) || name=$${wheel%%[<>=]=*} ; \ version=$$(echo $${requirement#*[<>=]=} | cut -f1 -d' ') ; \ - echo "WHEEL=\"$${name}-$${version}\" $(MAKE) crossenv-$(ARCH)-$(TCVERSION)" ; \ + $(MSG) "WHEEL=\"$${name}-$${version}\" $(MAKE) crossenv-$(ARCH)-$(TCVERSION)" ; \ WHEEL="$${name}-$${version}" $(MAKE) crossenv-$(ARCH)-$(TCVERSION) ; \ for crossenv in $(WORK_DIR)/crossenv-$${name}-$${version} $(WORK_DIR)/crossenv-$${name} $(WORK_DIR)/crossenv ; do \ [ -d $${crossenv} ] && . $${crossenv}/build/python-cc.mk && break ; \ done ; \ crossenvPIP=$(PIP) ; \ - echo "CROSSENV: $${CROSSENV}" ; \ + $(MSG) "activate crossenv found: $${CROSSENV}" ; \ if [ -s "$${CROSSENV}" ] ; then \ crossenvPIP=$$(. $${CROSSENV} && which pip) ; \ $(MSG) "Python crossenv found: [$${CROSSENV}]" ; \ From bf12e2a4242a56bc8d94e2f1cb604e3ec98bec2c Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Fri, 15 Nov 2024 21:54:17 +0000 Subject: [PATCH 036/130] crossenv-default: Enforce using msgpack==1.0.5 for py313 builds --- mk/crossenv/requirements-default.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/mk/crossenv/requirements-default.txt b/mk/crossenv/requirements-default.txt index 8956b9adfc3..ad6f40ef11f 100644 --- a/mk/crossenv/requirements-default.txt +++ b/mk/crossenv/requirements-default.txt @@ -9,6 +9,7 @@ Cython==3.0.11 flit==3.10.1 maturin==1.7.4 #meson-python==0.17.1 +msgpack==1.0.5 poetry==1.8.4 scikit-build==0.18.1 #scikit-build-core==0.10.7 From 3d3d6958860fdca33b75806b88877f06562a7e5e Mon Sep 17 00:00:00 2001 From: hgy59 Date: Sat, 16 Nov 2024 23:20:39 +0100 Subject: [PATCH 037/130] fix crossenv installation by packages using prebuilt python - spksrc.crossenv.mk: SPK_NAME and PYTHON_PACKAGE_WORK_DIR must be defined when PYTHON_PACKAGE is used --- mk/spksrc.python.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mk/spksrc.python.mk b/mk/spksrc.python.mk index 3092c9cf024..6a219c1a0ec 100644 --- a/mk/spksrc.python.mk +++ b/mk/spksrc.python.mk @@ -11,8 +11,10 @@ include ../../mk/spksrc.archs.mk ifneq ($(wildcard $(PYTHON_PACKAGE_WORK_DIR)),) -# Export the python package variable so it is usable in cross/* +# Export variables so to be usable in crossenv and cross/* export PYTHON_PACKAGE +export PYTHON_PACKAGE_WORK_DIR +export SPK_NAME # Set Python installtion prefix directory variables ifeq ($(strip $(PYTHON_STAGING_INSTALL_PREFIX)),) From 44973f6d9191244e9f39c496159d44eaa251c214 Mon Sep 17 00:00:00 2001 From: hgy59 Date: Sun, 17 Nov 2024 14:33:20 +0100 Subject: [PATCH 038/130] fix python311 for qoriq --- cross/python313/Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cross/python313/Makefile b/cross/python313/Makefile index 1428893c718..55ee299f80a 100644 --- a/cross/python313/Makefile +++ b/cross/python313/Makefile @@ -50,6 +50,11 @@ CONFIGURE_ARGS += --with-lto #CONFIGURE_ARGS += --enable-optimizations endif +ifeq ($(findstring $(ARCH),$(PPC_ARCHS)),$(ARCH)) +# for qoriq +ADDITIONAL_LDFLAGS = -latomic +endif + CONFIGURE_ARGS += ac_cv_buggy_getaddrinfo=no CONFIGURE_ARGS += ac_cv_file__dev_ptmx=no CONFIGURE_ARGS += ac_cv_file__dev_ptc=no From a1ebecee9f427315ab1869c3d2c9628de8b8bbf0 Mon Sep 17 00:00:00 2001 From: hgy59 Date: Mon, 18 Nov 2024 06:35:34 +0100 Subject: [PATCH 039/130] spksrc.python-wheel.mk: fix include of python-cc.mk --- mk/spksrc.python-wheel.mk | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/mk/spksrc.python-wheel.mk b/mk/spksrc.python-wheel.mk index 82cd3e683cc..d01f77ca462 100644 --- a/mk/spksrc.python-wheel.mk +++ b/mk/spksrc.python-wheel.mk @@ -20,7 +20,7 @@ endif include ../../mk/spksrc.cross-cc.mk # Fetch python variables --include $(WORK_DIR)/python-cc.mk +-include $(WORK_DIR)/crossenv/build/python-cc.mk # If using spk.python.mk with PYTHON_STAGING_PREFIX defined # then redirect STAGING_INSTALL_PREFIX so rust @@ -39,13 +39,9 @@ include ../../mk/spksrc.wheel-env.mk ### Python wheel rules build_python_wheel_target: -ifeq ($(strip $(CROSSENV)),) -# Python 2 way - @$(RUN) PYTHONPATH=$(PYTHONPATH) $(HOSTPYTHON) -c "import setuptools;__file__='setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" $(BUILD_ARGS) bdist_wheel $(WHEELS_BUILD_ARGS) -d $(WHEELHOUSE) -else -# Python 3 case: using crossenv helper - @. $(CROSSENV) && $(RUN) _PYTHON_HOST_PLATFORM=$(TC_TARGET) python3 setup.py $(BUILD_ARGS) bdist_wheel $(WHEELS_BUILD_ARGS) -d $(WHEELHOUSE) -endif + @$(MSG) "activate crossenv found: $(CROSSENV)" + @. $(CROSSENV) ; \ + $(RUN) _PYTHON_HOST_PLATFORM=$(TC_TARGET) python3 setup.py $(BUILD_ARGS) bdist_wheel $(WHEELS_BUILD_ARGS) -d $(WHEELHOUSE) @$(RUN) echo "$(PKG_NAME)==$(PKG_VERS)" >> $(WHEELHOUSE)/$(WHEELS_CROSS_COMPILE) post_install_python_wheel_target: $(WHEEL_TARGET) install_python_wheel From 0f2f55a10a4a1b8d6b2516dc411917653e431050 Mon Sep 17 00:00:00 2001 From: hgy59 Date: Mon, 18 Nov 2024 16:57:56 +0100 Subject: [PATCH 040/130] rdiff-backup: add crossenv for frozenlist --- mk/crossenv/requirements-frozenlist-1.4.0.txt | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 mk/crossenv/requirements-frozenlist-1.4.0.txt diff --git a/mk/crossenv/requirements-frozenlist-1.4.0.txt b/mk/crossenv/requirements-frozenlist-1.4.0.txt new file mode 100644 index 00000000000..70d1e7909f3 --- /dev/null +++ b/mk/crossenv/requirements-frozenlist-1.4.0.txt @@ -0,0 +1,2 @@ +-r ./requirements-default.txt +expandvars==0.12.0 From 25e02dbd32394015a6421188488f976f45310c97 Mon Sep 17 00:00:00 2001 From: hgy59 Date: Mon, 18 Nov 2024 19:54:25 +0100 Subject: [PATCH 041/130] rdiff-backup: add crossenv for yarl --- mk/crossenv/requirements-yarl-1.9.2.txt | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 mk/crossenv/requirements-yarl-1.9.2.txt diff --git a/mk/crossenv/requirements-yarl-1.9.2.txt b/mk/crossenv/requirements-yarl-1.9.2.txt new file mode 100644 index 00000000000..70d1e7909f3 --- /dev/null +++ b/mk/crossenv/requirements-yarl-1.9.2.txt @@ -0,0 +1,2 @@ +-r ./requirements-default.txt +expandvars==0.12.0 From 6b642a5a836cff30f81baf6dd9e7691dffbadcb5 Mon Sep 17 00:00:00 2001 From: hgy59 Date: Mon, 18 Nov 2024 21:56:27 +0100 Subject: [PATCH 042/130] fix for version less crossenv requirements - use dash (-) as version separator - rdiff-backup: version less requirements for frozenlist and yarl - adjust logging --- ...-1.4.0.txt => requirements-frozenlist.txt} | 0 ...s-yarl-1.9.2.txt => requirements-yarl.txt} | 0 mk/spksrc.crossenv.mk | 24 +++++++++---------- 3 files changed, 12 insertions(+), 12 deletions(-) rename mk/crossenv/{requirements-frozenlist-1.4.0.txt => requirements-frozenlist.txt} (100%) rename mk/crossenv/{requirements-yarl-1.9.2.txt => requirements-yarl.txt} (100%) diff --git a/mk/crossenv/requirements-frozenlist-1.4.0.txt b/mk/crossenv/requirements-frozenlist.txt similarity index 100% rename from mk/crossenv/requirements-frozenlist-1.4.0.txt rename to mk/crossenv/requirements-frozenlist.txt diff --git a/mk/crossenv/requirements-yarl-1.9.2.txt b/mk/crossenv/requirements-yarl.txt similarity index 100% rename from mk/crossenv/requirements-yarl-1.9.2.txt rename to mk/crossenv/requirements-yarl.txt diff --git a/mk/spksrc.crossenv.mk b/mk/spksrc.crossenv.mk index 86e00ed3159..72b2d7907e7 100644 --- a/mk/spksrc.crossenv.mk +++ b/mk/spksrc.crossenv.mk @@ -52,10 +52,10 @@ endif # Check for wheel==x.y, then fallback to wheel, then default ifneq ($(wildcard $(CROSSENV_CONFIG_PATH)/requirements-$(WHEEL).txt),) CROSSENV_BUILD_WHEEL = $(WHEEL) -CROSSENV_BUILD_REQUIREMENTS = $(CROSSENV_CONFIG_PATH)/requirements-$(WHEEL).txt -else ifneq ($(wildcard $(CROSSENV_CONFIG_PATH)/requirements-$(shell echo $${WHEEL%%[<>=]=*}).txt),) -CROSSENV_BUILD_WHEEL = $(shell echo $${WHEEL%%[<>=]=*}) -CROSSENV_BUILD_REQUIREMENTS = $(CROSSENV_CONFIG_PATH)/requirements-$(shell echo $${WHEEL%%[<>=]=*}).txt +CROSSENV_BUILD_REQUIREMENTS = $(CROSSENV_CONFIG_PATH)/requirements-$(CROSSENV_BUILD_WHEEL).txt +else ifneq ($(wildcard $(CROSSENV_CONFIG_PATH)/requirements-$(firstword $(subst -, ,$(WHEEL))).txt),) +CROSSENV_BUILD_WHEEL = $(firstword $(subst -, ,$(WHEEL))) +CROSSENV_BUILD_REQUIREMENTS = $(CROSSENV_CONFIG_PATH)/requirements-$(CROSSENV_BUILD_WHEEL).txt else CROSSENV_BUILD_WHEEL = default CROSSENV_BUILD_REQUIREMENTS = $(CROSSENV_CONFIG_DEFAULT) @@ -177,7 +177,8 @@ export LD_LIBRARY_PATH := $(abspath $(WORK_DIR)/../../../native/$(PYTHON_PKG_NAM build_crossenv_target: SHELL:=/bin/bash build_crossenv_target: $(CROSSENV_PATH)/build/python-cc.mk @$(MSG) crossenv wheel packages: $(CROSSENV_DEFAULT_PIP), $(CROSSENV_DEFAULT_SETUPTOOLS), $(CROSSENV_DEFAULT_WHEEL) - @$(MSG) crossenv requirements file = $(CROSSENV_BUILD_REQUIREMENTS) + @$(MSG) CROSSENV_BUILD_REQUIREMENTS = $(CROSSENV_BUILD_REQUIREMENTS) + @$(MSG) CROSSENV_BUILD_WHEEL = $(CROSSENV_BUILD_WHEEL) mkdir -p $(PYTHON_LIB_CROSS) cp -RL $(HOSTPYTHON_LIB_NATIVE) $(abspath $(PYTHON_LIB_CROSS)/../) @echo $(PYTHON_NATIVE) -m crossenv $(abspath $(PYTHON_WORK_DIR)/install/$(PYTHON_INSTALL_PREFIX)/bin/python$(PYTHON_PKG_VERS_MAJOR_MINOR)) \ @@ -204,27 +205,26 @@ endif @$(RUN) wget --no-verbose https://bootstrap.pypa.io/get-pip.py --directory-prefix=$(CROSSENV_PATH)/build ; \ $(RUN) chmod 755 $(CROSSENV_PATH)/build/get-pip.py @. $(CROSSENV_PATH)/bin/activate ; \ - $(MSG) $$(which build-python) $(CROSSENV_PATH)/build/get-pip.py $(CROSSENV_DEFAULT_PIP) --no-setuptools --no-wheel --disable-pip-version-check ; \ + $(MSG) build-python install $(CROSSENV_DEFAULT_PIP) ; \ $(RUN) $$(which build-python) $(CROSSENV_PATH)/build/get-pip.py $(CROSSENV_DEFAULT_PIP) --no-setuptools --no-wheel --disable-pip-version-check ; \ - $(MSG) $$(which cross-python) $(CROSSENV_PATH)/build/get-pip.py $(CROSSENV_DEFAULT_PIP) --no-setuptools --no-wheel --disable-pip-version-check ; \ + $(MSG) cross-python Install $(CROSSENV_DEFAULT_PIP) ; \ $(RUN) $$(which cross-python) $(CROSSENV_PATH)/build/get-pip.py $(CROSSENV_DEFAULT_PIP) --no-setuptools --no-wheel --disable-pip-version-check @. $(CROSSENV_PATH)/bin/activate ; \ - $(MSG) $$(which build-pip) --disable-pip-version-check install $(CROSSENV_DEFAULT_SETUPTOOLS) $(CROSSENV_DEFAULT_WHEEL) ; \ + $(MSG) build-pip Install $(CROSSENV_DEFAULT_SETUPTOOLS) $(CROSSENV_DEFAULT_WHEEL) ; \ $(RUN) $$(which build-pip) --disable-pip-version-check install $(CROSSENV_DEFAULT_SETUPTOOLS) $(CROSSENV_DEFAULT_WHEEL) ; \ - $(MSG) $$(which cross-pip) --disable-pip-version-check install $(CROSSENV_DEFAULT_SETUPTOOLS) $(CROSSENV_DEFAULT_WHEEL) ; \ + $(MSG) cross-pip Install $(CROSSENV_DEFAULT_SETUPTOOLS) $(CROSSENV_DEFAULT_WHEEL) ; \ $(RUN) $$(which cross-pip) --disable-pip-version-check install $(CROSSENV_DEFAULT_SETUPTOOLS) $(CROSSENV_DEFAULT_WHEEL) @$(MSG) [$(CROSSENV_PATH)] Processing $(CROSSENV_BUILD_REQUIREMENTS) @. $(CROSSENV_PATH)/bin/activate ; \ - $(MSG) $$(which build-pip) --disable-pip-version-check install -r $(CROSSENV_BUILD_REQUIREMENTS) ; \ + $(MSG) build-pip install -r $(CROSSENV_BUILD_REQUIREMENTS) ; \ $(RUN) $$(which build-pip) --disable-pip-version-check install -r $(CROSSENV_BUILD_REQUIREMENTS) ; \ - $(MSG) $$(which cross-pip) --disable-pip-version-check install -r $(CROSSENV_BUILD_REQUIREMENTS) ; \ + $(MSG) cross-pip Install -r $(CROSSENV_BUILD_REQUIREMENTS) ; \ $(RUN) $$(which cross-pip) --disable-pip-version-check install -r $(CROSSENV_BUILD_REQUIREMENTS) #ifneq ($(PYTHON_LIB_NATIVE),$(PYTHON_LIB_CROSS)) # cp $(PYTHON_LIB_CROSS)/_sysconfigdata_*.py $(PYTHON_LIB_NATIVE)/_sysconfigdata.py #endif @. $(CROSSENV_PATH)/bin/activate ; \ $(MSG) "Package list for $(CROSSENV_PATH):" ; \ - $(MSG) $$(which cross-pip) list ; \ $(RUN) $$(which cross-pip) list $(CROSSENV_PATH)/build/python-cc.mk: From 1b48f94698694e6b004cfed8e184a6aaf1509ef9 Mon Sep 17 00:00:00 2001 From: hgy59 Date: Wed, 20 Nov 2024 21:53:31 +0100 Subject: [PATCH 043/130] python.mk: revert support for ADDITIONAL_CROSSENV_WHEELS - obsolete with wheel specific crossenv --- mk/spksrc.python.mk | 10 ---------- spk/rdiff-backup/Makefile | 3 --- 2 files changed, 13 deletions(-) diff --git a/mk/spksrc.python.mk b/mk/spksrc.python.mk index 6a219c1a0ec..59992b12d05 100644 --- a/mk/spksrc.python.mk +++ b/mk/spksrc.python.mk @@ -53,9 +53,6 @@ PYTHON_DEPENDS := $(foreach cross,$(foreach pkg_name,$(shell $(MAKE) dependency- # call-up pre-depend to prepare the shared python build environment PRE_DEPEND_TARGET = python_pre_depend -ifneq ($(strip $(ADDITIONAL_CROSSENV_WHEELS)),) -POST_DEPEND_TARGET = python_post_depend -endif else ifneq ($(findstring $(ARCH),$(ARMv5_ARCHS) $(OLD_PPC_ARCHS)),$(ARCH)) @@ -86,10 +83,3 @@ python_pre_depend: rm -fr work-*/$${pkgname}* work-*/.$${pkgname}-* ; \ fi ; \ done - -.PHONY: python_post_depend -python_post_depend: - @$(MSG) "Install to crossenv: $(ADDITIONAL_CROSSENV_WHEELS)" - @. $(WORK_DIR)/crossenv/bin/activate ; \ - $(RUN) build-pip --disable-pip-version-check install $(ADDITIONAL_CROSSENV_WHEELS) ; \ - $(RUN) pip --disable-pip-version-check install $(ADDITIONAL_CROSSENV_WHEELS) diff --git a/spk/rdiff-backup/Makefile b/spk/rdiff-backup/Makefile index 6e09b10c85d..b21b2d30af8 100644 --- a/spk/rdiff-backup/Makefile +++ b/spk/rdiff-backup/Makefile @@ -11,9 +11,6 @@ WHEELS = src/requirements-crossenv.txt src/requirements-pure.txt DEPENDS = cross/librsync cross/attr cross/acl -# required to build frozenlist and yarl -ADDITIONAL_CROSSENV_WHEELS = expandvars==0.12.0 - # [PyYAML] DEPENDS += cross/libyaml From b82eaa90818e60dbd260ac69c3077b41419c236b Mon Sep 17 00:00:00 2001 From: hgy59 Date: Wed, 20 Nov 2024 21:54:58 +0100 Subject: [PATCH 044/130] Revert "borgbackup: Package bump to force build" This reverts commit e95af062c64d3ffb13cd588118acb58918d1eac4. --- spk/borgbackup/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spk/borgbackup/Makefile b/spk/borgbackup/Makefile index 6650db42540..d32281a08f4 100644 --- a/spk/borgbackup/Makefile +++ b/spk/borgbackup/Makefile @@ -1,6 +1,6 @@ SPK_NAME = borgbackup SPK_VERS = 1.4.0 -SPK_REV = 16 +SPK_REV = 15 SPK_ICON = src/borgbackup.png PYTHON_PACKAGE = python311 From 3eb24bca601d493e0dbe9daf182796f6398ea0fa Mon Sep 17 00:00:00 2001 From: hgy59 Date: Wed, 20 Nov 2024 23:31:08 +0100 Subject: [PATCH 045/130] use python -m build to create wheels with python-wheel.mk - add build to default crossenv - fix python-wheel.mk (include spksrc.crossenv.mk) - use workaround to access crossenv to build wheels with python-wheel.mk for unknown reason the CROSSENV variable is empty, use $(CROSSENV_PATH)/bin/activate instead --- cross/cryptography/Makefile | 9 +-------- mk/crossenv/requirements-default.txt | 1 + mk/spksrc.python-module.mk | 6 +++--- mk/spksrc.python-wheel.mk | 12 +++++++++--- mk/spksrc.wheel.mk | 2 +- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/cross/cryptography/Makefile b/cross/cryptography/Makefile index f87252594f6..1ce92258010 100644 --- a/cross/cryptography/Makefile +++ b/cross/cryptography/Makefile @@ -2,7 +2,7 @@ PKG_NAME = cryptography PKG_VERS = 41.0.3 PKG_EXT = tar.gz PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT) -PKG_DIST_SITE = https://files.pythonhosted.org/packages/source/c/$(PKG_NAME) +PKG_DIST_SITE = https://files.pythonhosted.org/packages/source/c/cryptography PKG_DIR = $(PKG_NAME)-$(PKG_VERS) DEPENDS = cross/openssl3 cross/cffi @@ -11,11 +11,4 @@ HOMEPAGE = https://github.com/pyca/cryptography COMMENT = Provide cryptographic recipes and primitives to Python developers LICENSE = BSD/ASL2 -### -### This cross/cryptography is needed to generate python-limited abi3 wheels -### Ref: https://github.com/pyca/cryptography/issues/7671 -### - -WHEELS_BUILD_ARGS = --py-limited-api=$(PYTHON_LIMITED_API) - include ../../mk/spksrc.python-wheel.mk diff --git a/mk/crossenv/requirements-default.txt b/mk/crossenv/requirements-default.txt index ad6f40ef11f..0946ba23703 100644 --- a/mk/crossenv/requirements-default.txt +++ b/mk/crossenv/requirements-default.txt @@ -1,6 +1,7 @@ pip==24.3.1 pip-tools==7.4.1 setuptools==75.4.0 +build==1.2.2 wheel==0.45.0 # cffi==1.17.1 diff --git a/mk/spksrc.python-module.mk b/mk/spksrc.python-module.mk index c260efab255..b609e3628d2 100644 --- a/mk/spksrc.python-module.mk +++ b/mk/spksrc.python-module.mk @@ -1,5 +1,5 @@ ### Python module rules -# Invoke make to (cross-) compile a python module. +# Invoke make to (cross-) compile a python extension module. # You can do some customization through python-cc.mk # Python module targets @@ -24,11 +24,11 @@ build_crossenv_module: @$(MSG) WHEEL="$(PKG_NAME)-$(PKG_VERS)" $(MAKE) crossenv-$(ARCH)-$(TCVERSION) @WHEEL="$(PKG_NAME)-$(PKG_VERS)" $(MAKE) crossenv-$(ARCH)-$(TCVERSION) -### Python module rules +### Python extension module rules compile_python_module: build_crossenv_module $(foreach e,$(shell cat $(CROSSENV_MODULE_PATH)/build/python-cc.mk),$(eval $(e))) $(eval PYTHONPATH = $(PYTHON_SITE_PACKAGES_NATIVE):$(PYTHON_LIB_NATIVE):$(INSTALL_DIR)$(INSTALL_PREFIX)/$(PYTHON_LIB_DIR)/site-packages/) - @$(MSG) "activate crossenv found: $(CROSSENV)" + @$(MSG) "PYTHON MODULE: activate crossenv found: $(CROSSENV)" @. $(CROSSENV) ; \ $(RUN) PYTHONPATH=$(PYTHONPATH) python setup.py build_ext \ -I $(STAGING_INSTALL_PREFIX)/include \ diff --git a/mk/spksrc.python-wheel.mk b/mk/spksrc.python-wheel.mk index d01f77ca462..f3bbc0c7422 100644 --- a/mk/spksrc.python-wheel.mk +++ b/mk/spksrc.python-wheel.mk @@ -39,11 +39,17 @@ include ../../mk/spksrc.wheel-env.mk ### Python wheel rules build_python_wheel_target: - @$(MSG) "activate crossenv found: $(CROSSENV)" - @. $(CROSSENV) ; \ - $(RUN) _PYTHON_HOST_PLATFORM=$(TC_TARGET) python3 setup.py $(BUILD_ARGS) bdist_wheel $(WHEELS_BUILD_ARGS) -d $(WHEELHOUSE) + @$(MSG) "PYTHON WHEEL: activate crossenv found: $(CROSSENV)" + @$(MSG) "CROSSENV_PATH = $(CROSSENV_PATH)" + @. $(CROSSENV_PATH)/bin/activate ; \ + $(RUN) _PYTHON_HOST_PLATFORM=$(TC_TARGET) python3 -m build $(BUILD_ARGS) --wheel $(WHEELS_BUILD_ARGS) --outdir $(WHEELHOUSE) @$(RUN) echo "$(PKG_NAME)==$(PKG_VERS)" >> $(WHEELHOUSE)/$(WHEELS_CROSS_COMPILE) post_install_python_wheel_target: $(WHEEL_TARGET) install_python_wheel all: install + +### + +# Use crossenv +include ../../mk/spksrc.crossenv.mk diff --git a/mk/spksrc.wheel.mk b/mk/spksrc.wheel.mk index c65396da761..662b9b9d047 100644 --- a/mk/spksrc.wheel.mk +++ b/mk/spksrc.wheel.mk @@ -156,7 +156,7 @@ ifneq ($(strip $(WHEELS)),) [ -d $${crossenv} ] && . $${crossenv}/build/python-cc.mk && break ; \ done ; \ crossenvPIP=$(PIP) ; \ - $(MSG) "activate crossenv found: $${CROSSENV}" ; \ + $(MSG) "WHEEL: activate crossenv found: $${CROSSENV}" ; \ if [ -s "$${CROSSENV}" ] ; then \ crossenvPIP=$$(. $${CROSSENV} && which pip) ; \ $(MSG) "Python crossenv found: [$${CROSSENV}]" ; \ From 97b879fd1c02b6a58f072bc5cc52cbe9154267da Mon Sep 17 00:00:00 2001 From: hgy59 Date: Sat, 23 Nov 2024 23:57:04 +0100 Subject: [PATCH 046/130] ffsync: fix build of cross/cryptography - remove wrong definitions of OPENSSL_LIB_DIR and OPENSSL_INCLUDE_DIR; correct values are imported from spksrc.crossenv.mk --- spk/ffsync/Makefile | 4 ---- 1 file changed, 4 deletions(-) diff --git a/spk/ffsync/Makefile b/spk/ffsync/Makefile index 4dad458788b..dbb8d36eb44 100644 --- a/spk/ffsync/Makefile +++ b/spk/ffsync/Makefile @@ -33,11 +33,7 @@ SERVICE_PORT_TITLE = $(DISPLAY_NAME) ADMIN_PORT = $(SERVICE_PORT) # [cryptography] -# Mandatory of using OPENSSL_*_DIR starting with version >= 40 -# https://docs.rs/openssl/latest/openssl/#automatic DEPENDS += cross/openssl3 -ENV += OPENSSL_LIB_DIR=$(STAGING_INSTALL_PREFIX)/lib/ -ENV += OPENSSL_INCLUDE_DIR=$(STAGING_INSTALL_PREFIX)/include/ # [mysqlclient] ENV += MYSQLCLIENT_CFLAGS="$(CFLAGS) -I$(STAGING_INSTALL_PREFIX)/include/mysql -I$(STAGING_INSTALL_PREFIX)/$(PYTHON_INC_DIR)" From 1e4569e46950d891d6e004efd9dde26385a69b60 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Sun, 24 Nov 2024 14:54:28 +0000 Subject: [PATCH 047/130] spksrc.python-wheel.mk: Fix wheel building --- mk/spksrc.python-wheel.mk | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/mk/spksrc.python-wheel.mk b/mk/spksrc.python-wheel.mk index f3bbc0c7422..27d29315a70 100644 --- a/mk/spksrc.python-wheel.mk +++ b/mk/spksrc.python-wheel.mk @@ -19,30 +19,30 @@ endif # Resume with standard spksrc.cross-cc.mk include ../../mk/spksrc.cross-cc.mk -# Fetch python variables --include $(WORK_DIR)/crossenv/build/python-cc.mk +# Define where is located the crossenv +CROSSENV_MODULE_PATH = $(firstword $(wildcard $(WORK_DIR)/crossenv-$(PKG_NAME)-$(PKG_VERS) $(WORK_DIR)/crossenv-$(PKG_NAME) $(WORK_DIR)/crossenv-default)) -# If using spk.python.mk with PYTHON_STAGING_PREFIX defined +# If using spksrc.python.mk with PYTHON_STAGING_PREFIX defined # then redirect STAGING_INSTALL_PREFIX so rust # wheels can find openssl and other libraries ifneq ($(wildcard $(PYTHON_STAGING_PREFIX)),) STAGING_INSTALL_PREFIX := $(PYTHON_STAGING_PREFIX) endif -# Python module variables -ifeq ($(strip $(PYTHONPATH)),) -PYTHONPATH = $(PYTHON_LIB_NATIVE):$(INSTALL_DIR)$(INSTALL_PREFIX)/$(PYTHON_LIB_DIR)/site-packages/ -endif - ## python wheel specific configurations include ../../mk/spksrc.wheel-env.mk +### Prepare crossenv +build_crossenv_module: + @$(MSG) WHEEL="$(PKG_NAME)-$(PKG_VERS)" $(MAKE) crossenv-$(ARCH)-$(TCVERSION) + @WHEEL="$(PKG_NAME)-$(PKG_VERS)" $(MAKE) crossenv-$(ARCH)-$(TCVERSION) + ### Python wheel rules -build_python_wheel_target: - @$(MSG) "PYTHON WHEEL: activate crossenv found: $(CROSSENV)" - @$(MSG) "CROSSENV_PATH = $(CROSSENV_PATH)" - @. $(CROSSENV_PATH)/bin/activate ; \ - $(RUN) _PYTHON_HOST_PLATFORM=$(TC_TARGET) python3 -m build $(BUILD_ARGS) --wheel $(WHEELS_BUILD_ARGS) --outdir $(WHEELHOUSE) +build_python_wheel_target: build_crossenv_module + $(foreach e,$(shell cat $(CROSSENV_MODULE_PATH)/build/python-cc.mk),$(eval $(e))) + @. $(CROSSENV) ; \ + $(MSG) _PYTHON_HOST_PLATFORM=$(TC_TARGET) cross-python3 -m build $(BUILD_ARGS) --wheel $(WHEELS_BUILD_ARGS) --outdir $(WHEELHOUSE) ; \ + $(RUN) _PYTHON_HOST_PLATFORM=$(TC_TARGET) cross-python3 -m build $(BUILD_ARGS) --wheel $(WHEELS_BUILD_ARGS) --outdir $(WHEELHOUSE) @$(RUN) echo "$(PKG_NAME)==$(PKG_VERS)" >> $(WHEELHOUSE)/$(WHEELS_CROSS_COMPILE) post_install_python_wheel_target: $(WHEEL_TARGET) install_python_wheel From cd5b56eba1cc1e392021fd17c1c931ecaa630e7f Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Sun, 24 Nov 2024 14:55:12 +0000 Subject: [PATCH 048/130] DTLSSocket: Update from 0.1.16 to 0.2.2 --- cross/dtlssocket/Makefile | 8 +++----- cross/dtlssocket/digests | 6 +++--- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/cross/dtlssocket/Makefile b/cross/dtlssocket/Makefile index af1a7a2b2ee..db25d99ad6f 100644 --- a/cross/dtlssocket/Makefile +++ b/cross/dtlssocket/Makefile @@ -1,12 +1,10 @@ -PKG_NAME = DTLSSocket -PKG_VERS = 0.1.16 +PKG_NAME = dtlssocket +PKG_VERS = 0.2.2 PKG_EXT = tar.gz PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT) -PKG_DIST_SITE = https://files.pythonhosted.org/packages/58/42/0a0442118096eb9fbc9dc70b45aee2957f7546b80545e2a05bd839380519 +PKG_DIST_SITE = https://files.pythonhosted.org/packages/97/b6/702c4197c37c7036d0b7d67a2963c83a4b7098525959566dc6e2284c9f89 PKG_DIR = $(PKG_NAME)-$(PKG_VERS) -BUILD_DEPENDS = cross/cython - HOMEPAGE = https://git.fslab.de/jkonra2m/tinydtls-cython COMMENT = DTLSSocket is a Cython wrapper for tinydtls with a Socket like interface. LICENSE = Eclipse Public License 1.0 diff --git a/cross/dtlssocket/digests b/cross/dtlssocket/digests index 6f1c3b7f1a7..66b25a5b5b8 100644 --- a/cross/dtlssocket/digests +++ b/cross/dtlssocket/digests @@ -1,3 +1,3 @@ -DTLSSocket-0.1.16.tar.gz SHA1 9b4eaa3e9a949f202844a27ba54b2f05d73aa410 -DTLSSocket-0.1.16.tar.gz SHA256 30b108ae45fce1c033e3ef6c2ddd7e7418062ae374228e3a7fa969b254366a39 -DTLSSocket-0.1.16.tar.gz MD5 15dfeca9678e381c7bb6e11e4c864fd5 +dtlssocket-0.2.2.tar.gz SHA1 0be2a954ca56fe7cca3a9fbc5a9e65194f0ab5a5 +dtlssocket-0.2.2.tar.gz SHA256 4e76d715726e0c46dc09e35da9b6717b063c2389b06c1723decc3ba38b7387f4 +dtlssocket-0.2.2.tar.gz MD5 d1f686febd12e67ec7a2efe81bf1eaee From 1b26305b8d6f0c5c27b63df4a32a71d811ee8d3d Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Sun, 24 Nov 2024 14:55:58 +0000 Subject: [PATCH 049/130] homeassistant: Fix building bcrupt and cryptography --- spk/homeassistant/Makefile | 6 ------ 1 file changed, 6 deletions(-) diff --git a/spk/homeassistant/Makefile b/spk/homeassistant/Makefile index b69d396c98b..8110cb88222 100644 --- a/spk/homeassistant/Makefile +++ b/spk/homeassistant/Makefile @@ -90,12 +90,6 @@ WHEELS_BUILD_ARGS += --enable-freetype WHEELS_BUILD_ARGS += --enable-jpeg WHEELS_BUILD_ARGS += --enable-zlib -# [bcrypt, cryptography] -ENV += PYO3_CROSS_LIB_DIR=$(STAGING_INSTALL_PREFIX)/lib/ -ENV += PYO3_CROSS_INCLUDE_DIR=$(STAGING_INSTALL_PREFIX)/include/ -# fix for openssl-sys crate (for cryptography >= 40.0.0) -# https://docs.rs/openssl/latest/openssl/#manual - # [gevent] DEPENDS += cross/libev cross/c-ares ENV += GEVENTSETUP_EMBED_CARES=FALSE From 262e9ecd1cd8bd21daa0894a49e5f23a1b853004 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Sun, 24 Nov 2024 19:03:28 +0000 Subject: [PATCH 050/130] spksrc.crossenv.mk: Ensure Python=* has hostpython to avoid errors --- mk/spksrc.crossenv.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mk/spksrc.crossenv.mk b/mk/spksrc.crossenv.mk index 72b2d7907e7..e529d724fca 100644 --- a/mk/spksrc.crossenv.mk +++ b/mk/spksrc.crossenv.mk @@ -19,7 +19,7 @@ SHELL = /bin/bash # Python spk/python* related variables -PYTHON_PKG_VERS = $(or $(lastword $(subst -, ,$(wildcard $(PYTHON_WORK_DIR)/Python-*))),$(SPK_VERS)) +PYTHON_PKG_VERS = $(or $(lastword $(subst -, ,$(dir $(wildcard $(PYTHON_WORK_DIR)/Python-*/hostpython)))),$(SPK_VERS)) PYTHON_PKG_VERS_MAJOR_MINOR = $(or $(word 1,$(subst ., ,$(PYTHON_PKG_VERS))).$(word 2,$(subst ., ,$(PYTHON_PKG_VERS))),$(SPK_VERS_MAJOR_MINOR)) PYTHON_PKG_NAME = python$(subst .,,$(PYTHON_PKG_VERS_MAJOR_MINOR)) PYTHON_PKG_DIR = Python-$(PYTHON_PKG_VERS) From bd779ed19c00e7a1293c79186b84704b16cf95e6 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Sun, 24 Nov 2024 19:04:00 +0000 Subject: [PATCH 051/130] crossenv/requirements-numpy-1.24.4.txt: Definition for numpy --- mk/crossenv/requirements-numpy-1.24.4.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 mk/crossenv/requirements-numpy-1.24.4.txt diff --git a/mk/crossenv/requirements-numpy-1.24.4.txt b/mk/crossenv/requirements-numpy-1.24.4.txt new file mode 100644 index 00000000000..e740501ce2d --- /dev/null +++ b/mk/crossenv/requirements-numpy-1.24.4.txt @@ -0,0 +1,14 @@ +pip==23.2.1 +setuptools==63.4.3 +wheel==0.41.2 +# +cffi==1.15.1 +cryptography==41.0.3 +Cython==0.29.36 +flit==3.9.0 +maturin==1.2.3 +msgpack==1.0.5 +poetry==1.6.1 +scikit-build==0.17.6 +setuptools-rust==1.7.0 +setuptools-scm==7.1.0 From 55ed229ea2303496a27d70664c891737ef6730ba Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Sun, 24 Nov 2024 19:22:21 +0000 Subject: [PATCH 052/130] python.mk: Remove zlib at source to avoir re-building --- mk/spksrc.python.mk | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/mk/spksrc.python.mk b/mk/spksrc.python.mk index 59992b12d05..c4350d9337d 100644 --- a/mk/spksrc.python.mk +++ b/mk/spksrc.python.mk @@ -45,11 +45,11 @@ endif # set PYTHONPATH for spksrc.python-module.mk #PYTHONPATH = $(PYTHON_SITE_PACKAGES_NATIVE):$(PYTHON_LIB_NATIVE):$(PYTHON_STAGING_INSTALL_PREFIX)/lib/python$(PYTHON_VERSION)/site-packages/ -# Re-use all default python mandatory libraries -PYTHON_LIBS := $(wildcard $(PYTHON_STAGING_INSTALL_PREFIX)/lib/pkgconfig/*.pc) +# Re-use all default python mandatory libraries (with exception of zlib) +PYTHON_LIBS := $(filter-out %zlib.pc,$(wildcard $(PYTHON_STAGING_INSTALL_PREFIX)/lib/pkgconfig/*.pc)) -# Re-use all python dependencies and mark as already done -PYTHON_DEPENDS := $(foreach cross,$(foreach pkg_name,$(shell $(MAKE) dependency-list -C $(realpath $(PYTHON_PACKAGE_WORK_DIR)/../) 2>/dev/null | grep ^$(PYTHON_PACKAGE) | cut -f2 -d:),$(shell sed -n 's/^PKG_NAME = \(.*\)/\1/p' $(realpath $(CURDIR)/../../$(pkg_name)/Makefile))),$(wildcard $(PYTHON_PACKAGE_WORK_DIR)/.$(cross)-*_done)) +# Re-use all python dependencies and mark as already done (with exceltion of zlib) +PYTHON_DEPENDS := $(foreach cross,$(filter-out zlib,$(foreach pkg_name,$(shell $(MAKE) dependency-list -C $(realpath $(PYTHON_PACKAGE_WORK_DIR)/../) 2>/dev/null | grep ^$(PYTHON_PACKAGE) | cut -f2 -d:),$(shell sed -n 's/^PKG_NAME = \(.*\)/\1/p' $(realpath $(CURDIR)/../../$(pkg_name)/Makefile)))),$(wildcard $(PYTHON_PACKAGE_WORK_DIR)/.$(cross)-*_done)) # call-up pre-depend to prepare the shared python build environment PRE_DEPEND_TARGET = python_pre_depend @@ -71,8 +71,6 @@ python_pre_depend: @mkdir -p $(STAGING_INSTALL_PREFIX)/lib/pkgconfig/ @$(foreach lib,$(PYTHON_LIBS),ln -sf $(lib) $(STAGING_INSTALL_PREFIX)/lib/pkgconfig/ ;) @$(foreach _done,$(PYTHON_DEPENDS), ln -sf $(_done) $(WORK_DIR) ;) - @# EXCEPTION: Ensure zlib is always built locally - @rm -f $(STAGING_INSTALL_PREFIX)/lib/pkgconfig/zlib.pc $(WORK_DIR)/.zlib* @# EXCEPTION: Do not symlink cross/* wheel builds @make --no-print-directory dependency-flat | sort -u | grep cross/ | while read depend ; do \ makefile="../../$${depend}/Makefile" ; \ From 7dbabc4630f4e342864af26f3002db63c2e9f522 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Sun, 24 Nov 2024 23:45:13 +0000 Subject: [PATCH 053/130] dtlssocket: Add -std=c99 for gcc < 5 --- cross/dtlssocket/Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cross/dtlssocket/Makefile b/cross/dtlssocket/Makefile index db25d99ad6f..5f55879614f 100644 --- a/cross/dtlssocket/Makefile +++ b/cross/dtlssocket/Makefile @@ -11,6 +11,12 @@ LICENSE = Eclipse Public License 1.0 PRE_CONFIGURE_TARGET = dtlssocket_pre_configure +include ../../mk/spksrc.common.mk + +ifeq ($(call version_le, $(TC_GCC), 5),1) +ADDITIONAL_CFLAGS = -std=c99 +endif + include ../../mk/spksrc.python-wheel.mk .PHONY: dtlssocket_pre_configure From c1823cd4a37c74e97151e76cc1c839c1b0ed9e87 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Mon, 25 Nov 2024 00:18:33 +0000 Subject: [PATCH 054/130] python.mk: Erase only $(ARCH)-$(TCVERSION) related files --- mk/spksrc.python.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mk/spksrc.python.mk b/mk/spksrc.python.mk index c4350d9337d..a61377ce9e0 100644 --- a/mk/spksrc.python.mk +++ b/mk/spksrc.python.mk @@ -77,7 +77,7 @@ python_pre_depend: if grep -q spksrc.python-wheel.mk $${makefile} ; then \ pkgstr=$$(grep ^PKG_NAME $${makefile}) ; \ pkgname=$$(echo $${pkgstr#*=} | xargs) ; \ - echo "rm -fr work-*/$${pkgname}* work-*/.$${pkgname}-*" ; \ - rm -fr work-*/$${pkgname}* work-*/.$${pkgname}-* ; \ + echo "rm -fr work-$(ARCH)-$(TCVERSION)/$${pkgname}* work-$(ARCH)-$(TCVERSION)/.$${pkgname}-*" ; \ + rm -fr work-$(ARCH)-$(TCVERSION)/$${pkgname}* work-$(ARCH)-$(TCVERSION)/.$${pkgname}-* ; \ fi ; \ done From f6bcd5b96caad3be709e8a76aa732cd940a53459 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Mon, 25 Nov 2024 01:21:39 +0000 Subject: [PATCH 055/130] deluge: Update wheels and fix build --- spk/deluge/Makefile | 4 ++-- spk/deluge/src/requirements-crossenv.txt | 16 +++++++--------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/spk/deluge/Makefile b/spk/deluge/Makefile index 99f69addc47..18f16a6f2ba 100644 --- a/spk/deluge/Makefile +++ b/spk/deluge/Makefile @@ -15,7 +15,7 @@ MAINTAINER = SynoCommunity DESCRIPTION = Deluge is a cross platform BitTorrent client, based on libtorrent rasterbar. This package integrates both the deluge deamon \(deluged\), as well as its web counterpart \(deluge-web\), which serves the deluge web UI. DESCRIPTION_FRE = Deluge est un client BitTorrent multi-plateforme, basé sur libtorrent rasterbar. Ce paquet intègre à la fois le démon deluge \(deluged\) ainsi que son penchant web \(deluge-web\), desservant l\'interface utilisateur web deluge. STARTABLE = yes -CHANGELOG = "1. Update to latest github development commit
2. Update to libtorrent 2.0.9
3. Update to OpenSSL 3.1.2
4. Fix for newer shared python" +CHANGELOG = "1. Update to latest github development commit
2. Update to libtorrent 2.0.10" DISPLAY_NAME = Deluge HOMEPAGE = https://deluge-torrent.org @@ -49,7 +49,7 @@ include ../../mk/spksrc.python.mk # [libtorrent] UNSUPPORTED_ARCHS += $(ARMv5_ARCHS) $(ARMv7L_ARCHS) $(OLD_PPC_ARCHS) -DEPENDS += cross/openssl +DEPENDS += cross/openssl3 DEPENDS += cross/geoip DEPENDS += cross/libiconv DEPENDS += cross/boost_1.82 diff --git a/spk/deluge/src/requirements-crossenv.txt b/spk/deluge/src/requirements-crossenv.txt index 9e9eaa83d9a..84b59626879 100644 --- a/spk/deluge/src/requirements-crossenv.txt +++ b/spk/deluge/src/requirements-crossenv.txt @@ -2,14 +2,12 @@ ## required wheels that need cross compilation ## -#deluge==2.1.1 ==> pure - # [deluge] -#deluge==2.1.1 +#deluge==2.1.1 ==> pure # Latest commit on develop branch #git+https://github.com/deluge-torrent/deluge.git@develop#egg=deluge==2.1.1 -# Commit from May30th on develop branch -git+https://github.com/deluge-torrent/deluge.git@8001110625dd95c188c7425d0d95f93abe65f03c#egg=deluge==2.1.1.dev61 +# Commit from August 27th 2024 on develop branch +git+https://github.com/deluge-torrent/deluge.git@8df36c454be320571005231a1c77cedb656557e1#egg=deluge==2.1.1.dev127 # [rencode] 1.0.6 ==> abi3 @@ -19,12 +17,12 @@ GeoIP==1.3.2 MarkupSafe==2.1.3 zope.interface==6.0 -# [libtorrent] 2.0.9 -# Depends: openssl, boost 1.82, geoip +# [libtorrent] 2.0.10 +# Depends: openssl3, boost 1.82, geoip # Require environment variables # BOOST_LIBRARIES # BOOST_BUILD_PATH # Only supported on DSM7 armv7, aarch64, x64 -git+https://github.com/arvidn/libtorrent.git@v2.0.9#egg=libtorrent==2.0.9 +git+https://github.com/arvidn/libtorrent.git@v2.0.9#egg=libtorrent==2.0.10 # Use RC_2_0 for latest development snapshots -# git+https://github.com/arvidn/libtorrent.git@RC_2_0#egg=libtorrent==2.0.9 +# git+https://github.com/arvidn/libtorrent.git@RC_2_0#egg=libtorrent==2.0.10 From c3a30b58c1ff992143b2f4054bd364d5fc8cb90d Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Mon, 25 Nov 2024 01:21:53 +0000 Subject: [PATCH 056/130] boost_1.82: Allow builds from python.mk --- cross/boost_1.82/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cross/boost_1.82/Makefile b/cross/boost_1.82/Makefile index cfe89fb2d1f..a9a8f660814 100644 --- a/cross/boost_1.82/Makefile +++ b/cross/boost_1.82/Makefile @@ -24,7 +24,7 @@ WITH_PYTHON_LIBRARY = ifneq ($(findstring python,$(BOOST_LIBRARIES)),) WITH_PYTHON_LIBRARY = 1 # The packages depending on boost with python, must build python before. -include $(WORK_DIR)/python-cc.mk +include $(WORK_DIR)/crossenv/build/python-cc.mk PYTHON_NAME = $(basename $(notdir $(PYTHON_INTERPRETER))) else ifneq ($(findstring $(BOOST_LIBRARIES), all),) # exclude python library if "all" selected @@ -43,7 +43,7 @@ ADDITIONAL_CXXFLAGS = -Wno-deprecated-declarations ifneq ($(strip $(WITH_PYTHON_LIBRARY)),) CONFIGURE_ARGS += --with-python=$(WORK_DIR)/../../../native/$(PYTHON_NAME)/work-native/install/usr/local/bin/$(PYTHON_NAME) -ADDITIONAL_CXXFLAGS += -I$(STAGING_INSTALL_PREFIX)/$(PYTHON_INC_DIR) -fpermissive +ADDITIONAL_CXXFLAGS += -I$(or $(PYTHON_STAGING_INSTALL_PREFIX),$(STAGING_INSTALL_PREFIX))/$(PYTHON_INC_DIR) -fpermissive endif include ../../mk/spksrc.common.mk @@ -75,7 +75,7 @@ boost_pre_compile: @rm -rf $(WORK_DIR)/$(PKG_DIR)/user-config.jam @echo "using gcc : ${TC_GCC} : ${CXX} : \"$(ADDRESS_MODEL)\" \"$(CFLAGS)\" \"$(CXXFLAGS) $(ADDITIONAL_CXXFLAGS)\" \"$(LDFLAGS)\" \"shared\" ; " > $(WORK_DIR)/$(PKG_DIR)/user-config.jam ifneq ($(strip $(WITH_PYTHON_LIBRARY)),) - @echo "using python : $(PYTHON_VERSION) : : $(STAGING_INSTALL_PREFIX)/$(PYTHON_INC_DIR) ;" >> $(WORK_DIR)/$(PKG_DIR)/user-config.jam + @echo "using python : $(PYTHON_VERSION) : : $(or $(PYTHON_STAGING_INSTALL_PREFIX),$(STAGING_INSTALL_PREFIX))/$(PYTHON_INC_DIR) ;" >> $(WORK_DIR)/$(PKG_DIR)/user-config.jam endif @echo "project : requirements $(OFLAGS) ;" >> $(WORK_DIR)/$(PKG_DIR)/user-config.jam From c5a2f19757e545aed7043d5ef54692d167c74c19 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Mon, 25 Nov 2024 11:10:33 +0000 Subject: [PATCH 057/130] cross/cryptography: crossenv already has cffi and pycparser --- cross/cryptography/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cross/cryptography/Makefile b/cross/cryptography/Makefile index 1ce92258010..66a6979501f 100644 --- a/cross/cryptography/Makefile +++ b/cross/cryptography/Makefile @@ -5,7 +5,7 @@ PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT) PKG_DIST_SITE = https://files.pythonhosted.org/packages/source/c/cryptography PKG_DIR = $(PKG_NAME)-$(PKG_VERS) -DEPENDS = cross/openssl3 cross/cffi +DEPENDS = cross/openssl3 cross/libffi HOMEPAGE = https://github.com/pyca/cryptography COMMENT = Provide cryptographic recipes and primitives to Python developers From 985ffc0780c74ac2c417f0975b629d295123c480 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Mon, 25 Nov 2024 11:12:59 +0000 Subject: [PATCH 058/130] crossenv.mk: Add debug traces to find issue on gh --- mk/spksrc.crossenv.mk | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/mk/spksrc.crossenv.mk b/mk/spksrc.crossenv.mk index e529d724fca..f69c6b2eb00 100644 --- a/mk/spksrc.crossenv.mk +++ b/mk/spksrc.crossenv.mk @@ -180,6 +180,15 @@ build_crossenv_target: $(CROSSENV_PATH)/build/python-cc.mk @$(MSG) CROSSENV_BUILD_REQUIREMENTS = $(CROSSENV_BUILD_REQUIREMENTS) @$(MSG) CROSSENV_BUILD_WHEEL = $(CROSSENV_BUILD_WHEEL) mkdir -p $(PYTHON_LIB_CROSS) + @$(MSG) PYTHON_PKG_VERS_MAJOR_MINOR: [$(PYTHON_PKG_VERS_MAJOR_MINOR)] + @$(MSG) PYTHON_PKG_VERS: [$(PYTHON_PKG_VERS)] + @$(MSG) wildcard PYTHON_WORK_DIR: [$(wildcard $(PYTHON_WORK_DIR)/Python-*)] + @$(MSG) SPK_VERS: [$(SPK_VERS)] + @$(MSG) PYTHON_PKG_NAME: [$(PYTHON_PKG_NAME)] + @$(MSG) PYTHON_PKG_DIR: [$(PYTHON_PKG_DIR)] + @$(MSG) PYTHON_WORK_DIR: [$(PYTHON_WORK_DIR)] + @$(MSG) PYTHON_PACKAGE_WORK_DIR: [$(PYTHON_PACKAGE_WORK_DIR)] + @$(MSG) WORK_DIR: [$(WORK_DIR)] cp -RL $(HOSTPYTHON_LIB_NATIVE) $(abspath $(PYTHON_LIB_CROSS)/../) @echo $(PYTHON_NATIVE) -m crossenv $(abspath $(PYTHON_WORK_DIR)/install/$(PYTHON_INSTALL_PREFIX)/bin/python$(PYTHON_PKG_VERS_MAJOR_MINOR)) \ --cc $(TC_PATH)$(TC_PREFIX)gcc \ From 1bfe6e72f037d71c576db772186eaddae006f457 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Mon, 25 Nov 2024 22:02:13 +0000 Subject: [PATCH 059/130] crossenv.mk: Testing alternative method to get python version dir --- mk/spksrc.crossenv.mk | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/mk/spksrc.crossenv.mk b/mk/spksrc.crossenv.mk index f69c6b2eb00..ba62e659c4f 100644 --- a/mk/spksrc.crossenv.mk +++ b/mk/spksrc.crossenv.mk @@ -18,8 +18,11 @@ # Set default sheel to bash SHELL = /bin/bash -# Python spk/python* related variables -PYTHON_PKG_VERS = $(or $(lastword $(subst -, ,$(dir $(wildcard $(PYTHON_WORK_DIR)/Python-*/hostpython)))),$(SPK_VERS)) +# Defined using PYTHON_PACKAGE_WORK_DIR from spksrc.python.mk or use local work directory +PYTHON_WORK_DIR = $(or $(wildcard $(PYTHON_PACKAGE_WORK_DIR)),$(wildcard $(WORK_DIR))) + +# Other Python spk/python* related variables +PYTHON_PKG_VERS = $(or $(lastword $(subst -, ,$(notdir $(patsubst %/,%,$(wildcard $(PYTHON_WORK_DIR)/Python-[0-9]*))))),$(SPK_VERS)) PYTHON_PKG_VERS_MAJOR_MINOR = $(or $(word 1,$(subst ., ,$(PYTHON_PKG_VERS))).$(word 2,$(subst ., ,$(PYTHON_PKG_VERS))),$(SPK_VERS_MAJOR_MINOR)) PYTHON_PKG_NAME = python$(subst .,,$(PYTHON_PKG_VERS_MAJOR_MINOR)) PYTHON_PKG_DIR = Python-$(PYTHON_PKG_VERS) @@ -111,9 +114,6 @@ endif #### -# Defined using PYTHON_PACKAGE_WORK_DIR from spksrc.python.mk or use local work directory -PYTHON_WORK_DIR = $(wildcard $(or $(PYTHON_PACKAGE_WORK_DIR),$(WORK_DIR))) - # Defined using current install prefix by replacing package name using PYTHON_PACKAGE from spksrc.python.mk, else use local install prefix ifneq ($(PYTHON_PACKAGE),) PYTHON_INSTALL_PREFIX = $(subst $(SPK_NAME),$(PYTHON_PACKAGE),$(INSTALL_PREFIX)) @@ -182,7 +182,7 @@ build_crossenv_target: $(CROSSENV_PATH)/build/python-cc.mk mkdir -p $(PYTHON_LIB_CROSS) @$(MSG) PYTHON_PKG_VERS_MAJOR_MINOR: [$(PYTHON_PKG_VERS_MAJOR_MINOR)] @$(MSG) PYTHON_PKG_VERS: [$(PYTHON_PKG_VERS)] - @$(MSG) wildcard PYTHON_WORK_DIR: [$(wildcard $(PYTHON_WORK_DIR)/Python-*)] + @$(MSG) wildcard PYTHON_WORK_DIR/Python-*: [$(wildcard $(PYTHON_WORK_DIR)/Python-*)] @$(MSG) SPK_VERS: [$(SPK_VERS)] @$(MSG) PYTHON_PKG_NAME: [$(PYTHON_PKG_NAME)] @$(MSG) PYTHON_PKG_DIR: [$(PYTHON_PKG_DIR)] From 77dccbd0ebcad0bcb50ef5556c89cbd0c6f2d0b7 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Mon, 25 Nov 2024 23:55:13 +0000 Subject: [PATCH 060/130] crossenv.mk: Send msg to status file --- mk/spksrc.crossenv.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/mk/spksrc.crossenv.mk b/mk/spksrc.crossenv.mk index ba62e659c4f..63dbaa7bd97 100644 --- a/mk/spksrc.crossenv.mk +++ b/mk/spksrc.crossenv.mk @@ -176,6 +176,7 @@ export LD_LIBRARY_PATH := $(abspath $(WORK_DIR)/../../../native/$(PYTHON_PKG_NAM # build_crossenv_target: SHELL:=/bin/bash build_crossenv_target: $(CROSSENV_PATH)/build/python-cc.mk + @$(MSG) $$(date +%Y%m%d-%H%M%S) MAKELEVEL: $(MAKELEVEL), PARALLEL_MAKE: $(PARALLEL_MAKE), ARCH: $(ARCH)-$(TCVERSION), CROSSENV: $(WHEEL) >> $(PSTAT_LOG) @$(MSG) crossenv wheel packages: $(CROSSENV_DEFAULT_PIP), $(CROSSENV_DEFAULT_SETUPTOOLS), $(CROSSENV_DEFAULT_WHEEL) @$(MSG) CROSSENV_BUILD_REQUIREMENTS = $(CROSSENV_BUILD_REQUIREMENTS) @$(MSG) CROSSENV_BUILD_WHEEL = $(CROSSENV_BUILD_WHEEL) From d6b3e1382ce3cda834b142f608187e08a19a02f0 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Tue, 26 Nov 2024 00:08:30 +0000 Subject: [PATCH 061/130] wheel.mk: Remove trailing # comment using $${wheel%% *} --- mk/spksrc.wheel.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mk/spksrc.wheel.mk b/mk/spksrc.wheel.mk index 662b9b9d047..9dcfb2f7d43 100644 --- a/mk/spksrc.wheel.mk +++ b/mk/spksrc.wheel.mk @@ -167,7 +167,7 @@ ifneq ($(strip $(WHEELS)),) else \ $(MSG) "Python $${PYTHON_VERSION} uses pip: $${crossenvPIP}" ; \ fi ; \ - $(MSG) "Cross-compiling [$${wheel}] wheel using $${CROSSENV_PATH}" ; \ + $(MSG) "Cross-compiling [$${wheel%% *}] wheel using $${CROSSENV_PATH}" ; \ [ "$${file}" = "$(WHEELS_LIMITED_API)" ] && abi3="--build-option=--py-limited-api=$(PYTHON_LIMITED_API)" || abi3="" ; \ global_options=$$(echo $(WHEELS_BUILD_ARGS) | sed -e 's/ \[/\n\[/g' | grep -i $${name} | cut -f2 -d] | xargs) ; \ localCFLAGS=($$(echo $(WHEELS_CFLAGS) | sed -e 's/ \[/\n\[/g' | grep -i $${name} | cut -f2 -d] | xargs)) ; \ @@ -182,7 +182,7 @@ ifneq ($(strip $(WHEELS)),) $$([ "$$(echo $${abi3})" ] && echo "$${abi3} ")" \ $${global_options}" ; \ PIP_CROSSENV=$${crossenvPIP} \ - REQUIREMENT=$${wheel} \ + REQUIREMENT=$$(echo $${wheel%% *}) \ ADDITIONAL_CFLAGS="-I$(STAGING_INSTALL_PREFIX)/$(PYTHON_INC_DIR) $${localCFLAGS[@]}" \ ADDITIONAL_CPPFLAGS="-I$(STAGING_INSTALL_PREFIX)/$(PYTHON_INC_DIR) $${localCPPFLAGS[@]}" \ ADDITIONAL_CXXFLAGS="-I$(STAGING_INSTALL_PREFIX)/$(PYTHON_INC_DIR) $${localCXXFLAGS[@]}" \ From 71c35a9f3618b37591c7f621c8715e753aa41db0 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Tue, 26 Nov 2024 00:28:00 +0000 Subject: [PATCH 062/130] crossenv.mk: Use $(WORK_DIR)/pip caching dir for crossenv creation --- mk/spksrc.crossenv.mk | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/mk/spksrc.crossenv.mk b/mk/spksrc.crossenv.mk index 63dbaa7bd97..5506c1c3677 100644 --- a/mk/spksrc.crossenv.mk +++ b/mk/spksrc.crossenv.mk @@ -97,7 +97,12 @@ endif crossenv_msg_target: @$(MSG) "Preparing crossenv for $(NAME)" +# Create per-arch caching directory: +# PIP_CACHE_DIR defaults to $(WORK_DIR)/pip pre_crossenv_target: crossenv_msg_target + @if [ -n "$(PIP_CACHE_OPT)" ] ; then \ + mkdir -p $(PIP_CACHE_DIR) ; \ + fi; \ post_crossenv_target: $(CROSSENV_TARGET) @@ -221,15 +226,15 @@ endif $(RUN) $$(which cross-python) $(CROSSENV_PATH)/build/get-pip.py $(CROSSENV_DEFAULT_PIP) --no-setuptools --no-wheel --disable-pip-version-check @. $(CROSSENV_PATH)/bin/activate ; \ $(MSG) build-pip Install $(CROSSENV_DEFAULT_SETUPTOOLS) $(CROSSENV_DEFAULT_WHEEL) ; \ - $(RUN) $$(which build-pip) --disable-pip-version-check install $(CROSSENV_DEFAULT_SETUPTOOLS) $(CROSSENV_DEFAULT_WHEEL) ; \ + $(RUN) $$(which build-pip) --cache-dir $(PIP_CACHE_DIR) --disable-pip-version-check install $(CROSSENV_DEFAULT_SETUPTOOLS) $(CROSSENV_DEFAULT_WHEEL) ; \ $(MSG) cross-pip Install $(CROSSENV_DEFAULT_SETUPTOOLS) $(CROSSENV_DEFAULT_WHEEL) ; \ - $(RUN) $$(which cross-pip) --disable-pip-version-check install $(CROSSENV_DEFAULT_SETUPTOOLS) $(CROSSENV_DEFAULT_WHEEL) + $(RUN) $$(which cross-pip) --cache-dir $(PIP_CACHE_DIR) --disable-pip-version-check install $(CROSSENV_DEFAULT_SETUPTOOLS) $(CROSSENV_DEFAULT_WHEEL) @$(MSG) [$(CROSSENV_PATH)] Processing $(CROSSENV_BUILD_REQUIREMENTS) @. $(CROSSENV_PATH)/bin/activate ; \ $(MSG) build-pip install -r $(CROSSENV_BUILD_REQUIREMENTS) ; \ - $(RUN) $$(which build-pip) --disable-pip-version-check install -r $(CROSSENV_BUILD_REQUIREMENTS) ; \ + $(RUN) $$(which build-pip) --cache-dir $(PIP_CACHE_DIR) --disable-pip-version-check install -r $(CROSSENV_BUILD_REQUIREMENTS) ; \ $(MSG) cross-pip Install -r $(CROSSENV_BUILD_REQUIREMENTS) ; \ - $(RUN) $$(which cross-pip) --disable-pip-version-check install -r $(CROSSENV_BUILD_REQUIREMENTS) + $(RUN) $$(which cross-pip) --cache-dir $(PIP_CACHE_DIR) --disable-pip-version-check install -r $(CROSSENV_BUILD_REQUIREMENTS) #ifneq ($(PYTHON_LIB_NATIVE),$(PYTHON_LIB_CROSS)) # cp $(PYTHON_LIB_CROSS)/_sysconfigdata_*.py $(PYTHON_LIB_NATIVE)/_sysconfigdata.py #endif From 03663cd0d4501043911cd585eda4f491f75dd3a3 Mon Sep 17 00:00:00 2001 From: hgy59 Date: Tue, 26 Nov 2024 21:22:15 +0100 Subject: [PATCH 063/130] python-wheels: include wheels in package --- spk/python-wheels/PLIST | 1 + 1 file changed, 1 insertion(+) create mode 100644 spk/python-wheels/PLIST diff --git a/spk/python-wheels/PLIST b/spk/python-wheels/PLIST new file mode 100644 index 00000000000..4cfaf73a12c --- /dev/null +++ b/spk/python-wheels/PLIST @@ -0,0 +1 @@ +rsc:share/wheelhouse From 4d8e8d2123a460d145c021105f5a67925b3dabe1 Mon Sep 17 00:00:00 2001 From: hgy59 Date: Tue, 26 Nov 2024 22:54:01 +0100 Subject: [PATCH 064/130] update github build action - add evaluation of python313 dependent packages - evaluate packages to build and changed dependency folders in build.yml to avoid overflow of bash variables (limited to 1024 chars) (fixes #6284) --- .github/actions/prepare.sh | 19 ++++++++----------- .github/workflows/build.yml | 25 +++++++++++++++---------- 2 files changed, 23 insertions(+), 21 deletions(-) diff --git a/.github/actions/prepare.sh b/.github/actions/prepare.sh index 8e940a041f8..97250593186 100755 --- a/.github/actions/prepare.sh +++ b/.github/actions/prepare.sh @@ -5,9 +5,10 @@ # Evaluate packages to build and referenced source files to download. # # Functions: -# - Evaluate all packages to build depending on files defined in ${GH_FILES}. +# - Build all packages defined by ${USER_SPK_TO_BUILD} and ${GH_SPK_PACKAGES} +# - Evaluate additional packages to build depending on changed folders defined in ${GH_DEPENDENT_PACKAGES}. # - synocli-videodriver is moved to head of packages to build first if triggered by its ffmpeg5-7 -# - python310-311 and ffmpeg5-7 are moved to head of remaining packages to build when triggered by its own or a dependent. +# - python310-313 and ffmpeg5-7 are moved to head of remaining packages to build when triggered by its own or a dependent. # - Referenced native and cross packages of the packages to build are added to the download list. set -o pipefail @@ -18,12 +19,8 @@ echo "::group:: ---- find dependent packages" make setup-synocommunity DEFAULT_TC=$(grep DEFAULT_TC local.mk | cut -f2 -d= | xargs) -# filter for changes made in the spk directories and take unique package name (without spk folder) -SPK_TO_BUILD+=" " -SPK_TO_BUILD+=$(echo "${GH_FILES}" | tr ' ' '\n' | grep -oP "^spk/\K[^\/]*" | sort -u | tr '\n' ' ') - -# filter for changes made in the cross and native directories and take unique package name (including cross or native folder) -DEPENDENT_PACKAGES=$(echo "${GH_FILES}" | tr ' ' '\n' | grep -oP "(cross|native)/[^\/]*" | sort -u | tr '\n' ' ') +# all packages to build from changes or manual definition +SPK_TO_BUILD="${USER_SPK_TO_BUILD} ${GH_SPK_PACKAGES}" # get dependency list # dependencies in this list include the cross or native folder (i.e. native/python cross/glib) @@ -37,7 +34,7 @@ do done # search for dependent spk packages -for package in ${DEPENDENT_PACKAGES} +for package in ${GH_DEPENDENT_PACKAGES} do echo "===> Searching for dependent package: ${package}" packages=$(echo "${DEPENDENCY_LIST}" | grep " ${package} " | grep -o ".*:" | tr ':' ' ' | sort -u | tr '\n' ' ') @@ -86,8 +83,8 @@ do fi done -# for python (310, 311) find all packages that depend on them -for py in python310 python311; do +# for python (310, 311, 313) find all packages that depend on them +for py in python310 python311 python313; do python_dependent_packages=$(find spk/ -maxdepth 2 -mindepth 2 -name "Makefile" -exec grep -Ho "PYTHON_PACKAGE = ${py}" {} \; | grep -Po ".*spk/\K[^/]*" | sort | tr '\n' ' ') # If packages contain a package that depends on python (or is python), then ensure diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 786447634a8..73859b2c3ac 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -84,26 +84,31 @@ jobs: fetch-depth: 0 persist-credentials: false - - name: Get changed files for pull request + - name: Get changed spk_packages and dependency_folders for pull request if: github.event_name == 'pull_request' - id: getfile_pr + id: getchanges_pr run: | - git diff --no-commit-id --name-only -r origin/master...${{github.event.pull_request.head.sha}} | xargs - echo "files=$(git diff --no-commit-id --name-only -r origin/master...${{github.event.pull_request.head.sha}} | xargs)" >> $GITHUB_OUTPUT + git diff --no-commit-id --name-only -r origin/master...${{github.event.pull_request.head.sha}} | grep -oP "^spk/\K[^\/]*" | sort -u | xargs + echo "spk_packages=$(git diff --no-commit-id --name-only -r origin/master...${{github.event.pull_request.head.sha}} | grep -oP "^spk/\K[^\/]*" | sort -u | xargs)" >> $GITHUB_OUTPUT + git diff --no-commit-id --name-only -r origin/master...${{github.event.pull_request.head.sha}} | grep -oP "(cross|native)/[^\/]*" | sort -u | xargs + echo "dependency_folders=$(git diff --no-commit-id --name-only -r origin/master...${{github.event.pull_request.head.sha}} | grep -oP "(cross|native)/[^\/]*" | sort -u | xargs)" >> $GITHUB_OUTPUT - - name: Get changed files for push + - name: Get changed spk_packages and dependency_folders of last commit for push if: github.event_name == 'push' - id: getfile + id: getchanges_push run: | - git diff-tree --no-commit-id --name-only -r ${{ github.sha }} | xargs - echo "files=$(git diff-tree --no-commit-id --name-only -r ${{ github.sha }} | xargs)" >> $GITHUB_OUTPUT + git diff-tree --no-commit-id --name-only -r ${{ github.sha }} | grep -oP "^spk/\K[^\/]*" | sort -u | xargs + echo "spk_packages=$(git diff-tree --no-commit-id --name-only -r ${{ github.sha }} | grep -oP "^spk/\K[^\/]*" | sort -u | xargs)" >> $GITHUB_OUTPUT + git diff-tree --no-commit-id --name-only -r ${{ github.sha }} | grep -oP "(cross|native)/[^\/]*" | sort -u | xargs + echo "dependency_folders=$(git diff-tree --no-commit-id --name-only -r ${{ github.sha }} | grep -oP "(cross|native)/[^\/]*" | sort -u | xargs)" >> $GITHUB_OUTPUT - name: Evaluate dependencies id: dependencies run: ./.github/actions/prepare.sh env: - GH_FILES: ${{ steps.getfile.outputs.files }} ${{ steps.getfile_pr.outputs.files }} - SPK_TO_BUILD: ${{ github.event.inputs.package }} + GH_SPK_PACKAGES: ${{ steps.getchanges_push.outputs.spk_packages }} ${{ steps.getchanges_pr.outputs.spk_packages }} + GH_DEPENDENCY_FOLDERS: ${{ steps.getchanges_push.outputs.dependency_folders }} ${{ steps.getchanges_pr.outputs.dependency_folders }} + USER_SPK_TO_BUILD: ${{ github.event.inputs.package }} - name: Cache downloaded files uses: actions/cache@v4 From 1018d94548eff966e934a7202006e83e719b1619 Mon Sep 17 00:00:00 2001 From: hgy59 Date: Tue, 26 Nov 2024 23:12:18 +0100 Subject: [PATCH 065/130] adjust variable GH_DEPENDENCY_FOLDERS --- .github/actions/prepare.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/prepare.sh b/.github/actions/prepare.sh index 97250593186..aaa5b0265ae 100755 --- a/.github/actions/prepare.sh +++ b/.github/actions/prepare.sh @@ -34,7 +34,7 @@ do done # search for dependent spk packages -for package in ${GH_DEPENDENT_PACKAGES} +for package in ${GH_DEPENDENCY_FOLDERS} do echo "===> Searching for dependent package: ${package}" packages=$(echo "${DEPENDENCY_LIST}" | grep " ${package} " | grep -o ".*:" | tr ':' ' ' | sort -u | tr '\n' ' ') From 819e915238c263183d2e5210e5acdcdb520b87a1 Mon Sep 17 00:00:00 2001 From: hgy59 Date: Tue, 26 Nov 2024 23:49:58 +0100 Subject: [PATCH 066/130] real fix for #6284 - python dependent packages with name sorted after python31* where removed from packages to build (in this context: python-wheels and rdiff-backup) --- .github/actions/prepare.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/actions/prepare.sh b/.github/actions/prepare.sh index aaa5b0265ae..56a3020e154 100755 --- a/.github/actions/prepare.sh +++ b/.github/actions/prepare.sh @@ -94,7 +94,6 @@ for py in python310 python311 python313; do if [ "$(echo ${py} ${python_dependent_packages} | grep -ow ${package})" != "" ]; then packages_without_python=$(echo "${packages}" | tr ' ' '\n' | grep -v "${py}" | tr '\n' ' ') packages="${py} ${packages_without_python}" - break fi done done From 44311cd5746f6206505e6f11f4ff7c7fe0ee1b7d Mon Sep 17 00:00:00 2001 From: hgy59 Date: Wed, 27 Nov 2024 00:09:36 +0100 Subject: [PATCH 067/130] fix github prepare script - add space to separate packages --- .github/actions/prepare.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/prepare.sh b/.github/actions/prepare.sh index 56a3020e154..35521f3ed13 100755 --- a/.github/actions/prepare.sh +++ b/.github/actions/prepare.sh @@ -20,7 +20,7 @@ make setup-synocommunity DEFAULT_TC=$(grep DEFAULT_TC local.mk | cut -f2 -d= | xargs) # all packages to build from changes or manual definition -SPK_TO_BUILD="${USER_SPK_TO_BUILD} ${GH_SPK_PACKAGES}" +SPK_TO_BUILD="${USER_SPK_TO_BUILD} ${GH_SPK_PACKAGES} " # get dependency list # dependencies in this list include the cross or native folder (i.e. native/python cross/glib) From 2c9d04301c54da71b57f631ae11caec1b4ec71eb Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Tue, 26 Nov 2024 23:55:24 +0000 Subject: [PATCH 068/130] crossenv.mk: Miscelanious cleanups --- mk/spksrc.crossenv.mk | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/mk/spksrc.crossenv.mk b/mk/spksrc.crossenv.mk index 5506c1c3677..f49439a760f 100644 --- a/mk/spksrc.crossenv.mk +++ b/mk/spksrc.crossenv.mk @@ -119,7 +119,8 @@ endif #### -# Defined using current install prefix by replacing package name using PYTHON_PACKAGE from spksrc.python.mk, else use local install prefix +# Defined using current install prefix by replacing package name using +# PYTHON_PACKAGE from spksrc.python.mk, else use local install prefix ifneq ($(PYTHON_PACKAGE),) PYTHON_INSTALL_PREFIX = $(subst $(SPK_NAME),$(PYTHON_PACKAGE),$(INSTALL_PREFIX)) else @@ -152,12 +153,11 @@ PYTHON_SITE_PACKAGES_NATIVE = $(abspath $(WORK_DIR)/../../../native/$(PYTHON_PKG PYTHON_LIB_DIR = lib/python$(PYTHON_PKG_VERS_MAJOR_MINOR) PYTHON_INC_DIR = include/python$(PYTHON_PKG_VERS_MAJOR_MINOR) -# Mandatory for rustc wheel building within crossenv -# --> Using python-cc.mk defined variable for cross-compiling wheels +# Mandatory for rustc wheel building at crossenv preparation time +# --> Using python-cc.mk defined variable when cross-compiling wheels at subsequent steps! export PYO3_CROSS_LIB_DIR = $(PYTHON_STAGING_INSTALL_PREFIX)/lib/ export PYO3_CROSS_INCLUDE_DIR = $(PYTHON_STAGING_INSTALL_PREFIX)/include/ -# Mandatory of using OPENSSL_*_DIR starting with -# cryptography version >= 40 +# Mandatory of using OPENSSL_*_DIR starting with cryptography version >= 40 # https://docs.rs/openssl/latest/openssl/#automatic export OPENSSL_LIB_DIR = $(OPENSSL_STAGING_PREFIX)/lib/ export OPENSSL_INCLUDE_DIR = $(OPENSSL_STAGING_PREFIX)/include/ @@ -182,19 +182,10 @@ export LD_LIBRARY_PATH := $(abspath $(WORK_DIR)/../../../native/$(PYTHON_PKG_NAM build_crossenv_target: SHELL:=/bin/bash build_crossenv_target: $(CROSSENV_PATH)/build/python-cc.mk @$(MSG) $$(date +%Y%m%d-%H%M%S) MAKELEVEL: $(MAKELEVEL), PARALLEL_MAKE: $(PARALLEL_MAKE), ARCH: $(ARCH)-$(TCVERSION), CROSSENV: $(WHEEL) >> $(PSTAT_LOG) + @$(MSG) Python sources: $(wildcard $(PYTHON_WORK_DIR)/Python-[0-9]*) @$(MSG) crossenv wheel packages: $(CROSSENV_DEFAULT_PIP), $(CROSSENV_DEFAULT_SETUPTOOLS), $(CROSSENV_DEFAULT_WHEEL) - @$(MSG) CROSSENV_BUILD_REQUIREMENTS = $(CROSSENV_BUILD_REQUIREMENTS) - @$(MSG) CROSSENV_BUILD_WHEEL = $(CROSSENV_BUILD_WHEEL) + @$(MSG) crossenv requirement definition: $(CROSSENV_BUILD_REQUIREMENTS) mkdir -p $(PYTHON_LIB_CROSS) - @$(MSG) PYTHON_PKG_VERS_MAJOR_MINOR: [$(PYTHON_PKG_VERS_MAJOR_MINOR)] - @$(MSG) PYTHON_PKG_VERS: [$(PYTHON_PKG_VERS)] - @$(MSG) wildcard PYTHON_WORK_DIR/Python-*: [$(wildcard $(PYTHON_WORK_DIR)/Python-*)] - @$(MSG) SPK_VERS: [$(SPK_VERS)] - @$(MSG) PYTHON_PKG_NAME: [$(PYTHON_PKG_NAME)] - @$(MSG) PYTHON_PKG_DIR: [$(PYTHON_PKG_DIR)] - @$(MSG) PYTHON_WORK_DIR: [$(PYTHON_WORK_DIR)] - @$(MSG) PYTHON_PACKAGE_WORK_DIR: [$(PYTHON_PACKAGE_WORK_DIR)] - @$(MSG) WORK_DIR: [$(WORK_DIR)] cp -RL $(HOSTPYTHON_LIB_NATIVE) $(abspath $(PYTHON_LIB_CROSS)/../) @echo $(PYTHON_NATIVE) -m crossenv $(abspath $(PYTHON_WORK_DIR)/install/$(PYTHON_INSTALL_PREFIX)/bin/python$(PYTHON_PKG_VERS_MAJOR_MINOR)) \ --cc $(TC_PATH)$(TC_PREFIX)gcc \ @@ -235,9 +226,6 @@ endif $(RUN) $$(which build-pip) --cache-dir $(PIP_CACHE_DIR) --disable-pip-version-check install -r $(CROSSENV_BUILD_REQUIREMENTS) ; \ $(MSG) cross-pip Install -r $(CROSSENV_BUILD_REQUIREMENTS) ; \ $(RUN) $$(which cross-pip) --cache-dir $(PIP_CACHE_DIR) --disable-pip-version-check install -r $(CROSSENV_BUILD_REQUIREMENTS) -#ifneq ($(PYTHON_LIB_NATIVE),$(PYTHON_LIB_CROSS)) -# cp $(PYTHON_LIB_CROSS)/_sysconfigdata_*.py $(PYTHON_LIB_NATIVE)/_sysconfigdata.py -#endif @. $(CROSSENV_PATH)/bin/activate ; \ $(MSG) "Package list for $(CROSSENV_PATH):" ; \ $(RUN) $$(which cross-pip) list From 0c200b83ab7598cfc197ef4c4c81fb71618f2c86 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Wed, 27 Nov 2024 01:40:08 +0000 Subject: [PATCH 069/130] mariadb-connector-c: Fix compilation for some archs --- cross/mariadb-connector-c/Makefile | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/cross/mariadb-connector-c/Makefile b/cross/mariadb-connector-c/Makefile index 1aafc5cbb39..0d05bcec6e7 100644 --- a/cross/mariadb-connector-c/Makefile +++ b/cross/mariadb-connector-c/Makefile @@ -1,4 +1,6 @@ PKG_NAME = mariadb-connector-c +# Version 3.3.11 is the last known version to work with aarch64-6.2.4 +# Assembly error: Error: CFI instruction used without previous .cfi_startproc PKG_VERS = 3.3.11 PKG_EXT = tar.gz PKG_DIST_NAME = v$(PKG_VERS).$(PKG_EXT) @@ -10,13 +12,23 @@ HOMEPAGE = https://mariadb.com/kb/en/mariadb-connector-c/ COMMENT = MariaDB C Connector LICENSE = LGPL -CMAKE_USE_TOOLCHAIN_FILE = OFF CMAKE_DISABLE_EXE_LINKER_FLAGS = 1 include ../../mk/spksrc.cross-cmake.mk -ifeq ($(call version_lt, $(TC_GCC), 5.0),1) +ifeq ($(call version_gt, $(TC_GCC), 4.9),1) +ADDITIONAL_CFLAGS += -Wno-error=maybe-uninitialized +# fails on evansport-6.2.4 +ADDITIONAL_CFLAGS += -Wno-error=strict-aliasing +endif + +ifeq ($(call version_lt, $(TC_GCC), 4.9),1) ADDITIONAL_CFLAGS += -std=gnu99 +# fails on 88f6281-6.2.4 +ADDITIONAL_CFLAGS += -Wno-error=missing-field-initializers +ADDITIONAL_CFLAGS += -Wno-error=uninitialized +# fails on hi3535-6.2.4 +ADDITIONAL_CFLAGS += -Wno-error=array-bounds endif # MySQL specific: From ebb30b6fc2cc2c995fff3f535932299da2c86c6d Mon Sep 17 00:00:00 2001 From: hgy59 Date: Wed, 27 Nov 2024 18:33:10 +0100 Subject: [PATCH 070/130] fix package name substitution in prepare.sh --- .github/actions/prepare.sh | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/actions/prepare.sh b/.github/actions/prepare.sh index 35521f3ed13..5b62865399f 100755 --- a/.github/actions/prepare.sh +++ b/.github/actions/prepare.sh @@ -39,15 +39,15 @@ do echo "===> Searching for dependent package: ${package}" packages=$(echo "${DEPENDENCY_LIST}" | grep " ${package} " | grep -o ".*:" | tr ':' ' ' | sort -u | tr '\n' ' ') echo "===> Found: ${packages}" - SPK_TO_BUILD+=${packages} + SPK_TO_BUILD+=" ${packages}" done # fix for packages with different names -if [ "$(echo ${SPK_TO_BUILD} | grep -ow nzbdrone)" != "" ]; then - SPK_TO_BUILD=$(echo "${SPK_TO_BUILD}" | tr ' ' '\n' | grep -vw "nzbdrone" | tr '\n' ' ')" sonarr3" +if [ "$(echo ${SPK_TO_BUILD} | grep -o ' nzbdrone ')" != "" ]; then + SPK_TO_BUILD=$(echo "${SPK_TO_BUILD}" | tr ' ' '\n' | grep -v "^nzbdrone$" | tr '\n' ' ')" sonarr3" fi -if [ "$(echo ${SPK_TO_BUILD} | grep -ow python)" != "" ]; then - SPK_TO_BUILD=$(echo "${SPK_TO_BUILD}" | tr ' ' '\n' | grep -vw "python" | tr '\n' ' ')" python2" +if [ "$(echo ${SPK_TO_BUILD} | grep -o ' python ')" != "" ]; then + SPK_TO_BUILD=$(echo "${SPK_TO_BUILD}" | tr ' ' '\n' | grep -v "^python$" | tr '\n' ' ')" python2" fi # remove duplicate packages @@ -83,8 +83,8 @@ do fi done -# for python (310, 311, 313) find all packages that depend on them -for py in python310 python311 python313; do +# for python (310, 311, 312, 313) find all packages that depend on them +for py in python310 python311 python312 python313; do python_dependent_packages=$(find spk/ -maxdepth 2 -mindepth 2 -name "Makefile" -exec grep -Ho "PYTHON_PACKAGE = ${py}" {} \; | grep -Po ".*spk/\K[^/]*" | sort | tr '\n' ' ') # If packages contain a package that depends on python (or is python), then ensure @@ -94,6 +94,7 @@ for py in python310 python311 python313; do if [ "$(echo ${py} ${python_dependent_packages} | grep -ow ${package})" != "" ]; then packages_without_python=$(echo "${packages}" | tr ' ' '\n' | grep -v "${py}" | tr '\n' ' ') packages="${py} ${packages_without_python}" + break fi done done From f011798b1fcc09118c2a24d1bc082c745cd81857 Mon Sep 17 00:00:00 2001 From: th0ma7 Date: Wed, 27 Nov 2024 15:33:25 -0500 Subject: [PATCH 071/130] Update mk/spksrc.crossenv.mk - typo Co-authored-by: hgy59 --- mk/spksrc.crossenv.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mk/spksrc.crossenv.mk b/mk/spksrc.crossenv.mk index f49439a760f..00dc48d24c2 100644 --- a/mk/spksrc.crossenv.mk +++ b/mk/spksrc.crossenv.mk @@ -15,7 +15,7 @@ # Variables: # WHEELS List of wheels to go through -# Set default sheel to bash +# Set default shell to bash SHELL = /bin/bash # Defined using PYTHON_PACKAGE_WORK_DIR from spksrc.python.mk or use local work directory From b1013f855949e473fe47709d03c7f15d8898f7fa Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Wed, 27 Nov 2024 21:46:49 +0000 Subject: [PATCH 072/130] python311-wheels: Rename to reference exact matching python version --- spk/{python-wheels => python311-wheels}/Makefile | 2 +- spk/{python-wheels => python311-wheels}/PLIST | 0 .../src/python3-pip.png | Bin .../src/requirements-abi3.txt | 0 .../src/requirements-crossenv-greenlet-v1.txt | 0 .../src/requirements-crossenv-greenlet-v2.txt | 0 .../src/requirements-crossenv-numpy-armv7l.txt | 0 .../src/requirements-crossenv-numpy-gcc4.txt | 0 .../src/requirements-crossenv-numpy.txt | 0 .../src/requirements-crossenv-rpds-py.txt | 0 .../src/requirements-crossenv.txt | 0 11 files changed, 1 insertion(+), 1 deletion(-) rename spk/{python-wheels => python311-wheels}/Makefile (99%) rename spk/{python-wheels => python311-wheels}/PLIST (100%) rename spk/{python-wheels => python311-wheels}/src/python3-pip.png (100%) rename spk/{python-wheels => python311-wheels}/src/requirements-abi3.txt (100%) rename spk/{python-wheels => python311-wheels}/src/requirements-crossenv-greenlet-v1.txt (100%) rename spk/{python-wheels => python311-wheels}/src/requirements-crossenv-greenlet-v2.txt (100%) rename spk/{python-wheels => python311-wheels}/src/requirements-crossenv-numpy-armv7l.txt (100%) rename spk/{python-wheels => python311-wheels}/src/requirements-crossenv-numpy-gcc4.txt (100%) rename spk/{python-wheels => python311-wheels}/src/requirements-crossenv-numpy.txt (100%) rename spk/{python-wheels => python311-wheels}/src/requirements-crossenv-rpds-py.txt (100%) rename spk/{python-wheels => python311-wheels}/src/requirements-crossenv.txt (100%) diff --git a/spk/python-wheels/Makefile b/spk/python311-wheels/Makefile similarity index 99% rename from spk/python-wheels/Makefile rename to spk/python311-wheels/Makefile index 0a773a6f3c0..fe941050967 100644 --- a/spk/python-wheels/Makefile +++ b/spk/python311-wheels/Makefile @@ -1,4 +1,4 @@ -SPK_NAME = python-wheels +SPK_NAME = python311-wheels SPK_VERS = 1.0 SPK_VERS_MAJOR_MINOR = $(word 1,$(subst ., ,$(SPK_VERS))).$(word 2,$(subst ., ,$(SPK_VERS))) SPK_REV = 1 diff --git a/spk/python-wheels/PLIST b/spk/python311-wheels/PLIST similarity index 100% rename from spk/python-wheels/PLIST rename to spk/python311-wheels/PLIST diff --git a/spk/python-wheels/src/python3-pip.png b/spk/python311-wheels/src/python3-pip.png similarity index 100% rename from spk/python-wheels/src/python3-pip.png rename to spk/python311-wheels/src/python3-pip.png diff --git a/spk/python-wheels/src/requirements-abi3.txt b/spk/python311-wheels/src/requirements-abi3.txt similarity index 100% rename from spk/python-wheels/src/requirements-abi3.txt rename to spk/python311-wheels/src/requirements-abi3.txt diff --git a/spk/python-wheels/src/requirements-crossenv-greenlet-v1.txt b/spk/python311-wheels/src/requirements-crossenv-greenlet-v1.txt similarity index 100% rename from spk/python-wheels/src/requirements-crossenv-greenlet-v1.txt rename to spk/python311-wheels/src/requirements-crossenv-greenlet-v1.txt diff --git a/spk/python-wheels/src/requirements-crossenv-greenlet-v2.txt b/spk/python311-wheels/src/requirements-crossenv-greenlet-v2.txt similarity index 100% rename from spk/python-wheels/src/requirements-crossenv-greenlet-v2.txt rename to spk/python311-wheels/src/requirements-crossenv-greenlet-v2.txt diff --git a/spk/python-wheels/src/requirements-crossenv-numpy-armv7l.txt b/spk/python311-wheels/src/requirements-crossenv-numpy-armv7l.txt similarity index 100% rename from spk/python-wheels/src/requirements-crossenv-numpy-armv7l.txt rename to spk/python311-wheels/src/requirements-crossenv-numpy-armv7l.txt diff --git a/spk/python-wheels/src/requirements-crossenv-numpy-gcc4.txt b/spk/python311-wheels/src/requirements-crossenv-numpy-gcc4.txt similarity index 100% rename from spk/python-wheels/src/requirements-crossenv-numpy-gcc4.txt rename to spk/python311-wheels/src/requirements-crossenv-numpy-gcc4.txt diff --git a/spk/python-wheels/src/requirements-crossenv-numpy.txt b/spk/python311-wheels/src/requirements-crossenv-numpy.txt similarity index 100% rename from spk/python-wheels/src/requirements-crossenv-numpy.txt rename to spk/python311-wheels/src/requirements-crossenv-numpy.txt diff --git a/spk/python-wheels/src/requirements-crossenv-rpds-py.txt b/spk/python311-wheels/src/requirements-crossenv-rpds-py.txt similarity index 100% rename from spk/python-wheels/src/requirements-crossenv-rpds-py.txt rename to spk/python311-wheels/src/requirements-crossenv-rpds-py.txt diff --git a/spk/python-wheels/src/requirements-crossenv.txt b/spk/python311-wheels/src/requirements-crossenv.txt similarity index 100% rename from spk/python-wheels/src/requirements-crossenv.txt rename to spk/python311-wheels/src/requirements-crossenv.txt From 8b399f25aef1ae71f84130c40fd2957c6c7ba925 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Wed, 27 Nov 2024 21:54:13 +0000 Subject: [PATCH 073/130] native/python313: Sync wheels with default crossenv versions --- native/python313/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/native/python313/Makefile b/native/python313/Makefile index da494613967..4902c3ab0ea 100644 --- a/native/python313/Makefile +++ b/native/python313/Makefile @@ -31,11 +31,11 @@ PYTHON = $(WORK_DIR)/install/usr/local/bin/python3 PIP = $(WORK_DIR)/install/usr/local/bin/pip PIP_NATIVE = $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/bin/pip -PIP_VERSION = "24.2" -PIP_WHEELS = setuptools==75.1.0 +PIP_VERSION = "24.3.1" +PIP_WHEELS = setuptools==75.4.0 PIP_WHEELS += setuptools-rust==1.10.2 PIP_WHEELS += maturin==1.7.4 -PIP_WHEELS += wheel==0.44.0 +PIP_WHEELS += wheel==0.45.0 PIP_WHEELS += cffi==1.17.1 PIP_WHEELS += crossenv==1.5.0 From e6b1cd65541f2f3881a319521335bcf434c20140 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Wed, 27 Nov 2024 21:54:45 +0000 Subject: [PATCH 074/130] python312: Initial package --- cross/python312/Makefile | 111 +++ cross/python312/PLIST | 14 + cross/python312/digests | 3 + cross/python312/patches/001-mimetypes.patch | 26 + cross/python312/src/mime.types | 788 ++++++++++++++++++++ native/python312/Makefile | 51 ++ native/python312/digests | 3 + spk/python312/Makefile | 46 ++ spk/python312/src/python3.png | Bin 0 -> 7862 bytes spk/python312/src/requirements-pure.txt | 29 + spk/python312/src/service-setup.sh | 16 + 11 files changed, 1087 insertions(+) create mode 100644 cross/python312/Makefile create mode 100644 cross/python312/PLIST create mode 100644 cross/python312/digests create mode 100644 cross/python312/patches/001-mimetypes.patch create mode 100644 cross/python312/src/mime.types create mode 100644 native/python312/Makefile create mode 100644 native/python312/digests create mode 100644 spk/python312/Makefile create mode 100644 spk/python312/src/python3.png create mode 100644 spk/python312/src/requirements-pure.txt create mode 100644 spk/python312/src/service-setup.sh diff --git a/cross/python312/Makefile b/cross/python312/Makefile new file mode 100644 index 00000000000..850b3a13c50 --- /dev/null +++ b/cross/python312/Makefile @@ -0,0 +1,111 @@ +PKG_NAME = python312 +PKG_VERS = 3.12.7 +PKG_VERS_MAJOR_MINOR = $(word 1,$(subst ., ,$(PKG_VERS))).$(word 2,$(subst ., ,$(PKG_VERS))) +PKG_EXT = tar.xz +PKG_DIST_NAME = Python-$(PKG_VERS).$(PKG_EXT) +PKG_DIST_SITE = https://www.python.org/ftp/python/$(PKG_VERS) +PKG_DIR = Python-$(PKG_VERS) + +# Platform "powerpc-none-linux-gnuspe" with compiler "gcc" is not supported by the +# CPython core team, see https://peps.python.org/pep-0011/ for more information. +# And compiler must support std=c++11 (OlD_PPC_ARCHS fail, but ARMv5_ARCHS have no issue). +UNSUPPORTED_ARCHS = $(OLD_PPC_ARCHS) + +BUILD_DEPENDS = native/$(PKG_NAME) + +DEPENDS = cross/zlib cross/sqlite cross/readline cross/ncursesw cross/bzip2 cross/xz +# required for Sleepycat^WOracle Berkeley DB interface +DEPENDS += cross/berkeleydb +# required for uuid module +DEPENDS += cross/libuuid + +HOMEPAGE = https://www.python.org/ +COMMENT = Python Programming Language +LICENSE = PSF + +GNU_CONFIGURE = 1 + +CONFIGURE_ARGS = --enable-shared +CONFIGURE_ARGS += --without-static-libpython +CONFIGURE_ARGS += --enable-ipv6 +# installed pip is not on PATH +CONFIGURE_ARGS += --without-ensurepip +CONFIGURE_ARGS += --enable-loadable-sqlite-extensions +CONFIGURE_ARGS += --with-computed-gotos=yes +CONFIGURE_ARGS += --with-build-python +CONFIGURE_ARGS += --with-readline=readline +CONFIGURE_ARGS += --disable-test-modules + +include ../../mk/spksrc.archs.mk + +# optionally generate optimized code +ifeq ($(strip $(PYTHON_OPTIMIZE)),1) +# +# Enable Link-Time Optimization +CONFIGURE_ARGS += --with-lto +# +# pgo optimization can only be run native platform and now +# exit on errors which had no impact (and effects) previously. +# https://github.com/python/cpython/pull/111950 +#CONFIGURE_ARGS += --enable-optimizations +endif + +ifeq ($(findstring $(ARCH),$(PPC_ARCHS)),$(ARCH)) +# for qoriq +ADDITIONAL_LDFLAGS = -latomic +endif + +CONFIGURE_ARGS += ac_cv_buggy_getaddrinfo=no +CONFIGURE_ARGS += ac_cv_file__dev_ptmx=no +CONFIGURE_ARGS += ac_cv_file__dev_ptc=no +CONFIGURE_ARGS += ac_cv_have_long_long_format=yes + +DEPENDS += cross/openssl3 +CONFIGURE_ARGS += --with-ssl-default-suites=openssl + +DEPENDS += cross/gdbm +CONFIGURE_ARGS += --with-dbmliborder=gdbm:ndbm:bdb + +DEPENDS += cross/libexpat +CONFIGURE_ARGS += --with-system-expat + +# libffi is no longer bundled with python +DEPENDS += cross/libffi + +ADDITIONAL_CFLAGS = -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -L $(STAGING_INSTALL_PREFIX)/lib -I $(STAGING_INSTALL_PREFIX)/include + +POST_PATCH_TARGET = python312_post_patch +PRE_CONFIGURE_TARGET = python312_pre_configure +COMPILE_TARGET = python312_compile +INSTALL_TARGET = python312_install + +include ../../mk/spksrc.cross-cc.mk + +PYTHON_NATIVE = $(abspath $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/bin/python3) +HOSTPYTHON = $(WORK_DIR)/$(PKG_DIR)/hostpython + +.PHONY: python312_post_patch +python312_post_patch: + $(RUN) sed -e 's#@INSTALL_PREFIX@#$(INSTALL_PREFIX)#' -i Lib/mimetypes.py + +.PHONY: python312_pre_configure +python312_pre_configure: + cp $(PYTHON_NATIVE) $(HOSTPYTHON) + $(RUN) autoreconf -ivf -Werror + # create phantom header and library to succeed add_dir_to_list in setup.py + # so that future-promised libsqlite3.so and sqlite3.h will be used. Yep, + # it's a bit hokey, but avoids editing upstream pristine source + mkdir -p $(STAGING_INSTALL_PREFIX)/lib $(STAGING_INSTALL_PREFIX)/include + mkdir -p $(WORK_DIR)/Python-$(PKG_VERS)/Include $(WORK_DIR)/Python-$(PKG_VERS)/lib + test -h $(WORK_DIR)/Python-$(PKG_VERS)/Include/sqlite3.h || ln -fs $(STAGING_INSTALL_PREFIX)/include/sqlite3.h $(WORK_DIR)/Python-$(PKG_VERS)/Include/sqlite3.h + test -h $(WORK_DIR)/Python-$(PKG_VERS)/lib/libsqlite3.so || ln -fs $(STAGING_INSTALL_PREFIX)/lib/libsqlite3.so $(WORK_DIR)/Python-$(PKG_VERS)/lib/ + +.PHONY: python312_compile +python312_compile: + $(RUN) _PYTHON_HOST_PLATFORM=$(TC_TARGET) $(MAKE) -j $(NCPUS) + +.PHONY: python312_install +python312_install: + @install -m 755 -d $(STAGING_INSTALL_PREFIX)/etc + @install -m 644 src/mime.types $(STAGING_INSTALL_PREFIX)/etc/ + $(RUN) _PYTHON_HOST_PLATFORM=$(TC_TARGET) $(MAKE) install prefix=$(STAGING_INSTALL_PREFIX) diff --git a/cross/python312/PLIST b/cross/python312/PLIST new file mode 100644 index 00000000000..39039e01ea1 --- /dev/null +++ b/cross/python312/PLIST @@ -0,0 +1,14 @@ +lnk:bin/idle3 +rsc:bin/idle3.13 +lnk:bin/pydoc3 +rsc:bin/pydoc3.13 +lnk:bin/python3 +bin:bin/python3.13 +rsc:bin/python3.13-config +lnk:bin/python3-config +rsc:etc/mime.types +rsc:include/python3.13/pyconfig.h +lnk:lib/libpython3.13.so +lib:lib/libpython3.13.so.1.0 +lib:lib/libpython3.so +rsc:lib/python3.13 diff --git a/cross/python312/digests b/cross/python312/digests new file mode 100644 index 00000000000..709e70c4a95 --- /dev/null +++ b/cross/python312/digests @@ -0,0 +1,3 @@ +Python-3.12.7.tar.xz SHA1 5a760bbc42c67f1a0aef5bcf7c329348fb88448b +Python-3.12.7.tar.xz SHA256 24887b92e2afd4a2ac602419ad4b596372f67ac9b077190f459aba390faf5550 +Python-3.12.7.tar.xz MD5 c6c933c1a0db52597cb45a7910490f93 diff --git a/cross/python312/patches/001-mimetypes.patch b/cross/python312/patches/001-mimetypes.patch new file mode 100644 index 00000000000..804b3e1f0b1 --- /dev/null +++ b/cross/python312/patches/001-mimetypes.patch @@ -0,0 +1,26 @@ + +DSM does not have the default mime-type files available, +need to bring our own for the module to work. + +Equivalent of cross/python/patches/004-mimetypes.patch +Added by Diaoul 2013-03-24_23:25:49+0100 + +--- Lib/mimetypes.py.orig 2011-10-16 21:07:51.000000000 +0200 ++++ Lib/mimetypes.py 2011-10-16 21:07:58.000000000 +0200 +@@ -40,15 +40,7 @@ + ] + + knownfiles = [ +- "/etc/mime.types", +- "/etc/httpd/mime.types", # Mac OS X +- "/etc/httpd/conf/mime.types", # Apache +- "/etc/apache/mime.types", # Apache 1 +- "/etc/apache2/mime.types", # Apache 2 +- "/usr/local/etc/httpd/conf/mime.types", +- "/usr/local/lib/netscape/mime.types", +- "/usr/local/etc/httpd/conf/mime.types", # Apache 1.2 +- "/usr/local/etc/mime.types", # Apache 1.3 ++ "@INSTALL_PREFIX@/etc/mime.types", + ] + + inited = False diff --git a/cross/python312/src/mime.types b/cross/python312/src/mime.types new file mode 100644 index 00000000000..893622137dd --- /dev/null +++ b/cross/python312/src/mime.types @@ -0,0 +1,788 @@ +############################################################################### +# +# MIME-TYPES and the extensions that represent them +# +# This file is part of the "mime-support" package. Please send email (not a +# bug report) to mime-support@packages.debian.org if you would like new types +# and/or extensions to be added. +# +# The reason that all types are managed by the mime-support package instead +# allowing individual packages to install types in much the same way as they +# add entries in to the mailcap file is so these types can be referenced by +# other programs (such as a web server) even if the specific support package +# for that type is not installed. +# +# Users can add their own types if they wish by creating a ".mime.types" +# file in their home directory. Definitions included there will take +# precedence over those listed here. +# +# Note: Compression schemes like "gzip", "bzip", and "compress" are not +# actually "mime-types". They are "encodings" and hence must _not_ have +# entries in this file to map their extensions. The "mime-type" of an +# encoded file refers to the type of data that has been encoded, not the +# type of encoding. +# +############################################################################### + + +application/activemessage +application/andrew-inset ez +application/annodex anx +application/applefile +application/atom+xml atom +application/atomcat+xml atomcat +application/atomserv+xml atomsrv +application/atomicmail +application/batch-SMTP +application/beep+xml +application/bbolin lin +application/cals-1840 +application/cap cap pcap +application/commonground +application/cu-seeme cu +application/cybercash +application/davmount+xml davmount +application/dca-rft +application/dec-dx +application/docbook+xml +application/dsptype tsp +application/dvcs +application/ecmascript es +application/edi-consent +application/edi-x12 +application/edifact +application/eshop +application/font-tdpfr +application/futuresplash spl +application/ghostview +application/hta hta +application/http +application/hyperstudio +application/iges +application/index +application/index.cmd +application/index.obj +application/index.response +application/index.vnd +application/iotp +application/ipp +application/isup +application/java-archive jar +application/java-serialized-object ser +application/java-vm class +application/javascript js +application/m3g m3g +application/mac-binhex40 hqx +application/mac-compactpro cpt +application/macwriteii +application/marc +application/mathematica nb nbp +application/ms-tnef +application/msaccess mdb +application/msword doc dot +application/mxf mxf +application/news-message-id +application/news-transmission +application/ocsp-request +application/ocsp-response +application/octet-stream bin +application/oda oda +application/ogg ogx +application/parityfec +application/pdf pdf +application/pgp-encrypted +application/pgp-keys key +application/pgp-signature pgp +application/pics-rules prf +application/pkcs10 +application/pkcs7-mime +application/pkcs7-signature +application/pkix-cert +application/pkix-crl +application/pkixcmp +application/postscript ps ai eps epsi epsf eps2 eps3 +application/prs.alvestrand.titrax-sheet +application/prs.cww +application/prs.nprend +application/qsig +application/rar rar +application/rdf+xml rdf +application/remote-printing +application/riscos +application/rss+xml rss +application/rtf rtf +application/sdp +application/set-payment +application/set-payment-initiation +application/set-registration +application/set-registration-initiation +application/sgml +application/sgml-open-catalog +application/sieve +application/slate +application/smil smi smil +application/timestamp-query +application/timestamp-reply +application/vemmi +application/whoispp-query +application/whoispp-response +application/wita +application/x400-bp +application/xhtml+xml xhtml xht +application/xml xml xsl xsd +application/xml-dtd +application/xml-external-parsed-entity +application/xspf+xml xspf +application/zip zip +application/vnd.3M.Post-it-Notes +application/vnd.accpac.simply.aso +application/vnd.accpac.simply.imp +application/vnd.acucobol +application/vnd.aether.imp +application/vnd.android.package-archive apk +application/vnd.anser-web-certificate-issue-initiation +application/vnd.anser-web-funds-transfer-initiation +application/vnd.audiograph +application/vnd.bmi +application/vnd.businessobjects +application/vnd.canon-cpdl +application/vnd.canon-lips +application/vnd.cinderella cdy +application/vnd.claymore +application/vnd.commerce-battelle +application/vnd.commonspace +application/vnd.comsocaller +application/vnd.contact.cmsg +application/vnd.cosmocaller +application/vnd.ctc-posml +application/vnd.cups-postscript +application/vnd.cups-raster +application/vnd.cups-raw +application/vnd.cybank +application/vnd.dna +application/vnd.dpgraph +application/vnd.dxr +application/vnd.ecdis-update +application/vnd.ecowin.chart +application/vnd.ecowin.filerequest +application/vnd.ecowin.fileupdate +application/vnd.ecowin.series +application/vnd.ecowin.seriesrequest +application/vnd.ecowin.seriesupdate +application/vnd.enliven +application/vnd.epson.esf +application/vnd.epson.msf +application/vnd.epson.quickanime +application/vnd.epson.salt +application/vnd.epson.ssf +application/vnd.ericsson.quickcall +application/vnd.eudora.data +application/vnd.fdf +application/vnd.ffsns +application/vnd.flographit +application/vnd.framemaker +application/vnd.fsc.weblaunch +application/vnd.fujitsu.oasys +application/vnd.fujitsu.oasys2 +application/vnd.fujitsu.oasys3 +application/vnd.fujitsu.oasysgp +application/vnd.fujitsu.oasysprs +application/vnd.fujixerox.ddd +application/vnd.fujixerox.docuworks +application/vnd.fujixerox.docuworks.binder +application/vnd.fut-misnet +application/vnd.google-earth.kml+xml kml +application/vnd.google-earth.kmz kmz +application/vnd.grafeq +application/vnd.groove-account +application/vnd.groove-identity-message +application/vnd.groove-injector +application/vnd.groove-tool-message +application/vnd.groove-tool-template +application/vnd.groove-vcard +application/vnd.hhe.lesson-player +application/vnd.hp-HPGL +application/vnd.hp-PCL +application/vnd.hp-PCLXL +application/vnd.hp-hpid +application/vnd.hp-hps +application/vnd.httphone +application/vnd.hzn-3d-crossword +application/vnd.ibm.MiniPay +application/vnd.ibm.afplinedata +application/vnd.ibm.modcap +application/vnd.informix-visionary +application/vnd.intercon.formnet +application/vnd.intertrust.digibox +application/vnd.intertrust.nncp +application/vnd.intu.qbo +application/vnd.intu.qfx +application/vnd.irepository.package+xml +application/vnd.is-xpr +application/vnd.japannet-directory-service +application/vnd.japannet-jpnstore-wakeup +application/vnd.japannet-payment-wakeup +application/vnd.japannet-registration +application/vnd.japannet-registration-wakeup +application/vnd.japannet-setstore-wakeup +application/vnd.japannet-verification +application/vnd.japannet-verification-wakeup +application/vnd.koan +application/vnd.lotus-1-2-3 +application/vnd.lotus-approach +application/vnd.lotus-freelance +application/vnd.lotus-notes +application/vnd.lotus-organizer +application/vnd.lotus-screencam +application/vnd.lotus-wordpro +application/vnd.mcd +application/vnd.mediastation.cdkey +application/vnd.meridian-slingshot +application/vnd.mif +application/vnd.minisoft-hp3000-save +application/vnd.mitsubishi.misty-guard.trustweb +application/vnd.mobius.daf +application/vnd.mobius.dis +application/vnd.mobius.msl +application/vnd.mobius.plc +application/vnd.mobius.txf +application/vnd.motorola.flexsuite +application/vnd.motorola.flexsuite.adsi +application/vnd.motorola.flexsuite.fis +application/vnd.motorola.flexsuite.gotap +application/vnd.motorola.flexsuite.kmr +application/vnd.motorola.flexsuite.ttc +application/vnd.motorola.flexsuite.wem +application/vnd.mozilla.xul+xml xul +application/vnd.ms-artgalry +application/vnd.ms-asf +application/vnd.ms-excel xls xlb xlt +application/vnd.ms-lrm +application/vnd.ms-pki.seccat cat +application/vnd.ms-pki.stl stl +application/vnd.ms-powerpoint ppt pps +application/vnd.ms-project +application/vnd.ms-tnef +application/vnd.ms-works +application/vnd.mseq +application/vnd.msign +application/vnd.music-niff +application/vnd.musician +application/vnd.netfpx +application/vnd.noblenet-directory +application/vnd.noblenet-sealer +application/vnd.noblenet-web +application/vnd.novadigm.EDM +application/vnd.novadigm.EDX +application/vnd.novadigm.EXT +application/vnd.oasis.opendocument.chart odc +application/vnd.oasis.opendocument.database odb +application/vnd.oasis.opendocument.formula odf +application/vnd.oasis.opendocument.graphics odg +application/vnd.oasis.opendocument.graphics-template otg +application/vnd.oasis.opendocument.image odi +application/vnd.oasis.opendocument.presentation odp +application/vnd.oasis.opendocument.presentation-template otp +application/vnd.oasis.opendocument.spreadsheet ods +application/vnd.oasis.opendocument.spreadsheet-template ots +application/vnd.oasis.opendocument.text odt +application/vnd.oasis.opendocument.text-master odm +application/vnd.oasis.opendocument.text-template ott +application/vnd.oasis.opendocument.text-web oth +application/vnd.osa.netdeploy +application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx +application/vnd.openxmlformats-officedocument.spreadsheetml.template xltx +application/vnd.openxmlformats-officedocument.presentationml.presentation pptx +application/vnd.openxmlformats-officedocument.presentationml.slideshow ppsx +application/vnd.openxmlformats-officedocument.presentationml.template potx +application/vnd.openxmlformats-officedocument.wordprocessingml.document docx +application/vnd.openxmlformats-officedocument.wordprocessingml.template dotx +application/vnd.palm +application/vnd.pg.format +application/vnd.pg.osasli +application/vnd.powerbuilder6 +application/vnd.powerbuilder6-s +application/vnd.powerbuilder7 +application/vnd.powerbuilder7-s +application/vnd.powerbuilder75 +application/vnd.powerbuilder75-s +application/vnd.previewsystems.box +application/vnd.publishare-delta-tree +application/vnd.pvi.ptid1 +application/vnd.pwg-xhtml-print+xml +application/vnd.rapid +application/vnd.rim.cod cod +application/vnd.s3sms +application/vnd.seemail +application/vnd.shana.informed.formdata +application/vnd.shana.informed.formtemplate +application/vnd.shana.informed.interchange +application/vnd.shana.informed.package +application/vnd.smaf mmf +application/vnd.sss-cod +application/vnd.sss-dtf +application/vnd.sss-ntf +application/vnd.stardivision.calc sdc +application/vnd.stardivision.chart sds +application/vnd.stardivision.draw sda +application/vnd.stardivision.impress sdd +application/vnd.stardivision.math sdf +application/vnd.stardivision.writer sdw +application/vnd.stardivision.writer-global sgl +application/vnd.street-stream +application/vnd.sun.xml.calc sxc +application/vnd.sun.xml.calc.template stc +application/vnd.sun.xml.draw sxd +application/vnd.sun.xml.draw.template std +application/vnd.sun.xml.impress sxi +application/vnd.sun.xml.impress.template sti +application/vnd.sun.xml.math sxm +application/vnd.sun.xml.writer sxw +application/vnd.sun.xml.writer.global sxg +application/vnd.sun.xml.writer.template stw +application/vnd.svd +application/vnd.swiftview-ics +application/vnd.symbian.install sis +application/vnd.triscape.mxs +application/vnd.trueapp +application/vnd.truedoc +application/vnd.tve-trigger +application/vnd.ufdl +application/vnd.uplanet.alert +application/vnd.uplanet.alert-wbxml +application/vnd.uplanet.bearer-choice +application/vnd.uplanet.bearer-choice-wbxml +application/vnd.uplanet.cacheop +application/vnd.uplanet.cacheop-wbxml +application/vnd.uplanet.channel +application/vnd.uplanet.channel-wbxml +application/vnd.uplanet.list +application/vnd.uplanet.list-wbxml +application/vnd.uplanet.listcmd +application/vnd.uplanet.listcmd-wbxml +application/vnd.uplanet.signal +application/vnd.vcx +application/vnd.vectorworks +application/vnd.vidsoft.vidconference +application/vnd.visio vsd +application/vnd.vividence.scriptfile +application/vnd.wap.sic +application/vnd.wap.slc +application/vnd.wap.wbxml wbxml +application/vnd.wap.wmlc wmlc +application/vnd.wap.wmlscriptc wmlsc +application/vnd.webturbo +application/vnd.wordperfect wpd +application/vnd.wordperfect5.1 wp5 +application/vnd.wrq-hp3000-labelled +application/vnd.wt.stf +application/vnd.xara +application/vnd.xfdl +application/vnd.yellowriver-custom-menu +application/x-123 wk +application/x-7z-compressed 7z +application/x-abiword abw +application/x-apple-diskimage dmg +application/x-bcpio bcpio +application/x-bittorrent torrent +application/x-cab cab +application/x-cbr cbr +application/x-cbz cbz +application/x-cdf cdf cda +application/x-cdlink vcd +application/x-chess-pgn pgn +application/x-core +application/x-cpio cpio +application/x-csh csh +application/x-debian-package deb udeb +application/x-director dcr dir dxr +application/x-dms dms +application/x-doom wad +application/x-dvi dvi +application/x-httpd-eruby rhtml +application/x-executable +application/x-font pfa pfb gsf pcf pcf.Z +application/x-freemind mm +application/x-futuresplash spl +application/x-gnumeric gnumeric +application/x-go-sgf sgf +application/x-graphing-calculator gcf +application/x-gtar gtar tgz taz +application/x-hdf hdf +application/x-httpd-php phtml pht php +application/x-httpd-php-source phps +application/x-httpd-php3 php3 +application/x-httpd-php3-preprocessed php3p +application/x-httpd-php4 php4 +application/x-httpd-php5 php5 +application/x-ica ica +application/x-info info +application/x-internet-signup ins isp +application/x-iphone iii +application/x-iso9660-image iso +application/x-jam jam +application/x-java-applet +application/x-java-bean +application/x-java-jnlp-file jnlp +application/x-jmol jmz +application/x-kchart chrt +application/x-kdelnk +application/x-killustrator kil +application/x-koan skp skd skt skm +application/x-kpresenter kpr kpt +application/x-kspread ksp +application/x-kword kwd kwt +application/x-latex latex +application/x-lha lha +application/x-lyx lyx +application/x-lzh lzh +application/x-lzx lzx +application/x-maker frm maker frame fm fb book fbdoc +application/x-mif mif +application/x-ms-wmd wmd +application/x-ms-wmz wmz +application/x-msdos-program com exe bat dll +application/x-msi msi +application/x-netcdf nc +application/x-ns-proxy-autoconfig pac dat +application/x-nwc nwc +application/x-object o +application/x-oz-application oza +application/x-pkcs7-certreqresp p7r +application/x-pkcs7-crl crl +application/x-python-code pyc pyo +application/x-qgis qgs shp shx +application/x-quicktimeplayer qtl +application/x-redhat-package-manager rpm +application/x-ruby rb +application/x-rx +application/x-sh sh +application/x-shar shar +application/x-shellscript +application/x-shockwave-flash swf swfl +application/x-silverlight scr +application/x-stuffit sit sitx +application/x-sv4cpio sv4cpio +application/x-sv4crc sv4crc +application/x-tar tar +application/x-tcl tcl +application/x-tex-gf gf +application/x-tex-pk pk +application/x-texinfo texinfo texi +application/x-trash ~ % bak old sik +application/x-troff t tr roff +application/x-troff-man man +application/x-troff-me me +application/x-troff-ms ms +application/x-ustar ustar +application/x-videolan +application/x-wais-source src +application/x-wingz wz +application/x-x509-ca-cert crt +application/x-xcf xcf +application/x-xfig fig +application/x-xpinstall xpi + +audio/32kadpcm +audio/3gpp +audio/amr amr +audio/amr-wb awb +audio/amr amr +audio/amr-wb awb +audio/annodex axa +audio/basic au snd +audio/flac flac +audio/g.722.1 +audio/l16 +audio/midi mid midi kar +audio/mp4a-latm +audio/mpa-robust +audio/mpeg mpga mpega mp2 mp3 m4a +audio/mpegurl m3u +audio/ogg oga ogg spx +audio/parityfec +audio/prs.sid sid +audio/telephone-event +audio/tone +audio/vnd.cisco.nse +audio/vnd.cns.anp1 +audio/vnd.cns.inf1 +audio/vnd.digital-winds +audio/vnd.everad.plj +audio/vnd.lucent.voice +audio/vnd.nortel.vbk +audio/vnd.nuera.ecelp4800 +audio/vnd.nuera.ecelp7470 +audio/vnd.nuera.ecelp9600 +audio/vnd.octel.sbc +audio/vnd.qcelp +audio/vnd.rhetorex.32kadpcm +audio/vnd.vmx.cvsd +audio/x-aiff aif aiff aifc +audio/x-gsm gsm +audio/x-mpegurl m3u +audio/x-ms-wma wma +audio/x-ms-wax wax +audio/x-pn-realaudio-plugin +audio/x-pn-realaudio ra rm ram +audio/x-realaudio ra +audio/x-scpls pls +audio/x-sd2 sd2 +audio/x-wav wav + +chemical/x-alchemy alc +chemical/x-cache cac cache +chemical/x-cache-csf csf +chemical/x-cactvs-binary cbin cascii ctab +chemical/x-cdx cdx +chemical/x-cerius cer +chemical/x-chem3d c3d +chemical/x-chemdraw chm +chemical/x-cif cif +chemical/x-cmdf cmdf +chemical/x-cml cml +chemical/x-compass cpa +chemical/x-crossfire bsd +chemical/x-csml csml csm +chemical/x-ctx ctx +chemical/x-cxf cxf cef +#chemical/x-daylight-smiles smi +chemical/x-embl-dl-nucleotide emb embl +chemical/x-galactic-spc spc +chemical/x-gamess-input inp gam gamin +chemical/x-gaussian-checkpoint fch fchk +chemical/x-gaussian-cube cub +chemical/x-gaussian-input gau gjc gjf +chemical/x-gaussian-log gal +chemical/x-gcg8-sequence gcg +chemical/x-genbank gen +chemical/x-hin hin +chemical/x-isostar istr ist +chemical/x-jcamp-dx jdx dx +chemical/x-kinemage kin +chemical/x-macmolecule mcm +chemical/x-macromodel-input mmd mmod +chemical/x-mdl-molfile mol +chemical/x-mdl-rdfile rd +chemical/x-mdl-rxnfile rxn +chemical/x-mdl-sdfile sd sdf +chemical/x-mdl-tgf tgf +#chemical/x-mif mif +chemical/x-mmcif mcif +chemical/x-mol2 mol2 +chemical/x-molconn-Z b +chemical/x-mopac-graph gpt +chemical/x-mopac-input mop mopcrt mpc zmt +chemical/x-mopac-out moo +chemical/x-mopac-vib mvb +chemical/x-ncbi-asn1 asn +chemical/x-ncbi-asn1-ascii prt ent +chemical/x-ncbi-asn1-binary val aso +chemical/x-ncbi-asn1-spec asn +chemical/x-pdb pdb ent +chemical/x-rosdal ros +chemical/x-swissprot sw +chemical/x-vamas-iso14976 vms +chemical/x-vmd vmd +chemical/x-xtel xtel +chemical/x-xyz xyz + +image/cgm +image/g3fax +image/gif gif +image/ief ief +image/jpeg jpeg jpg jpe +image/naplps +image/pcx pcx +image/png png +image/prs.btif +image/prs.pti +image/svg+xml svg svgz +image/tiff tiff tif +image/vnd.cns.inf2 +image/vnd.djvu djvu djv +image/vnd.dwg +image/vnd.dxf +image/vnd.fastbidsheet +image/vnd.fpx +image/vnd.fst +image/vnd.fujixerox.edmics-mmr +image/vnd.fujixerox.edmics-rlc +image/vnd.mix +image/vnd.net-fpx +image/vnd.svf +image/vnd.wap.wbmp wbmp +image/vnd.xiff +image/x-canon-cr2 cr2 +image/x-canon-crw crw +image/x-cmu-raster ras +image/x-coreldraw cdr +image/x-coreldrawpattern pat +image/x-coreldrawtemplate cdt +image/x-corelphotopaint cpt +image/x-epson-erf erf +image/x-icon ico +image/x-jg art +image/x-jng jng +image/x-ms-bmp bmp +image/x-nikon-nef nef +image/x-olympus-orf orf +image/x-photoshop psd +image/x-portable-anymap pnm +image/x-portable-bitmap pbm +image/x-portable-graymap pgm +image/x-portable-pixmap ppm +image/x-rgb rgb +image/x-xbitmap xbm +image/x-xpixmap xpm +image/x-xwindowdump xwd + +inode/chardevice +inode/blockdevice +inode/directory-locked +inode/directory +inode/fifo +inode/socket + +message/delivery-status +message/disposition-notification +message/external-body +message/http +message/s-http +message/news +message/partial +message/rfc822 eml + +model/iges igs iges +model/mesh msh mesh silo +model/vnd.dwf +model/vnd.flatland.3dml +model/vnd.gdl +model/vnd.gs-gdl +model/vnd.gtw +model/vnd.mts +model/vnd.vtu +model/vrml wrl vrml +model/x3d+vrml x3dv +model/x3d+xml x3d +model/x3d+binary x3db + +multipart/alternative +multipart/appledouble +multipart/byteranges +multipart/digest +multipart/encrypted +multipart/form-data +multipart/header-set +multipart/mixed +multipart/parallel +multipart/related +multipart/report +multipart/signed +multipart/voice-message + +text/cache-manifest manifest +text/calendar ics icz +text/css css +text/csv csv +text/directory +text/english +text/enriched +text/h323 323 +text/html html htm shtml +text/iuls uls +text/mathml mml +text/parityfec +text/plain asc txt text pot brf +text/prs.lines.tag +text/rfc822-headers +text/richtext rtx +text/rtf +text/scriptlet sct wsc +text/t140 +text/texmacs tm ts +text/tab-separated-values tsv +text/uri-list +text/vnd.abc +text/vnd.curl +text/vnd.DMClientScript +text/vnd.flatland.3dml +text/vnd.fly +text/vnd.fmi.flexstor +text/vnd.in3d.3dml +text/vnd.in3d.spot +text/vnd.IPTC.NewsML +text/vnd.IPTC.NITF +text/vnd.latex-z +text/vnd.motorola.reflex +text/vnd.ms-mediapackage +text/vnd.sun.j2me.app-descriptor jad +text/vnd.wap.si +text/vnd.wap.sl +text/vnd.wap.wml wml +text/vnd.wap.wmlscript wmls +text/x-bibtex bib +text/x-boo boo +text/x-c++hdr h++ hpp hxx hh +text/x-c++src c++ cpp cxx cc +text/x-chdr h +text/x-component htc +text/x-crontab +text/x-csh csh +text/x-csrc c +text/x-dsrc d +text/x-diff diff patch +text/x-haskell hs +text/x-java java +text/x-literate-haskell lhs +text/x-makefile +text/x-moc moc +text/x-pascal p pas +text/x-pcs-gcd gcd +text/x-perl pl pm +text/x-python py +text/x-scala scala +text/x-server-parsed-html +text/x-setext etx +text/x-sh sh +text/x-tcl tcl tk +text/x-tex tex ltx sty cls +text/x-vcalendar vcs +text/x-vcard vcf + +video/3gpp 3gp +video/annodex axv +video/dl dl +video/dv dif dv +video/fli fli +video/gl gl +video/mpeg mpeg mpg mpe +video/mp4 mp4 +video/quicktime qt mov +video/mp4v-es +video/ogg ogv +video/parityfec +video/pointer +video/vnd.fvt +video/vnd.motorola.video +video/vnd.motorola.videop +video/vnd.mpegurl mxu +video/vnd.mts +video/vnd.nokia.interleaved-multimedia +video/vnd.vivo +video/x-flv flv +video/x-la-asf lsf lsx +video/x-mng mng +video/x-ms-asf asf asx +video/x-ms-wm wm +video/x-ms-wmv wmv +video/x-ms-wmx wmx +video/x-ms-wvx wvx +video/x-msvideo avi +video/x-sgi-movie movie +video/x-matroska mpv mkv + +x-conference/x-cooltalk ice + +x-epoc/x-sisx-app sisx +x-world/x-vrml vrm vrml wrl diff --git a/native/python312/Makefile b/native/python312/Makefile new file mode 100644 index 00000000000..7a3c6233b84 --- /dev/null +++ b/native/python312/Makefile @@ -0,0 +1,51 @@ +PKG_NAME = python312 +PKG_VERS = 3.12.7 +PKG_EXT = tar.xz +PKG_DIST_NAME = Python-$(PKG_VERS).$(PKG_EXT) +PKG_DIST_SITE = https://www.python.org/ftp/python/$(PKG_VERS) +PKG_DIR = Python-$(PKG_VERS) + +HOMEPAGE = https://www.python.org/ +COMMENT = Python Programming Language +LICENSE = PSF + +GNU_CONFIGURE = 1 +CONFIGURE_ARGS = --enable-ipv6 +CONFIGURE_ARGS += --without-static-libpython +# installed pip is not on PATH +CONFIGURE_ARGS += --with-ensurepip=no +# test modules are required for optimization only +CONFIGURE_ARGS += --disable-test-modules +# Uses system default libffi-dev +CONFIGURE_ARGS += --with-system-ffi +# Uses system default libssl-dev +CONFIGURE_ARGS += --with-ssl-default-suites=openssl + +COMPILE_MAKE_OPTIONS += all + +POST_INSTALL_TARGET = python311_native_post_install + +include ../../mk/spksrc.native-cc.mk + +PYTHON = $(WORK_DIR)/install/usr/local/bin/python3 +PIP = $(WORK_DIR)/install/usr/local/bin/pip +PIP_NATIVE = $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/bin/pip + +PIP_VERSION = "24.3.1" +PIP_WHEELS = setuptools==75.4.0 +PIP_WHEELS += setuptools-rust==1.10.2 +PIP_WHEELS += maturin==1.7.4 +PIP_WHEELS += wheel==0.45.0 +PIP_WHEELS += cffi==1.17.1 +PIP_WHEELS += crossenv==1.5.0 + +.PHONY: python311_native_post_install +python311_native_post_install: $(WORK_DIR)/python-native.mk + @$(MSG) Installing pip + @$(RUN) wget https://bootstrap.pypa.io/get-pip.py + @$(RUN) $(PYTHON) get-pip.py "pip==$(PIP_VERSION)" --no-setuptools --no-wheel --disable-pip-version-check + @$(MSG) Installing setuptools, wheel, cffi and crossenv + @$(PIP) --disable-pip-version-check install $(PIP_WHEELS) + +$(WORK_DIR)/python-native.mk: + @echo PIP=$(PIP_NATIVE) >> $@ diff --git a/native/python312/digests b/native/python312/digests new file mode 100644 index 00000000000..709e70c4a95 --- /dev/null +++ b/native/python312/digests @@ -0,0 +1,3 @@ +Python-3.12.7.tar.xz SHA1 5a760bbc42c67f1a0aef5bcf7c329348fb88448b +Python-3.12.7.tar.xz SHA256 24887b92e2afd4a2ac602419ad4b596372f67ac9b077190f459aba390faf5550 +Python-3.12.7.tar.xz MD5 c6c933c1a0db52597cb45a7910490f93 diff --git a/spk/python312/Makefile b/spk/python312/Makefile new file mode 100644 index 00000000000..66549015b9d --- /dev/null +++ b/spk/python312/Makefile @@ -0,0 +1,46 @@ +SPK_NAME = python312 +SPK_VERS = 3.12.7 +SPK_VERS_MAJOR_MINOR = $(word 1,$(subst ., ,$(SPK_VERS))).$(word 2,$(subst ., ,$(SPK_VERS))) +SPK_REV = 1 +SPK_ICON = src/python3.png + +# Platform "powerpc-none-linux-gnuspe" with compiler "gcc" is not supported by the +# CPython core team, see https://peps.python.org/pep-0011/ for more information. +# And compiler must support std=c++11 (OlD_PPC_ARCHS fail, but ARMv5_ARCHS have no issue). +UNSUPPORTED_ARCHS = $(OLD_PPC_ARCHS) + +DEPENDS = cross/python312 +DEPENDS += cross/pip + +MAINTAINER = SynoCommunity +DESCRIPTION = Python Programming Language. +DESCRIPTION_FRE = Language de programmation Python. +DESCRIPTION_SPN = Lenguaje de programación Python. +STARTABLE = no +DISPLAY_NAME = Python 3.12 +CHANGELOG = "1. Initial Python 3.13.7 package release" + +HOMEPAGE = https://www.python.org +LICENSE = PSF + +# Force compiler LTO optimizations +ENV += PYTHON_OPTIMIZE=1 + +# Force building pure-python wheels +WHEELS_PURE_PYTHON_PACKAGING_ENABLE = 1 +WHEELS = src/requirements-pure.txt + +SERVICE_SETUP = src/service-setup.sh + +PYTHON_LIB_DIR = lib/python$(SPK_VERS_MAJOR_MINOR) + +POST_STRIP_TARGET = python312_extra_install + +SPK_USR_LOCAL_LINKS = bin:bin/python3.12 + +include ../../mk/spksrc.spk.mk + +.PHONY: python312_extra_install +python312_extra_install: + @$(MSG) - Remove compiled files from __pycache__ + find $(STAGING_DIR)/$(PYTHON_LIB_DIR) -type f -regex '.*\.py[co]' -delete diff --git a/spk/python312/src/python3.png b/spk/python312/src/python3.png new file mode 100644 index 0000000000000000000000000000000000000000..7c9cb8f7d1612fc23aeaf4fdfcad5e578d68ddaf GIT binary patch literal 7862 zcmV;n9!cSeP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01m?d01m?e$8V@)00007bV*G`2i*f4 z6aohSVf(!R03J3;L_t(|+U;Fwm=xu;eouAJ48x)b!JrUV5Mjo6V{Y)q2u35Df*?Xb zy;(5PG2qT3E{PB{2#R17jY}}x>jGSYiU=+sFrW#L=#40f;F8FuaRX(UnXd2TM{QqK zeYJJh3=Qdi9-i*$nX0DiZ0|YeJ*Nl<=ws@lH!!Y$wd=jXcP;CZ6QXlNj*lV2(ad}V zGq+_%8)iO4BWjb=bt=nhZFOB}f&l_UBSKDyPl*8re?g$V0DsPmPXO@|3+yN_)3)e> zH?^wFZdx$z-0e6>9(17mM@KyP3Ld%aGyuTZ+3PYJ|M_KKChj40?hfGFy5K{Y8315C zgBff-g96?+gbreW4GjRmVDlLaW@chIzXJe`u#JJ&G{Vaj+04QvzZ&!=0Nni8E4cOI z(@F}E_G9Rbl_&1a=|5uTVazz5!C(Opxr7BvP|OS_fQ0cJD12f-05H!(@SKksF#krO zAj}M6W@I$_3XFS?Y}<136Qld>8uXimcM61QI)*6a=ep_VFHKA1s9i~uu%3>Rabhs^VkEo5eZ$$U1nzRK%nrauN;xf>9f4T_XPdLDOR5CvM^JMf|)eJ2O80AT^AdO=ul?SOE89-5+IStQvKdVneHiYgiv{> zkkABEKUy>^tEwo=Y*;*TXvqV}4`$R@QuA4=nQxb8GCx^zeeYwR9oK8ZcTYHc-p9Lk zKlI!UeSg@dMcH8lyydl2inLTIiy+@;27^fRGpuxySgJ?3gztbzGwtMk^$qijMfgSI z0WN=JZSxO5`D!-@=JVE zXAB0uVDs69KRlsCcyNRZL^7jgv$F3U+Op!6CvUo-Gso5Cm1{2<{2 zz`}98G4PHT(4r#K&n zNPzd&=dLLR;TMep5K)!oR$VdGwAAu4x^u{k<)PB&LkGofei#Q;XCtDenSafhF|h=%U=@fA zN%!okAStSX@_8aFk%(1^)OCSgH_ho>QULRj)Ag3b#7?^BSZY#`!i;^1(>=-J3GAeM z@PJ5FC6eSyB*&{n0@zz$-?gLw=A%55X~kqG_%31Tf^p$JE02sHPq>S79yTpiDj7%i z46F*G*%_qZ&}4&1PtSl|A;nvlFurC(gJ@q;0LN}CT}>BHD|XlJx*tbo5)alIXA(Hq zu~Y=7dn!vMb-L$-CfK0~fjt8gM8fJBu=8x<5@JAS!6gNNT=NO2qA|EZh+khd>y^qr zw*`0Aes@_<^q#cnUi(7I{x;scSMOu@_?s00Fi)jNgND5_}YKaS$_sf2|X@n5!7 zGJf_^#2CJG&jyo{qH>%{WJv++0HAQe3QL8*#_pthQf}_DcqdI`U%KZdp16AkL7^#5 zy63_X6u@3Cg#ZZxD1elk+9iD5JJGbjD6Hok>8V({!Q4bJ76fx;MqDa_y`&|Kk za$hZGkL-CffSdQn=bv`{6C4I2m7%~3TrHLm2+YC+kwP7stTd2IAP@jBdt}f3n}Vvk zdvJqDS1gy1e_Y~8P$jaY07X%Ru+lxaDPnfI$F6h_`J{VtCDQB}2tEi3K^NV-3XfmW z0|0RUvdx)g>$h}e!cn{THe{s)PfB|X+O>cbmm$SYm>fD`#Ap&$ytKTnaLy_KkN^vk zj+BN(Krkmr00;;skok840%W*nvnlJQh;aa#59=8)D<+kdu)P7piDZuUqeQ^IfUb=vRKF|F1gSJ*%*Nk-TR;*{fo)zgH*>2T7 z%z15ED(teq6jSAN4^BbH8Q655nVdq8aOTb^R=TGWXk@w<03yj317-j?C0X@^05pJi zT=y{;j{%qt;6vViE$E2pjiUgUJ+!9z_Fa1>3g$5lIbF)(q*zC6Vj?d`UZPb?Ile3H zgTj5Pn75J#2`tROJru&~fei{x_atO*e`eTNxnj5^hVTI(m%M;(7t#+0_*w|QmbYK? zM^M9X-gZrnj+~JW2DotMY5>5%=_{|_x^vHNU0{qE6b%&QjA==v2~QtBVtk8LqzNFJ zc^hkd3oeS7ig*I)cdjzDobE}LNJ0=r%rznGR3I&438jVpWMgqPx-Njw_5$LhR6yX7 zSNsvo)M~(8E8fiM;&yX(M?rR=lt~i^=JP2!cXsdH!{>7g6iSv5dnbZ@WoS~&86bdo z;vXxwLKCHl{26Y+lheHfI0J~+dFz!u3sit!_-^NRoxZAT_*e+;YF)C}gO)%bX`=YX zx8Mpz>}&LR)4hmFq^I$eZq{dAA0fS#eztR0eI;+b;yB(qGC2kqJfjxbEFHI}PJhP~ zHpQ!(C#<5WND~n;)!#FaE!981MZVlTq-PK`S?u{VA#E@acJ}M$~|@Zdeby0E@{HsiiNiT;%onszZGkD_n?fa z7XI*W>&SC_i{qtx@_A%scYhyGXiBy1%Z9;#J(eH%ngDLiTWV&igdeB?bFVlZpMJG( zHJB^qSvz>qZ(NSN6iee&(X2i^*}_sVZ;|5omP9;J^7-HnP0TW@SQ-jZdMRoQpy&1i zvSPTgfc1JLfB1`z{Nc~zDZs$HR{TO|K1DTU>yN1ljy!WL(nOr`E!t1xTd@{NMG{Y_ zF@c`j3&^;@uP6*O+)3YfI2;3voAVl4G>5is)6SVDY$X-FDSk|i=T_syRPXqfq4eQv z;bdX4NVxLNw@AtoGJ(igN5kY@PvcO_sbI)236Z>Bz=H$i@IaEMwiO2i=3)Ggn#+)> z+(jK`s6D{c;orimn|DnzHe(tE5|xFe&5=)%?xj7x70f+=Zzx2jh#@32J`6Pm4zs%e%cBu%)06bmzBP*B7?%-g0+_uvJQDA4+ox_FZL zk&4vNI^H<84S#S+H)IdlKpkheJ;1t&=OCx^C1ftk^{0CX8{Y~^_b7N<2YHt>BG&kp zk0O>JG$C;%5{gteARSI3Zf`rdAfPAWAB)^@OZdJJz(8M^$lvA4Ih-*Qp6+oB(uC9H z%X?c#%+Q3`<6GXIfqQDGkaUlkQCVK**(1yqii)0jZV{gD`9gy5ga;uXd!7;l48D71 zcV^+Th$iF6b3{zdE8PnNk%jLKW>0e~F%u_4?|HPMV=6$8B0waIla&gP%jsuXLUp<0 z2#!3Z#gX?|;eH+8;`pH{AK?=SgHJp0FCGPG8#@CK5sJa#*#p0KQBU4F-VFi;;&fLC_~`?yTMNOJQ9EzLVybFy_ZGqfP?x(dhy`4_Cmj zdiiIK-}_NJIRtdK8!w3F$a|L`MUQX!movs5-)gi@}=^6aaJqivf95^xQxXil1eIt)=u9QP&XC$p98x9^fPplM_?n zF3jYU?jeXR6hNAg(me`I_mcAY5Tg=_fOL-wO84Z#PqXsu{cC=E={y??beIXScv31} zB&+D<8y;+7h;K?EfRB$;m`P5WU^i(30hSu&$|J|O+-WBA7~et|pRWMa$IK`%%lu)@ zZ!aBr*0|Zu`&%x*2@qY)!b9OeFIEO1tYZn_uC@XQ!Og<&zJ+v26QSi^M_B%J&kG_s zy=@&Hs(A|CJqCdCvh3(}_gpq&+(R$mrKvwLh5w7wz_?Yq5QPCfQUW~%Y1H-lH~^p@ z-o3Kz&OLRX)p3h29u4V0_DAVI~Iql+9@G z9NMB{;7e0~`nKzrTP{BV;Ei@ISw;3B&(B^Q5Y`Fwl0m%3%bvaS)1;9xRpP66BXs92 zeCZy-IP&c0$jeHkB%Z|V8TisY?@&lYXi}$p$r?N?jg4tUs}60^Y`|Y<)^w?B(7nR{ zrc3xq_N6mJ2!f(oi2&E{vUtSK^)nfb>KpWJT1I<6qtTkGZ?t=M*4RP&PQBXT-n~5i zXRzql{9(<-VDYG}S>&*rY+-qkzt;np-p=JAR2~Eh51`@_==)k{+q7ub{t&Ff$JEgux(9!v>8q|J$-M`|OelL)W9o9)l*#!K|@^003+5mf5%2GTu@%56pv{ z#YPG0`YM6?Kwm(*r~G^Q=Z3b~oqOs8%z}xCT!K{C-M2`Qn+p}y+~TAVD63@_G;fw2 z|J;Njn^DA%rzQ+HzQfjQK^>->F2Ck_p#FAAz+{ccJNdZB3%Hh7NkX)RD_MP^q*0Vt zYAwpks2In$G8tOmsTCvG?1&G)x7=R8(stZ@7_%DPz zQ?WODv9qP(lYdt7){#ep`D8HnaEcaa{ED6zH&7A}A^>C#%Vx8*o9m_YD3UZGTpW3r z+;|m7-bwcyd_k)5Enx|tsj{N%d&?#beFXrXpEv~k(Rk3;ZwK$VF$>gP0q|u2b+xD! zd8TR+@@MDta4WGpj@lR2x;WPR(<56UF`yHwv2dHGze!MdnohPNxhf=sw^+-zI4)%bsjh0 z1;APWhcsdo_fOrrLYKFIqGH%6+^!1Pseqmrs0CSlkQeZJl~@HLOChpHXlC&uu)&jL zTZj7YTkwNOcY}vAnl?%y{6PS}4WLyMK)C|y>nXNw(*k;t#U-Q1KqoHQp_#V$ZsUz_ zc{I??65@=et*)Is>^_h1F97&SX){#gSbb>YB?aN8QPIn1Iw(#T(QKV)W)yv^vB$Sm zlf?j0t7c^bhE7>z2_C#-%r^ndZ#?0{LGX!Ms3N{K7Bm z0~jHfb2a$&~8ujhHw;@vVURU5#V-5mrHYB6B%aj6&jJ$Q&WaJ}C2m!Xw4aJct35ol4!7uGIiw z!Pq|UYc{jGfblKF8{cAP%4*u|ZX;(<VV7dQP7d=oK1Q(>OLQpci^9K;4$Ebq$6P z@RxYwTkwo;NkbuVZnkV{?x|glczVNqm&gLEX?mb1B7mMK5a@~h7g~Zpm%;oe-)ta& z72$lo0Mdj!6r!Mrkz&q3Bl>viPtT~ADt_$&v}+uom!>ra#8qeDB5E)*h@+P$@l)he zLm&_>bSXg11GUI#w9Ga1fq<27d5v$uwXK5zPd{JuEZqGUG0=paQh2sQ5$FI(9@bcmvn5 z%OEn9+ocp4&_huHJr8a$jg07T)a|()feP^S4gEgUG`wLj+r!7V5NCWVXps~hgg_5P z2J~#hvo1Ch7*qM}GhJ8IwJEgU(O;%l9<+A9q4At0P-(1ITQ{G}MXLK);QtS;*q6Q2_TulJ< zLg?-NKtk#8ZG5C!9ZDBU;PW(#W9kE#y1Cl?TvE)sjVo zHKq;pqPPU90X>!V6G$6RM@|&f>5+H}aPF-O(Y|%_K4e0{RBpCxkxe3{pEA&EtcDLK z0eUe!PAWi8aWRRuQT3`RL4TlBfM;($4|B%!`=X*Od%CqMB+=csDEjVOO;*uMt16e4 zi%+Mb=d_c)1KgWHBqmzaN2KQ-H*@ z%hSZsv6Dd{8cJ2mH_}OK@>2j~IAicrm09gHvL-iTqqmT_doxq!`n1FB%^6dtcgA!MU2&JRD-s41jhYF19~BGH6Ngt zIJAfYLyL%E^$dXafVA&W^~#6i$Tr^H!#{Z#dJel+O&)e`+g8m^(g^eHu`ko)lPr?* zYrw$(^hA0<4+(&teNOruTJ{F2UfmM)JN^XI-Q0mw^5`wCp>e>`T<`rT6Wc-zl47mstuX;azg~bC`8? z-^9mV`{0Y1epxT$>ukH~Zh)_f9>GG){Wl@wTW)vzIUP5*4G!Q3zc&hW+|0a>r=s{0 z+paVeK*iLBr*0lPGpAtnGKVpBKd0m79ncC;=p$PkYMfvg!`p~SWf-HR0Q+A7qB>>D zb*BZdSE=C5Lq>wQ!dV6Z36#kSD*Y@kj<6SK2npLN7D?D0Mp)zIFH%+Q`jP^K0Xb{|zO8wCKo`NyD6{{sLo0=SdkIAavJ;a-CwOT{gH#BB#RRUKfzF?$r# zKY_<;4^p>fqxjvQ8Ii*fzWt!;l`}!v8ha|XqyTx;0rvL>t>9z#QnzI_yy+s)@xKrJ zHdI~vAV^yefJ+LHR~?{8mopMQ3;@*m@$heR8vxLZP%ls<9zrV;`S0@!H)>{1G~Vr2 zg0_1=TgUGVjr=-v698yyL$e;O?2D2D0N`!E1eo7c3N+EGR1rZMjpFD9D4cby@m?L8 zb&mVh^a%XDsiXh^=*UR`X{(wZ=p_s-!~l!`prd{ht<-Pz16WiAXMhB%TJ~B=0j$e$ z%}iTE+=d5e&u{d+ zD$)aNIP-Kc_f}Scme{20LBsruz(i{+XZjRNqR4nVseKLG1X zeRcb=^{%eEyrP1aXuYfFZ-d6I83fXngS08gcK8!AS{?Rn`4*5H1?K-YSFw{a+ttcW z2IpR<>eVF$P%6Uap?8AB=z?#Zn$P}SZ=)%41k01l6N1aX%m8I?pz7M&i|Kk7Wx0|! z51s|)5s|H1Ux>)_RxLi-dD>ry0m}ZKs%w8M1h^6&+g?v+#>v0gTJ3*U<^j41rcw1<;D*&7y!-FH&afI8(Zd zK;_3$^{NZOdVR59-lA6k>b$_Rs}0oU*|U%-I|_{Z9YklZB8gwovt52#8_MyOkrK8# zoT^u!2NE9u0G%+u=zF{Itt*9 z01g9-R-nvbU_E2hZD Always install latest version (service-setup.sh:install_python_virtualenv) +pip==24.3.1 +setuptools==75.4.0 +wheel==0.45.0 + +# Always use latest version available +# certifi==2024.8.30 +certifi + +# Mandatory for python application +# to create their local virtualenv +# in order to install wheels within +# their running environment +virtualenv==20.27.1 + +# Other mandatory wheels that +# gets install by default as +# basic dependencies of above +distlib==0.3.9 +filelock==3.16.1 +platformdirs==4.3.6 +six==1.16.0 + +## +## All configurations below are optional and +## are provided to demonstrate how to build +## various wheels. Uncoment to enable. +## diff --git a/spk/python312/src/service-setup.sh b/spk/python312/src/service-setup.sh new file mode 100644 index 00000000000..bd7b2c47850 --- /dev/null +++ b/spk/python312/src/service-setup.sh @@ -0,0 +1,16 @@ +PATH="${SYNOPKG_PKGDEST}/bin:$PATH" + +service_postinst () +{ + # Install the wheels + install_python_wheels + + # Log installation informations + echo "Installed version: $( ${SYNOPKG_PKGDEST}/bin/python3 --version 2>&1 )" + + # Byte-compile in background + PYTHON_SHORT_VER=$(${SYNOPKG_PKGDEST}/bin/python3 -c 'import sys; print("{0}.{1}".format(*sys.version_info[:2]))') + ${SYNOPKG_PKGDEST}/bin/python3 -m compileall -q -f ${SYNOPKG_PKGDEST}/lib/python${PYTHON_SHORT_VER} /dev/null & + ${SYNOPKG_PKGDEST}/bin/python3 -OO -m compileall -q -f ${SYNOPKG_PKGDEST}/lib/python${PYTHON_SHORT_VER} /dev/null & +} + From 805cd0b9d013ebef0f112458c81654060a579faa Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Wed, 27 Nov 2024 22:33:53 +0000 Subject: [PATCH 075/130] mariadb-connector-c: Fix build using spksrc.python.mk --- cross/mariadb-connector-c/Makefile | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/cross/mariadb-connector-c/Makefile b/cross/mariadb-connector-c/Makefile index 0d05bcec6e7..511f2b538d3 100644 --- a/cross/mariadb-connector-c/Makefile +++ b/cross/mariadb-connector-c/Makefile @@ -36,8 +36,23 @@ CMAKE_ARGS += -DWITH_UNIT_TESTS=OFF CMAKE_ARGS += -DDEFAULT_CHARSET=utf8 CMAKE_ARGS += -DINSTALL_LIBDIR=lib +# Creates the following two synlinks: +# - libmysqlclient.so -> libmariadb.so.3 +# - libmysqlclient_r.so -> libmariadb.so.3 +# Which in turns conflict with mysql-connector-c +#CMAKE_ARGS += -DWITH_MYSQLCOMPAT=ON + +# Does not handle pkgconfig well and fails to +# find openssl3 include and libraries using +# spksrc.python.mk thus using OPENSSL_STAGING_PREFIX DEPENDS += cross/openssl3 CMAKE_ARGS += -DWITH_SSL=ON +ifneq ($(wildcard $(OPENSSL_STAGING_PREFIX)),) +CMAKE_ARGS += -DOPENSSL_CRYPTO_LIBRARY:FILEPATH=$(OPENSSL_STAGING_PREFIX)/lib/libcrypto.so +CMAKE_ARGS += -DOPENSSL_SSL_LIBRARY:FILEPATH=$(OPENSSL_STAGING_PREFIX)/lib/libssl.so +CMAKE_ARGS += -DOPENSSL_INCLUDE_DIR:PATH=$(OPENSSL_STAGING_PREFIX)/include +endif + DEPENDS += cross/zlib CMAKE_ARGS += -DWITH_EXTERNAL_ZLIB=ON DEPENDS += cross/libiconv From 12650ebde5c1a76c8c3befc5b0f295ab00d7f938 Mon Sep 17 00:00:00 2001 From: hgy59 Date: Thu, 28 Nov 2024 00:22:53 +0100 Subject: [PATCH 076/130] prepare.sh: keep python311-wheels to build --- .github/actions/prepare.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/prepare.sh b/.github/actions/prepare.sh index 5b62865399f..696e3c63fe0 100755 --- a/.github/actions/prepare.sh +++ b/.github/actions/prepare.sh @@ -62,7 +62,7 @@ for i in {5..7}; do for package in ${packages} do if [ "$(echo ffmpeg${i} ${ffmpeg_dependent_packages} | grep -ow ${package})" != "" ]; then - packages_without_ffmpeg=$(echo "${packages}" | tr ' ' '\n' | grep -v "ffmpeg${i}" | tr '\n' ' ') + packages_without_ffmpeg=$(echo "${packages}" | tr ' ' '\n' | grep -v "^ffmpeg${i}\$" | tr '\n' ' ') packages="ffmpeg${i} ${packages_without_ffmpeg}" break fi @@ -77,7 +77,7 @@ videodrv_dependent_packages=$(find spk/ -maxdepth 2 -mindepth 2 -name "Makefile" for package in ${packages} do if [ "$(echo synocli-videodriver ${videodrv_dependent_packages} | grep -ow ${package})" != "" ]; then - packages_without_videodrv=$(echo "${packages}" | tr ' ' '\n' | grep -v "synocli-videodriver" | tr '\n' ' ') + packages_without_videodrv=$(echo "${packages}" | tr ' ' '\n' | grep -v "^synocli-videodriver\$" | tr '\n' ' ') packages="synocli-videodriver ${packages_without_videodrv}" break fi @@ -92,7 +92,7 @@ for py in python310 python311 python312 python313; do for package in ${packages} do if [ "$(echo ${py} ${python_dependent_packages} | grep -ow ${package})" != "" ]; then - packages_without_python=$(echo "${packages}" | tr ' ' '\n' | grep -v "${py}" | tr '\n' ' ') + packages_without_python=$(echo "${packages}" | tr ' ' '\n' | grep -v "^${py}\$" | tr '\n' ' ') packages="${py} ${packages_without_python}" break fi From 7da051e12135a52cec0f4b717376f793f80b3a14 Mon Sep 17 00:00:00 2001 From: hgy59 Date: Thu, 28 Nov 2024 00:45:24 +0100 Subject: [PATCH 077/130] fix python312/PLIST --- cross/python312/PLIST | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/cross/python312/PLIST b/cross/python312/PLIST index 39039e01ea1..f1dd2f95731 100644 --- a/cross/python312/PLIST +++ b/cross/python312/PLIST @@ -1,14 +1,14 @@ +lnk:bin/2to3 +rsc:bin/2to3-3.12 lnk:bin/idle3 -rsc:bin/idle3.13 +rsc:bin/idle3.12 lnk:bin/pydoc3 -rsc:bin/pydoc3.13 +rsc:bin/pydoc3.12 lnk:bin/python3 -bin:bin/python3.13 -rsc:bin/python3.13-config -lnk:bin/python3-config +bin:bin/python3.12 rsc:etc/mime.types -rsc:include/python3.13/pyconfig.h -lnk:lib/libpython3.13.so -lib:lib/libpython3.13.so.1.0 +rsc:include/python3.12/pyconfig.h +lnk:lib/libpython3.12.so +lib:lib/libpython3.12.so.1.0 lib:lib/libpython3.so -rsc:lib/python3.13 +rsc:lib/python3.12 From c64ee5cfd53a07bdbdb676e49b8f293f46b5aa76 Mon Sep 17 00:00:00 2001 From: hgy59 Date: Thu, 28 Nov 2024 21:46:02 +0100 Subject: [PATCH 078/130] cleanup python - python311-wheels for ARMv7L (crossenv for numpy-1.22.4) - didn't fix it - add PLIST files for python312 and python313 - remove lxml==4.9.3 in python311-wheels/src/requirements-crossenv.txt (build only lxml==5.3.0) --- cross/python313/PLIST | 2 -- mk/crossenv/requirements-numpy-1.22.4.txt | 14 ++++++++++++++ spk/python311-wheels/src/requirements-crossenv.txt | 1 - spk/python311/Makefile | 2 +- spk/python312/Makefile | 8 +++----- spk/python312/PLIST | 1 + spk/python313/Makefile | 4 +--- spk/python313/PLIST | 1 + 8 files changed, 21 insertions(+), 12 deletions(-) create mode 100644 mk/crossenv/requirements-numpy-1.22.4.txt create mode 100644 spk/python312/PLIST create mode 100644 spk/python313/PLIST diff --git a/cross/python313/PLIST b/cross/python313/PLIST index 39039e01ea1..4f0da5b775f 100644 --- a/cross/python313/PLIST +++ b/cross/python313/PLIST @@ -4,8 +4,6 @@ lnk:bin/pydoc3 rsc:bin/pydoc3.13 lnk:bin/python3 bin:bin/python3.13 -rsc:bin/python3.13-config -lnk:bin/python3-config rsc:etc/mime.types rsc:include/python3.13/pyconfig.h lnk:lib/libpython3.13.so diff --git a/mk/crossenv/requirements-numpy-1.22.4.txt b/mk/crossenv/requirements-numpy-1.22.4.txt new file mode 100644 index 00000000000..e740501ce2d --- /dev/null +++ b/mk/crossenv/requirements-numpy-1.22.4.txt @@ -0,0 +1,14 @@ +pip==23.2.1 +setuptools==63.4.3 +wheel==0.41.2 +# +cffi==1.15.1 +cryptography==41.0.3 +Cython==0.29.36 +flit==3.9.0 +maturin==1.2.3 +msgpack==1.0.5 +poetry==1.6.1 +scikit-build==0.17.6 +setuptools-rust==1.7.0 +setuptools-scm==7.1.0 diff --git a/spk/python311-wheels/src/requirements-crossenv.txt b/spk/python311-wheels/src/requirements-crossenv.txt index 1d239a2e534..0e66cb93829 100644 --- a/spk/python311-wheels/src/requirements-crossenv.txt +++ b/spk/python311-wheels/src/requirements-crossenv.txt @@ -48,7 +48,6 @@ gevent==24.2.1 # [lxml] # Depends: libxml2, libxslt -lxml==4.9.3 lxml==5.3.0 # [mysqlclient] diff --git a/spk/python311/Makefile b/spk/python311/Makefile index 94b3fea3f88..047de95ff93 100644 --- a/spk/python311/Makefile +++ b/spk/python311/Makefile @@ -9,7 +9,7 @@ SPK_ICON = src/python3.png # And compiler must support std=c++11 (OlD_PPC_ARCHS fail, but ARMv5_ARCHS have no issue). UNSUPPORTED_ARCHS = $(OLD_PPC_ARCHS) -DEPENDS = cross/$(SPK_NAME) +DEPENDS = cross/python311 DEPENDS += cross/pip MAINTAINER = SynoCommunity diff --git a/spk/python312/Makefile b/spk/python312/Makefile index 66549015b9d..dd78c729d4e 100644 --- a/spk/python312/Makefile +++ b/spk/python312/Makefile @@ -4,10 +4,8 @@ SPK_VERS_MAJOR_MINOR = $(word 1,$(subst ., ,$(SPK_VERS))).$(word 2,$(subst ., ,$ SPK_REV = 1 SPK_ICON = src/python3.png -# Platform "powerpc-none-linux-gnuspe" with compiler "gcc" is not supported by the -# CPython core team, see https://peps.python.org/pep-0011/ for more information. -# And compiler must support std=c++11 (OlD_PPC_ARCHS fail, but ARMv5_ARCHS have no issue). -UNSUPPORTED_ARCHS = $(OLD_PPC_ARCHS) +# Compiler must support std=c++11 +UNSUPPORTED_ARCHS = $(OLD_PPC_ARCHS) $(ARMv5_ARCHS) DEPENDS = cross/python312 DEPENDS += cross/pip @@ -18,7 +16,7 @@ DESCRIPTION_FRE = Language de programmation Python. DESCRIPTION_SPN = Lenguaje de programación Python. STARTABLE = no DISPLAY_NAME = Python 3.12 -CHANGELOG = "1. Initial Python 3.13.7 package release" +CHANGELOG = "1. Initial Python 3.12.7 package release" HOMEPAGE = https://www.python.org LICENSE = PSF diff --git a/spk/python312/PLIST b/spk/python312/PLIST new file mode 100644 index 00000000000..4cfaf73a12c --- /dev/null +++ b/spk/python312/PLIST @@ -0,0 +1 @@ +rsc:share/wheelhouse diff --git a/spk/python313/Makefile b/spk/python313/Makefile index b2430259855..85104050793 100644 --- a/spk/python313/Makefile +++ b/spk/python313/Makefile @@ -4,9 +4,7 @@ SPK_VERS_MAJOR_MINOR = $(word 1,$(subst ., ,$(SPK_VERS))).$(word 2,$(subst ., ,$ SPK_REV = 1 SPK_ICON = src/python3.png -# Platform "powerpc-none-linux-gnuspe" with compiler "gcc" is not supported by the -# CPython core team, see https://peps.python.org/pep-0011/ for more information. -# And compiler must support std=c++11 (both OLD_PPC_ARCHS and ARMv5_ARCHS now fails). +# Compiler must support std=c++11 UNSUPPORTED_ARCHS = $(OLD_PPC_ARCHS) $(ARMv5_ARCHS) DEPENDS = cross/python313 diff --git a/spk/python313/PLIST b/spk/python313/PLIST new file mode 100644 index 00000000000..4cfaf73a12c --- /dev/null +++ b/spk/python313/PLIST @@ -0,0 +1 @@ +rsc:share/wheelhouse From 77d0a727638062b6a857462394d83f6c1a134999 Mon Sep 17 00:00:00 2001 From: hgy59 Date: Fri, 29 Nov 2024 12:07:40 +0100 Subject: [PATCH 079/130] fix INFO file generation - use explicit /bin/sh to fix language specific description generation --- mk/spksrc.spk.mk | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/mk/spksrc.spk.mk b/mk/spksrc.spk.mk index f97e6a48721..7cf7592a421 100644 --- a/mk/spksrc.spk.mk +++ b/mk/spksrc.spk.mk @@ -164,6 +164,7 @@ get_github_maintainer_url = "https://github.com/SynoCommunity" get_github_maintainer_name = $(MAINTAINER) endif +$(WORK_DIR)/INFO: SHELL:=/bin/sh $(WORK_DIR)/INFO: $(create_target_dir) @$(MSG) "Creating INFO file for $(SPK_NAME)" @@ -171,11 +172,11 @@ $(WORK_DIR)/INFO: if [ "$(ARCH)" = "noarch" ]; then \ echo "ERROR: 'noarch' package without TCVERSION is not supported" ; \ exit 1; \ - else \ + else \ echo "ERROR: Arch '$(ARCH)' is not a supported architecture" ; \ echo " - There is no remaining arch in '$(TC_ARCH)' for unsupported archs '$(UNSUPPORTED_ARCHS)'"; \ exit 1; \ - fi; \ + fi; \ fi @echo package=\"$(SPK_NAME)\" > $@ @echo version=\"$(SPK_VERS)-$(SPK_REV)\" >> $@ @@ -183,10 +184,10 @@ $(WORK_DIR)/INFO: @/bin/echo -n "${DESCRIPTION}" | sed -e 's/\\//g' -e 's/"/\\"/g' >> $@ @echo "\"" >> $@ @echo $(foreach LANGUAGE, $(LANGUAGES), \ - $(shell [ ! -z "$(DESCRIPTION_$(shell echo $(LANGUAGE) | tr [:lower:] [:upper:]))" ] && \ - /bin/echo -n "description_$(LANGUAGE)=\\\"" && \ - /bin/echo -n "$(DESCRIPTION_$(shell echo $(LANGUAGE) | tr [:lower:] [:upper:]))" | sed -e 's/"/\\\\\\"/g' && \ - /bin/echo -n "\\\"\\\n")) | sed -e 's/ description_/description_/g' >> $@ + $(shell [ ! -z "$(DESCRIPTION_$(shell echo $(LANGUAGE) | tr [:lower:] [:upper:]))" ] && \ + /bin/echo -n "description_$(LANGUAGE)=\\\"" && \ + /bin/echo -n "$(DESCRIPTION_$(shell echo $(LANGUAGE) | tr [:lower:] [:upper:]))" | sed -e 's/"/\\\\\\"/g' && \ + /bin/echo -n "\\\"\\\n")) | sed -e 's/ description_/description_/g' >> $@ @echo arch=\"$(SPK_ARCH)\" >> $@ @echo maintainer=\"$(call get_github_maintainer_name,$(MAINTAINER))\" >> $@ ifeq ($(strip $(MAINTAINER_URL)),) @@ -416,7 +417,7 @@ ifneq ($(strip $(WIZARDS_TEMPLATES_DIR)),) $(eval IS_DSM_7_OR_GREATER = $(if $(filter 1,$(call version_ge, $(TCVERSION), 7.0)),true,false)) $(eval IS_DSM_7 = $(IS_DSM_7_OR_GREATER)) $(eval IS_DSM_6 = $(if $(filter true,$(IS_DSM_6_OR_GREATER)),$(if $(filter true,$(IS_DSM_7)),false,true),false)) - @for template in `find $(WIZARDS_TEMPLATES_DIR) -maxdepth 1 -type f -and \( $(WIZARD_FILE_NAMES) \) -print`; do \ + @for template in $(shell find $(WIZARDS_TEMPLATES_DIR) -maxdepth 1 -type f -and \( $(WIZARD_FILE_NAMES) \) -print); do \ template_filename="$$(basename $${template})"; \ template_name="$${template_filename%.*}"; \ if [ "$${template_name}" = "$${template_filename}" ]; then \ @@ -458,12 +459,12 @@ ifneq ($(strip $(WIZARDS_DIR)),) rm "$(DSM_WIZARDS_DIR)/uninstall_uifile"; \ fi @if [ -d "$(WIZARDS_DIR)$(TCVERSION)" ]; then \ - $(MSG) "Create DSM Version specific Wizards: $(WIZARDS_DIR)$(TCVERSION)"; \ - find $${SPKSRC_WIZARDS_DIR}$(TCVERSION) -maxdepth 1 -type f -and \( $(WIZARD_FILE_NAMES) \) -print -exec cp -f {} $(DSM_WIZARDS_DIR) \; ;\ + $(MSG) "Create DSM Version specific Wizards: $(WIZARDS_DIR)$(TCVERSION)"; \ + find $${SPKSRC_WIZARDS_DIR}$(TCVERSION) -maxdepth 1 -type f -and \( $(WIZARD_FILE_NAMES) \) -print -exec cp -f {} $(DSM_WIZARDS_DIR) \; ;\ fi @if [ -d "$(DSM_WIZARDS_DIR)" ]; then \ - find $(DSM_WIZARDS_DIR) -maxdepth 1 -type f -not -name "*.sh" -print -exec chmod 0644 {} \; ;\ - find $(DSM_WIZARDS_DIR) -maxdepth 1 -type f -name "*.sh" -print -exec chmod 0755 {} \; ;\ + find $(DSM_WIZARDS_DIR) -maxdepth 1 -type f -not -name "*.sh" -print -exec chmod 0644 {} \; ;\ + find $(DSM_WIZARDS_DIR) -maxdepth 1 -type f -name "*.sh" -print -exec chmod 0755 {} \; ;\ fi endif From 4893a1cc341e1dff5da4975325bd78edfbd87c83 Mon Sep 17 00:00:00 2001 From: hgy59 Date: Fri, 29 Nov 2024 12:09:27 +0100 Subject: [PATCH 080/130] python packages: further cleanup - update unsupported archs in cross Makefiles - python311-wheels: avoid multiple versions of greenlet --- cross/python311/Makefile | 2 +- cross/python312/Makefile | 8 +++----- cross/python313/Makefile | 8 +++----- spk/python311-wheels/Makefile | 2 +- ...nlet-v2.txt => requirements-crossenv-greenlet-v32.txt} | 1 - 5 files changed, 8 insertions(+), 13 deletions(-) rename spk/python311-wheels/src/{requirements-crossenv-greenlet-v2.txt => requirements-crossenv-greenlet-v32.txt} (92%) diff --git a/cross/python311/Makefile b/cross/python311/Makefile index 5763504679d..1f3fd043f9d 100644 --- a/cross/python311/Makefile +++ b/cross/python311/Makefile @@ -11,7 +11,7 @@ PKG_DIR = Python-$(PKG_VERS) # And compiler must support std=c++11 (OlD_PPC_ARCHS fail, but ARMv5_ARCHS have no issue). UNSUPPORTED_ARCHS = $(OLD_PPC_ARCHS) -BUILD_DEPENDS = native/$(PKG_NAME) +BUILD_DEPENDS = native/python311 DEPENDS = cross/zlib cross/sqlite cross/readline cross/ncursesw cross/bzip2 cross/xz # required for Sleepycat^WOracle Berkeley DB interface diff --git a/cross/python312/Makefile b/cross/python312/Makefile index 850b3a13c50..ef14f9a4651 100644 --- a/cross/python312/Makefile +++ b/cross/python312/Makefile @@ -6,12 +6,10 @@ PKG_DIST_NAME = Python-$(PKG_VERS).$(PKG_EXT) PKG_DIST_SITE = https://www.python.org/ftp/python/$(PKG_VERS) PKG_DIR = Python-$(PKG_VERS) -# Platform "powerpc-none-linux-gnuspe" with compiler "gcc" is not supported by the -# CPython core team, see https://peps.python.org/pep-0011/ for more information. -# And compiler must support std=c++11 (OlD_PPC_ARCHS fail, but ARMv5_ARCHS have no issue). -UNSUPPORTED_ARCHS = $(OLD_PPC_ARCHS) +# Compiler must support std=c++11 +UNSUPPORTED_ARCHS = $(OLD_PPC_ARCHS) $(ARMv5_ARCHS) -BUILD_DEPENDS = native/$(PKG_NAME) +BUILD_DEPENDS = native/python312 DEPENDS = cross/zlib cross/sqlite cross/readline cross/ncursesw cross/bzip2 cross/xz # required for Sleepycat^WOracle Berkeley DB interface diff --git a/cross/python313/Makefile b/cross/python313/Makefile index 55ee299f80a..442f5317d8d 100644 --- a/cross/python313/Makefile +++ b/cross/python313/Makefile @@ -6,12 +6,10 @@ PKG_DIST_NAME = Python-$(PKG_VERS).$(PKG_EXT) PKG_DIST_SITE = https://www.python.org/ftp/python/$(PKG_VERS) PKG_DIR = Python-$(PKG_VERS) -# Platform "powerpc-none-linux-gnuspe" with compiler "gcc" is not supported by the -# CPython core team, see https://peps.python.org/pep-0011/ for more information. -# And compiler must support std=c++11 (OlD_PPC_ARCHS fail, but ARMv5_ARCHS have no issue). -UNSUPPORTED_ARCHS = $(OLD_PPC_ARCHS) +# Compiler must support std=c++11 +UNSUPPORTED_ARCHS = $(OLD_PPC_ARCHS) $(ARMv5_ARCHS) -BUILD_DEPENDS = native/$(PKG_NAME) +BUILD_DEPENDS = native/python313 DEPENDS = cross/zlib cross/sqlite cross/readline cross/ncursesw cross/bzip2 cross/xz # required for Sleepycat^WOracle Berkeley DB interface diff --git a/spk/python311-wheels/Makefile b/spk/python311-wheels/Makefile index fe941050967..91527cafcf7 100644 --- a/spk/python311-wheels/Makefile +++ b/spk/python311-wheels/Makefile @@ -96,7 +96,7 @@ include ../../mk/spksrc.python.mk # [greenlet] ifeq ($(call version_ge, $(TC_GCC), 4.9),1) -WHEELS += src/requirements-crossenv-greenlet-v2.txt +WHEELS += src/requirements-crossenv-greenlet-v3.txt ifeq ($(call version_lt, $(TC_GCC), 5.0),1) WHEELS_CPPFLAGS += [greenlet] -std=c++11 -fpermissive endif diff --git a/spk/python311-wheels/src/requirements-crossenv-greenlet-v2.txt b/spk/python311-wheels/src/requirements-crossenv-greenlet-v32.txt similarity index 92% rename from spk/python311-wheels/src/requirements-crossenv-greenlet-v2.txt rename to spk/python311-wheels/src/requirements-crossenv-greenlet-v32.txt index 8a8c42e83ad..c2b4802c7ad 100644 --- a/spk/python311-wheels/src/requirements-crossenv-greenlet-v2.txt +++ b/spk/python311-wheels/src/requirements-crossenv-greenlet-v32.txt @@ -6,5 +6,4 @@ # [greenlet] # - Mandatory require full c++11 support -greenlet==2.0.2 greenlet==3.0.3 From 0d2b49e985c0a0fd428d631d5b1f7fff6392082b Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Sun, 1 Dec 2024 13:41:41 +0000 Subject: [PATCH 081/130] wheel-env.mk: Bump default abi3 to match py311 with cp37 --- mk/spksrc.wheel-env.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mk/spksrc.wheel-env.mk b/mk/spksrc.wheel-env.mk index 774455fcb8c..fbf9d01f199 100644 --- a/mk/spksrc.wheel-env.mk +++ b/mk/spksrc.wheel-env.mk @@ -57,9 +57,9 @@ WHEELS_DEFAULT_REQUIREMENT = $(WHEELS_CROSSENV_COMPILE) endif # For generating abi3 wheels with limited -# python API (e.g cp36 = Python 3.6) +# python API (e.g cp37 = Python 3.7) ifeq ($(strip $(PYTHON_LIMITED_API)),) -PYTHON_LIMITED_API = cp36 +PYTHON_LIMITED_API = cp37 endif # From f0e3f0a43b975caef3a2e57a87855993d9a08321 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Sun, 1 Dec 2024 13:42:38 +0000 Subject: [PATCH 082/130] crossenv.mk: Reduce total amount of makefile variable definitions --- mk/spksrc.crossenv.mk | 38 ++++++++++++++++---------------------- 1 file changed, 16 insertions(+), 22 deletions(-) diff --git a/mk/spksrc.crossenv.mk b/mk/spksrc.crossenv.mk index 00dc48d24c2..0a9cbbd0b36 100644 --- a/mk/spksrc.crossenv.mk +++ b/mk/spksrc.crossenv.mk @@ -26,6 +26,10 @@ PYTHON_PKG_VERS = $(or $(lastword $(subst -, ,$(notdir $(patsubst %/ PYTHON_PKG_VERS_MAJOR_MINOR = $(or $(word 1,$(subst ., ,$(PYTHON_PKG_VERS))).$(word 2,$(subst ., ,$(PYTHON_PKG_VERS))),$(SPK_VERS_MAJOR_MINOR)) PYTHON_PKG_NAME = python$(subst .,,$(PYTHON_PKG_VERS_MAJOR_MINOR)) PYTHON_PKG_DIR = Python-$(PYTHON_PKG_VERS) +# +PYTHON_NATIVE = $(abspath $(WORK_DIR)/../../../native/$(PYTHON_PKG_NAME)/work-native/install/usr/local/bin/python3) +PYTHON_LIB_NATIVE = $(abspath $(PYTHON_WORK_DIR)/$(PYTHON_PKG_DIR)/build/lib.linux-$(HOST_ARCH)-$(PYTHON_PKG_VERS_MAJOR_MINOR)) +PYTHON_LIB_CROSS = $(abspath $(PYTHON_WORK_DIR)/$(PYTHON_PKG_DIR)/build/lib.linux-$(BUILD_ARCH)-$(PYTHON_PKG_VERS_MAJOR_MINOR)) # wheel crossenv definitions CROSSENV_CONFIG_PATH = $(abspath $(WORK_DIR)/../../../mk/crossenv) @@ -138,21 +142,6 @@ OPENSSL_STAGING_PREFIX = $(PYTHON_STAGING_INSTALL_PREFIX) OPENSSL_PREFIX = $(PYTHON_INSTALL_PREFIX) endif -## -## python-cc.mk -## -HOST_ARCH = $(shell uname -m) -BUILD_ARCH = $(shell expr "$(TC_TARGET)" : '\([^-]*\)' ) -PYTHON_NATIVE = $(abspath $(WORK_DIR)/../../../native/$(PYTHON_PKG_NAME)/work-native/install/usr/local/bin/python3) -PIP_NATIVE = $(abspath $(WORK_DIR)/../../../native/$(PYTHON_PKG_NAME)/work-native/install/usr/local/bin/pip) -HOSTPYTHON = $(abspath $(PYTHON_WORK_DIR)/$(PYTHON_PKG_DIR)/hostpython) -HOSTPYTHON_LIB_NATIVE = $(abspath $(WORK_DIR)/../../../native/$(PYTHON_PKG_NAME)/work-native/$(PYTHON_PKG_DIR)/build/lib.linux-$(HOST_ARCH)-$(PYTHON_PKG_VERS_MAJOR_MINOR)) -PYTHON_LIB_NATIVE = $(abspath $(PYTHON_WORK_DIR)/$(PYTHON_PKG_DIR)/build/lib.linux-$(HOST_ARCH)-$(PYTHON_PKG_VERS_MAJOR_MINOR)) -PYTHON_LIB_CROSS = $(abspath $(PYTHON_WORK_DIR)/$(PYTHON_PKG_DIR)/build/lib.linux-$(BUILD_ARCH)-$(PYTHON_PKG_VERS_MAJOR_MINOR)) -PYTHON_SITE_PACKAGES_NATIVE = $(abspath $(WORK_DIR)/../../../native/$(PYTHON_PKG_NAME)/work-native/install/usr/local/lib/python$(PYTHON_PKG_VERS_MAJOR_MINOR)/site-packages) -PYTHON_LIB_DIR = lib/python$(PYTHON_PKG_VERS_MAJOR_MINOR) -PYTHON_INC_DIR = include/python$(PYTHON_PKG_VERS_MAJOR_MINOR) - # Mandatory for rustc wheel building at crossenv preparation time # --> Using python-cc.mk defined variable when cross-compiling wheels at subsequent steps! export PYO3_CROSS_LIB_DIR = $(PYTHON_STAGING_INSTALL_PREFIX)/lib/ @@ -230,25 +219,30 @@ endif $(MSG) "Package list for $(CROSSENV_PATH):" ; \ $(RUN) $$(which cross-pip) list +## +## python-cc.mk +## $(CROSSENV_PATH)/build/python-cc.mk: @$(MSG) "crossenv environment definition: $@" @mkdir -p $(CROSSENV_PATH)/build - @echo CROSSENV_PATH=$(CROSSENV_PATH) > $@ + @echo BUILD_ARCH=$(shell expr "$(TC_TARGET)" : '\([^-]*\)' ) > $@ + @echo HOST_ARCH=$(shell uname -m) >> @@ + @echo CROSSENV_PATH=$(CROSSENV_PATH) >> $@ @echo CROSSENV=$(CROSSENV_PATH)/bin/activate >> $@ - @echo HOSTPYTHON=$(HOSTPYTHON) >> $@ - @echo HOSTPYTHON_LIB_NATIVE=$(HOSTPYTHON_LIB_NATIVE) >> $@ + @echo HOSTPYTHON=$(abspath $(PYTHON_WORK_DIR)/$(PYTHON_PKG_DIR)/hostpython) >> $@ + @echo HOSTPYTHON_LIB_NATIVE=$(abspath $(WORK_DIR)/../../../native/$(PYTHON_PKG_NAME)/work-native/$(PYTHON_PKG_DIR)/build/lib.linux-$(shell uname -m)-$(PYTHON_PKG_VERS_MAJOR_MINOR)) >> $@ @echo PYTHON_LIB_NATIVE=$(PYTHON_LIB_NATIVE) >> $@ @echo PYTHON_LIB_CROSS=$(PYTHON_LIB_CROSS) >> $@ - @echo PYTHON_SITE_PACKAGES_NATIVE=$(PYTHON_SITE_PACKAGES_NATIVE) >> $@ + @echo PYTHON_SITE_PACKAGES_NATIVE=$(abspath $(WORK_DIR)/../../../native/$(PYTHON_PKG_NAME)/work-native/install/usr/local/lib/python$(PYTHON_PKG_VERS_MAJOR_MINOR)/site-packages) >> $@ @echo PYTHON_INTERPRETER=$(PYTHON_INSTALL_PREFIX)/bin/python$(PYTHON_PKG_VERS_MAJOR_MINOR) >> $@ @echo PYTHON_VERSION=$(PYTHON_PKG_VERS_MAJOR_MINOR) >> $@ - @echo PYTHON_LIB_DIR=$(PYTHON_LIB_DIR) >> $@ - @echo PYTHON_INC_DIR=$(PYTHON_INC_DIR) >> $@ + @echo PYTHON_LIB_DIR=lib/python$(PYTHON_PKG_VERS_MAJOR_MINOR) >> $@ + @echo PYTHON_INC_DIR=include/python$(PYTHON_PKG_VERS_MAJOR_MINOR) >> $@ @echo PYO3_CROSS_LIB_DIR=$(abspath $(PYTHON_STAGING_INSTALL_PREFIX)/lib) >> $@ @echo PYO3_CROSS_INCLUDE_DIR=$(abspath $(PYTHON_STAGING_INSTALL_PREFIX)/include) >> $@ @echo OPENSSL_LIB_DIR=$(abspath $(PYTHON_STAGING_INSTALL_PREFIX)/lib) >> $@ @echo OPENSSL_INCLUDE_DIR=$(abspath $(PYTHON_STAGING_INSTALL_PREFIX)/include) >> $@ - @echo PIP=$(PIP_NATIVE) >> $@ + @echo PIP=$(abspath $(WORK_DIR)/../../../native/$(PYTHON_PKG_NAME)/work-native/install/usr/local/bin/pip) >> $@ @echo CROSS_COMPILE_WHEELS=1 >> $@ @echo ADDITIONAL_WHEEL_BUILD_ARGS=--no-build-isolation >> $@ @echo CROSSENV_BUILD_REQUIREMENTS=$(CROSSENV_BUILD_REQUIREMENTS) >> $@ From 69727dac6593c7b8bdf1f3c978cc4977cc68f2b3 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Sun, 1 Dec 2024 13:49:35 +0000 Subject: [PATCH 083/130] crossenv.mk: Empty MAKEFLAGS= variable when calling crossenv recipe --- mk/spksrc.crossenv.mk | 2 +- mk/spksrc.python-module.mk | 2 +- mk/spksrc.wheel.mk | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mk/spksrc.crossenv.mk b/mk/spksrc.crossenv.mk index 0a9cbbd0b36..4ff2e25b1fd 100644 --- a/mk/spksrc.crossenv.mk +++ b/mk/spksrc.crossenv.mk @@ -118,7 +118,7 @@ ifneq ($(filter error-%, $(CROSSENV_BUILD_WHEEL)),) @$(MAKE) $(CROSSENV_BUILD_WHEEL) else @$(MSG) $(MAKE) ARCH=$(firstword $(subst -, ,$*)) TCVERSION=$(lastword $(subst -, ,$*)) WHEEL=$(CROSSENV_BUILD_WHEEL) crossenv - @$(MAKE) ARCH=$(firstword $(subst -, ,$*)) TCVERSION=$(lastword $(subst -, ,$*)) WHEEL=$(CROSSENV_BUILD_WHEEL) crossenv + -@MAKEFLAGS= $(MAKE) ARCH=$(firstword $(subst -, ,$*)) TCVERSION=$(lastword $(subst -, ,$*)) WHEEL=$(CROSSENV_BUILD_WHEEL) crossenv endif #### diff --git a/mk/spksrc.python-module.mk b/mk/spksrc.python-module.mk index b609e3628d2..3f1467f5a88 100644 --- a/mk/spksrc.python-module.mk +++ b/mk/spksrc.python-module.mk @@ -22,7 +22,7 @@ CROSSENV_MODULE_PATH = $(firstword $(wildcard $(WORK_DIR)/crossenv-$(PKG_NAME)-$ ### Prepare crossenv build_crossenv_module: @$(MSG) WHEEL="$(PKG_NAME)-$(PKG_VERS)" $(MAKE) crossenv-$(ARCH)-$(TCVERSION) - @WHEEL="$(PKG_NAME)-$(PKG_VERS)" $(MAKE) crossenv-$(ARCH)-$(TCVERSION) + -@MAKEFLAGS= WHEEL="$(PKG_NAME)-$(PKG_VERS)" $(MAKE) crossenv-$(ARCH)-$(TCVERSION) ### Python extension module rules compile_python_module: build_crossenv_module diff --git a/mk/spksrc.wheel.mk b/mk/spksrc.wheel.mk index 9dcfb2f7d43..937470e1e13 100644 --- a/mk/spksrc.wheel.mk +++ b/mk/spksrc.wheel.mk @@ -151,7 +151,7 @@ ifneq ($(strip $(WHEELS)),) [ "$$(grep -s egg <<< $${wheel})" ] && name=$$(echo $${wheel#*egg=} | cut -f1 -d=) || name=$${wheel%%[<>=]=*} ; \ version=$$(echo $${requirement#*[<>=]=} | cut -f1 -d' ') ; \ $(MSG) "WHEEL=\"$${name}-$${version}\" $(MAKE) crossenv-$(ARCH)-$(TCVERSION)" ; \ - WHEEL="$${name}-$${version}" $(MAKE) crossenv-$(ARCH)-$(TCVERSION) ; \ + MAKEFLAGS= WHEEL="$${name}-$${version}" $(MAKE) crossenv-$(ARCH)-$(TCVERSION) ; \ for crossenv in $(WORK_DIR)/crossenv-$${name}-$${version} $(WORK_DIR)/crossenv-$${name} $(WORK_DIR)/crossenv ; do \ [ -d $${crossenv} ] && . $${crossenv}/build/python-cc.mk && break ; \ done ; \ From 71ce9901cea4fde5d85e7014694831f6ebf72470 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Sun, 1 Dec 2024 14:25:57 +0000 Subject: [PATCH 084/130] crossenv.mk: Fix missing variable definition --- mk/spksrc.crossenv.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mk/spksrc.crossenv.mk b/mk/spksrc.crossenv.mk index 4ff2e25b1fd..9d750e05d2c 100644 --- a/mk/spksrc.crossenv.mk +++ b/mk/spksrc.crossenv.mk @@ -27,6 +27,7 @@ PYTHON_PKG_VERS_MAJOR_MINOR = $(or $(word 1,$(subst ., ,$(PYTHON_PKG_VERS))).$(w PYTHON_PKG_NAME = python$(subst .,,$(PYTHON_PKG_VERS_MAJOR_MINOR)) PYTHON_PKG_DIR = Python-$(PYTHON_PKG_VERS) # +HOSTPYTHON_LIB_NATIVE = $(abspath $(WORK_DIR)/../../../native/$(PYTHON_PKG_NAME)/work-native/$(PYTHON_PKG_DIR)/build/lib.linux-$(shell uname -m)-$(PYTHON_PKG_VERS_MAJOR_MINOR)) PYTHON_NATIVE = $(abspath $(WORK_DIR)/../../../native/$(PYTHON_PKG_NAME)/work-native/install/usr/local/bin/python3) PYTHON_LIB_NATIVE = $(abspath $(PYTHON_WORK_DIR)/$(PYTHON_PKG_DIR)/build/lib.linux-$(HOST_ARCH)-$(PYTHON_PKG_VERS_MAJOR_MINOR)) PYTHON_LIB_CROSS = $(abspath $(PYTHON_WORK_DIR)/$(PYTHON_PKG_DIR)/build/lib.linux-$(BUILD_ARCH)-$(PYTHON_PKG_VERS_MAJOR_MINOR)) @@ -230,7 +231,7 @@ $(CROSSENV_PATH)/build/python-cc.mk: @echo CROSSENV_PATH=$(CROSSENV_PATH) >> $@ @echo CROSSENV=$(CROSSENV_PATH)/bin/activate >> $@ @echo HOSTPYTHON=$(abspath $(PYTHON_WORK_DIR)/$(PYTHON_PKG_DIR)/hostpython) >> $@ - @echo HOSTPYTHON_LIB_NATIVE=$(abspath $(WORK_DIR)/../../../native/$(PYTHON_PKG_NAME)/work-native/$(PYTHON_PKG_DIR)/build/lib.linux-$(shell uname -m)-$(PYTHON_PKG_VERS_MAJOR_MINOR)) >> $@ + @echo HOSTPYTHON_LIB_NATIVE=$(HOSTPYTHON_LIB_NATIVE) >> $@ @echo PYTHON_LIB_NATIVE=$(PYTHON_LIB_NATIVE) >> $@ @echo PYTHON_LIB_CROSS=$(PYTHON_LIB_CROSS) >> $@ @echo PYTHON_SITE_PACKAGES_NATIVE=$(abspath $(WORK_DIR)/../../../native/$(PYTHON_PKG_NAME)/work-native/install/usr/local/lib/python$(PYTHON_PKG_VERS_MAJOR_MINOR)/site-packages) >> $@ From 1e025a8e60e47152491fe184edf2e0fa9f1664e4 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Mon, 2 Dec 2024 02:48:00 +0000 Subject: [PATCH 085/130] tc.mk: Enhance meson toolchain file declarations --- mk/spksrc.tc.mk | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/mk/spksrc.tc.mk b/mk/spksrc.tc.mk index b380edb7413..fc887f10957 100644 --- a/mk/spksrc.tc.mk +++ b/mk/spksrc.tc.mk @@ -129,19 +129,37 @@ endif echo "set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY $(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY))" ; \ echo "set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE $(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE))" + + .PHONY: meson_vars meson_vars: + @echo "[host_machine]" ; \ + echo "system = 'linux'" ; \ + echo "cpu_family = '$(MESON_HOST_CPU_FAMILY)'" ; \ + echo "cpu = '$(MESON_HOST_CPU)'" ; \ + echo "endian = '$(MESON_HOST_ENDIAN)'" + @echo + @echo "[binaries]" ; \ + for tool in $(TOOLS) ; \ + do \ + target=$$(echo $${tool} | sed 's/\(.*\):\(.*\)/\1/' ) ; \ + source=$$(echo $${tool} | sed 's/\(.*\):\(.*\)/\2/' ) ; \ + if [ "$${target}" = "cpp" ]; then \ + echo "#$${target} = '$(WORK_DIR)/$(TC_TARGET)/bin/$(TC_PREFIX)cpp'" ; \ + else \ + echo "$${target} = '$(WORK_DIR)/$(TC_TARGET)/bin/$(TC_PREFIX)$${source}'" ; \ + fi ; \ + done + @echo + @echo "[properties]" ; \ + echo "sys_root = '$(WORK_DIR)/$(TC_TARGET)/$(TC_SYSROOT)'" + @echo @echo "[built-in]" ; \ echo "c_args = ['$(MESON_BUILTIN_C_ARGS)']" ; \ echo "c_link_args = ['$(MESON_BUILTIN_C_LINK_ARGS)']" ; \ echo "cpp_args = ['$(MESON_BUILTIN_CPP_ARGS)']" ; \ echo "cpp_link_args = ['$(MESON_BUILTIN_CPP_LINK_ARGS)']" @echo - @echo "[host_machine]" ; \ - echo "system = 'linux'" ; \ - echo "cpu_family = '$(MESON_HOST_CPU_FAMILY)'" ; \ - echo "cpu = '$(MESON_HOST_CPU)'" ; \ - echo "endian = '$(MESON_HOST_ENDIAN)'" .PHONY: tc_vars tc_vars: flag From b73a524c0e5abcfffa68df4be137342ae0e9de56 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Mon, 2 Dec 2024 02:48:34 +0000 Subject: [PATCH 086/130] wheel.mk: Add meson wheel compiling ability --- mk/crossenv/requirements-default.txt | 4 ++-- mk/spksrc.wheel.mk | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/mk/crossenv/requirements-default.txt b/mk/crossenv/requirements-default.txt index 0946ba23703..9400a96724e 100644 --- a/mk/crossenv/requirements-default.txt +++ b/mk/crossenv/requirements-default.txt @@ -9,11 +9,11 @@ cryptography==43.0.3 Cython==3.0.11 flit==3.10.1 maturin==1.7.4 -#meson-python==0.17.1 +meson-python==0.17.1 msgpack==1.0.5 poetry==1.8.4 scikit-build==0.18.1 -#scikit-build-core==0.10.7 +scikit-build-core==0.10.7 setuptools-rust==1.10.2 setuptools-scm==8.1.0 typing_extensions==4.12.2 diff --git a/mk/spksrc.wheel.mk b/mk/spksrc.wheel.mk index 937470e1e13..2ef95acdecb 100644 --- a/mk/spksrc.wheel.mk +++ b/mk/spksrc.wheel.mk @@ -20,6 +20,12 @@ include ../../mk/spksrc.wheel-env.mk ## python wheel specific configurations include ../../mk/spksrc.crossenv.mk +## meson specific configurations +include ../../mk/spksrc.cross-cmake-env.mk + +## meson specific configurations +include ../../mk/spksrc.cross-meson-env.mk + ## ifeq ($(strip $(PRE_WHEEL_TARGET)),) @@ -215,6 +221,7 @@ cross-compile-wheel-%: fi ; \ $(MSG) \ _PYTHON_HOST_PLATFORM="$(TC_TARGET)" \ + MESON_CROSS_FILE="$(MESON_TOOLCHAIN_WRK)" \ $(PIP_CROSSENV) \ $(PIP_WHEEL_ARGS_CROSSENV) \ $${pip_global_option} \ @@ -223,6 +230,7 @@ cross-compile-wheel-%: $(REQUIREMENT) ; \ $(RUN) \ _PYTHON_HOST_PLATFORM="$(TC_TARGET)" \ + MESON_CROSS_FILE="$(MESON_TOOLCHAIN_WRK)" \ $(PIP_CROSSENV) \ $(PIP_WHEEL_ARGS_CROSSENV) \ $${pip_global_option} \ From 6be0ae9fba52c78e1a1a66a4a1f718e8695f0365 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Mon, 2 Dec 2024 02:49:12 +0000 Subject: [PATCH 087/130] python311-wheels: Add new compatible numpy versions --- spk/python311-wheels/src/requirements-crossenv-numpy.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/spk/python311-wheels/src/requirements-crossenv-numpy.txt b/spk/python311-wheels/src/requirements-crossenv-numpy.txt index 8ee5a285e37..23ffee217ce 100644 --- a/spk/python311-wheels/src/requirements-crossenv-numpy.txt +++ b/spk/python311-wheels/src/requirements-crossenv-numpy.txt @@ -9,6 +9,8 @@ # - Numpy 1.25.x require c++17 # - Numpy 1.26.x requires: # c++17, meson-python, scikit-build-core -#numpy==1.25.2 -# - Temp. reverted to 1.24.x numpy==1.24.4 +numpy==1.25.1 +numpy==1.26.4 +numpy==2.0.2 +numpy==2.1.3 From 4962a9d7281cd0badaf4d7d93955b256f9797095 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Mon, 2 Dec 2024 02:50:00 +0000 Subject: [PATCH 088/130] python312-wheels: Wheel testing package against py312 --- spk/python312-wheels/Makefile | 137 ++++++++++++++++++ spk/python312-wheels/src/python3-pip.png | Bin 0 -> 4832 bytes .../src/requirements-abi3.txt | 12 ++ .../src/requirements-crossenv-greenlet-v3.txt | 10 ++ .../src/requirements-crossenv-numpy.txt | 14 ++ .../src/requirements-crossenv-rpds-py.txt | 13 ++ .../src/requirements-crossenv.txt | 116 +++++++++++++++ 7 files changed, 302 insertions(+) create mode 100644 spk/python312-wheels/Makefile create mode 100644 spk/python312-wheels/src/python3-pip.png create mode 100644 spk/python312-wheels/src/requirements-abi3.txt create mode 100644 spk/python312-wheels/src/requirements-crossenv-greenlet-v3.txt create mode 100644 spk/python312-wheels/src/requirements-crossenv-numpy.txt create mode 100644 spk/python312-wheels/src/requirements-crossenv-rpds-py.txt create mode 100644 spk/python312-wheels/src/requirements-crossenv.txt diff --git a/spk/python312-wheels/Makefile b/spk/python312-wheels/Makefile new file mode 100644 index 00000000000..598ff0292fa --- /dev/null +++ b/spk/python312-wheels/Makefile @@ -0,0 +1,137 @@ +SPK_NAME = python312-wheels +SPK_VERS = 1.0 +SPK_VERS_MAJOR_MINOR = $(word 1,$(subst ., ,$(SPK_VERS))).$(word 2,$(subst ., ,$(SPK_VERS))) +SPK_REV = 1 +SPK_ICON = src/python3-pip.png + +# Platform "powerpc-none-linux-gnuspe" with compiler "gcc" is not supported by the +# CPython core team, see https://peps.python.org/pep-0011/ for more information. +# And compiler must support std=c++11 (OlD_PPC_ARCHS fail, but ARMv5_ARCHS have no issue). +UNSUPPORTED_ARCHS = $(OLD_PPC_ARCHS) + +PYTHON_PACKAGE = python312 + +MAINTAINER = SynoCommunity +DESCRIPTION = Collection of programs for the Python programming language. +DESCRIPTION_FRE = Collection of programs for the Python programming language. +DESCRIPTION_SPN = Colección de programas para el lenguaje de programación Python. +STARTABLE = no +DISPLAY_NAME = Python Wheels Collection +CHANGELOG = "1. Initial package" + +HOMEPAGE = https://www.python.org +LICENSE = PSF + +# Enable debug_info symgols +#GCC_DEBUG_INFO := 1 + +WHEELS = src/requirements-crossenv.txt +WHEELS += src/requirements-abi3.txt + +# [borgbackup] +# Use OpenSSL path as defined by either +# spksrc.wheel-env.mk or spksrc.python.mk +ENV += BORG_OPENSSL_PREFIX="$(OPENSSL_STAGING_PREFIX)" +ENV += BORG_LIBLZ4_PREFIX="$(STAGING_INSTALL_PREFIX)" +ENV += BORG_LIBZSTD_PREFIX="$(STAGING_INSTALL_PREFIX)" +ENV += BORG_LIBB2_PREFIX="$(STAGING_INSTALL_PREFIX)" +DEPENDS += cross/attr cross/acl cross/openssl3 cross/lz4 cross/zstd cross/libb2 cross/fuse + +# [cryptography] +# Use cross/cryptography to generate py36-abi3 limited API +# NOTE: It's not possible to build py36-abi3 limited API using pip due to PEP517 +# To generate py311-py311 regular build use src/requirements-crossenv.txt +DEPENDS += cross/cryptography + +# [gevent] +DEPENDS += cross/libev cross/c-ares +ENV += GEVENTSETUP_EMBED_CARES=FALSE +ENV += GEVENTSETUP_EMBED_LIBEV=FALSE + +# [lxml] +DEPENDS += cross/libxml2 +DEPENDS += cross/libxslt + +# [mysqlclient] +DEPENDS += cross/mysql-connector-c +DEPENDS += cross/mariadb-connector-c +ENV += MYSQLCLIENT_CFLAGS="$(CFLAGS) -I$(STAGING_INSTALL_PREFIX)/include/mysql -I$(STAGING_INSTALL_PREFIX)/include/mariadb -I$(STAGING_INSTALL_PREFIX)/$(PYTHON_INC_DIR)" +ENV += MYSQLCLIENT_LDFLAGS="$(LDFLAGS)" + +# [Pillow] +DEPENDS += cross/freetype cross/libjpeg cross/zlib +WHEELS_BUILD_ARGS += [Pillow] +WHEELS_BUILD_ARGS += build_ext +WHEELS_BUILD_ARGS += --disable-platform-guessing +WHEELS_BUILD_ARGS += --enable-freetype +WHEELS_BUILD_ARGS += --enable-jpeg +WHEELS_BUILD_ARGS += --enable-zlib + +# [pycares] +DEPENDS += cross/c-ares +ENV += PYCARES_USE_SYSTEM_LIB=1 + +# [pycurl] +DEPENDS += cross/curl +ENV += PYCURL_CURL_CONFIG=$(STAGING_INSTALL_PREFIX)/bin/curl-config + +# [PyNaCl] +DEPENDS += cross/libsodium +ENV += SODIUM_INSTALL=system + +# [PyYAML] +DEPENDS += cross/libyaml + +include ../../mk/spksrc.common.mk + +# [rpds-py] +# maturin canot be built as pre-requisite crossenv +ifneq ($(findstring $(ARCH),$(ARMv5_ARCHS)),$(ARCH)) +WHEELS += src/requirements-crossenv-rpds-py.txt +# Requires path to maturin from crossenv +ENV += PATH=$(WORK_DIR)/crossenv/build/bin:$(PATH) +endif + +include ../../mk/spksrc.python.mk + +# [greenlet] +ifeq ($(call version_ge $(TC_GCC), 4.9),1) +WHEELS += src/requirements-crossenv-greenlet-v3.txt +WHEELS_CPPFLAGS += [greenlet] -std=c++11 -fpermissive +endif + +# [numpy] <= 1.21.6 (armv5) +# [numpy] <= 1.22.4 (armv7l) +# [numpy] <= 1.24.4 last working version with gcc-4.9 +# These versions are now unsupported using py312 +# [numpy] >= 1.25.0 requires c++17 +ifeq ($(call version_gt, $(TC_GCC), 5.0),1) +WHEELS += src/requirements-crossenv-numpy.txt +endif + +# [pycryptodome] +ifeq ($(call version_ge, $(TC_GCC), 4.9),1) +WHEELS_CFLAGS += [pycryptodome] -std=c11 +else +WHEELS_CFLAGS += [pycryptodome] -std=c99 +endif + +# [pycryptodomex] +ifeq ($(call version_ge, $(TC_GCC), 4.9),1) +WHEELS_CFLAGS += [pycryptodomex] -std=c11 +else +WHEELS_CFLAGS += [pycryptodomex] -std=c99 +endif + +# [pydantic_core] +ifeq ($(call version_ge, $(TC_GCC), 4.9),1) +WHEELS_CFLAGS += [pydantic_core] -std=c11 +else +WHEELS_CFLAGS += [pydantic_core] -std=c99 +endif +# Requires path to maturin from crossenv +ENV += PATH=$(WORK_DIR)/crossenv/build/bin:$(PATH) + +# [rpds-py] +# Requires path to maturin from crossenv +ENV += PATH=$(WORK_DIR)/crossenv/build/bin:$(PATH) diff --git a/spk/python312-wheels/src/python3-pip.png b/spk/python312-wheels/src/python3-pip.png new file mode 100644 index 0000000000000000000000000000000000000000..d195821833d57b8973f0d12950054c679edb48f4 GIT binary patch literal 4832 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 literal 0 HcmV?d00001 diff --git a/spk/python312-wheels/src/requirements-abi3.txt b/spk/python312-wheels/src/requirements-abi3.txt new file mode 100644 index 00000000000..4e50951c5f1 --- /dev/null +++ b/spk/python312-wheels/src/requirements-abi3.txt @@ -0,0 +1,12 @@ +## +## All configurations below are optional and +## are provided to demonstrate how to build +## various wheels. Uncoment to enable. +## + +# [pycryptodome] + [pycryptodomex] +# Require: +# - CFLAGS=-sdt=c99 < gcc-4.9 +# - CFLAGS=-sdt=c11 >= gcc-4.9 +pycryptodome==3.20.0 +pycryptodomex==3.20.0 diff --git a/spk/python312-wheels/src/requirements-crossenv-greenlet-v3.txt b/spk/python312-wheels/src/requirements-crossenv-greenlet-v3.txt new file mode 100644 index 00000000000..e2ea909ebd6 --- /dev/null +++ b/spk/python312-wheels/src/requirements-crossenv-greenlet-v3.txt @@ -0,0 +1,10 @@ +## +## All configurations below are optional and +## are provided to demonstrate how to build +## various wheels. Uncoment to enable. +## + +# [greenlet] +# - Mandatory require full c++11 support +greenlet==3.0.3 +greenlet==3.1.1 diff --git a/spk/python312-wheels/src/requirements-crossenv-numpy.txt b/spk/python312-wheels/src/requirements-crossenv-numpy.txt new file mode 100644 index 00000000000..46e88a79f22 --- /dev/null +++ b/spk/python312-wheels/src/requirements-crossenv-numpy.txt @@ -0,0 +1,14 @@ +## +## All configurations below are optional and +## are provided to demonstrate how to build +## various wheels. Uncoment to enable. +## + +# [numpy] +# - Require Cython in cross/python310 crossenv +# - Numpy >= 1.26.x requires: +# c++17, meson-python, scikit-build-core +numpy==2.1.3 +numpy==2.0.2 +numpy==1.26.4 +numpy==1.25.1 diff --git a/spk/python312-wheels/src/requirements-crossenv-rpds-py.txt b/spk/python312-wheels/src/requirements-crossenv-rpds-py.txt new file mode 100644 index 00000000000..dbe0de961fc --- /dev/null +++ b/spk/python312-wheels/src/requirements-crossenv-rpds-py.txt @@ -0,0 +1,13 @@ +## +## All configurations below are optional and +## are provided to demonstrate how to build +## various wheels. Uncoment to enable. +## + +# [rpds-py] +# Require environment variables +# PYO3_CROSS_LIB_DIR=$(STAGING_INSTALL_PREFIX)/lib/ +# PYO3_CROSS_INCLUDE_DIR=$(STAGING_INSTALL_PREFIX)/include/ +# Requires path to maturin from crossenv +# ENV += PATH=$(WORK_DIR)/crossenv/build/bin:$(PATH) +rpds-py==0.20.0 diff --git a/spk/python312-wheels/src/requirements-crossenv.txt b/spk/python312-wheels/src/requirements-crossenv.txt new file mode 100644 index 00000000000..8bdbfaa2d62 --- /dev/null +++ b/spk/python312-wheels/src/requirements-crossenv.txt @@ -0,0 +1,116 @@ +## +## All configurations below are optional and +## are provided to demonstrate how to build +## various wheels. Uncoment to enable. +## + +# [bcrypt] +# Require environment variables +# PYO3_CROSS_LIB_DIR=$(STAGING_INSTALL_PREFIX)/lib/ +# PYO3_CROSS_INCLUDE_DIR=$(STAGING_INSTALL_PREFIX)/include/ +bcrypt==4.2.0 + +# [cryptography] +# Mandatory of using OPENSSL_*_DIR starting with version >= 40 +# https://docs.rs/openssl/latest/openssl/#automatic +# ENV += OPENSSL_LIB_DIR=$(STAGING_INSTALL_PREFIX)/lib/ +# ENV += OPENSSL_INCLUDE_DIR=$(STAGING_INSTALL_PREFIX)/include/ +cryptography==43.0.1 + +# Requirement for cryptography +cffi==1.17.0 + +# commonly used cross-compiled wheels +# All tested and can be enabled but may conflict +# with local python apps requirements + +borgbackup==1.2.6 +charset-normalizer==3.2.0 +greenlet==3.1.1 +immutables==0.20 +llfuse==1.5.0 +MarkupSafe==2.1.5 +msgpack==1.0.5 # used compiled verrsion for performance +msgpack-python==0.5.6 +netifaces==0.11.0 +psutil==6.0.0 +pyrsistent==0.19.3 +regex==2024.7.24 +ruamel.yaml.clib==0.2.12 +SQLAlchemy==2.0.32 +zope.interface==7.0.2 + +# [gevent] +# Depends: libev, c-ares +# Require environment variables +# GEVENTSETUP_EMBED_CARES=FALSE +# GEVENTSETUP_EMBED_LIBEV=FALSE +gevent==24.2.1 + +# [lxml] +# Depends: libxml2, libxslt +lxml==5.3.0 + +# [mysqlclient] +# Depends: mysql-connector-c, mariadb-connector-c +# Require environment variables +# MYSQLCLIENT_CFLAGS +# MYSQLCLIENT_LDFLAGS +mysqlclient==2.2.4 + +# [Pillow] +# Require --global-options arguments +# WHEELS_BUILD_ARGS = [Pillow] build_ext --disable-platform-guessing +Pillow==9.5.0 + +# [pycares] +# Depends: c-ares +# Require environment variables +# PYCARES_USE_SYSTEM_LIB=1 +pycares==4.4.0 + +# [pycurl] +# Depends: curl +# Require environment variables +# PYCURL_CURL_CONFIG +pycurl==7.45.3 + +# [pydantic_core] +# Requires path to maturin from crossenv +# Requires WHEELS_CFLAGS = -std=c11 for = gcc-4.9 +# Requires WHEELS_CFLAGS = -std=c99 for < gcc-4.9 +# Require environment variables +# PYO3_CROSS_LIB_DIR=$(STAGING_INSTALL_PREFIX)/lib/ +# PYO3_CROSS_INCLUDE_DIR=$(STAGING_INSTALL_PREFIX)/include/ +pydantic_core==2.23.0 + +# [PyNaCl] +# Depends: cross/libsodium +# Require environment variables +# SODIUM_INSTALL=system +PyNaCl==1.5.0 + +# [PyYAML] +# Depends: libyaml +PyYAML==6.0.2 + +# [rencode] +# Updated fork of the project +# rencode==1.0.6 <<-- unsupported +git+https://github.com/totaam/rencode.git@f6254ab26161f90b9c5e97915b9193fee805fc1f#egg=rencode==1.0.7 + +# [rpds-py] +# Require environment variables +# PYO3_CROSS_LIB_DIR=$(STAGING_INSTALL_PREFIX)/lib/ +# PYO3_CROSS_INCLUDE_DIR=$(STAGING_INSTALL_PREFIX)/include/ +# Requires path to maturin from crossenv +# ENV += PATH=$(WORK_DIR)/crossenv/build/bin:$(PATH) +rpds-py==0.10.2 + +# [ujson] +# - Require setuptools-scm in cross/python3* crossenv +ujson==5.10.0 + +# [webrtcvad] +# webrtcvad==2.0.10 # requires unreleased version at specific commit for qoriq arch +git+https://github.com/wiseman/py-webrtcvad@3bd761332a9404f5c9276105070ee814c4428342#egg=webrtcvad==2.0.10 From 4cf67da79f1e415e989ed82474930ed7b92b7994 Mon Sep 17 00:00:00 2001 From: th0ma7 Date: Mon, 2 Dec 2024 18:05:49 -0500 Subject: [PATCH 089/130] Update spk/python312-wheels/Makefile Co-authored-by: hgy59 --- spk/python312-wheels/Makefile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/spk/python312-wheels/Makefile b/spk/python312-wheels/Makefile index 598ff0292fa..30635634ac4 100644 --- a/spk/python312-wheels/Makefile +++ b/spk/python312-wheels/Makefile @@ -4,10 +4,8 @@ SPK_VERS_MAJOR_MINOR = $(word 1,$(subst ., ,$(SPK_VERS))).$(word 2,$(subst ., ,$ SPK_REV = 1 SPK_ICON = src/python3-pip.png -# Platform "powerpc-none-linux-gnuspe" with compiler "gcc" is not supported by the -# CPython core team, see https://peps.python.org/pep-0011/ for more information. -# And compiler must support std=c++11 (OlD_PPC_ARCHS fail, but ARMv5_ARCHS have no issue). -UNSUPPORTED_ARCHS = $(OLD_PPC_ARCHS) +# Compiler must support std=c++11 +UNSUPPORTED_ARCHS = $(OLD_PPC_ARCHS) $(ARMv5_ARCHS) PYTHON_PACKAGE = python312 From c5093a344b579e8d96a7eaad3e49964f60adbab6 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Mon, 2 Dec 2024 23:07:38 +0000 Subject: [PATCH 090/130] numpy-1.25.1: Adding crossenv requirement file --- mk/crossenv/requirements-numpy-1.25.1.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 mk/crossenv/requirements-numpy-1.25.1.txt diff --git a/mk/crossenv/requirements-numpy-1.25.1.txt b/mk/crossenv/requirements-numpy-1.25.1.txt new file mode 100644 index 00000000000..e740501ce2d --- /dev/null +++ b/mk/crossenv/requirements-numpy-1.25.1.txt @@ -0,0 +1,14 @@ +pip==23.2.1 +setuptools==63.4.3 +wheel==0.41.2 +# +cffi==1.15.1 +cryptography==41.0.3 +Cython==0.29.36 +flit==3.9.0 +maturin==1.2.3 +msgpack==1.0.5 +poetry==1.6.1 +scikit-build==0.17.6 +setuptools-rust==1.7.0 +setuptools-scm==7.1.0 From 8cb990fef6e739d053454b92ed3b3a0c1943e434 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Tue, 3 Dec 2024 00:36:17 +0000 Subject: [PATCH 091/130] crossenv.mk: Fix missing definitions for HOST and BUILD_ARCH --- mk/spksrc.crossenv.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mk/spksrc.crossenv.mk b/mk/spksrc.crossenv.mk index 9d750e05d2c..e892ad195b4 100644 --- a/mk/spksrc.crossenv.mk +++ b/mk/spksrc.crossenv.mk @@ -29,8 +29,8 @@ PYTHON_PKG_DIR = Python-$(PYTHON_PKG_VERS) # HOSTPYTHON_LIB_NATIVE = $(abspath $(WORK_DIR)/../../../native/$(PYTHON_PKG_NAME)/work-native/$(PYTHON_PKG_DIR)/build/lib.linux-$(shell uname -m)-$(PYTHON_PKG_VERS_MAJOR_MINOR)) PYTHON_NATIVE = $(abspath $(WORK_DIR)/../../../native/$(PYTHON_PKG_NAME)/work-native/install/usr/local/bin/python3) -PYTHON_LIB_NATIVE = $(abspath $(PYTHON_WORK_DIR)/$(PYTHON_PKG_DIR)/build/lib.linux-$(HOST_ARCH)-$(PYTHON_PKG_VERS_MAJOR_MINOR)) -PYTHON_LIB_CROSS = $(abspath $(PYTHON_WORK_DIR)/$(PYTHON_PKG_DIR)/build/lib.linux-$(BUILD_ARCH)-$(PYTHON_PKG_VERS_MAJOR_MINOR)) +PYTHON_LIB_NATIVE = $(abspath $(PYTHON_WORK_DIR)/$(PYTHON_PKG_DIR)/build/lib.linux-$(shell uname -m)-$(PYTHON_PKG_VERS_MAJOR_MINOR)) +PYTHON_LIB_CROSS = $(abspath $(PYTHON_WORK_DIR)/$(PYTHON_PKG_DIR)/build/lib.linux-$(shell expr "$(TC_TARGET)" : '\([^-]*\)' )-$(PYTHON_PKG_VERS_MAJOR_MINOR)) # wheel crossenv definitions CROSSENV_CONFIG_PATH = $(abspath $(WORK_DIR)/../../../mk/crossenv) @@ -227,7 +227,7 @@ $(CROSSENV_PATH)/build/python-cc.mk: @$(MSG) "crossenv environment definition: $@" @mkdir -p $(CROSSENV_PATH)/build @echo BUILD_ARCH=$(shell expr "$(TC_TARGET)" : '\([^-]*\)' ) > $@ - @echo HOST_ARCH=$(shell uname -m) >> @@ + @echo HOST_ARCH=$(shell uname -m) >> $@ @echo CROSSENV_PATH=$(CROSSENV_PATH) >> $@ @echo CROSSENV=$(CROSSENV_PATH)/bin/activate >> $@ @echo HOSTPYTHON=$(abspath $(PYTHON_WORK_DIR)/$(PYTHON_PKG_DIR)/hostpython) >> $@ From 9c20b457c6b26f1cf14614934eae9e90f0a4de85 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Tue, 3 Dec 2024 01:05:46 +0000 Subject: [PATCH 092/130] wheel.mk: sort wheelhouse requirement files to avoid duplicates --- mk/spksrc.wheel.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mk/spksrc.wheel.mk b/mk/spksrc.wheel.mk index 2ef95acdecb..d7f40c27ced 100644 --- a/mk/spksrc.wheel.mk +++ b/mk/spksrc.wheel.mk @@ -142,6 +142,9 @@ ifneq ($(strip $(WHEELS)),) $(MSG) "ERROR: File $$wheel does not exist" ; \ fi ; \ done + @for file in $$(ls -1 $(WHEELHOUSE)/requirements-*.txt) ; do \ + sort -u -o $${file}{,} ; \ + done endif # Build cross compiled wheels first, to fail fast. From 18613d2794c2f904c93d8ff6b5055cd80e0ccf92 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Tue, 3 Dec 2024 02:10:21 +0000 Subject: [PATCH 093/130] python31*-wheels: various adjustments --- .../src/requirements-crossenv-greenlet-v32.txt | 9 --------- spk/python311-wheels/src/requirements-crossenv-numpy.txt | 4 ++-- spk/python311-wheels/src/requirements-crossenv.txt | 6 ++++-- spk/python312-wheels/src/requirements-crossenv-numpy.txt | 4 +++- spk/python312-wheels/src/requirements-crossenv.txt | 6 ++++-- 5 files changed, 13 insertions(+), 16 deletions(-) delete mode 100644 spk/python311-wheels/src/requirements-crossenv-greenlet-v32.txt diff --git a/spk/python311-wheels/src/requirements-crossenv-greenlet-v32.txt b/spk/python311-wheels/src/requirements-crossenv-greenlet-v32.txt deleted file mode 100644 index c2b4802c7ad..00000000000 --- a/spk/python311-wheels/src/requirements-crossenv-greenlet-v32.txt +++ /dev/null @@ -1,9 +0,0 @@ -## -## All configurations below are optional and -## are provided to demonstrate how to build -## various wheels. Uncoment to enable. -## - -# [greenlet] -# - Mandatory require full c++11 support -greenlet==3.0.3 diff --git a/spk/python311-wheels/src/requirements-crossenv-numpy.txt b/spk/python311-wheels/src/requirements-crossenv-numpy.txt index 23ffee217ce..60f1dd705bd 100644 --- a/spk/python311-wheels/src/requirements-crossenv-numpy.txt +++ b/spk/python311-wheels/src/requirements-crossenv-numpy.txt @@ -11,6 +11,6 @@ # c++17, meson-python, scikit-build-core numpy==1.24.4 numpy==1.25.1 -numpy==1.26.4 -numpy==2.0.2 +#numpy==1.26.4 +#numpy==2.0.2 numpy==2.1.3 diff --git a/spk/python311-wheels/src/requirements-crossenv.txt b/spk/python311-wheels/src/requirements-crossenv.txt index 0e66cb93829..20bbba27003 100644 --- a/spk/python311-wheels/src/requirements-crossenv.txt +++ b/spk/python311-wheels/src/requirements-crossenv.txt @@ -15,10 +15,12 @@ bcrypt==4.2.0 # https://docs.rs/openssl/latest/openssl/#automatic # ENV += OPENSSL_LIB_DIR=$(STAGING_INSTALL_PREFIX)/lib/ # ENV += OPENSSL_INCLUDE_DIR=$(STAGING_INSTALL_PREFIX)/include/ -cryptography==43.0.1 +cryptography==43.0.3 +cryptography==44.0.0 # Requirement for cryptography -cffi==1.17.0 +cffi==1.15.1 +cffi==1.17.1 # commonly used cross-compiled wheels # All tested and can be enabled but may conflict diff --git a/spk/python312-wheels/src/requirements-crossenv-numpy.txt b/spk/python312-wheels/src/requirements-crossenv-numpy.txt index 46e88a79f22..9e5b9788cf4 100644 --- a/spk/python312-wheels/src/requirements-crossenv-numpy.txt +++ b/spk/python312-wheels/src/requirements-crossenv-numpy.txt @@ -11,4 +11,6 @@ numpy==2.1.3 numpy==2.0.2 numpy==1.26.4 -numpy==1.25.1 + +# unsupported +#numpy==1.25.2 diff --git a/spk/python312-wheels/src/requirements-crossenv.txt b/spk/python312-wheels/src/requirements-crossenv.txt index 8bdbfaa2d62..b38782a4790 100644 --- a/spk/python312-wheels/src/requirements-crossenv.txt +++ b/spk/python312-wheels/src/requirements-crossenv.txt @@ -15,10 +15,12 @@ bcrypt==4.2.0 # https://docs.rs/openssl/latest/openssl/#automatic # ENV += OPENSSL_LIB_DIR=$(STAGING_INSTALL_PREFIX)/lib/ # ENV += OPENSSL_INCLUDE_DIR=$(STAGING_INSTALL_PREFIX)/include/ -cryptography==43.0.1 +cryptography==43.0.3 +cryptography==44.0.0 # Requirement for cryptography -cffi==1.17.0 +cffi==1.15.1 +cffi==1.17.1 # commonly used cross-compiled wheels # All tested and can be enabled but may conflict From b1e647e73aa21c413a36679e75c11561c325eee4 Mon Sep 17 00:00:00 2001 From: hgy59 Date: Tue, 3 Dec 2024 17:42:28 +0100 Subject: [PATCH 094/130] restore python311-wheels/src/requirements-crossenv-greenlet-v3.txt --- .../src/requirements-crossenv-greenlet-v3.txt | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 spk/python311-wheels/src/requirements-crossenv-greenlet-v3.txt diff --git a/spk/python311-wheels/src/requirements-crossenv-greenlet-v3.txt b/spk/python311-wheels/src/requirements-crossenv-greenlet-v3.txt new file mode 100644 index 00000000000..c2b4802c7ad --- /dev/null +++ b/spk/python311-wheels/src/requirements-crossenv-greenlet-v3.txt @@ -0,0 +1,9 @@ +## +## All configurations below are optional and +## are provided to demonstrate how to build +## various wheels. Uncoment to enable. +## + +# [greenlet] +# - Mandatory require full c++11 support +greenlet==3.0.3 From 4311e47b1441885b58003241cfc904cdc9674bc9 Mon Sep 17 00:00:00 2001 From: hgy59 Date: Tue, 3 Dec 2024 17:56:42 +0100 Subject: [PATCH 095/130] build.sh: add python312 and python313 to packages to keep --- .github/actions/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/build.sh b/.github/actions/build.sh index 709d6cb5623..cad54658fb3 100755 --- a/.github/actions/build.sh +++ b/.github/actions/build.sh @@ -61,7 +61,7 @@ if [ -n "$API_KEY" ] && [ "$PUBLISH" == "true" ]; then fi # Build -PACKAGES_TO_KEEP="synocli-videodriver ffmpeg5 ffmpeg7 python310 python311" +PACKAGES_TO_KEEP="synocli-videodriver ffmpeg5 ffmpeg7 python310 python311 python312 python313" for package in ${build_packages} do echo "::group:: ---- build ${package}" From 661cf73908f7e83be52a35f00366c7736821c07d Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Tue, 3 Dec 2024 21:03:01 +0000 Subject: [PATCH 096/130] python.mk: Add xz (lzma) to the library exception list --- mk/spksrc.python.mk | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/mk/spksrc.python.mk b/mk/spksrc.python.mk index a61377ce9e0..4d505b30d82 100644 --- a/mk/spksrc.python.mk +++ b/mk/spksrc.python.mk @@ -42,14 +42,11 @@ export ADDITIONAL_LDFLAGS += -L$(OPENSSL_STAGING_PREFIX)/lib export ADDITIONAL_LDFLAGS += -Wl,--rpath-link,$(OPENSSL_STAGING_PREFIX)/lib -Wl,--rpath,$(OPENSSL_PREFIX)/lib endif -# set PYTHONPATH for spksrc.python-module.mk -#PYTHONPATH = $(PYTHON_SITE_PACKAGES_NATIVE):$(PYTHON_LIB_NATIVE):$(PYTHON_STAGING_INSTALL_PREFIX)/lib/python$(PYTHON_VERSION)/site-packages/ +# Re-use all default python mandatory libraries (with exception of xz, zlib) +PYTHON_LIBS := $(filter-out %lzma.pc %zlib.pc,$(wildcard $(PYTHON_STAGING_INSTALL_PREFIX)/lib/pkgconfig/*.pc)) -# Re-use all default python mandatory libraries (with exception of zlib) -PYTHON_LIBS := $(filter-out %zlib.pc,$(wildcard $(PYTHON_STAGING_INSTALL_PREFIX)/lib/pkgconfig/*.pc)) - -# Re-use all python dependencies and mark as already done (with exceltion of zlib) -PYTHON_DEPENDS := $(foreach cross,$(filter-out zlib,$(foreach pkg_name,$(shell $(MAKE) dependency-list -C $(realpath $(PYTHON_PACKAGE_WORK_DIR)/../) 2>/dev/null | grep ^$(PYTHON_PACKAGE) | cut -f2 -d:),$(shell sed -n 's/^PKG_NAME = \(.*\)/\1/p' $(realpath $(CURDIR)/../../$(pkg_name)/Makefile)))),$(wildcard $(PYTHON_PACKAGE_WORK_DIR)/.$(cross)-*_done)) +# Re-use all python dependencies and mark as already done (with exceltion of xz, zlib) +PYTHON_DEPENDS := $(foreach cross,$(filter-out xz zlib,$(foreach pkg_name,$(shell $(MAKE) dependency-list -C $(realpath $(PYTHON_PACKAGE_WORK_DIR)/../) 2>/dev/null | grep ^$(PYTHON_PACKAGE) | cut -f2 -d:),$(shell sed -n 's/^PKG_NAME = \(.*\)/\1/p' $(realpath $(CURDIR)/../../$(pkg_name)/Makefile)))),$(wildcard $(PYTHON_PACKAGE_WORK_DIR)/.$(cross)-*_done)) # call-up pre-depend to prepare the shared python build environment PRE_DEPEND_TARGET = python_pre_depend From 190f583e77ce54347b42444fe0f7042d84e1a2ce Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Tue, 3 Dec 2024 21:05:05 +0000 Subject: [PATCH 097/130] python311-wheels: Sync greenlet requirement files with py312-wheels --- spk/python311-wheels/src/requirements-crossenv-greenlet-v3.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/spk/python311-wheels/src/requirements-crossenv-greenlet-v3.txt b/spk/python311-wheels/src/requirements-crossenv-greenlet-v3.txt index c2b4802c7ad..e2ea909ebd6 100644 --- a/spk/python311-wheels/src/requirements-crossenv-greenlet-v3.txt +++ b/spk/python311-wheels/src/requirements-crossenv-greenlet-v3.txt @@ -7,3 +7,4 @@ # [greenlet] # - Mandatory require full c++11 support greenlet==3.0.3 +greenlet==3.1.1 From 141ac431e5e2ed0d813c76f0a556ccdd51d4e270 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Tue, 3 Dec 2024 21:09:45 +0000 Subject: [PATCH 098/130] python.mk: Use *_EXCLUDE variables to simplify later additions --- mk/spksrc.python.mk | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mk/spksrc.python.mk b/mk/spksrc.python.mk index 4d505b30d82..e26ca07ec4a 100644 --- a/mk/spksrc.python.mk +++ b/mk/spksrc.python.mk @@ -43,10 +43,12 @@ export ADDITIONAL_LDFLAGS += -Wl,--rpath-link,$(OPENSSL_STAGING_PREFIX)/lib -Wl endif # Re-use all default python mandatory libraries (with exception of xz, zlib) -PYTHON_LIBS := $(filter-out %lzma.pc %zlib.pc,$(wildcard $(PYTHON_STAGING_INSTALL_PREFIX)/lib/pkgconfig/*.pc)) +PYTHON_LIBS_EXCLUDE = %lzma.pc %zlib.pc +PYTHON_LIBS := $(filter-out $(PYTHON_LIBS_EXCLUDE),$(wildcard $(PYTHON_STAGING_INSTALL_PREFIX)/lib/pkgconfig/*.pc)) # Re-use all python dependencies and mark as already done (with exceltion of xz, zlib) -PYTHON_DEPENDS := $(foreach cross,$(filter-out xz zlib,$(foreach pkg_name,$(shell $(MAKE) dependency-list -C $(realpath $(PYTHON_PACKAGE_WORK_DIR)/../) 2>/dev/null | grep ^$(PYTHON_PACKAGE) | cut -f2 -d:),$(shell sed -n 's/^PKG_NAME = \(.*\)/\1/p' $(realpath $(CURDIR)/../../$(pkg_name)/Makefile)))),$(wildcard $(PYTHON_PACKAGE_WORK_DIR)/.$(cross)-*_done)) +PYTHON_DEPENDS_EXCLUDE = xz zlib +PYTHON_DEPENDS := $(foreach cross,$(filter-out $(PYTHON_DEPENDS_EXCLUDE),$(foreach pkg_name,$(shell $(MAKE) dependency-list -C $(realpath $(PYTHON_PACKAGE_WORK_DIR)/../) 2>/dev/null | grep ^$(PYTHON_PACKAGE) | cut -f2 -d:),$(shell sed -n 's/^PKG_NAME = \(.*\)/\1/p' $(realpath $(CURDIR)/../../$(pkg_name)/Makefile)))),$(wildcard $(PYTHON_PACKAGE_WORK_DIR)/.$(cross)-*_done)) # call-up pre-depend to prepare the shared python build environment PRE_DEPEND_TARGET = python_pre_depend From fa909d2d592214726f33557e5a0a2f412908a0a8 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Tue, 3 Dec 2024 22:41:28 +0000 Subject: [PATCH 099/130] python310: Update from version 3.10.15 to 3.10.16 --- cross/python310/Makefile | 2 +- cross/python310/digests | 6 +++--- native/python310/Makefile | 16 ++++++++++++---- native/python310/digests | 6 +++--- spk/python310/Makefile | 6 +++--- spk/python310/src/requirements-pure.txt | 6 +++--- 6 files changed, 25 insertions(+), 17 deletions(-) diff --git a/cross/python310/Makefile b/cross/python310/Makefile index d36d44d0b80..55f5e810d0f 100644 --- a/cross/python310/Makefile +++ b/cross/python310/Makefile @@ -1,5 +1,5 @@ PKG_NAME = python310 -PKG_VERS = 3.10.15 +PKG_VERS = 3.10.16 PKG_VERS_MAJOR_MINOR = $(word 1,$(subst ., ,$(PKG_VERS))).$(word 2,$(subst ., ,$(PKG_VERS))) PKG_EXT = tar.xz PKG_DIST_NAME = Python-$(PKG_VERS).$(PKG_EXT) diff --git a/cross/python310/digests b/cross/python310/digests index 97d74f52750..c916efe4b23 100644 --- a/cross/python310/digests +++ b/cross/python310/digests @@ -1,3 +1,3 @@ -Python-3.10.15.tar.xz SHA1 f498fd8921e3c37e6aded9acb11ed23c8daa0bbe -Python-3.10.15.tar.xz SHA256 aab0950817735172601879872d937c1e4928a57c409ae02369ec3d91dccebe79 -Python-3.10.15.tar.xz MD5 8b1faa1b193e4e90c0f17eb2decd89b5 +Python-3.10.16.tar.xz SHA1 401e6a504a956c8f0aab76c4f3ad9df601a83eb1 +Python-3.10.16.tar.xz SHA256 bfb249609990220491a1b92850a07135ed0831e41738cf681d63cf01b2a8fbd1 +Python-3.10.16.tar.xz MD5 97b3ee1740f32a92905dd0a99dcb04d5 diff --git a/native/python310/Makefile b/native/python310/Makefile index 81f2ac89707..ee3fc05f7b2 100644 --- a/native/python310/Makefile +++ b/native/python310/Makefile @@ -1,5 +1,5 @@ PKG_NAME = python310 -PKG_VERS = 3.10.15 +PKG_VERS = 3.10.16 PKG_EXT = tar.xz PKG_DIST_NAME = Python-$(PKG_VERS).$(PKG_EXT) PKG_DIST_SITE = https://www.python.org/ftp/python/$(PKG_VERS) @@ -31,13 +31,21 @@ PYTHON = $(WORK_DIR)/install/usr/local/bin/python3 PIP = $(WORK_DIR)/install/usr/local/bin/pip PIP_NATIVE = $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/bin/pip +PIP_VERSION = "24.3.1" +PIP_WHEELS = setuptools==75.6.0 +PIP_WHEELS += setuptools-rust==1.10.2 +PIP_WHEELS += maturin==1.7.7 +PIP_WHEELS += wheel==0.45.1 +PIP_WHEELS += cffi==1.17.1 +PIP_WHEELS += crossenv==1.5.0 + .PHONY: python310_native_post_install python310_native_post_install: $(WORK_DIR)/python-native.mk @$(MSG) Installing pip @$(RUN) wget https://bootstrap.pypa.io/get-pip.py - @$(RUN) $(PYTHON) get-pip.py "pip==24.2" --no-setuptools --no-wheel --disable-pip-version-check - @$(MSG) Installing setuptools, wheel, cffi and cross env - @$(PIP) --disable-pip-version-check install "setuptools==75.1.0" "setuptools-rust==1.10.2" "maturin==1.7.4" "wheel==0.44.0" "cffi==1.17.1" "crossenv==1.5.0" + @$(RUN) $(PYTHON) get-pip.py "pip==$(PIP_VERSION)" --no-setuptools --no-wheel --disable-pip-version-check + @$(MSG) Installing setuptools, wheel, cffi and crossenv + @$(PIP) --disable-pip-version-check install $(PIP_WHEELS) $(WORK_DIR)/python-native.mk: @echo PIP=$(PIP_NATIVE) >> $@ diff --git a/native/python310/digests b/native/python310/digests index 97d74f52750..c916efe4b23 100644 --- a/native/python310/digests +++ b/native/python310/digests @@ -1,3 +1,3 @@ -Python-3.10.15.tar.xz SHA1 f498fd8921e3c37e6aded9acb11ed23c8daa0bbe -Python-3.10.15.tar.xz SHA256 aab0950817735172601879872d937c1e4928a57c409ae02369ec3d91dccebe79 -Python-3.10.15.tar.xz MD5 8b1faa1b193e4e90c0f17eb2decd89b5 +Python-3.10.16.tar.xz SHA1 401e6a504a956c8f0aab76c4f3ad9df601a83eb1 +Python-3.10.16.tar.xz SHA256 bfb249609990220491a1b92850a07135ed0831e41738cf681d63cf01b2a8fbd1 +Python-3.10.16.tar.xz MD5 97b3ee1740f32a92905dd0a99dcb04d5 diff --git a/spk/python310/Makefile b/spk/python310/Makefile index d511f713c7e..8e58d605318 100644 --- a/spk/python310/Makefile +++ b/spk/python310/Makefile @@ -1,7 +1,7 @@ SPK_NAME = python310 -SPK_VERS = 3.10.15 +SPK_VERS = 3.10.16 SPK_VERS_MAJOR_MINOR = $(word 1,$(subst ., ,$(SPK_VERS))).$(word 2,$(subst ., ,$(SPK_VERS))) -SPK_REV = 21 +SPK_REV = 22 SPK_ICON = src/python3.png DEPENDS = cross/python310 @@ -13,7 +13,7 @@ DESCRIPTION_FRE = Language de programmation Python. DESCRIPTION_SPN = Lenguaje de programación Python. STARTABLE = no DISPLAY_NAME = Python 3.10 -CHANGELOG = "1. Update to Python 3.10.15
2. Update all mandatory wheels" +CHANGELOG = "1. Update to Python 3.10.16
2. Update all mandatory wheels" HOMEPAGE = https://www.python.org LICENSE = PSF diff --git a/spk/python310/src/requirements-pure.txt b/spk/python310/src/requirements-pure.txt index 91569720023..617e77197ba 100644 --- a/spk/python310/src/requirements-pure.txt +++ b/spk/python310/src/requirements-pure.txt @@ -1,8 +1,8 @@ # basic default wheels # ==> Always install latest version (service-setup.sh:install_python_virtualenv) pip==24.3.1 -setuptools==75.4.0 -wheel==0.45.0 +setuptools==75.6.0 +wheel==0.45.1 # Always use latest version available # certifi==2024.8.30 @@ -12,7 +12,7 @@ certifi # to create their local virtualenv # in order to install wheels within # their running environment -virtualenv==20.27.1 +virtualenv==20.28.0 # Other mandatory wheels that # gets install by default as From 5c2a607290b22504dbb090a54265c8ecaf260569 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Tue, 3 Dec 2024 22:42:00 +0000 Subject: [PATCH 100/130] python311: Update from version 3.11.10 to 3.11.11 --- cross/python311/Makefile | 2 +- cross/python311/digests | 6 +++--- native/python311/Makefile | 16 ++++++++++++---- native/python311/digests | 6 +++--- spk/python311/Makefile | 6 +++--- spk/python311/src/requirements-pure.txt | 6 +++--- 6 files changed, 25 insertions(+), 17 deletions(-) diff --git a/cross/python311/Makefile b/cross/python311/Makefile index 1f3fd043f9d..08aa4eb70f2 100644 --- a/cross/python311/Makefile +++ b/cross/python311/Makefile @@ -1,5 +1,5 @@ PKG_NAME = python311 -PKG_VERS = 3.11.10 +PKG_VERS = 3.11.11 PKG_VERS_MAJOR_MINOR = $(word 1,$(subst ., ,$(PKG_VERS))).$(word 2,$(subst ., ,$(PKG_VERS))) PKG_EXT = tar.xz PKG_DIST_NAME = Python-$(PKG_VERS).$(PKG_EXT) diff --git a/cross/python311/digests b/cross/python311/digests index 80952233979..4e023eb4c28 100644 --- a/cross/python311/digests +++ b/cross/python311/digests @@ -1,3 +1,3 @@ -Python-3.11.10.tar.xz SHA1 eb0ee5c84407445809a556592008cfc1867a39bc -Python-3.11.10.tar.xz SHA256 07a4356e912900e61a15cb0949a06c4a05012e213ecd6b4e84d0f67aabbee372 -Python-3.11.10.tar.xz MD5 af59e243df4c7019f941ae51891c10bc +Python-3.11.11.tar.xz SHA1 acf539109b024d3c5f1fc63d6e7f08cd294ba56d +Python-3.11.11.tar.xz SHA256 2a9920c7a0cd236de33644ed980a13cbbc21058bfdc528febb6081575ed73be3 +Python-3.11.11.tar.xz MD5 3e497037b170fe4be5f462c4964596f2 diff --git a/native/python311/Makefile b/native/python311/Makefile index 224df7c2a7d..77e77829cb2 100644 --- a/native/python311/Makefile +++ b/native/python311/Makefile @@ -1,5 +1,5 @@ PKG_NAME = python311 -PKG_VERS = 3.11.10 +PKG_VERS = 3.11.11 PKG_EXT = tar.xz PKG_DIST_NAME = Python-$(PKG_VERS).$(PKG_EXT) PKG_DIST_SITE = https://www.python.org/ftp/python/$(PKG_VERS) @@ -31,13 +31,21 @@ PYTHON = $(WORK_DIR)/install/usr/local/bin/python3 PIP = $(WORK_DIR)/install/usr/local/bin/pip PIP_NATIVE = $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/bin/pip +PIP_VERSION = "24.3.1" +PIP_WHEELS = setuptools==75.6.0 +PIP_WHEELS += setuptools-rust==1.10.2 +PIP_WHEELS += maturin==1.7.7 +PIP_WHEELS += wheel==0.45.1 +PIP_WHEELS += cffi==1.17.1 +PIP_WHEELS += crossenv==1.5.0 + .PHONY: python311_native_post_install python311_native_post_install: $(WORK_DIR)/python-native.mk @$(MSG) Installing pip @$(RUN) wget https://bootstrap.pypa.io/get-pip.py - @$(RUN) $(PYTHON) get-pip.py "pip==24.2" --no-setuptools --no-wheel --disable-pip-version-check - @$(MSG) Installing setuptools, wheel, cffi and cross env - @$(PIP) --disable-pip-version-check install "setuptools==75.1.0" "setuptools-rust==1.10.2" "maturin==1.7.4" "wheel==0.44.0" "cffi==1.17.1" "crossenv==1.5.0" + @$(RUN) $(PYTHON) get-pip.py "pip==$(PIP_VERSION)" --no-setuptools --no-wheel --disable-pip-version-check + @$(MSG) Installing setuptools, wheel, cffi and crossenv + @$(PIP) --disable-pip-version-check install $(PIP_WHEELS) $(WORK_DIR)/python-native.mk: @echo PIP=$(PIP_NATIVE) >> $@ diff --git a/native/python311/digests b/native/python311/digests index 80952233979..4e023eb4c28 100644 --- a/native/python311/digests +++ b/native/python311/digests @@ -1,3 +1,3 @@ -Python-3.11.10.tar.xz SHA1 eb0ee5c84407445809a556592008cfc1867a39bc -Python-3.11.10.tar.xz SHA256 07a4356e912900e61a15cb0949a06c4a05012e213ecd6b4e84d0f67aabbee372 -Python-3.11.10.tar.xz MD5 af59e243df4c7019f941ae51891c10bc +Python-3.11.11.tar.xz SHA1 acf539109b024d3c5f1fc63d6e7f08cd294ba56d +Python-3.11.11.tar.xz SHA256 2a9920c7a0cd236de33644ed980a13cbbc21058bfdc528febb6081575ed73be3 +Python-3.11.11.tar.xz MD5 3e497037b170fe4be5f462c4964596f2 diff --git a/spk/python311/Makefile b/spk/python311/Makefile index 047de95ff93..6ba22500b43 100644 --- a/spk/python311/Makefile +++ b/spk/python311/Makefile @@ -1,7 +1,7 @@ SPK_NAME = python311 -SPK_VERS = 3.11.10 +SPK_VERS = 3.11.11 SPK_VERS_MAJOR_MINOR = $(word 1,$(subst ., ,$(SPK_VERS))).$(word 2,$(subst ., ,$(SPK_VERS))) -SPK_REV = 9 +SPK_REV = 10 SPK_ICON = src/python3.png # Platform "powerpc-none-linux-gnuspe" with compiler "gcc" is not supported by the @@ -18,7 +18,7 @@ DESCRIPTION_FRE = Language de programmation Python. DESCRIPTION_SPN = Lenguaje de programación Python. STARTABLE = no DISPLAY_NAME = Python 3.11 -CHANGELOG = "1. Update to Python 3.11.10
2. Update all mandatory wheels" +CHANGELOG = "1. Update to Python 3.11.11
2. Update all mandatory wheels" HOMEPAGE = https://www.python.org LICENSE = PSF diff --git a/spk/python311/src/requirements-pure.txt b/spk/python311/src/requirements-pure.txt index 91569720023..617e77197ba 100644 --- a/spk/python311/src/requirements-pure.txt +++ b/spk/python311/src/requirements-pure.txt @@ -1,8 +1,8 @@ # basic default wheels # ==> Always install latest version (service-setup.sh:install_python_virtualenv) pip==24.3.1 -setuptools==75.4.0 -wheel==0.45.0 +setuptools==75.6.0 +wheel==0.45.1 # Always use latest version available # certifi==2024.8.30 @@ -12,7 +12,7 @@ certifi # to create their local virtualenv # in order to install wheels within # their running environment -virtualenv==20.27.1 +virtualenv==20.28.0 # Other mandatory wheels that # gets install by default as From b08a7d6ee8d38de766b0a39b42187367291578a6 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Tue, 3 Dec 2024 22:42:25 +0000 Subject: [PATCH 101/130] python312-python313: Sync requirement files with py310-311 --- native/python312/Makefile | 12 ++++++------ native/python313/Makefile | 12 ++++++------ spk/python312/src/requirements-pure.txt | 6 +++--- spk/python313/src/requirements-pure.txt | 6 +++--- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/native/python312/Makefile b/native/python312/Makefile index 7a3c6233b84..6ffd710396a 100644 --- a/native/python312/Makefile +++ b/native/python312/Makefile @@ -23,7 +23,7 @@ CONFIGURE_ARGS += --with-ssl-default-suites=openssl COMPILE_MAKE_OPTIONS += all -POST_INSTALL_TARGET = python311_native_post_install +POST_INSTALL_TARGET = python312_native_post_install include ../../mk/spksrc.native-cc.mk @@ -32,15 +32,15 @@ PIP = $(WORK_DIR)/install/usr/local/bin/pip PIP_NATIVE = $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/bin/pip PIP_VERSION = "24.3.1" -PIP_WHEELS = setuptools==75.4.0 +PIP_WHEELS = setuptools==75.6.0 PIP_WHEELS += setuptools-rust==1.10.2 -PIP_WHEELS += maturin==1.7.4 -PIP_WHEELS += wheel==0.45.0 +PIP_WHEELS += maturin==1.7.7 +PIP_WHEELS += wheel==0.45.1 PIP_WHEELS += cffi==1.17.1 PIP_WHEELS += crossenv==1.5.0 -.PHONY: python311_native_post_install -python311_native_post_install: $(WORK_DIR)/python-native.mk +.PHONY: python312_native_post_install +python312_native_post_install: $(WORK_DIR)/python-native.mk @$(MSG) Installing pip @$(RUN) wget https://bootstrap.pypa.io/get-pip.py @$(RUN) $(PYTHON) get-pip.py "pip==$(PIP_VERSION)" --no-setuptools --no-wheel --disable-pip-version-check diff --git a/native/python313/Makefile b/native/python313/Makefile index 4902c3ab0ea..24dfe102fea 100644 --- a/native/python313/Makefile +++ b/native/python313/Makefile @@ -23,7 +23,7 @@ CONFIGURE_ARGS += --with-ssl-default-suites=openssl COMPILE_MAKE_OPTIONS += all -POST_INSTALL_TARGET = python311_native_post_install +POST_INSTALL_TARGET = python313_native_post_install include ../../mk/spksrc.native-cc.mk @@ -32,15 +32,15 @@ PIP = $(WORK_DIR)/install/usr/local/bin/pip PIP_NATIVE = $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/bin/pip PIP_VERSION = "24.3.1" -PIP_WHEELS = setuptools==75.4.0 +PIP_WHEELS = setuptools==75.6.0 PIP_WHEELS += setuptools-rust==1.10.2 -PIP_WHEELS += maturin==1.7.4 -PIP_WHEELS += wheel==0.45.0 +PIP_WHEELS += maturin==1.7.7 +PIP_WHEELS += wheel==0.45.1 PIP_WHEELS += cffi==1.17.1 PIP_WHEELS += crossenv==1.5.0 -.PHONY: python311_native_post_install -python311_native_post_install: $(WORK_DIR)/python-native.mk +.PHONY: python313_native_post_install +python313_native_post_install: $(WORK_DIR)/python-native.mk @$(MSG) Installing pip @$(RUN) wget https://bootstrap.pypa.io/get-pip.py @$(RUN) $(PYTHON) get-pip.py "pip==$(PIP_VERSION)" --no-setuptools --no-wheel --disable-pip-version-check diff --git a/spk/python312/src/requirements-pure.txt b/spk/python312/src/requirements-pure.txt index 91569720023..617e77197ba 100644 --- a/spk/python312/src/requirements-pure.txt +++ b/spk/python312/src/requirements-pure.txt @@ -1,8 +1,8 @@ # basic default wheels # ==> Always install latest version (service-setup.sh:install_python_virtualenv) pip==24.3.1 -setuptools==75.4.0 -wheel==0.45.0 +setuptools==75.6.0 +wheel==0.45.1 # Always use latest version available # certifi==2024.8.30 @@ -12,7 +12,7 @@ certifi # to create their local virtualenv # in order to install wheels within # their running environment -virtualenv==20.27.1 +virtualenv==20.28.0 # Other mandatory wheels that # gets install by default as diff --git a/spk/python313/src/requirements-pure.txt b/spk/python313/src/requirements-pure.txt index 91569720023..617e77197ba 100644 --- a/spk/python313/src/requirements-pure.txt +++ b/spk/python313/src/requirements-pure.txt @@ -1,8 +1,8 @@ # basic default wheels # ==> Always install latest version (service-setup.sh:install_python_virtualenv) pip==24.3.1 -setuptools==75.4.0 -wheel==0.45.0 +setuptools==75.6.0 +wheel==0.45.1 # Always use latest version available # certifi==2024.8.30 @@ -12,7 +12,7 @@ certifi # to create their local virtualenv # in order to install wheels within # their running environment -virtualenv==20.27.1 +virtualenv==20.28.0 # Other mandatory wheels that # gets install by default as From cf0fe6c8c4f5b5ce818e02bd544c84ca3600d610 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Wed, 4 Dec 2024 11:35:28 +0000 Subject: [PATCH 102/130] python312: Update from version 3.12.7 to 3.12.8 --- cross/python312/Makefile | 2 +- cross/python312/digests | 6 +++--- native/python312/Makefile | 2 +- native/python312/digests | 6 +++--- spk/python312/Makefile | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/cross/python312/Makefile b/cross/python312/Makefile index ef14f9a4651..01d10232a2e 100644 --- a/cross/python312/Makefile +++ b/cross/python312/Makefile @@ -1,5 +1,5 @@ PKG_NAME = python312 -PKG_VERS = 3.12.7 +PKG_VERS = 3.12.8 PKG_VERS_MAJOR_MINOR = $(word 1,$(subst ., ,$(PKG_VERS))).$(word 2,$(subst ., ,$(PKG_VERS))) PKG_EXT = tar.xz PKG_DIST_NAME = Python-$(PKG_VERS).$(PKG_EXT) diff --git a/cross/python312/digests b/cross/python312/digests index 709e70c4a95..bbc77569f89 100644 --- a/cross/python312/digests +++ b/cross/python312/digests @@ -1,3 +1,3 @@ -Python-3.12.7.tar.xz SHA1 5a760bbc42c67f1a0aef5bcf7c329348fb88448b -Python-3.12.7.tar.xz SHA256 24887b92e2afd4a2ac602419ad4b596372f67ac9b077190f459aba390faf5550 -Python-3.12.7.tar.xz MD5 c6c933c1a0db52597cb45a7910490f93 +Python-3.12.8.tar.xz SHA1 8872c7a124c6970833e0bde4f25d6d7d61c6af6e +Python-3.12.8.tar.xz SHA256 c909157bb25ec114e5869124cc2a9c4a4d4c1e957ca4ff553f1edc692101154e +Python-3.12.8.tar.xz MD5 d46e5bf9f2e596a3ba45fc0b3c053dd2 diff --git a/native/python312/Makefile b/native/python312/Makefile index 6ffd710396a..6a627cde016 100644 --- a/native/python312/Makefile +++ b/native/python312/Makefile @@ -1,5 +1,5 @@ PKG_NAME = python312 -PKG_VERS = 3.12.7 +PKG_VERS = 3.12.8 PKG_EXT = tar.xz PKG_DIST_NAME = Python-$(PKG_VERS).$(PKG_EXT) PKG_DIST_SITE = https://www.python.org/ftp/python/$(PKG_VERS) diff --git a/native/python312/digests b/native/python312/digests index 709e70c4a95..bbc77569f89 100644 --- a/native/python312/digests +++ b/native/python312/digests @@ -1,3 +1,3 @@ -Python-3.12.7.tar.xz SHA1 5a760bbc42c67f1a0aef5bcf7c329348fb88448b -Python-3.12.7.tar.xz SHA256 24887b92e2afd4a2ac602419ad4b596372f67ac9b077190f459aba390faf5550 -Python-3.12.7.tar.xz MD5 c6c933c1a0db52597cb45a7910490f93 +Python-3.12.8.tar.xz SHA1 8872c7a124c6970833e0bde4f25d6d7d61c6af6e +Python-3.12.8.tar.xz SHA256 c909157bb25ec114e5869124cc2a9c4a4d4c1e957ca4ff553f1edc692101154e +Python-3.12.8.tar.xz MD5 d46e5bf9f2e596a3ba45fc0b3c053dd2 diff --git a/spk/python312/Makefile b/spk/python312/Makefile index dd78c729d4e..fea0f1d29b4 100644 --- a/spk/python312/Makefile +++ b/spk/python312/Makefile @@ -1,5 +1,5 @@ SPK_NAME = python312 -SPK_VERS = 3.12.7 +SPK_VERS = 3.12.8 SPK_VERS_MAJOR_MINOR = $(word 1,$(subst ., ,$(SPK_VERS))).$(word 2,$(subst ., ,$(SPK_VERS))) SPK_REV = 1 SPK_ICON = src/python3.png @@ -16,7 +16,7 @@ DESCRIPTION_FRE = Language de programmation Python. DESCRIPTION_SPN = Lenguaje de programación Python. STARTABLE = no DISPLAY_NAME = Python 3.12 -CHANGELOG = "1. Initial Python 3.12.7 package release" +CHANGELOG = "1. Initial Python 3.12.8 package release" HOMEPAGE = https://www.python.org LICENSE = PSF From 173b71bfc6bdda6c65e5ed68552555a968ca55bc Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Wed, 4 Dec 2024 11:36:11 +0000 Subject: [PATCH 103/130] python313: Update from version 3.13.0 to 3.13.1 --- cross/python313/Makefile | 2 +- cross/python313/digests | 6 +++--- native/python313/Makefile | 2 +- native/python313/digests | 6 +++--- spk/python313/Makefile | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/cross/python313/Makefile b/cross/python313/Makefile index 442f5317d8d..edea82c439e 100644 --- a/cross/python313/Makefile +++ b/cross/python313/Makefile @@ -1,5 +1,5 @@ PKG_NAME = python313 -PKG_VERS = 3.13.0 +PKG_VERS = 3.13.1 PKG_VERS_MAJOR_MINOR = $(word 1,$(subst ., ,$(PKG_VERS))).$(word 2,$(subst ., ,$(PKG_VERS))) PKG_EXT = tar.xz PKG_DIST_NAME = Python-$(PKG_VERS).$(PKG_EXT) diff --git a/cross/python313/digests b/cross/python313/digests index e04149813c9..35979854910 100644 --- a/cross/python313/digests +++ b/cross/python313/digests @@ -1,3 +1,3 @@ -Python-3.13.0.tar.xz SHA1 0f71dce4a3251460985a944bbd1d1b7db1660a91 -Python-3.13.0.tar.xz SHA256 086de5882e3cb310d4dca48457522e2e48018ecd43da9cdf827f6a0759efb07d -Python-3.13.0.tar.xz MD5 726e5b829fcf352326874c1ae599abaa +Python-3.13.1.tar.xz SHA1 4b0c2a49a848c3c5d611416099636262a0b9090f +Python-3.13.1.tar.xz SHA256 9cf9427bee9e2242e3877dd0f6b641c1853ca461f39d6503ce260a59c80bf0d9 +Python-3.13.1.tar.xz MD5 80c16badb94ffe235280d4d9a099b8bc diff --git a/native/python313/Makefile b/native/python313/Makefile index 24dfe102fea..e801c66530c 100644 --- a/native/python313/Makefile +++ b/native/python313/Makefile @@ -1,5 +1,5 @@ PKG_NAME = python313 -PKG_VERS = 3.13.0 +PKG_VERS = 3.13.1 PKG_EXT = tar.xz PKG_DIST_NAME = Python-$(PKG_VERS).$(PKG_EXT) PKG_DIST_SITE = https://www.python.org/ftp/python/$(PKG_VERS) diff --git a/native/python313/digests b/native/python313/digests index e04149813c9..35979854910 100644 --- a/native/python313/digests +++ b/native/python313/digests @@ -1,3 +1,3 @@ -Python-3.13.0.tar.xz SHA1 0f71dce4a3251460985a944bbd1d1b7db1660a91 -Python-3.13.0.tar.xz SHA256 086de5882e3cb310d4dca48457522e2e48018ecd43da9cdf827f6a0759efb07d -Python-3.13.0.tar.xz MD5 726e5b829fcf352326874c1ae599abaa +Python-3.13.1.tar.xz SHA1 4b0c2a49a848c3c5d611416099636262a0b9090f +Python-3.13.1.tar.xz SHA256 9cf9427bee9e2242e3877dd0f6b641c1853ca461f39d6503ce260a59c80bf0d9 +Python-3.13.1.tar.xz MD5 80c16badb94ffe235280d4d9a099b8bc diff --git a/spk/python313/Makefile b/spk/python313/Makefile index 85104050793..dbbe8d6dbc1 100644 --- a/spk/python313/Makefile +++ b/spk/python313/Makefile @@ -1,5 +1,5 @@ SPK_NAME = python313 -SPK_VERS = 3.13.0 +SPK_VERS = 3.13.1 SPK_VERS_MAJOR_MINOR = $(word 1,$(subst ., ,$(SPK_VERS))).$(word 2,$(subst ., ,$(SPK_VERS))) SPK_REV = 1 SPK_ICON = src/python3.png @@ -16,7 +16,7 @@ DESCRIPTION_FRE = Language de programmation Python. DESCRIPTION_SPN = Lenguaje de programación Python. STARTABLE = no DISPLAY_NAME = Python 3.13 -CHANGELOG = "1. Initial Python 3.13.0 package release" +CHANGELOG = "1. Initial Python 3.13.1 package release" HOMEPAGE = https://www.python.org LICENSE = PSF From 482019d8e073471ba75594e6347d7eeb3ff1d96c Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Wed, 4 Dec 2024 12:17:55 +0000 Subject: [PATCH 104/130] py311-312-wheels: Fix greenlet 3.x support with gcc <= 8 --- spk/python311-wheels/Makefile | 6 +++--- .../src/requirements-crossenv-greenlet-v3-gcc4.txt | 9 +++++++++ .../src/requirements-crossenv-greenlet-v3.txt | 1 + spk/python312-wheels/Makefile | 4 +++- .../src/requirements-crossenv-greenlet-v3-gcc4.txt | 9 +++++++++ .../src/requirements-crossenv-greenlet-v3.txt | 1 + 6 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 spk/python311-wheels/src/requirements-crossenv-greenlet-v3-gcc4.txt create mode 100644 spk/python312-wheels/src/requirements-crossenv-greenlet-v3-gcc4.txt diff --git a/spk/python311-wheels/Makefile b/spk/python311-wheels/Makefile index 91527cafcf7..278d5df31bd 100644 --- a/spk/python311-wheels/Makefile +++ b/spk/python311-wheels/Makefile @@ -95,11 +95,11 @@ endif include ../../mk/spksrc.python.mk # [greenlet] -ifeq ($(call version_ge, $(TC_GCC), 4.9),1) +ifeq ($(call version_ge, $(TC_GCC), 5.0),1) WHEELS += src/requirements-crossenv-greenlet-v3.txt -ifeq ($(call version_lt, $(TC_GCC), 5.0),1) +else ifeq ($(call version_ge, $(TC_GCC), 4.9)$(call version_lt, $(TC_GCC), 5.0),11) +WHEELS += src/requirements-crossenv-greenlet-v3-gcc4.txt WHEELS_CPPFLAGS += [greenlet] -std=c++11 -fpermissive -endif else WHEELS += src/requirements-crossenv-greenlet-v1.txt endif diff --git a/spk/python311-wheels/src/requirements-crossenv-greenlet-v3-gcc4.txt b/spk/python311-wheels/src/requirements-crossenv-greenlet-v3-gcc4.txt new file mode 100644 index 00000000000..c2b4802c7ad --- /dev/null +++ b/spk/python311-wheels/src/requirements-crossenv-greenlet-v3-gcc4.txt @@ -0,0 +1,9 @@ +## +## All configurations below are optional and +## are provided to demonstrate how to build +## various wheels. Uncoment to enable. +## + +# [greenlet] +# - Mandatory require full c++11 support +greenlet==3.0.3 diff --git a/spk/python311-wheels/src/requirements-crossenv-greenlet-v3.txt b/spk/python311-wheels/src/requirements-crossenv-greenlet-v3.txt index e2ea909ebd6..837c343884b 100644 --- a/spk/python311-wheels/src/requirements-crossenv-greenlet-v3.txt +++ b/spk/python311-wheels/src/requirements-crossenv-greenlet-v3.txt @@ -7,4 +7,5 @@ # [greenlet] # - Mandatory require full c++11 support greenlet==3.0.3 +# - Mandatory require full c++20 support added with gcc >= 8 greenlet==3.1.1 diff --git a/spk/python312-wheels/Makefile b/spk/python312-wheels/Makefile index 30635634ac4..bf702c57c64 100644 --- a/spk/python312-wheels/Makefile +++ b/spk/python312-wheels/Makefile @@ -93,8 +93,10 @@ endif include ../../mk/spksrc.python.mk # [greenlet] -ifeq ($(call version_ge $(TC_GCC), 4.9),1) +ifeq ($(call version_ge, $(TC_GCC), 5.0),1) WHEELS += src/requirements-crossenv-greenlet-v3.txt +else ifeq ($(call version_ge, $(TC_GCC), 4.9)$(call version_lt, $(TC_GCC), 5.0),11) +WHEELS += src/requirements-crossenv-greenlet-v3-gcc4.txt WHEELS_CPPFLAGS += [greenlet] -std=c++11 -fpermissive endif diff --git a/spk/python312-wheels/src/requirements-crossenv-greenlet-v3-gcc4.txt b/spk/python312-wheels/src/requirements-crossenv-greenlet-v3-gcc4.txt new file mode 100644 index 00000000000..c2b4802c7ad --- /dev/null +++ b/spk/python312-wheels/src/requirements-crossenv-greenlet-v3-gcc4.txt @@ -0,0 +1,9 @@ +## +## All configurations below are optional and +## are provided to demonstrate how to build +## various wheels. Uncoment to enable. +## + +# [greenlet] +# - Mandatory require full c++11 support +greenlet==3.0.3 diff --git a/spk/python312-wheels/src/requirements-crossenv-greenlet-v3.txt b/spk/python312-wheels/src/requirements-crossenv-greenlet-v3.txt index e2ea909ebd6..837c343884b 100644 --- a/spk/python312-wheels/src/requirements-crossenv-greenlet-v3.txt +++ b/spk/python312-wheels/src/requirements-crossenv-greenlet-v3.txt @@ -7,4 +7,5 @@ # [greenlet] # - Mandatory require full c++11 support greenlet==3.0.3 +# - Mandatory require full c++20 support added with gcc >= 8 greenlet==3.1.1 From 6d98cb4d7416c7ec6943ef92e164d43d485296b4 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Thu, 5 Dec 2024 00:51:16 +0000 Subject: [PATCH 105/130] crossenv.mk: Move PATH and LD_LIBRARY_PATH to be crossenv specific --- mk/spksrc.crossenv.mk | 4 ---- mk/spksrc.wheel.mk | 8 +++++++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/mk/spksrc.crossenv.mk b/mk/spksrc.crossenv.mk index e892ad195b4..bbcc4395347 100644 --- a/mk/spksrc.crossenv.mk +++ b/mk/spksrc.crossenv.mk @@ -155,10 +155,6 @@ export OPENSSL_INCLUDE_DIR = $(OPENSSL_STAGING_PREFIX)/include/ # set PYTHONPATH for spksrc.python-module.mk export PYTHONPATH = $(PYTHON_LIB_NATIVE):$(PYTHON_STAGING_INSTALL_PREFIX)/lib/python$(PYTHON_PKG_VERS_MAJOR_MINOR)/site-packages/ -# Required so native python and maturin binaries can always be found -export PATH := $(abspath $(WORK_DIR)/../../../native/$(PYTHON_PKG_NAME)/work-native/install/usr/local/bin):$(PATH) -export LD_LIBRARY_PATH := $(abspath $(WORK_DIR)/../../../native/$(PYTHON_PKG_NAME)/work-native/install/usr/local/lib):$(LD_LIBRARY_PATH) - ### # Create the crossenv in preparation for diff --git a/mk/spksrc.wheel.mk b/mk/spksrc.wheel.mk index d7f40c27ced..b7910b6237b 100644 --- a/mk/spksrc.wheel.mk +++ b/mk/spksrc.wheel.mk @@ -215,7 +215,9 @@ else endif endif - +# PATH modified to access native/python* linked to crossenv-/build/bin +# this also provide access to maturin and its dependencies needed for building wheels +# LD_LIBRARY_PATH modified to access native/python libraries so related binary works cross-compile-wheel-%: SHELL:=/bin/bash cross-compile-wheel-%: @if [ "$(PIP_GLOBAL_OPTION)" ]; then \ @@ -224,6 +226,8 @@ cross-compile-wheel-%: fi ; \ $(MSG) \ _PYTHON_HOST_PLATFORM="$(TC_TARGET)" \ + PATH="$(CROSSENV_PATH)/build/bin:$(PATH)" \ + LD_LIBRARY_PATH="$(abspath $(WORK_DIR)/../../../native/$(PYTHON_PKG_NAME)/work-native/install/usr/local/lib):$(LD_LIBRARY_PATH)" \ MESON_CROSS_FILE="$(MESON_TOOLCHAIN_WRK)" \ $(PIP_CROSSENV) \ $(PIP_WHEEL_ARGS_CROSSENV) \ @@ -233,6 +237,8 @@ cross-compile-wheel-%: $(REQUIREMENT) ; \ $(RUN) \ _PYTHON_HOST_PLATFORM="$(TC_TARGET)" \ + PATH="$(CROSSENV_PATH)/build/bin:$(PATH)" \ + LD_LIBRARY_PATH="$(abspath $(WORK_DIR)/../../../native/$(PYTHON_PKG_NAME)/work-native/install/usr/local/lib):$(LD_LIBRARY_PATH)" \ MESON_CROSS_FILE="$(MESON_TOOLCHAIN_WRK)" \ $(PIP_CROSSENV) \ $(PIP_WHEEL_ARGS_CROSSENV) \ From 02e5cca79c09b0df3e0c1c1c84866a9648ebd278 Mon Sep 17 00:00:00 2001 From: hgy59 Date: Fri, 6 Dec 2024 11:30:19 +0100 Subject: [PATCH 106/130] define build-python when not in path --- cross/python310/Makefile | 2 +- cross/python311/Makefile | 2 +- cross/python312/Makefile | 2 +- cross/python313/Makefile | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cross/python310/Makefile b/cross/python310/Makefile index 55f5e810d0f..c9067bd0897 100644 --- a/cross/python310/Makefile +++ b/cross/python310/Makefile @@ -27,7 +27,7 @@ CONFIGURE_ARGS += --enable-ipv6 CONFIGURE_ARGS += --without-ensurepip CONFIGURE_ARGS += --enable-loadable-sqlite-extensions CONFIGURE_ARGS += --with-computed-gotos=yes -CONFIGURE_ARGS += --with-build-python +CONFIGURE_ARGS += --with-build-python=$(abspath $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/bin/python$(PKG_VERS_MAJOR_MINOR)) CONFIGURE_ARGS += --disable-test-modules include ../../mk/spksrc.archs.mk diff --git a/cross/python311/Makefile b/cross/python311/Makefile index 08aa4eb70f2..42d1f3be6b0 100644 --- a/cross/python311/Makefile +++ b/cross/python311/Makefile @@ -32,7 +32,7 @@ CONFIGURE_ARGS += --enable-ipv6 CONFIGURE_ARGS += --without-ensurepip CONFIGURE_ARGS += --enable-loadable-sqlite-extensions CONFIGURE_ARGS += --with-computed-gotos=yes -CONFIGURE_ARGS += --with-build-python +CONFIGURE_ARGS += --with-build-python=$(abspath $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/bin/python$(PKG_VERS_MAJOR_MINOR)) CONFIGURE_ARGS += --disable-test-modules include ../../mk/spksrc.archs.mk diff --git a/cross/python312/Makefile b/cross/python312/Makefile index 01d10232a2e..ba7e680c0ca 100644 --- a/cross/python312/Makefile +++ b/cross/python312/Makefile @@ -30,7 +30,7 @@ CONFIGURE_ARGS += --enable-ipv6 CONFIGURE_ARGS += --without-ensurepip CONFIGURE_ARGS += --enable-loadable-sqlite-extensions CONFIGURE_ARGS += --with-computed-gotos=yes -CONFIGURE_ARGS += --with-build-python +CONFIGURE_ARGS += --with-build-python=$(abspath $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/bin/python$(PKG_VERS_MAJOR_MINOR)) CONFIGURE_ARGS += --with-readline=readline CONFIGURE_ARGS += --disable-test-modules diff --git a/cross/python313/Makefile b/cross/python313/Makefile index edea82c439e..ccf62d6da81 100644 --- a/cross/python313/Makefile +++ b/cross/python313/Makefile @@ -30,7 +30,7 @@ CONFIGURE_ARGS += --enable-ipv6 CONFIGURE_ARGS += --without-ensurepip CONFIGURE_ARGS += --enable-loadable-sqlite-extensions CONFIGURE_ARGS += --with-computed-gotos=yes -CONFIGURE_ARGS += --with-build-python +CONFIGURE_ARGS += --with-build-python=$(abspath $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/bin/python$(PKG_VERS_MAJOR_MINOR)) CONFIGURE_ARGS += --with-readline=readline CONFIGURE_ARGS += --disable-test-modules From 828912d5f387d165def731b090d18e97fdcfbb47 Mon Sep 17 00:00:00 2001 From: hgy59 Date: Fri, 6 Dec 2024 11:30:54 +0100 Subject: [PATCH 107/130] minimize specific crossenv for frozenlist and yarl --- mk/crossenv/requirements-frozenlist.txt | 8 +++++++- mk/crossenv/requirements-yarl.txt | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/mk/crossenv/requirements-frozenlist.txt b/mk/crossenv/requirements-frozenlist.txt index 70d1e7909f3..4edc3b107fb 100644 --- a/mk/crossenv/requirements-frozenlist.txt +++ b/mk/crossenv/requirements-frozenlist.txt @@ -1,2 +1,8 @@ --r ./requirements-default.txt +pip==24.3.1 +pip-tools==7.4.1 +setuptools==75.4.0 +build==1.2.2 +wheel==0.45.0 +# +Cython==3.0.11 expandvars==0.12.0 diff --git a/mk/crossenv/requirements-yarl.txt b/mk/crossenv/requirements-yarl.txt index 70d1e7909f3..4edc3b107fb 100644 --- a/mk/crossenv/requirements-yarl.txt +++ b/mk/crossenv/requirements-yarl.txt @@ -1,2 +1,8 @@ --r ./requirements-default.txt +pip==24.3.1 +pip-tools==7.4.1 +setuptools==75.4.0 +build==1.2.2 +wheel==0.45.0 +# +Cython==3.0.11 expandvars==0.12.0 From 07356c4083becbbb25490de7acdae2c9031dd75f Mon Sep 17 00:00:00 2001 From: hgy59 Date: Fri, 6 Dec 2024 11:33:21 +0100 Subject: [PATCH 108/130] remove unsupported configure args - --with-system-ffi is not supported (python312, python313) - --with-system-ffi is "is ignored on this platform" (python311) --- native/python311/Makefile | 2 -- native/python312/Makefile | 2 -- native/python313/Makefile | 2 -- 3 files changed, 6 deletions(-) diff --git a/native/python311/Makefile b/native/python311/Makefile index 77e77829cb2..2dd1b11872d 100644 --- a/native/python311/Makefile +++ b/native/python311/Makefile @@ -16,8 +16,6 @@ CONFIGURE_ARGS += --without-static-libpython CONFIGURE_ARGS += --with-ensurepip=no # test modules are required for optimization only CONFIGURE_ARGS += --disable-test-modules -# Uses system default libffi-dev -CONFIGURE_ARGS += --with-system-ffi # Uses system default libssl-dev CONFIGURE_ARGS += --with-ssl-default-suites=openssl diff --git a/native/python312/Makefile b/native/python312/Makefile index 6a627cde016..7c25b3dccac 100644 --- a/native/python312/Makefile +++ b/native/python312/Makefile @@ -16,8 +16,6 @@ CONFIGURE_ARGS += --without-static-libpython CONFIGURE_ARGS += --with-ensurepip=no # test modules are required for optimization only CONFIGURE_ARGS += --disable-test-modules -# Uses system default libffi-dev -CONFIGURE_ARGS += --with-system-ffi # Uses system default libssl-dev CONFIGURE_ARGS += --with-ssl-default-suites=openssl diff --git a/native/python313/Makefile b/native/python313/Makefile index e801c66530c..a9d26a00960 100644 --- a/native/python313/Makefile +++ b/native/python313/Makefile @@ -16,8 +16,6 @@ CONFIGURE_ARGS += --without-static-libpython CONFIGURE_ARGS += --with-ensurepip=no # test modules are required for optimization only CONFIGURE_ARGS += --disable-test-modules -# Uses system default libffi-dev -CONFIGURE_ARGS += --with-system-ffi # Uses system default libssl-dev CONFIGURE_ARGS += --with-ssl-default-suites=openssl From e1136742692883caeafdecda50e941fef695a1c9 Mon Sep 17 00:00:00 2001 From: hgy59 Date: Fri, 6 Dec 2024 15:29:16 +0100 Subject: [PATCH 109/130] revert fullpath for build-python for python310 and python311 - python310 and python311 require the path to build python for "generate-posix-vars" --- cross/python310/Makefile | 6 ++++-- cross/python311/Makefile | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/cross/python310/Makefile b/cross/python310/Makefile index c9067bd0897..744b4024f77 100644 --- a/cross/python310/Makefile +++ b/cross/python310/Makefile @@ -6,7 +6,7 @@ PKG_DIST_NAME = Python-$(PKG_VERS).$(PKG_EXT) PKG_DIST_SITE = https://www.python.org/ftp/python/$(PKG_VERS) PKG_DIR = Python-$(PKG_VERS) -BUILD_DEPENDS = native/$(PKG_NAME) +BUILD_DEPENDS = native/python310 DEPENDS = cross/zlib cross/sqlite cross/readline cross/ncursesw cross/bzip2 cross/xz # required for Sleepycat^WOracle Berkeley DB interface @@ -27,7 +27,7 @@ CONFIGURE_ARGS += --enable-ipv6 CONFIGURE_ARGS += --without-ensurepip CONFIGURE_ARGS += --enable-loadable-sqlite-extensions CONFIGURE_ARGS += --with-computed-gotos=yes -CONFIGURE_ARGS += --with-build-python=$(abspath $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/bin/python$(PKG_VERS_MAJOR_MINOR)) +CONFIGURE_ARGS += --with-build-python CONFIGURE_ARGS += --disable-test-modules include ../../mk/spksrc.archs.mk @@ -78,6 +78,8 @@ include ../../mk/spksrc.cross-cc.mk PYTHON_NATIVE = $(abspath $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/bin/python3) HOSTPYTHON = $(WORK_DIR)/$(PKG_DIR)/hostpython +# Required to find build-python and to generate-posix-vars +PATH := $(abspath $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/bin):$(PATH) .PHONY: python310_post_patch python310_post_patch: diff --git a/cross/python311/Makefile b/cross/python311/Makefile index 42d1f3be6b0..aea0e907ef9 100644 --- a/cross/python311/Makefile +++ b/cross/python311/Makefile @@ -32,7 +32,7 @@ CONFIGURE_ARGS += --enable-ipv6 CONFIGURE_ARGS += --without-ensurepip CONFIGURE_ARGS += --enable-loadable-sqlite-extensions CONFIGURE_ARGS += --with-computed-gotos=yes -CONFIGURE_ARGS += --with-build-python=$(abspath $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/bin/python$(PKG_VERS_MAJOR_MINOR)) +CONFIGURE_ARGS += --with-build-python CONFIGURE_ARGS += --disable-test-modules include ../../mk/spksrc.archs.mk @@ -78,6 +78,8 @@ include ../../mk/spksrc.cross-cc.mk PYTHON_NATIVE = $(abspath $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/bin/python3) HOSTPYTHON = $(WORK_DIR)/$(PKG_DIR)/hostpython +# Required to find build-python and to generate-posix-vars +PATH := $(abspath $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/bin):$(PATH) .PHONY: python311_post_patch python311_post_patch: From 27e5b7f5b5a0aad1e86cc78e4add514910c49589 Mon Sep 17 00:00:00 2001 From: hgy59 Date: Fri, 6 Dec 2024 19:57:48 +0100 Subject: [PATCH 110/130] python312-wheels: fix build - add wheelhouse to package - many wheels need -std=c11 for gcc4 - llfuse wheel fails to build (temp. excluded) - remove ARMv5 specific handling - udpate rpds_py==0.20.0 and remove requirements-crossenv-rpds-py.txt (not referenced) - add specific crossenv for pydantic_core --- cross/python311/Makefile | 2 + mk/crossenv/requirements-pydantic_core.txt | 10 ++ spk/python311-wheels/Makefile | 9 +- spk/python312-wheels/Makefile | 118 ++++++++++-------- spk/python312-wheels/PLIST | 1 + .../src/requirements-crossenv-rpds-py.txt | 13 -- .../src/requirements-crossenv.txt | 9 +- 7 files changed, 86 insertions(+), 76 deletions(-) create mode 100644 mk/crossenv/requirements-pydantic_core.txt create mode 100644 spk/python312-wheels/PLIST delete mode 100644 spk/python312-wheels/src/requirements-crossenv-rpds-py.txt diff --git a/cross/python311/Makefile b/cross/python311/Makefile index aea0e907ef9..dc33b1b22f8 100644 --- a/cross/python311/Makefile +++ b/cross/python311/Makefile @@ -80,6 +80,8 @@ PYTHON_NATIVE = $(abspath $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/in HOSTPYTHON = $(WORK_DIR)/$(PKG_DIR)/hostpython # Required to find build-python and to generate-posix-vars PATH := $(abspath $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/bin):$(PATH) +# Required for python to find ssl libraries to download sources from pypi +export LD_LIBRARY_PATH:=$(abspath $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/lib):$(LD_LIBRARY_PATH) .PHONY: python311_post_patch python311_post_patch: diff --git a/mk/crossenv/requirements-pydantic_core.txt b/mk/crossenv/requirements-pydantic_core.txt new file mode 100644 index 00000000000..aab8e3a040e --- /dev/null +++ b/mk/crossenv/requirements-pydantic_core.txt @@ -0,0 +1,10 @@ +pip==24.3.1 +pip-tools==7.4.1 +setuptools==75.4.0 +build==1.2.2 +wheel==0.45.0 +# +# [pydantic_core] depends on Cython < 3.x +Cython==0.29.37 +maturin==1.7.4 +typing_extensions==4.12.2 diff --git a/spk/python311-wheels/Makefile b/spk/python311-wheels/Makefile index 278d5df31bd..9581caa9c85 100644 --- a/spk/python311-wheels/Makefile +++ b/spk/python311-wheels/Makefile @@ -10,13 +10,14 @@ SPK_ICON = src/python3-pip.png UNSUPPORTED_ARCHS = $(OLD_PPC_ARCHS) PYTHON_PACKAGE = python311 +SPK_DEPENDS = "$(PYTHON_PACKAGE)" MAINTAINER = SynoCommunity -DESCRIPTION = Collection of programs for the Python programming language. -DESCRIPTION_FRE = Collection of programs for the Python programming language. -DESCRIPTION_SPN = Colección de programas para el lenguaje de programación Python. +DESCRIPTION = Collection of programs for the Python 3.11 programming language. +DESCRIPTION_FRE = Collection of programs for the Python 3.11 programming language. +DESCRIPTION_SPN = Colección de programas para el lenguaje de programación Python 3.11. STARTABLE = no -DISPLAY_NAME = Python Wheels Collection +DISPLAY_NAME = Python 3.11 Wheels Collection CHANGELOG = "1. Initial package" HOMEPAGE = https://www.python.org diff --git a/spk/python312-wheels/Makefile b/spk/python312-wheels/Makefile index bf702c57c64..79b5840e848 100644 --- a/spk/python312-wheels/Makefile +++ b/spk/python312-wheels/Makefile @@ -8,13 +8,14 @@ SPK_ICON = src/python3-pip.png UNSUPPORTED_ARCHS = $(OLD_PPC_ARCHS) $(ARMv5_ARCHS) PYTHON_PACKAGE = python312 +SPK_DEPENDS = "$(PYTHON_PACKAGE)" MAINTAINER = SynoCommunity -DESCRIPTION = Collection of programs for the Python programming language. -DESCRIPTION_FRE = Collection of programs for the Python programming language. -DESCRIPTION_SPN = Colección de programas para el lenguaje de programación Python. +DESCRIPTION = Collection of programs for the Python 3.12 programming language. +DESCRIPTION_FRE = Collection of programs for the Python 3.12 programming language. +DESCRIPTION_SPN = Colección de programas para el lenguaje de programación Python 3.12. STARTABLE = no -DISPLAY_NAME = Python Wheels Collection +DISPLAY_NAME = Python 3.12 Wheels Collection CHANGELOG = "1. Initial package" HOMEPAGE = https://www.python.org @@ -26,6 +27,8 @@ LICENSE = PSF WHEELS = src/requirements-crossenv.txt WHEELS += src/requirements-abi3.txt +include ../../mk/spksrc.common.mk + # [borgbackup] # Use OpenSSL path as defined by either # spksrc.wheel-env.mk or spksrc.python.mk @@ -34,6 +37,9 @@ ENV += BORG_LIBLZ4_PREFIX="$(STAGING_INSTALL_PREFIX)" ENV += BORG_LIBZSTD_PREFIX="$(STAGING_INSTALL_PREFIX)" ENV += BORG_LIBB2_PREFIX="$(STAGING_INSTALL_PREFIX)" DEPENDS += cross/attr cross/acl cross/openssl3 cross/lz4 cross/zstd cross/libb2 cross/fuse +ifeq ($(call version_lt, $(TC_GCC), 5.0),1) +WHEELS_CFLAGS += [borgbackup] -std=c11 +endif # [cryptography] # Use cross/cryptography to generate py36-abi3 limited API @@ -45,10 +51,34 @@ DEPENDS += cross/cryptography DEPENDS += cross/libev cross/c-ares ENV += GEVENTSETUP_EMBED_CARES=FALSE ENV += GEVENTSETUP_EMBED_LIBEV=FALSE +ifeq ($(call version_lt, $(TC_GCC), 5.0),1) +WHEELS_CFLAGS += [gevent] -std=c11 +endif + +# [greenlet] +ifeq ($(call version_ge, $(TC_GCC), 5.0),1) +WHEELS += src/requirements-crossenv-greenlet-v3.txt +else +WHEELS += src/requirements-crossenv-greenlet-v3-gcc4.txt +WHEELS_CPPFLAGS += [greenlet] -std=c++11 -fpermissive +endif + +# [llfuse] +ifeq ($(call version_lt, $(TC_GCC), 5.0),1) +WHEELS_CFLAGS += [llfuse] -std=c11 +endif # [lxml] DEPENDS += cross/libxml2 DEPENDS += cross/libxslt +ifeq ($(call version_lt, $(TC_GCC), 5.0),1) +WHEELS_CFLAGS += [lxml] -std=c11 +endif + +# [msgpack] +ifeq ($(call version_lt, $(TC_GCC), 5.0),1) +WHEELS_CFLAGS += [msgpack] -std=c11 +endif # [mysqlclient] DEPENDS += cross/mysql-connector-c @@ -56,6 +86,15 @@ DEPENDS += cross/mariadb-connector-c ENV += MYSQLCLIENT_CFLAGS="$(CFLAGS) -I$(STAGING_INSTALL_PREFIX)/include/mysql -I$(STAGING_INSTALL_PREFIX)/include/mariadb -I$(STAGING_INSTALL_PREFIX)/$(PYTHON_INC_DIR)" ENV += MYSQLCLIENT_LDFLAGS="$(LDFLAGS)" +# [numpy] <= 1.21.6 (armv5) +# [numpy] <= 1.22.4 (armv7l) +# [numpy] <= 1.24.4 last working version with gcc-4.9 +# These versions are now unsupported using py312 +# [numpy] >= 1.25.0 requires c++17 +ifeq ($(call version_gt, $(TC_GCC), 5.0),1) +WHEELS += src/requirements-crossenv-numpy.txt +endif + # [Pillow] DEPENDS += cross/freetype cross/libjpeg cross/zlib WHEELS_BUILD_ARGS += [Pillow] @@ -69,10 +108,26 @@ WHEELS_BUILD_ARGS += --enable-zlib DEPENDS += cross/c-ares ENV += PYCARES_USE_SYSTEM_LIB=1 +# [pycryptodome] +ifeq ($(call version_lt, $(TC_GCC), 5.0),1) +WHEELS_CFLAGS += [pycryptodome] -std=c11 +endif + +# [pycryptodomex] +ifeq ($(call version_lt, $(TC_GCC), 5.0),1) +WHEELS_CFLAGS += [pycryptodomex] -std=c11 +endif + # [pycurl] DEPENDS += cross/curl ENV += PYCURL_CURL_CONFIG=$(STAGING_INSTALL_PREFIX)/bin/curl-config +# [pydantic_core] +# Requires path to maturin from crossenv +ifeq ($(call version_lt, $(TC_GCC), 5.0),1) +WHEELS_CFLAGS += [pydantic_core] -std=c11 +endif + # [PyNaCl] DEPENDS += cross/libsodium ENV += SODIUM_INSTALL=system @@ -80,58 +135,13 @@ ENV += SODIUM_INSTALL=system # [PyYAML] DEPENDS += cross/libyaml -include ../../mk/spksrc.common.mk - -# [rpds-py] -# maturin canot be built as pre-requisite crossenv -ifneq ($(findstring $(ARCH),$(ARMv5_ARCHS)),$(ARCH)) -WHEELS += src/requirements-crossenv-rpds-py.txt -# Requires path to maturin from crossenv -ENV += PATH=$(WORK_DIR)/crossenv/build/bin:$(PATH) -endif - -include ../../mk/spksrc.python.mk - -# [greenlet] -ifeq ($(call version_ge, $(TC_GCC), 5.0),1) -WHEELS += src/requirements-crossenv-greenlet-v3.txt -else ifeq ($(call version_ge, $(TC_GCC), 4.9)$(call version_lt, $(TC_GCC), 5.0),11) -WHEELS += src/requirements-crossenv-greenlet-v3-gcc4.txt -WHEELS_CPPFLAGS += [greenlet] -std=c++11 -fpermissive +# [ruamel.yaml.clib] +ifeq ($(call version_lt, $(TC_GCC), 5.0),1) +WHEELS_CFLAGS += [ruamel.yaml.clib] -std=c11 endif -# [numpy] <= 1.21.6 (armv5) -# [numpy] <= 1.22.4 (armv7l) -# [numpy] <= 1.24.4 last working version with gcc-4.9 -# These versions are now unsupported using py312 -# [numpy] >= 1.25.0 requires c++17 -ifeq ($(call version_gt, $(TC_GCC), 5.0),1) -WHEELS += src/requirements-crossenv-numpy.txt -endif - -# [pycryptodome] -ifeq ($(call version_ge, $(TC_GCC), 4.9),1) -WHEELS_CFLAGS += [pycryptodome] -std=c11 -else -WHEELS_CFLAGS += [pycryptodome] -std=c99 -endif - -# [pycryptodomex] -ifeq ($(call version_ge, $(TC_GCC), 4.9),1) -WHEELS_CFLAGS += [pycryptodomex] -std=c11 -else -WHEELS_CFLAGS += [pycryptodomex] -std=c99 -endif - -# [pydantic_core] -ifeq ($(call version_ge, $(TC_GCC), 4.9),1) -WHEELS_CFLAGS += [pydantic_core] -std=c11 -else -WHEELS_CFLAGS += [pydantic_core] -std=c99 -endif +# [rpds-py], [pydantic_core] # Requires path to maturin from crossenv ENV += PATH=$(WORK_DIR)/crossenv/build/bin:$(PATH) -# [rpds-py] -# Requires path to maturin from crossenv -ENV += PATH=$(WORK_DIR)/crossenv/build/bin:$(PATH) +include ../../mk/spksrc.python.mk diff --git a/spk/python312-wheels/PLIST b/spk/python312-wheels/PLIST new file mode 100644 index 00000000000..4cfaf73a12c --- /dev/null +++ b/spk/python312-wheels/PLIST @@ -0,0 +1 @@ +rsc:share/wheelhouse diff --git a/spk/python312-wheels/src/requirements-crossenv-rpds-py.txt b/spk/python312-wheels/src/requirements-crossenv-rpds-py.txt deleted file mode 100644 index dbe0de961fc..00000000000 --- a/spk/python312-wheels/src/requirements-crossenv-rpds-py.txt +++ /dev/null @@ -1,13 +0,0 @@ -## -## All configurations below are optional and -## are provided to demonstrate how to build -## various wheels. Uncoment to enable. -## - -# [rpds-py] -# Require environment variables -# PYO3_CROSS_LIB_DIR=$(STAGING_INSTALL_PREFIX)/lib/ -# PYO3_CROSS_INCLUDE_DIR=$(STAGING_INSTALL_PREFIX)/include/ -# Requires path to maturin from crossenv -# ENV += PATH=$(WORK_DIR)/crossenv/build/bin:$(PATH) -rpds-py==0.20.0 diff --git a/spk/python312-wheels/src/requirements-crossenv.txt b/spk/python312-wheels/src/requirements-crossenv.txt index b38782a4790..65f3088ff05 100644 --- a/spk/python312-wheels/src/requirements-crossenv.txt +++ b/spk/python312-wheels/src/requirements-crossenv.txt @@ -27,13 +27,12 @@ cffi==1.17.1 # with local python apps requirements borgbackup==1.2.6 -charset-normalizer==3.2.0 -greenlet==3.1.1 +charset_normalizer==3.2.0 immutables==0.20 -llfuse==1.5.0 +### llfuse==1.5.0 # fails to find "clock_gettime" MarkupSafe==2.1.5 msgpack==1.0.5 # used compiled verrsion for performance -msgpack-python==0.5.6 +msgpack_python==0.5.6 netifaces==0.11.0 psutil==6.0.0 pyrsistent==0.19.3 @@ -107,7 +106,7 @@ git+https://github.com/totaam/rencode.git@f6254ab26161f90b9c5e97915b9193fee805fc # PYO3_CROSS_INCLUDE_DIR=$(STAGING_INSTALL_PREFIX)/include/ # Requires path to maturin from crossenv # ENV += PATH=$(WORK_DIR)/crossenv/build/bin:$(PATH) -rpds-py==0.10.2 +rpds_py==0.20.0 # [ujson] # - Require setuptools-scm in cross/python3* crossenv From 7c491f377048f8afe06eb681e5f53feb46ee3e2f Mon Sep 17 00:00:00 2001 From: hgy59 Date: Fri, 6 Dec 2024 22:32:54 +0100 Subject: [PATCH 111/130] revert unintended change --- cross/python311/Makefile | 2 -- 1 file changed, 2 deletions(-) diff --git a/cross/python311/Makefile b/cross/python311/Makefile index dc33b1b22f8..aea0e907ef9 100644 --- a/cross/python311/Makefile +++ b/cross/python311/Makefile @@ -80,8 +80,6 @@ PYTHON_NATIVE = $(abspath $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/in HOSTPYTHON = $(WORK_DIR)/$(PKG_DIR)/hostpython # Required to find build-python and to generate-posix-vars PATH := $(abspath $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/bin):$(PATH) -# Required for python to find ssl libraries to download sources from pypi -export LD_LIBRARY_PATH:=$(abspath $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/lib):$(LD_LIBRARY_PATH) .PHONY: python311_post_patch python311_post_patch: From d88bbea04f85363d5b5e931626cf1e22ca039e34 Mon Sep 17 00:00:00 2001 From: hgy59 Date: Fri, 6 Dec 2024 22:34:44 +0100 Subject: [PATCH 112/130] spksrc.wheel.mk: add PATH for build of pure-python-wheels --- mk/spksrc.wheel.mk | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mk/spksrc.wheel.mk b/mk/spksrc.wheel.mk index b7910b6237b..9b32f757a12 100644 --- a/mk/spksrc.wheel.mk +++ b/mk/spksrc.wheel.mk @@ -152,7 +152,6 @@ endif build_wheel_target: SHELL:=/bin/bash build_wheel_target: $(PRE_WHEEL_TARGET) ifneq ($(strip $(WHEELS)),) -# $(foreach e,$(shell cat $(WORK_DIR)/python-cc.mk),$(eval $(e))) @if [ -s $(WHEELHOUSE)/$(WHEELS_CROSSENV_COMPILE) -o -s $(WHEELHOUSE)/$(WHEELS_LIMITED_API) ]; then \ while IFS= read -r requirement ; do \ wheel=$${requirement#*:} ; \ @@ -208,7 +207,7 @@ ifneq ($(filter 1 ON TRUE,$(WHEELS_PURE_PYTHON_PACKAGING_ENABLE)),) @if [ -s "$(WHEELHOUSE)/$(WHEELS_PURE_PYTHON)" ]; then \ $(MSG) "Building pure-python" ; \ export LD= LDSHARED= CPP= NM= CC= AS= RANLIB= CXX= AR= STRIP= OBJDUMP= OBJCOPY= READELF= CFLAGS= CPPFLAGS= CXXFLAGS= LDFLAGS= && \ - $(RUN) $(PIP) $(PIP_WHEEL_ARGS) --requirement $(WHEELHOUSE)/$(WHEELS_PURE_PYTHON) ; \ + $(RUN) PATH="$(abspath $(WORK_DIR)/../../../native/$(PYTHON_PKG_NAME)/work-native/install/usr/local/bin):$(PATH)" $(PIP) $(PIP_WHEEL_ARGS) --requirement $(WHEELHOUSE)/$(WHEELS_PURE_PYTHON) ; \ fi else @$(MSG) "[SKIP] Building pure-python" @@ -216,7 +215,7 @@ endif endif # PATH modified to access native/python* linked to crossenv-/build/bin -# this also provide access to maturin and its dependencies needed for building wheels +# this also provides access to maturin and its dependencies needed for building wheels # LD_LIBRARY_PATH modified to access native/python libraries so related binary works cross-compile-wheel-%: SHELL:=/bin/bash cross-compile-wheel-%: From 7955fc5bcae3d34860a580065779c66c416f66d5 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Sat, 4 Jan 2025 22:47:42 +0000 Subject: [PATCH 113/130] Revert move of crossenv files temporarely Created a patch from that reverted comit to first focus on other issues found then return on this. --- ...ents-for-crossenv-from-mk-crossenv-t.patch | 499 ++++++++++++++++++ 1 file changed, 499 insertions(+) create mode 100644 0001-migrate-requirements-for-crossenv-from-mk-crossenv-t.patch diff --git a/0001-migrate-requirements-for-crossenv-from-mk-crossenv-t.patch b/0001-migrate-requirements-for-crossenv-from-mk-crossenv-t.patch new file mode 100644 index 00000000000..d0c074e3032 --- /dev/null +++ b/0001-migrate-requirements-for-crossenv-from-mk-crossenv-t.patch @@ -0,0 +1,499 @@ +From 54e8a0a03c998f82e1e40c5f4ed1bb446bd76c51 Mon Sep 17 00:00:00 2001 +From: hgy59 +Date: Fri, 6 Dec 2024 23:21:52 +0100 +Subject: [PATCH] migrate requirements for crossenv from mk/crossenv to + spk/python31*/crossenv + +- use python version specific crossenv +- downgrade cryptography in default crossenv for python < 3.12 to v41.0.3 +--- + mk/spksrc.crossenv.mk | 2 +- + .../crossenv/requirements-default.txt | 19 +++++++++++++++++++ + .../crossenv/requirements-frozenlist.txt | 0 + .../crossenv/requirements-numpy-1.22.4.txt | 0 + .../crossenv/requirements-numpy-1.24.4.txt | 0 + .../crossenv/requirements-numpy-1.25.1.txt | 0 + .../crossenv/requirements-pydantic_core.txt | 0 + .../python310}/crossenv/requirements-yarl.txt | 0 + .../crossenv/requirements-default.txt | 19 +++++++++++++++++++ + .../crossenv/requirements-frozenlist.txt | 8 ++++++++ + .../crossenv/requirements-numpy-1.22.4.txt | 14 ++++++++++++++ + .../crossenv/requirements-numpy-1.24.4.txt | 14 ++++++++++++++ + .../crossenv/requirements-numpy-1.25.1.txt | 14 ++++++++++++++ + .../crossenv/requirements-pydantic_core.txt | 10 ++++++++++ + spk/python311/crossenv/requirements-yarl.txt | 8 ++++++++ + .../crossenv/requirements-default.txt | 0 + .../crossenv/requirements-frozenlist.txt | 8 ++++++++ + .../crossenv/requirements-numpy-1.22.4.txt | 14 ++++++++++++++ + .../crossenv/requirements-numpy-1.24.4.txt | 14 ++++++++++++++ + .../crossenv/requirements-numpy-1.25.1.txt | 14 ++++++++++++++ + .../crossenv/requirements-pydantic_core.txt | 10 ++++++++++ + spk/python312/crossenv/requirements-yarl.txt | 8 ++++++++ + .../crossenv/requirements-default.txt | 19 +++++++++++++++++++ + .../crossenv/requirements-frozenlist.txt | 8 ++++++++ + .../crossenv/requirements-numpy-1.22.4.txt | 14 ++++++++++++++ + .../crossenv/requirements-numpy-1.24.4.txt | 14 ++++++++++++++ + .../crossenv/requirements-numpy-1.25.1.txt | 14 ++++++++++++++ + .../crossenv/requirements-pydantic_core.txt | 10 ++++++++++ + spk/python313/crossenv/requirements-yarl.txt | 8 ++++++++ + 29 files changed, 262 insertions(+), 1 deletion(-) + create mode 100644 spk/python310/crossenv/requirements-default.txt + rename {mk => spk/python310}/crossenv/requirements-frozenlist.txt (100%) + rename {mk => spk/python310}/crossenv/requirements-numpy-1.22.4.txt (100%) + rename {mk => spk/python310}/crossenv/requirements-numpy-1.24.4.txt (100%) + rename {mk => spk/python310}/crossenv/requirements-numpy-1.25.1.txt (100%) + rename {mk => spk/python310}/crossenv/requirements-pydantic_core.txt (100%) + rename {mk => spk/python310}/crossenv/requirements-yarl.txt (100%) + create mode 100644 spk/python311/crossenv/requirements-default.txt + create mode 100644 spk/python311/crossenv/requirements-frozenlist.txt + create mode 100644 spk/python311/crossenv/requirements-numpy-1.22.4.txt + create mode 100644 spk/python311/crossenv/requirements-numpy-1.24.4.txt + create mode 100644 spk/python311/crossenv/requirements-numpy-1.25.1.txt + create mode 100644 spk/python311/crossenv/requirements-pydantic_core.txt + create mode 100644 spk/python311/crossenv/requirements-yarl.txt + rename {mk => spk/python312}/crossenv/requirements-default.txt (100%) + create mode 100644 spk/python312/crossenv/requirements-frozenlist.txt + create mode 100644 spk/python312/crossenv/requirements-numpy-1.22.4.txt + create mode 100644 spk/python312/crossenv/requirements-numpy-1.24.4.txt + create mode 100644 spk/python312/crossenv/requirements-numpy-1.25.1.txt + create mode 100644 spk/python312/crossenv/requirements-pydantic_core.txt + create mode 100644 spk/python312/crossenv/requirements-yarl.txt + create mode 100644 spk/python313/crossenv/requirements-default.txt + create mode 100644 spk/python313/crossenv/requirements-frozenlist.txt + create mode 100644 spk/python313/crossenv/requirements-numpy-1.22.4.txt + create mode 100644 spk/python313/crossenv/requirements-numpy-1.24.4.txt + create mode 100644 spk/python313/crossenv/requirements-numpy-1.25.1.txt + create mode 100644 spk/python313/crossenv/requirements-pydantic_core.txt + create mode 100644 spk/python313/crossenv/requirements-yarl.txt + +diff --git mk/spksrc.crossenv.mk mk/spksrc.crossenv.mk +index bbcc4395..e0615607 100644 +--- mk/spksrc.crossenv.mk ++++ mk/spksrc.crossenv.mk +@@ -33,7 +33,7 @@ PYTHON_LIB_NATIVE = $(abspath $(PYTHON_WORK_DIR)/$(PYTHON_PKG_DIR)/bui + PYTHON_LIB_CROSS = $(abspath $(PYTHON_WORK_DIR)/$(PYTHON_PKG_DIR)/build/lib.linux-$(shell expr "$(TC_TARGET)" : '\([^-]*\)' )-$(PYTHON_PKG_VERS_MAJOR_MINOR)) + + # wheel crossenv definitions +-CROSSENV_CONFIG_PATH = $(abspath $(WORK_DIR)/../../../mk/crossenv) ++CROSSENV_CONFIG_PATH = $(abspath $(WORK_DIR)/../../../spk/$(PYTHON_PKG_NAME)/crossenv) + CROSSENV_CONFIG_DEFAULT = $(CROSSENV_CONFIG_PATH)/requirements-default.txt + CROSSENV_PATH = $(abspath $(WORK_DIR)/crossenv-$(CROSSENV_BUILD_WHEEL)/) + +diff --git spk/python310/crossenv/requirements-default.txt spk/python310/crossenv/requirements-default.txt +new file mode 100644 +index 00000000..4b8f768e +--- /dev/null ++++ spk/python310/crossenv/requirements-default.txt +@@ -0,0 +1,19 @@ ++pip==24.3.1 ++pip-tools==7.4.1 ++setuptools==75.4.0 ++build==1.2.2 ++wheel==0.45.0 ++# ++cffi==1.17.1 ++cryptography==41.0.3 ++Cython==3.0.11 ++flit==3.10.1 ++maturin==1.7.4 ++meson-python==0.17.1 ++msgpack==1.0.5 ++poetry==1.8.4 ++scikit-build==0.18.1 ++scikit-build-core==0.10.7 ++setuptools-rust==1.10.2 ++setuptools-scm==8.1.0 ++typing_extensions==4.12.2 +diff --git mk/crossenv/requirements-frozenlist.txt spk/python310/crossenv/requirements-frozenlist.txt +similarity index 100% +rename from mk/crossenv/requirements-frozenlist.txt +rename to spk/python310/crossenv/requirements-frozenlist.txt +diff --git mk/crossenv/requirements-numpy-1.22.4.txt spk/python310/crossenv/requirements-numpy-1.22.4.txt +similarity index 100% +rename from mk/crossenv/requirements-numpy-1.22.4.txt +rename to spk/python310/crossenv/requirements-numpy-1.22.4.txt +diff --git mk/crossenv/requirements-numpy-1.24.4.txt spk/python310/crossenv/requirements-numpy-1.24.4.txt +similarity index 100% +rename from mk/crossenv/requirements-numpy-1.24.4.txt +rename to spk/python310/crossenv/requirements-numpy-1.24.4.txt +diff --git mk/crossenv/requirements-numpy-1.25.1.txt spk/python310/crossenv/requirements-numpy-1.25.1.txt +similarity index 100% +rename from mk/crossenv/requirements-numpy-1.25.1.txt +rename to spk/python310/crossenv/requirements-numpy-1.25.1.txt +diff --git mk/crossenv/requirements-pydantic_core.txt spk/python310/crossenv/requirements-pydantic_core.txt +similarity index 100% +rename from mk/crossenv/requirements-pydantic_core.txt +rename to spk/python310/crossenv/requirements-pydantic_core.txt +diff --git mk/crossenv/requirements-yarl.txt spk/python310/crossenv/requirements-yarl.txt +similarity index 100% +rename from mk/crossenv/requirements-yarl.txt +rename to spk/python310/crossenv/requirements-yarl.txt +diff --git spk/python311/crossenv/requirements-default.txt spk/python311/crossenv/requirements-default.txt +new file mode 100644 +index 00000000..4b8f768e +--- /dev/null ++++ spk/python311/crossenv/requirements-default.txt +@@ -0,0 +1,19 @@ ++pip==24.3.1 ++pip-tools==7.4.1 ++setuptools==75.4.0 ++build==1.2.2 ++wheel==0.45.0 ++# ++cffi==1.17.1 ++cryptography==41.0.3 ++Cython==3.0.11 ++flit==3.10.1 ++maturin==1.7.4 ++meson-python==0.17.1 ++msgpack==1.0.5 ++poetry==1.8.4 ++scikit-build==0.18.1 ++scikit-build-core==0.10.7 ++setuptools-rust==1.10.2 ++setuptools-scm==8.1.0 ++typing_extensions==4.12.2 +diff --git spk/python311/crossenv/requirements-frozenlist.txt spk/python311/crossenv/requirements-frozenlist.txt +new file mode 100644 +index 00000000..4edc3b10 +--- /dev/null ++++ spk/python311/crossenv/requirements-frozenlist.txt +@@ -0,0 +1,8 @@ ++pip==24.3.1 ++pip-tools==7.4.1 ++setuptools==75.4.0 ++build==1.2.2 ++wheel==0.45.0 ++# ++Cython==3.0.11 ++expandvars==0.12.0 +diff --git spk/python311/crossenv/requirements-numpy-1.22.4.txt spk/python311/crossenv/requirements-numpy-1.22.4.txt +new file mode 100644 +index 00000000..e740501c +--- /dev/null ++++ spk/python311/crossenv/requirements-numpy-1.22.4.txt +@@ -0,0 +1,14 @@ ++pip==23.2.1 ++setuptools==63.4.3 ++wheel==0.41.2 ++# ++cffi==1.15.1 ++cryptography==41.0.3 ++Cython==0.29.36 ++flit==3.9.0 ++maturin==1.2.3 ++msgpack==1.0.5 ++poetry==1.6.1 ++scikit-build==0.17.6 ++setuptools-rust==1.7.0 ++setuptools-scm==7.1.0 +diff --git spk/python311/crossenv/requirements-numpy-1.24.4.txt spk/python311/crossenv/requirements-numpy-1.24.4.txt +new file mode 100644 +index 00000000..e740501c +--- /dev/null ++++ spk/python311/crossenv/requirements-numpy-1.24.4.txt +@@ -0,0 +1,14 @@ ++pip==23.2.1 ++setuptools==63.4.3 ++wheel==0.41.2 ++# ++cffi==1.15.1 ++cryptography==41.0.3 ++Cython==0.29.36 ++flit==3.9.0 ++maturin==1.2.3 ++msgpack==1.0.5 ++poetry==1.6.1 ++scikit-build==0.17.6 ++setuptools-rust==1.7.0 ++setuptools-scm==7.1.0 +diff --git spk/python311/crossenv/requirements-numpy-1.25.1.txt spk/python311/crossenv/requirements-numpy-1.25.1.txt +new file mode 100644 +index 00000000..e740501c +--- /dev/null ++++ spk/python311/crossenv/requirements-numpy-1.25.1.txt +@@ -0,0 +1,14 @@ ++pip==23.2.1 ++setuptools==63.4.3 ++wheel==0.41.2 ++# ++cffi==1.15.1 ++cryptography==41.0.3 ++Cython==0.29.36 ++flit==3.9.0 ++maturin==1.2.3 ++msgpack==1.0.5 ++poetry==1.6.1 ++scikit-build==0.17.6 ++setuptools-rust==1.7.0 ++setuptools-scm==7.1.0 +diff --git spk/python311/crossenv/requirements-pydantic_core.txt spk/python311/crossenv/requirements-pydantic_core.txt +new file mode 100644 +index 00000000..aab8e3a0 +--- /dev/null ++++ spk/python311/crossenv/requirements-pydantic_core.txt +@@ -0,0 +1,10 @@ ++pip==24.3.1 ++pip-tools==7.4.1 ++setuptools==75.4.0 ++build==1.2.2 ++wheel==0.45.0 ++# ++# [pydantic_core] depends on Cython < 3.x ++Cython==0.29.37 ++maturin==1.7.4 ++typing_extensions==4.12.2 +diff --git spk/python311/crossenv/requirements-yarl.txt spk/python311/crossenv/requirements-yarl.txt +new file mode 100644 +index 00000000..4edc3b10 +--- /dev/null ++++ spk/python311/crossenv/requirements-yarl.txt +@@ -0,0 +1,8 @@ ++pip==24.3.1 ++pip-tools==7.4.1 ++setuptools==75.4.0 ++build==1.2.2 ++wheel==0.45.0 ++# ++Cython==3.0.11 ++expandvars==0.12.0 +diff --git mk/crossenv/requirements-default.txt spk/python312/crossenv/requirements-default.txt +similarity index 100% +rename from mk/crossenv/requirements-default.txt +rename to spk/python312/crossenv/requirements-default.txt +diff --git spk/python312/crossenv/requirements-frozenlist.txt spk/python312/crossenv/requirements-frozenlist.txt +new file mode 100644 +index 00000000..4edc3b10 +--- /dev/null ++++ spk/python312/crossenv/requirements-frozenlist.txt +@@ -0,0 +1,8 @@ ++pip==24.3.1 ++pip-tools==7.4.1 ++setuptools==75.4.0 ++build==1.2.2 ++wheel==0.45.0 ++# ++Cython==3.0.11 ++expandvars==0.12.0 +diff --git spk/python312/crossenv/requirements-numpy-1.22.4.txt spk/python312/crossenv/requirements-numpy-1.22.4.txt +new file mode 100644 +index 00000000..e740501c +--- /dev/null ++++ spk/python312/crossenv/requirements-numpy-1.22.4.txt +@@ -0,0 +1,14 @@ ++pip==23.2.1 ++setuptools==63.4.3 ++wheel==0.41.2 ++# ++cffi==1.15.1 ++cryptography==41.0.3 ++Cython==0.29.36 ++flit==3.9.0 ++maturin==1.2.3 ++msgpack==1.0.5 ++poetry==1.6.1 ++scikit-build==0.17.6 ++setuptools-rust==1.7.0 ++setuptools-scm==7.1.0 +diff --git spk/python312/crossenv/requirements-numpy-1.24.4.txt spk/python312/crossenv/requirements-numpy-1.24.4.txt +new file mode 100644 +index 00000000..e740501c +--- /dev/null ++++ spk/python312/crossenv/requirements-numpy-1.24.4.txt +@@ -0,0 +1,14 @@ ++pip==23.2.1 ++setuptools==63.4.3 ++wheel==0.41.2 ++# ++cffi==1.15.1 ++cryptography==41.0.3 ++Cython==0.29.36 ++flit==3.9.0 ++maturin==1.2.3 ++msgpack==1.0.5 ++poetry==1.6.1 ++scikit-build==0.17.6 ++setuptools-rust==1.7.0 ++setuptools-scm==7.1.0 +diff --git spk/python312/crossenv/requirements-numpy-1.25.1.txt spk/python312/crossenv/requirements-numpy-1.25.1.txt +new file mode 100644 +index 00000000..e740501c +--- /dev/null ++++ spk/python312/crossenv/requirements-numpy-1.25.1.txt +@@ -0,0 +1,14 @@ ++pip==23.2.1 ++setuptools==63.4.3 ++wheel==0.41.2 ++# ++cffi==1.15.1 ++cryptography==41.0.3 ++Cython==0.29.36 ++flit==3.9.0 ++maturin==1.2.3 ++msgpack==1.0.5 ++poetry==1.6.1 ++scikit-build==0.17.6 ++setuptools-rust==1.7.0 ++setuptools-scm==7.1.0 +diff --git spk/python312/crossenv/requirements-pydantic_core.txt spk/python312/crossenv/requirements-pydantic_core.txt +new file mode 100644 +index 00000000..aab8e3a0 +--- /dev/null ++++ spk/python312/crossenv/requirements-pydantic_core.txt +@@ -0,0 +1,10 @@ ++pip==24.3.1 ++pip-tools==7.4.1 ++setuptools==75.4.0 ++build==1.2.2 ++wheel==0.45.0 ++# ++# [pydantic_core] depends on Cython < 3.x ++Cython==0.29.37 ++maturin==1.7.4 ++typing_extensions==4.12.2 +diff --git spk/python312/crossenv/requirements-yarl.txt spk/python312/crossenv/requirements-yarl.txt +new file mode 100644 +index 00000000..4edc3b10 +--- /dev/null ++++ spk/python312/crossenv/requirements-yarl.txt +@@ -0,0 +1,8 @@ ++pip==24.3.1 ++pip-tools==7.4.1 ++setuptools==75.4.0 ++build==1.2.2 ++wheel==0.45.0 ++# ++Cython==3.0.11 ++expandvars==0.12.0 +diff --git spk/python313/crossenv/requirements-default.txt spk/python313/crossenv/requirements-default.txt +new file mode 100644 +index 00000000..9400a967 +--- /dev/null ++++ spk/python313/crossenv/requirements-default.txt +@@ -0,0 +1,19 @@ ++pip==24.3.1 ++pip-tools==7.4.1 ++setuptools==75.4.0 ++build==1.2.2 ++wheel==0.45.0 ++# ++cffi==1.17.1 ++cryptography==43.0.3 ++Cython==3.0.11 ++flit==3.10.1 ++maturin==1.7.4 ++meson-python==0.17.1 ++msgpack==1.0.5 ++poetry==1.8.4 ++scikit-build==0.18.1 ++scikit-build-core==0.10.7 ++setuptools-rust==1.10.2 ++setuptools-scm==8.1.0 ++typing_extensions==4.12.2 +diff --git spk/python313/crossenv/requirements-frozenlist.txt spk/python313/crossenv/requirements-frozenlist.txt +new file mode 100644 +index 00000000..4edc3b10 +--- /dev/null ++++ spk/python313/crossenv/requirements-frozenlist.txt +@@ -0,0 +1,8 @@ ++pip==24.3.1 ++pip-tools==7.4.1 ++setuptools==75.4.0 ++build==1.2.2 ++wheel==0.45.0 ++# ++Cython==3.0.11 ++expandvars==0.12.0 +diff --git spk/python313/crossenv/requirements-numpy-1.22.4.txt spk/python313/crossenv/requirements-numpy-1.22.4.txt +new file mode 100644 +index 00000000..e740501c +--- /dev/null ++++ spk/python313/crossenv/requirements-numpy-1.22.4.txt +@@ -0,0 +1,14 @@ ++pip==23.2.1 ++setuptools==63.4.3 ++wheel==0.41.2 ++# ++cffi==1.15.1 ++cryptography==41.0.3 ++Cython==0.29.36 ++flit==3.9.0 ++maturin==1.2.3 ++msgpack==1.0.5 ++poetry==1.6.1 ++scikit-build==0.17.6 ++setuptools-rust==1.7.0 ++setuptools-scm==7.1.0 +diff --git spk/python313/crossenv/requirements-numpy-1.24.4.txt spk/python313/crossenv/requirements-numpy-1.24.4.txt +new file mode 100644 +index 00000000..e740501c +--- /dev/null ++++ spk/python313/crossenv/requirements-numpy-1.24.4.txt +@@ -0,0 +1,14 @@ ++pip==23.2.1 ++setuptools==63.4.3 ++wheel==0.41.2 ++# ++cffi==1.15.1 ++cryptography==41.0.3 ++Cython==0.29.36 ++flit==3.9.0 ++maturin==1.2.3 ++msgpack==1.0.5 ++poetry==1.6.1 ++scikit-build==0.17.6 ++setuptools-rust==1.7.0 ++setuptools-scm==7.1.0 +diff --git spk/python313/crossenv/requirements-numpy-1.25.1.txt spk/python313/crossenv/requirements-numpy-1.25.1.txt +new file mode 100644 +index 00000000..e740501c +--- /dev/null ++++ spk/python313/crossenv/requirements-numpy-1.25.1.txt +@@ -0,0 +1,14 @@ ++pip==23.2.1 ++setuptools==63.4.3 ++wheel==0.41.2 ++# ++cffi==1.15.1 ++cryptography==41.0.3 ++Cython==0.29.36 ++flit==3.9.0 ++maturin==1.2.3 ++msgpack==1.0.5 ++poetry==1.6.1 ++scikit-build==0.17.6 ++setuptools-rust==1.7.0 ++setuptools-scm==7.1.0 +diff --git spk/python313/crossenv/requirements-pydantic_core.txt spk/python313/crossenv/requirements-pydantic_core.txt +new file mode 100644 +index 00000000..aab8e3a0 +--- /dev/null ++++ spk/python313/crossenv/requirements-pydantic_core.txt +@@ -0,0 +1,10 @@ ++pip==24.3.1 ++pip-tools==7.4.1 ++setuptools==75.4.0 ++build==1.2.2 ++wheel==0.45.0 ++# ++# [pydantic_core] depends on Cython < 3.x ++Cython==0.29.37 ++maturin==1.7.4 ++typing_extensions==4.12.2 +diff --git spk/python313/crossenv/requirements-yarl.txt spk/python313/crossenv/requirements-yarl.txt +new file mode 100644 +index 00000000..4edc3b10 +--- /dev/null ++++ spk/python313/crossenv/requirements-yarl.txt +@@ -0,0 +1,8 @@ ++pip==24.3.1 ++pip-tools==7.4.1 ++setuptools==75.4.0 ++build==1.2.2 ++wheel==0.45.0 ++# ++Cython==3.0.11 ++expandvars==0.12.0 +-- +2.39.2 + From 5031b41987483908cec24ba83dccda516b3d7f5c Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Sat, 4 Jan 2025 22:48:51 +0000 Subject: [PATCH 114/130] crossenv.mk: Fix PATH and LD_LIBRARY_PATH for native and crossenv --- mk/spksrc.crossenv.mk | 10 ++++++++-- mk/spksrc.wheel.mk | 5 ++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/mk/spksrc.crossenv.mk b/mk/spksrc.crossenv.mk index bbcc4395347..50a0a74e410 100644 --- a/mk/spksrc.crossenv.mk +++ b/mk/spksrc.crossenv.mk @@ -209,9 +209,15 @@ endif @$(MSG) [$(CROSSENV_PATH)] Processing $(CROSSENV_BUILD_REQUIREMENTS) @. $(CROSSENV_PATH)/bin/activate ; \ $(MSG) build-pip install -r $(CROSSENV_BUILD_REQUIREMENTS) ; \ - $(RUN) $$(which build-pip) --cache-dir $(PIP_CACHE_DIR) --disable-pip-version-check install -r $(CROSSENV_BUILD_REQUIREMENTS) ; \ + $(RUN) \ + PATH="$(abspath $(WORK_DIR)/../../../native/$(PYTHON_PKG_NAME)/work-native/install/usr/local/bin):$(PATH)" \ + LD_LIBRARY_PATH="$(abspath $(WORK_DIR)/../../../native/$(PYTHON_PKG_NAME)/work-native/install/usr/local/lib):$(LD_LIBRARY_PATH)" \ + $$(which build-pip) --cache-dir $(PIP_CACHE_DIR) --disable-pip-version-check install -r $(CROSSENV_BUILD_REQUIREMENTS) ; \ $(MSG) cross-pip Install -r $(CROSSENV_BUILD_REQUIREMENTS) ; \ - $(RUN) $$(which cross-pip) --cache-dir $(PIP_CACHE_DIR) --disable-pip-version-check install -r $(CROSSENV_BUILD_REQUIREMENTS) + $(RUN) \ + PATH="$(abspath $(WORK_DIR)/../../../native/$(PYTHON_PKG_NAME)/work-native/install/usr/local/bin):$(PATH)" \ + LD_LIBRARY_PATH="$(abspath $(WORK_DIR)/../../../native/$(PYTHON_PKG_NAME)/work-native/install/usr/local/lib):$(LD_LIBRARY_PATH)" \ + $$(which cross-pip) --cache-dir $(PIP_CACHE_DIR) --disable-pip-version-check install -r $(CROSSENV_BUILD_REQUIREMENTS) @. $(CROSSENV_PATH)/bin/activate ; \ $(MSG) "Package list for $(CROSSENV_PATH):" ; \ $(RUN) $$(which cross-pip) list diff --git a/mk/spksrc.wheel.mk b/mk/spksrc.wheel.mk index 9b32f757a12..8c78cdb58f0 100644 --- a/mk/spksrc.wheel.mk +++ b/mk/spksrc.wheel.mk @@ -207,7 +207,10 @@ ifneq ($(filter 1 ON TRUE,$(WHEELS_PURE_PYTHON_PACKAGING_ENABLE)),) @if [ -s "$(WHEELHOUSE)/$(WHEELS_PURE_PYTHON)" ]; then \ $(MSG) "Building pure-python" ; \ export LD= LDSHARED= CPP= NM= CC= AS= RANLIB= CXX= AR= STRIP= OBJDUMP= OBJCOPY= READELF= CFLAGS= CPPFLAGS= CXXFLAGS= LDFLAGS= && \ - $(RUN) PATH="$(abspath $(WORK_DIR)/../../../native/$(PYTHON_PKG_NAME)/work-native/install/usr/local/bin):$(PATH)" $(PIP) $(PIP_WHEEL_ARGS) --requirement $(WHEELHOUSE)/$(WHEELS_PURE_PYTHON) ; \ + $(RUN) \ + PATH="$(abspath $(WORK_DIR)/../../../native/$(PYTHON_PKG_NAME)/work-native/install/usr/local/bin):$(PATH)" \ + LD_LIBRARY_PATH="$(abspath $(WORK_DIR)/../../../native/$(PYTHON_PKG_NAME)/work-native/install/usr/local/lib):$(LD_LIBRARY_PATH)" \ + $(PIP) $(PIP_WHEEL_ARGS) --requirement $(WHEELHOUSE)/$(WHEELS_PURE_PYTHON) ; \ fi else @$(MSG) "[SKIP] Building pure-python" From bca4c7b3b6912459670b69b55d414992bf050b15 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Sat, 4 Jan 2025 22:49:50 +0000 Subject: [PATCH 115/130] py310-313: Fix --with-build-python using $(PYTHON_NATIVE) --- cross/python310/Makefile | 6 ++---- cross/python311/Makefile | 6 ++---- cross/python312/Makefile | 4 ++-- cross/python313/Makefile | 4 ++-- 4 files changed, 8 insertions(+), 12 deletions(-) diff --git a/cross/python310/Makefile b/cross/python310/Makefile index 744b4024f77..e8b1fa8af03 100644 --- a/cross/python310/Makefile +++ b/cross/python310/Makefile @@ -27,7 +27,7 @@ CONFIGURE_ARGS += --enable-ipv6 CONFIGURE_ARGS += --without-ensurepip CONFIGURE_ARGS += --enable-loadable-sqlite-extensions CONFIGURE_ARGS += --with-computed-gotos=yes -CONFIGURE_ARGS += --with-build-python +CONFIGURE_ARGS += --with-build-python=$(PYTHON_NATIVE) CONFIGURE_ARGS += --disable-test-modules include ../../mk/spksrc.archs.mk @@ -76,10 +76,8 @@ INSTALL_TARGET = python310_install include ../../mk/spksrc.cross-cc.mk -PYTHON_NATIVE = $(abspath $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/bin/python3) +PYTHON_NATIVE = $(abspath $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/bin/python$(PKG_VERS_MAJOR_MINOR)) HOSTPYTHON = $(WORK_DIR)/$(PKG_DIR)/hostpython -# Required to find build-python and to generate-posix-vars -PATH := $(abspath $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/bin):$(PATH) .PHONY: python310_post_patch python310_post_patch: diff --git a/cross/python311/Makefile b/cross/python311/Makefile index aea0e907ef9..da74f711687 100644 --- a/cross/python311/Makefile +++ b/cross/python311/Makefile @@ -32,7 +32,7 @@ CONFIGURE_ARGS += --enable-ipv6 CONFIGURE_ARGS += --without-ensurepip CONFIGURE_ARGS += --enable-loadable-sqlite-extensions CONFIGURE_ARGS += --with-computed-gotos=yes -CONFIGURE_ARGS += --with-build-python +CONFIGURE_ARGS += --with-build-python=$(PYTHON_NATIVE) CONFIGURE_ARGS += --disable-test-modules include ../../mk/spksrc.archs.mk @@ -76,10 +76,8 @@ INSTALL_TARGET = python311_install include ../../mk/spksrc.cross-cc.mk -PYTHON_NATIVE = $(abspath $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/bin/python3) +PYTHON_NATIVE = $(abspath $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/bin/python$(PKG_VERS_MAJOR_MINOR)) HOSTPYTHON = $(WORK_DIR)/$(PKG_DIR)/hostpython -# Required to find build-python and to generate-posix-vars -PATH := $(abspath $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/bin):$(PATH) .PHONY: python311_post_patch python311_post_patch: diff --git a/cross/python312/Makefile b/cross/python312/Makefile index ba7e680c0ca..0a9193237f8 100644 --- a/cross/python312/Makefile +++ b/cross/python312/Makefile @@ -30,7 +30,7 @@ CONFIGURE_ARGS += --enable-ipv6 CONFIGURE_ARGS += --without-ensurepip CONFIGURE_ARGS += --enable-loadable-sqlite-extensions CONFIGURE_ARGS += --with-computed-gotos=yes -CONFIGURE_ARGS += --with-build-python=$(abspath $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/bin/python$(PKG_VERS_MAJOR_MINOR)) +CONFIGURE_ARGS += --with-build-python=$(PYTHON_NATIVE) CONFIGURE_ARGS += --with-readline=readline CONFIGURE_ARGS += --disable-test-modules @@ -79,7 +79,7 @@ INSTALL_TARGET = python312_install include ../../mk/spksrc.cross-cc.mk -PYTHON_NATIVE = $(abspath $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/bin/python3) +PYTHON_NATIVE = $(abspath $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/bin/python$(PKG_VERS_MAJOR_MINOR)) HOSTPYTHON = $(WORK_DIR)/$(PKG_DIR)/hostpython .PHONY: python312_post_patch diff --git a/cross/python313/Makefile b/cross/python313/Makefile index ccf62d6da81..6076b1a2ef7 100644 --- a/cross/python313/Makefile +++ b/cross/python313/Makefile @@ -30,7 +30,7 @@ CONFIGURE_ARGS += --enable-ipv6 CONFIGURE_ARGS += --without-ensurepip CONFIGURE_ARGS += --enable-loadable-sqlite-extensions CONFIGURE_ARGS += --with-computed-gotos=yes -CONFIGURE_ARGS += --with-build-python=$(abspath $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/bin/python$(PKG_VERS_MAJOR_MINOR)) +CONFIGURE_ARGS += --with-build-python=$(PYTHON_NATIVE) CONFIGURE_ARGS += --with-readline=readline CONFIGURE_ARGS += --disable-test-modules @@ -79,7 +79,7 @@ INSTALL_TARGET = python313_install include ../../mk/spksrc.cross-cc.mk -PYTHON_NATIVE = $(abspath $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/bin/python3) +PYTHON_NATIVE = $(abspath $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/bin/python$(PKG_VERS_MAJOR_MINOR)) HOSTPYTHON = $(WORK_DIR)/$(PKG_DIR)/hostpython .PHONY: python313_post_patch From 7f16bbd1b0db6f97f6eb14e37d7b1010b620770a Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Sun, 5 Jan 2025 00:57:03 +0000 Subject: [PATCH 116/130] py310: re-revert fix --with-build-python only for py310 --- cross/python310/Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cross/python310/Makefile b/cross/python310/Makefile index e8b1fa8af03..b90588b4e36 100644 --- a/cross/python310/Makefile +++ b/cross/python310/Makefile @@ -26,8 +26,8 @@ CONFIGURE_ARGS += --enable-ipv6 # installed pip is not on PATH CONFIGURE_ARGS += --without-ensurepip CONFIGURE_ARGS += --enable-loadable-sqlite-extensions +CONFIGURE_ARGS += --with-build-python CONFIGURE_ARGS += --with-computed-gotos=yes -CONFIGURE_ARGS += --with-build-python=$(PYTHON_NATIVE) CONFIGURE_ARGS += --disable-test-modules include ../../mk/spksrc.archs.mk @@ -79,6 +79,11 @@ include ../../mk/spksrc.cross-cc.mk PYTHON_NATIVE = $(abspath $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/bin/python$(PKG_VERS_MAJOR_MINOR)) HOSTPYTHON = $(WORK_DIR)/$(PKG_DIR)/hostpython +# Required to find build-python and to generate-posix-vars +PATH := $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/bin:$(PATH) +LD_LIBRARY_PATH := $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/lib:$(LD_LIBRARY_PATH) +export PATH LD_LIBRARY_PATH + .PHONY: python310_post_patch python310_post_patch: $(RUN) sed -e 's#@INSTALL_PREFIX@#$(INSTALL_PREFIX)#' -i Lib/mimetypes.py From 9cbf35d66552c5dd3337bc048ff60986c5c9aba7 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Sun, 5 Jan 2025 03:12:31 +0000 Subject: [PATCH 117/130] crossenv.mk: Move crossenv definitions to spk/python3* - Simplified shell calls to avoid defining SHELL = /bin/bash - Added at ifneq ($(wildcard file-wheel file-default)) as at early makefile variable asignation path will not have been determined just yet, thus blocking when trying to determine default version values extracted from variable within requirement files - Fixed CROSSENV_CONFIG_PATH so it always refer back to $(PYTHON_WORK_DIR) to ensure it works both from spk/python3* and from python related spk projects called using spksrc.python.mk Co-Author: hgy59 --- ...ents-for-crossenv-from-mk-crossenv-t.patch | 499 ------------------ mk/spksrc.crossenv.mk | 13 +- .../crossenv/requirements-default.txt | 19 + .../crossenv/requirements-frozenlist.txt | 0 .../crossenv/requirements-numpy-1.22.4.txt | 0 .../crossenv/requirements-numpy-1.24.4.txt | 0 .../crossenv/requirements-numpy-1.25.1.txt | 0 .../crossenv/requirements-pydantic_core.txt | 0 .../python310}/crossenv/requirements-yarl.txt | 0 .../crossenv/requirements-default.txt | 19 + .../crossenv/requirements-frozenlist.txt | 8 + .../crossenv/requirements-numpy-1.22.4.txt | 14 + .../crossenv/requirements-numpy-1.24.4.txt | 14 + .../crossenv/requirements-numpy-1.25.1.txt | 14 + .../crossenv/requirements-pydantic_core.txt | 10 + spk/python311/crossenv/requirements-yarl.txt | 8 + .../crossenv/requirements-default.txt | 0 .../crossenv/requirements-frozenlist.txt | 8 + .../crossenv/requirements-numpy-1.22.4.txt | 14 + .../crossenv/requirements-numpy-1.24.4.txt | 14 + .../crossenv/requirements-numpy-1.25.1.txt | 14 + .../crossenv/requirements-pydantic_core.txt | 10 + spk/python312/crossenv/requirements-yarl.txt | 8 + .../crossenv/requirements-default.txt | 19 + .../crossenv/requirements-frozenlist.txt | 8 + .../crossenv/requirements-numpy-1.22.4.txt | 14 + .../crossenv/requirements-numpy-1.24.4.txt | 14 + .../crossenv/requirements-numpy-1.25.1.txt | 14 + .../crossenv/requirements-pydantic_core.txt | 10 + spk/python313/crossenv/requirements-yarl.txt | 8 + 30 files changed, 267 insertions(+), 506 deletions(-) delete mode 100644 0001-migrate-requirements-for-crossenv-from-mk-crossenv-t.patch create mode 100644 spk/python310/crossenv/requirements-default.txt rename {mk => spk/python310}/crossenv/requirements-frozenlist.txt (100%) rename {mk => spk/python310}/crossenv/requirements-numpy-1.22.4.txt (100%) rename {mk => spk/python310}/crossenv/requirements-numpy-1.24.4.txt (100%) rename {mk => spk/python310}/crossenv/requirements-numpy-1.25.1.txt (100%) rename {mk => spk/python310}/crossenv/requirements-pydantic_core.txt (100%) rename {mk => spk/python310}/crossenv/requirements-yarl.txt (100%) create mode 100644 spk/python311/crossenv/requirements-default.txt create mode 100644 spk/python311/crossenv/requirements-frozenlist.txt create mode 100644 spk/python311/crossenv/requirements-numpy-1.22.4.txt create mode 100644 spk/python311/crossenv/requirements-numpy-1.24.4.txt create mode 100644 spk/python311/crossenv/requirements-numpy-1.25.1.txt create mode 100644 spk/python311/crossenv/requirements-pydantic_core.txt create mode 100644 spk/python311/crossenv/requirements-yarl.txt rename {mk => spk/python312}/crossenv/requirements-default.txt (100%) create mode 100644 spk/python312/crossenv/requirements-frozenlist.txt create mode 100644 spk/python312/crossenv/requirements-numpy-1.22.4.txt create mode 100644 spk/python312/crossenv/requirements-numpy-1.24.4.txt create mode 100644 spk/python312/crossenv/requirements-numpy-1.25.1.txt create mode 100644 spk/python312/crossenv/requirements-pydantic_core.txt create mode 100644 spk/python312/crossenv/requirements-yarl.txt create mode 100644 spk/python313/crossenv/requirements-default.txt create mode 100644 spk/python313/crossenv/requirements-frozenlist.txt create mode 100644 spk/python313/crossenv/requirements-numpy-1.22.4.txt create mode 100644 spk/python313/crossenv/requirements-numpy-1.24.4.txt create mode 100644 spk/python313/crossenv/requirements-numpy-1.25.1.txt create mode 100644 spk/python313/crossenv/requirements-pydantic_core.txt create mode 100644 spk/python313/crossenv/requirements-yarl.txt diff --git a/0001-migrate-requirements-for-crossenv-from-mk-crossenv-t.patch b/0001-migrate-requirements-for-crossenv-from-mk-crossenv-t.patch deleted file mode 100644 index d0c074e3032..00000000000 --- a/0001-migrate-requirements-for-crossenv-from-mk-crossenv-t.patch +++ /dev/null @@ -1,499 +0,0 @@ -From 54e8a0a03c998f82e1e40c5f4ed1bb446bd76c51 Mon Sep 17 00:00:00 2001 -From: hgy59 -Date: Fri, 6 Dec 2024 23:21:52 +0100 -Subject: [PATCH] migrate requirements for crossenv from mk/crossenv to - spk/python31*/crossenv - -- use python version specific crossenv -- downgrade cryptography in default crossenv for python < 3.12 to v41.0.3 ---- - mk/spksrc.crossenv.mk | 2 +- - .../crossenv/requirements-default.txt | 19 +++++++++++++++++++ - .../crossenv/requirements-frozenlist.txt | 0 - .../crossenv/requirements-numpy-1.22.4.txt | 0 - .../crossenv/requirements-numpy-1.24.4.txt | 0 - .../crossenv/requirements-numpy-1.25.1.txt | 0 - .../crossenv/requirements-pydantic_core.txt | 0 - .../python310}/crossenv/requirements-yarl.txt | 0 - .../crossenv/requirements-default.txt | 19 +++++++++++++++++++ - .../crossenv/requirements-frozenlist.txt | 8 ++++++++ - .../crossenv/requirements-numpy-1.22.4.txt | 14 ++++++++++++++ - .../crossenv/requirements-numpy-1.24.4.txt | 14 ++++++++++++++ - .../crossenv/requirements-numpy-1.25.1.txt | 14 ++++++++++++++ - .../crossenv/requirements-pydantic_core.txt | 10 ++++++++++ - spk/python311/crossenv/requirements-yarl.txt | 8 ++++++++ - .../crossenv/requirements-default.txt | 0 - .../crossenv/requirements-frozenlist.txt | 8 ++++++++ - .../crossenv/requirements-numpy-1.22.4.txt | 14 ++++++++++++++ - .../crossenv/requirements-numpy-1.24.4.txt | 14 ++++++++++++++ - .../crossenv/requirements-numpy-1.25.1.txt | 14 ++++++++++++++ - .../crossenv/requirements-pydantic_core.txt | 10 ++++++++++ - spk/python312/crossenv/requirements-yarl.txt | 8 ++++++++ - .../crossenv/requirements-default.txt | 19 +++++++++++++++++++ - .../crossenv/requirements-frozenlist.txt | 8 ++++++++ - .../crossenv/requirements-numpy-1.22.4.txt | 14 ++++++++++++++ - .../crossenv/requirements-numpy-1.24.4.txt | 14 ++++++++++++++ - .../crossenv/requirements-numpy-1.25.1.txt | 14 ++++++++++++++ - .../crossenv/requirements-pydantic_core.txt | 10 ++++++++++ - spk/python313/crossenv/requirements-yarl.txt | 8 ++++++++ - 29 files changed, 262 insertions(+), 1 deletion(-) - create mode 100644 spk/python310/crossenv/requirements-default.txt - rename {mk => spk/python310}/crossenv/requirements-frozenlist.txt (100%) - rename {mk => spk/python310}/crossenv/requirements-numpy-1.22.4.txt (100%) - rename {mk => spk/python310}/crossenv/requirements-numpy-1.24.4.txt (100%) - rename {mk => spk/python310}/crossenv/requirements-numpy-1.25.1.txt (100%) - rename {mk => spk/python310}/crossenv/requirements-pydantic_core.txt (100%) - rename {mk => spk/python310}/crossenv/requirements-yarl.txt (100%) - create mode 100644 spk/python311/crossenv/requirements-default.txt - create mode 100644 spk/python311/crossenv/requirements-frozenlist.txt - create mode 100644 spk/python311/crossenv/requirements-numpy-1.22.4.txt - create mode 100644 spk/python311/crossenv/requirements-numpy-1.24.4.txt - create mode 100644 spk/python311/crossenv/requirements-numpy-1.25.1.txt - create mode 100644 spk/python311/crossenv/requirements-pydantic_core.txt - create mode 100644 spk/python311/crossenv/requirements-yarl.txt - rename {mk => spk/python312}/crossenv/requirements-default.txt (100%) - create mode 100644 spk/python312/crossenv/requirements-frozenlist.txt - create mode 100644 spk/python312/crossenv/requirements-numpy-1.22.4.txt - create mode 100644 spk/python312/crossenv/requirements-numpy-1.24.4.txt - create mode 100644 spk/python312/crossenv/requirements-numpy-1.25.1.txt - create mode 100644 spk/python312/crossenv/requirements-pydantic_core.txt - create mode 100644 spk/python312/crossenv/requirements-yarl.txt - create mode 100644 spk/python313/crossenv/requirements-default.txt - create mode 100644 spk/python313/crossenv/requirements-frozenlist.txt - create mode 100644 spk/python313/crossenv/requirements-numpy-1.22.4.txt - create mode 100644 spk/python313/crossenv/requirements-numpy-1.24.4.txt - create mode 100644 spk/python313/crossenv/requirements-numpy-1.25.1.txt - create mode 100644 spk/python313/crossenv/requirements-pydantic_core.txt - create mode 100644 spk/python313/crossenv/requirements-yarl.txt - -diff --git mk/spksrc.crossenv.mk mk/spksrc.crossenv.mk -index bbcc4395..e0615607 100644 ---- mk/spksrc.crossenv.mk -+++ mk/spksrc.crossenv.mk -@@ -33,7 +33,7 @@ PYTHON_LIB_NATIVE = $(abspath $(PYTHON_WORK_DIR)/$(PYTHON_PKG_DIR)/bui - PYTHON_LIB_CROSS = $(abspath $(PYTHON_WORK_DIR)/$(PYTHON_PKG_DIR)/build/lib.linux-$(shell expr "$(TC_TARGET)" : '\([^-]*\)' )-$(PYTHON_PKG_VERS_MAJOR_MINOR)) - - # wheel crossenv definitions --CROSSENV_CONFIG_PATH = $(abspath $(WORK_DIR)/../../../mk/crossenv) -+CROSSENV_CONFIG_PATH = $(abspath $(WORK_DIR)/../../../spk/$(PYTHON_PKG_NAME)/crossenv) - CROSSENV_CONFIG_DEFAULT = $(CROSSENV_CONFIG_PATH)/requirements-default.txt - CROSSENV_PATH = $(abspath $(WORK_DIR)/crossenv-$(CROSSENV_BUILD_WHEEL)/) - -diff --git spk/python310/crossenv/requirements-default.txt spk/python310/crossenv/requirements-default.txt -new file mode 100644 -index 00000000..4b8f768e ---- /dev/null -+++ spk/python310/crossenv/requirements-default.txt -@@ -0,0 +1,19 @@ -+pip==24.3.1 -+pip-tools==7.4.1 -+setuptools==75.4.0 -+build==1.2.2 -+wheel==0.45.0 -+# -+cffi==1.17.1 -+cryptography==41.0.3 -+Cython==3.0.11 -+flit==3.10.1 -+maturin==1.7.4 -+meson-python==0.17.1 -+msgpack==1.0.5 -+poetry==1.8.4 -+scikit-build==0.18.1 -+scikit-build-core==0.10.7 -+setuptools-rust==1.10.2 -+setuptools-scm==8.1.0 -+typing_extensions==4.12.2 -diff --git mk/crossenv/requirements-frozenlist.txt spk/python310/crossenv/requirements-frozenlist.txt -similarity index 100% -rename from mk/crossenv/requirements-frozenlist.txt -rename to spk/python310/crossenv/requirements-frozenlist.txt -diff --git mk/crossenv/requirements-numpy-1.22.4.txt spk/python310/crossenv/requirements-numpy-1.22.4.txt -similarity index 100% -rename from mk/crossenv/requirements-numpy-1.22.4.txt -rename to spk/python310/crossenv/requirements-numpy-1.22.4.txt -diff --git mk/crossenv/requirements-numpy-1.24.4.txt spk/python310/crossenv/requirements-numpy-1.24.4.txt -similarity index 100% -rename from mk/crossenv/requirements-numpy-1.24.4.txt -rename to spk/python310/crossenv/requirements-numpy-1.24.4.txt -diff --git mk/crossenv/requirements-numpy-1.25.1.txt spk/python310/crossenv/requirements-numpy-1.25.1.txt -similarity index 100% -rename from mk/crossenv/requirements-numpy-1.25.1.txt -rename to spk/python310/crossenv/requirements-numpy-1.25.1.txt -diff --git mk/crossenv/requirements-pydantic_core.txt spk/python310/crossenv/requirements-pydantic_core.txt -similarity index 100% -rename from mk/crossenv/requirements-pydantic_core.txt -rename to spk/python310/crossenv/requirements-pydantic_core.txt -diff --git mk/crossenv/requirements-yarl.txt spk/python310/crossenv/requirements-yarl.txt -similarity index 100% -rename from mk/crossenv/requirements-yarl.txt -rename to spk/python310/crossenv/requirements-yarl.txt -diff --git spk/python311/crossenv/requirements-default.txt spk/python311/crossenv/requirements-default.txt -new file mode 100644 -index 00000000..4b8f768e ---- /dev/null -+++ spk/python311/crossenv/requirements-default.txt -@@ -0,0 +1,19 @@ -+pip==24.3.1 -+pip-tools==7.4.1 -+setuptools==75.4.0 -+build==1.2.2 -+wheel==0.45.0 -+# -+cffi==1.17.1 -+cryptography==41.0.3 -+Cython==3.0.11 -+flit==3.10.1 -+maturin==1.7.4 -+meson-python==0.17.1 -+msgpack==1.0.5 -+poetry==1.8.4 -+scikit-build==0.18.1 -+scikit-build-core==0.10.7 -+setuptools-rust==1.10.2 -+setuptools-scm==8.1.0 -+typing_extensions==4.12.2 -diff --git spk/python311/crossenv/requirements-frozenlist.txt spk/python311/crossenv/requirements-frozenlist.txt -new file mode 100644 -index 00000000..4edc3b10 ---- /dev/null -+++ spk/python311/crossenv/requirements-frozenlist.txt -@@ -0,0 +1,8 @@ -+pip==24.3.1 -+pip-tools==7.4.1 -+setuptools==75.4.0 -+build==1.2.2 -+wheel==0.45.0 -+# -+Cython==3.0.11 -+expandvars==0.12.0 -diff --git spk/python311/crossenv/requirements-numpy-1.22.4.txt spk/python311/crossenv/requirements-numpy-1.22.4.txt -new file mode 100644 -index 00000000..e740501c ---- /dev/null -+++ spk/python311/crossenv/requirements-numpy-1.22.4.txt -@@ -0,0 +1,14 @@ -+pip==23.2.1 -+setuptools==63.4.3 -+wheel==0.41.2 -+# -+cffi==1.15.1 -+cryptography==41.0.3 -+Cython==0.29.36 -+flit==3.9.0 -+maturin==1.2.3 -+msgpack==1.0.5 -+poetry==1.6.1 -+scikit-build==0.17.6 -+setuptools-rust==1.7.0 -+setuptools-scm==7.1.0 -diff --git spk/python311/crossenv/requirements-numpy-1.24.4.txt spk/python311/crossenv/requirements-numpy-1.24.4.txt -new file mode 100644 -index 00000000..e740501c ---- /dev/null -+++ spk/python311/crossenv/requirements-numpy-1.24.4.txt -@@ -0,0 +1,14 @@ -+pip==23.2.1 -+setuptools==63.4.3 -+wheel==0.41.2 -+# -+cffi==1.15.1 -+cryptography==41.0.3 -+Cython==0.29.36 -+flit==3.9.0 -+maturin==1.2.3 -+msgpack==1.0.5 -+poetry==1.6.1 -+scikit-build==0.17.6 -+setuptools-rust==1.7.0 -+setuptools-scm==7.1.0 -diff --git spk/python311/crossenv/requirements-numpy-1.25.1.txt spk/python311/crossenv/requirements-numpy-1.25.1.txt -new file mode 100644 -index 00000000..e740501c ---- /dev/null -+++ spk/python311/crossenv/requirements-numpy-1.25.1.txt -@@ -0,0 +1,14 @@ -+pip==23.2.1 -+setuptools==63.4.3 -+wheel==0.41.2 -+# -+cffi==1.15.1 -+cryptography==41.0.3 -+Cython==0.29.36 -+flit==3.9.0 -+maturin==1.2.3 -+msgpack==1.0.5 -+poetry==1.6.1 -+scikit-build==0.17.6 -+setuptools-rust==1.7.0 -+setuptools-scm==7.1.0 -diff --git spk/python311/crossenv/requirements-pydantic_core.txt spk/python311/crossenv/requirements-pydantic_core.txt -new file mode 100644 -index 00000000..aab8e3a0 ---- /dev/null -+++ spk/python311/crossenv/requirements-pydantic_core.txt -@@ -0,0 +1,10 @@ -+pip==24.3.1 -+pip-tools==7.4.1 -+setuptools==75.4.0 -+build==1.2.2 -+wheel==0.45.0 -+# -+# [pydantic_core] depends on Cython < 3.x -+Cython==0.29.37 -+maturin==1.7.4 -+typing_extensions==4.12.2 -diff --git spk/python311/crossenv/requirements-yarl.txt spk/python311/crossenv/requirements-yarl.txt -new file mode 100644 -index 00000000..4edc3b10 ---- /dev/null -+++ spk/python311/crossenv/requirements-yarl.txt -@@ -0,0 +1,8 @@ -+pip==24.3.1 -+pip-tools==7.4.1 -+setuptools==75.4.0 -+build==1.2.2 -+wheel==0.45.0 -+# -+Cython==3.0.11 -+expandvars==0.12.0 -diff --git mk/crossenv/requirements-default.txt spk/python312/crossenv/requirements-default.txt -similarity index 100% -rename from mk/crossenv/requirements-default.txt -rename to spk/python312/crossenv/requirements-default.txt -diff --git spk/python312/crossenv/requirements-frozenlist.txt spk/python312/crossenv/requirements-frozenlist.txt -new file mode 100644 -index 00000000..4edc3b10 ---- /dev/null -+++ spk/python312/crossenv/requirements-frozenlist.txt -@@ -0,0 +1,8 @@ -+pip==24.3.1 -+pip-tools==7.4.1 -+setuptools==75.4.0 -+build==1.2.2 -+wheel==0.45.0 -+# -+Cython==3.0.11 -+expandvars==0.12.0 -diff --git spk/python312/crossenv/requirements-numpy-1.22.4.txt spk/python312/crossenv/requirements-numpy-1.22.4.txt -new file mode 100644 -index 00000000..e740501c ---- /dev/null -+++ spk/python312/crossenv/requirements-numpy-1.22.4.txt -@@ -0,0 +1,14 @@ -+pip==23.2.1 -+setuptools==63.4.3 -+wheel==0.41.2 -+# -+cffi==1.15.1 -+cryptography==41.0.3 -+Cython==0.29.36 -+flit==3.9.0 -+maturin==1.2.3 -+msgpack==1.0.5 -+poetry==1.6.1 -+scikit-build==0.17.6 -+setuptools-rust==1.7.0 -+setuptools-scm==7.1.0 -diff --git spk/python312/crossenv/requirements-numpy-1.24.4.txt spk/python312/crossenv/requirements-numpy-1.24.4.txt -new file mode 100644 -index 00000000..e740501c ---- /dev/null -+++ spk/python312/crossenv/requirements-numpy-1.24.4.txt -@@ -0,0 +1,14 @@ -+pip==23.2.1 -+setuptools==63.4.3 -+wheel==0.41.2 -+# -+cffi==1.15.1 -+cryptography==41.0.3 -+Cython==0.29.36 -+flit==3.9.0 -+maturin==1.2.3 -+msgpack==1.0.5 -+poetry==1.6.1 -+scikit-build==0.17.6 -+setuptools-rust==1.7.0 -+setuptools-scm==7.1.0 -diff --git spk/python312/crossenv/requirements-numpy-1.25.1.txt spk/python312/crossenv/requirements-numpy-1.25.1.txt -new file mode 100644 -index 00000000..e740501c ---- /dev/null -+++ spk/python312/crossenv/requirements-numpy-1.25.1.txt -@@ -0,0 +1,14 @@ -+pip==23.2.1 -+setuptools==63.4.3 -+wheel==0.41.2 -+# -+cffi==1.15.1 -+cryptography==41.0.3 -+Cython==0.29.36 -+flit==3.9.0 -+maturin==1.2.3 -+msgpack==1.0.5 -+poetry==1.6.1 -+scikit-build==0.17.6 -+setuptools-rust==1.7.0 -+setuptools-scm==7.1.0 -diff --git spk/python312/crossenv/requirements-pydantic_core.txt spk/python312/crossenv/requirements-pydantic_core.txt -new file mode 100644 -index 00000000..aab8e3a0 ---- /dev/null -+++ spk/python312/crossenv/requirements-pydantic_core.txt -@@ -0,0 +1,10 @@ -+pip==24.3.1 -+pip-tools==7.4.1 -+setuptools==75.4.0 -+build==1.2.2 -+wheel==0.45.0 -+# -+# [pydantic_core] depends on Cython < 3.x -+Cython==0.29.37 -+maturin==1.7.4 -+typing_extensions==4.12.2 -diff --git spk/python312/crossenv/requirements-yarl.txt spk/python312/crossenv/requirements-yarl.txt -new file mode 100644 -index 00000000..4edc3b10 ---- /dev/null -+++ spk/python312/crossenv/requirements-yarl.txt -@@ -0,0 +1,8 @@ -+pip==24.3.1 -+pip-tools==7.4.1 -+setuptools==75.4.0 -+build==1.2.2 -+wheel==0.45.0 -+# -+Cython==3.0.11 -+expandvars==0.12.0 -diff --git spk/python313/crossenv/requirements-default.txt spk/python313/crossenv/requirements-default.txt -new file mode 100644 -index 00000000..9400a967 ---- /dev/null -+++ spk/python313/crossenv/requirements-default.txt -@@ -0,0 +1,19 @@ -+pip==24.3.1 -+pip-tools==7.4.1 -+setuptools==75.4.0 -+build==1.2.2 -+wheel==0.45.0 -+# -+cffi==1.17.1 -+cryptography==43.0.3 -+Cython==3.0.11 -+flit==3.10.1 -+maturin==1.7.4 -+meson-python==0.17.1 -+msgpack==1.0.5 -+poetry==1.8.4 -+scikit-build==0.18.1 -+scikit-build-core==0.10.7 -+setuptools-rust==1.10.2 -+setuptools-scm==8.1.0 -+typing_extensions==4.12.2 -diff --git spk/python313/crossenv/requirements-frozenlist.txt spk/python313/crossenv/requirements-frozenlist.txt -new file mode 100644 -index 00000000..4edc3b10 ---- /dev/null -+++ spk/python313/crossenv/requirements-frozenlist.txt -@@ -0,0 +1,8 @@ -+pip==24.3.1 -+pip-tools==7.4.1 -+setuptools==75.4.0 -+build==1.2.2 -+wheel==0.45.0 -+# -+Cython==3.0.11 -+expandvars==0.12.0 -diff --git spk/python313/crossenv/requirements-numpy-1.22.4.txt spk/python313/crossenv/requirements-numpy-1.22.4.txt -new file mode 100644 -index 00000000..e740501c ---- /dev/null -+++ spk/python313/crossenv/requirements-numpy-1.22.4.txt -@@ -0,0 +1,14 @@ -+pip==23.2.1 -+setuptools==63.4.3 -+wheel==0.41.2 -+# -+cffi==1.15.1 -+cryptography==41.0.3 -+Cython==0.29.36 -+flit==3.9.0 -+maturin==1.2.3 -+msgpack==1.0.5 -+poetry==1.6.1 -+scikit-build==0.17.6 -+setuptools-rust==1.7.0 -+setuptools-scm==7.1.0 -diff --git spk/python313/crossenv/requirements-numpy-1.24.4.txt spk/python313/crossenv/requirements-numpy-1.24.4.txt -new file mode 100644 -index 00000000..e740501c ---- /dev/null -+++ spk/python313/crossenv/requirements-numpy-1.24.4.txt -@@ -0,0 +1,14 @@ -+pip==23.2.1 -+setuptools==63.4.3 -+wheel==0.41.2 -+# -+cffi==1.15.1 -+cryptography==41.0.3 -+Cython==0.29.36 -+flit==3.9.0 -+maturin==1.2.3 -+msgpack==1.0.5 -+poetry==1.6.1 -+scikit-build==0.17.6 -+setuptools-rust==1.7.0 -+setuptools-scm==7.1.0 -diff --git spk/python313/crossenv/requirements-numpy-1.25.1.txt spk/python313/crossenv/requirements-numpy-1.25.1.txt -new file mode 100644 -index 00000000..e740501c ---- /dev/null -+++ spk/python313/crossenv/requirements-numpy-1.25.1.txt -@@ -0,0 +1,14 @@ -+pip==23.2.1 -+setuptools==63.4.3 -+wheel==0.41.2 -+# -+cffi==1.15.1 -+cryptography==41.0.3 -+Cython==0.29.36 -+flit==3.9.0 -+maturin==1.2.3 -+msgpack==1.0.5 -+poetry==1.6.1 -+scikit-build==0.17.6 -+setuptools-rust==1.7.0 -+setuptools-scm==7.1.0 -diff --git spk/python313/crossenv/requirements-pydantic_core.txt spk/python313/crossenv/requirements-pydantic_core.txt -new file mode 100644 -index 00000000..aab8e3a0 ---- /dev/null -+++ spk/python313/crossenv/requirements-pydantic_core.txt -@@ -0,0 +1,10 @@ -+pip==24.3.1 -+pip-tools==7.4.1 -+setuptools==75.4.0 -+build==1.2.2 -+wheel==0.45.0 -+# -+# [pydantic_core] depends on Cython < 3.x -+Cython==0.29.37 -+maturin==1.7.4 -+typing_extensions==4.12.2 -diff --git spk/python313/crossenv/requirements-yarl.txt spk/python313/crossenv/requirements-yarl.txt -new file mode 100644 -index 00000000..4edc3b10 ---- /dev/null -+++ spk/python313/crossenv/requirements-yarl.txt -@@ -0,0 +1,8 @@ -+pip==24.3.1 -+pip-tools==7.4.1 -+setuptools==75.4.0 -+build==1.2.2 -+wheel==0.45.0 -+# -+Cython==3.0.11 -+expandvars==0.12.0 --- -2.39.2 - diff --git a/mk/spksrc.crossenv.mk b/mk/spksrc.crossenv.mk index 50a0a74e410..14a25cf3feb 100644 --- a/mk/spksrc.crossenv.mk +++ b/mk/spksrc.crossenv.mk @@ -15,9 +15,6 @@ # Variables: # WHEELS List of wheels to go through -# Set default shell to bash -SHELL = /bin/bash - # Defined using PYTHON_PACKAGE_WORK_DIR from spksrc.python.mk or use local work directory PYTHON_WORK_DIR = $(or $(wildcard $(PYTHON_PACKAGE_WORK_DIR)),$(wildcard $(WORK_DIR))) @@ -33,7 +30,7 @@ PYTHON_LIB_NATIVE = $(abspath $(PYTHON_WORK_DIR)/$(PYTHON_PKG_DIR)/bui PYTHON_LIB_CROSS = $(abspath $(PYTHON_WORK_DIR)/$(PYTHON_PKG_DIR)/build/lib.linux-$(shell expr "$(TC_TARGET)" : '\([^-]*\)' )-$(PYTHON_PKG_VERS_MAJOR_MINOR)) # wheel crossenv definitions -CROSSENV_CONFIG_PATH = $(abspath $(WORK_DIR)/../../../mk/crossenv) +CROSSENV_CONFIG_PATH = $(abspath $(PYTHON_WORK_DIR)/../crossenv) CROSSENV_CONFIG_DEFAULT = $(CROSSENV_CONFIG_PATH)/requirements-default.txt CROSSENV_PATH = $(abspath $(WORK_DIR)/crossenv-$(CROSSENV_BUILD_WHEEL)/) @@ -75,9 +72,11 @@ CROSSENV_COOKIE = $(WORK_DIR)/.crossenv-$(CROSSENV_BUILD_WHEEL)_done ### # default wheel packages to install in crossenv -CROSSENV_DEFAULT_PIP_VERSION = $(shell read version < <(grep -hnm 1 '^pip[<>=]=' $(wildcard $(CROSSENV_CONFIG_PATH)/requirements-$(WHEEL).txt $(CROSSENV_CONFIG_DEFAULT)) | head -1) && echo $${version#*[<>=]=}) -CROSSENV_DEFAULT_SETUPTOOLS_VERSION = $(shell read version < <(grep -hnm 1 '^setuptools[<>=]=' $(wildcard $(CROSSENV_CONFIG_PATH)/requirements-$(WHEEL).txt $(CROSSENV_CONFIG_DEFAULT)) | head -1) && echo $${version#*[<>=]=}) -CROSSENV_DEFAULT_WHEEL_VERSION = $(shell read version < <(grep -hnm 1 '^wheel[<>=]=' $(wildcard $(CROSSENV_CONFIG_PATH)/requirements-$(WHEEL).txt $(CROSSENV_CONFIG_DEFAULT)) | head -1) && echo $${version#*[<>=]=}) +ifneq ($(wildcard $(CROSSENV_CONFIG_PATH)/requirements-$(WHEEL).txt $(CROSSENV_CONFIG_DEFAULT)),) +CROSSENV_DEFAULT_PIP_VERSION = $(shell grep -h -E "^pip[<>=]=" $(wildcard $(CROSSENV_CONFIG_PATH)/requirements-$(WHEEL).txt $(CROSSENV_CONFIG_DEFAULT)) | head -1 | sed -E 's/.*[<>=]=//') +CROSSENV_DEFAULT_SETUPTOOLS_VERSION = $(shell grep -h -E "^setuptools[<>=]=" $(wildcard $(CROSSENV_CONFIG_PATH)/requirements-$(WHEEL).txt $(CROSSENV_CONFIG_DEFAULT)) | head -1 | sed -E 's/.*[<>=]=//') +CROSSENV_DEFAULT_WHEEL_VERSION = $(shell grep -h -E "^wheel[<>=]=" $(wildcard $(CROSSENV_CONFIG_PATH)/requirements-$(WHEEL).txt $(CROSSENV_CONFIG_DEFAULT)) | head -1 | sed -E 's/.*[<>=]=//') +endif ifneq ($(CROSSENV_DEFAULT_PIP_VERSION),) CROSSENV_DEFAULT_PIP = pip==$(CROSSENV_DEFAULT_PIP_VERSION) diff --git a/spk/python310/crossenv/requirements-default.txt b/spk/python310/crossenv/requirements-default.txt new file mode 100644 index 00000000000..4b8f768e596 --- /dev/null +++ b/spk/python310/crossenv/requirements-default.txt @@ -0,0 +1,19 @@ +pip==24.3.1 +pip-tools==7.4.1 +setuptools==75.4.0 +build==1.2.2 +wheel==0.45.0 +# +cffi==1.17.1 +cryptography==41.0.3 +Cython==3.0.11 +flit==3.10.1 +maturin==1.7.4 +meson-python==0.17.1 +msgpack==1.0.5 +poetry==1.8.4 +scikit-build==0.18.1 +scikit-build-core==0.10.7 +setuptools-rust==1.10.2 +setuptools-scm==8.1.0 +typing_extensions==4.12.2 diff --git a/mk/crossenv/requirements-frozenlist.txt b/spk/python310/crossenv/requirements-frozenlist.txt similarity index 100% rename from mk/crossenv/requirements-frozenlist.txt rename to spk/python310/crossenv/requirements-frozenlist.txt diff --git a/mk/crossenv/requirements-numpy-1.22.4.txt b/spk/python310/crossenv/requirements-numpy-1.22.4.txt similarity index 100% rename from mk/crossenv/requirements-numpy-1.22.4.txt rename to spk/python310/crossenv/requirements-numpy-1.22.4.txt diff --git a/mk/crossenv/requirements-numpy-1.24.4.txt b/spk/python310/crossenv/requirements-numpy-1.24.4.txt similarity index 100% rename from mk/crossenv/requirements-numpy-1.24.4.txt rename to spk/python310/crossenv/requirements-numpy-1.24.4.txt diff --git a/mk/crossenv/requirements-numpy-1.25.1.txt b/spk/python310/crossenv/requirements-numpy-1.25.1.txt similarity index 100% rename from mk/crossenv/requirements-numpy-1.25.1.txt rename to spk/python310/crossenv/requirements-numpy-1.25.1.txt diff --git a/mk/crossenv/requirements-pydantic_core.txt b/spk/python310/crossenv/requirements-pydantic_core.txt similarity index 100% rename from mk/crossenv/requirements-pydantic_core.txt rename to spk/python310/crossenv/requirements-pydantic_core.txt diff --git a/mk/crossenv/requirements-yarl.txt b/spk/python310/crossenv/requirements-yarl.txt similarity index 100% rename from mk/crossenv/requirements-yarl.txt rename to spk/python310/crossenv/requirements-yarl.txt diff --git a/spk/python311/crossenv/requirements-default.txt b/spk/python311/crossenv/requirements-default.txt new file mode 100644 index 00000000000..4b8f768e596 --- /dev/null +++ b/spk/python311/crossenv/requirements-default.txt @@ -0,0 +1,19 @@ +pip==24.3.1 +pip-tools==7.4.1 +setuptools==75.4.0 +build==1.2.2 +wheel==0.45.0 +# +cffi==1.17.1 +cryptography==41.0.3 +Cython==3.0.11 +flit==3.10.1 +maturin==1.7.4 +meson-python==0.17.1 +msgpack==1.0.5 +poetry==1.8.4 +scikit-build==0.18.1 +scikit-build-core==0.10.7 +setuptools-rust==1.10.2 +setuptools-scm==8.1.0 +typing_extensions==4.12.2 diff --git a/spk/python311/crossenv/requirements-frozenlist.txt b/spk/python311/crossenv/requirements-frozenlist.txt new file mode 100644 index 00000000000..4edc3b107fb --- /dev/null +++ b/spk/python311/crossenv/requirements-frozenlist.txt @@ -0,0 +1,8 @@ +pip==24.3.1 +pip-tools==7.4.1 +setuptools==75.4.0 +build==1.2.2 +wheel==0.45.0 +# +Cython==3.0.11 +expandvars==0.12.0 diff --git a/spk/python311/crossenv/requirements-numpy-1.22.4.txt b/spk/python311/crossenv/requirements-numpy-1.22.4.txt new file mode 100644 index 00000000000..e740501ce2d --- /dev/null +++ b/spk/python311/crossenv/requirements-numpy-1.22.4.txt @@ -0,0 +1,14 @@ +pip==23.2.1 +setuptools==63.4.3 +wheel==0.41.2 +# +cffi==1.15.1 +cryptography==41.0.3 +Cython==0.29.36 +flit==3.9.0 +maturin==1.2.3 +msgpack==1.0.5 +poetry==1.6.1 +scikit-build==0.17.6 +setuptools-rust==1.7.0 +setuptools-scm==7.1.0 diff --git a/spk/python311/crossenv/requirements-numpy-1.24.4.txt b/spk/python311/crossenv/requirements-numpy-1.24.4.txt new file mode 100644 index 00000000000..e740501ce2d --- /dev/null +++ b/spk/python311/crossenv/requirements-numpy-1.24.4.txt @@ -0,0 +1,14 @@ +pip==23.2.1 +setuptools==63.4.3 +wheel==0.41.2 +# +cffi==1.15.1 +cryptography==41.0.3 +Cython==0.29.36 +flit==3.9.0 +maturin==1.2.3 +msgpack==1.0.5 +poetry==1.6.1 +scikit-build==0.17.6 +setuptools-rust==1.7.0 +setuptools-scm==7.1.0 diff --git a/spk/python311/crossenv/requirements-numpy-1.25.1.txt b/spk/python311/crossenv/requirements-numpy-1.25.1.txt new file mode 100644 index 00000000000..e740501ce2d --- /dev/null +++ b/spk/python311/crossenv/requirements-numpy-1.25.1.txt @@ -0,0 +1,14 @@ +pip==23.2.1 +setuptools==63.4.3 +wheel==0.41.2 +# +cffi==1.15.1 +cryptography==41.0.3 +Cython==0.29.36 +flit==3.9.0 +maturin==1.2.3 +msgpack==1.0.5 +poetry==1.6.1 +scikit-build==0.17.6 +setuptools-rust==1.7.0 +setuptools-scm==7.1.0 diff --git a/spk/python311/crossenv/requirements-pydantic_core.txt b/spk/python311/crossenv/requirements-pydantic_core.txt new file mode 100644 index 00000000000..aab8e3a040e --- /dev/null +++ b/spk/python311/crossenv/requirements-pydantic_core.txt @@ -0,0 +1,10 @@ +pip==24.3.1 +pip-tools==7.4.1 +setuptools==75.4.0 +build==1.2.2 +wheel==0.45.0 +# +# [pydantic_core] depends on Cython < 3.x +Cython==0.29.37 +maturin==1.7.4 +typing_extensions==4.12.2 diff --git a/spk/python311/crossenv/requirements-yarl.txt b/spk/python311/crossenv/requirements-yarl.txt new file mode 100644 index 00000000000..4edc3b107fb --- /dev/null +++ b/spk/python311/crossenv/requirements-yarl.txt @@ -0,0 +1,8 @@ +pip==24.3.1 +pip-tools==7.4.1 +setuptools==75.4.0 +build==1.2.2 +wheel==0.45.0 +# +Cython==3.0.11 +expandvars==0.12.0 diff --git a/mk/crossenv/requirements-default.txt b/spk/python312/crossenv/requirements-default.txt similarity index 100% rename from mk/crossenv/requirements-default.txt rename to spk/python312/crossenv/requirements-default.txt diff --git a/spk/python312/crossenv/requirements-frozenlist.txt b/spk/python312/crossenv/requirements-frozenlist.txt new file mode 100644 index 00000000000..4edc3b107fb --- /dev/null +++ b/spk/python312/crossenv/requirements-frozenlist.txt @@ -0,0 +1,8 @@ +pip==24.3.1 +pip-tools==7.4.1 +setuptools==75.4.0 +build==1.2.2 +wheel==0.45.0 +# +Cython==3.0.11 +expandvars==0.12.0 diff --git a/spk/python312/crossenv/requirements-numpy-1.22.4.txt b/spk/python312/crossenv/requirements-numpy-1.22.4.txt new file mode 100644 index 00000000000..e740501ce2d --- /dev/null +++ b/spk/python312/crossenv/requirements-numpy-1.22.4.txt @@ -0,0 +1,14 @@ +pip==23.2.1 +setuptools==63.4.3 +wheel==0.41.2 +# +cffi==1.15.1 +cryptography==41.0.3 +Cython==0.29.36 +flit==3.9.0 +maturin==1.2.3 +msgpack==1.0.5 +poetry==1.6.1 +scikit-build==0.17.6 +setuptools-rust==1.7.0 +setuptools-scm==7.1.0 diff --git a/spk/python312/crossenv/requirements-numpy-1.24.4.txt b/spk/python312/crossenv/requirements-numpy-1.24.4.txt new file mode 100644 index 00000000000..e740501ce2d --- /dev/null +++ b/spk/python312/crossenv/requirements-numpy-1.24.4.txt @@ -0,0 +1,14 @@ +pip==23.2.1 +setuptools==63.4.3 +wheel==0.41.2 +# +cffi==1.15.1 +cryptography==41.0.3 +Cython==0.29.36 +flit==3.9.0 +maturin==1.2.3 +msgpack==1.0.5 +poetry==1.6.1 +scikit-build==0.17.6 +setuptools-rust==1.7.0 +setuptools-scm==7.1.0 diff --git a/spk/python312/crossenv/requirements-numpy-1.25.1.txt b/spk/python312/crossenv/requirements-numpy-1.25.1.txt new file mode 100644 index 00000000000..e740501ce2d --- /dev/null +++ b/spk/python312/crossenv/requirements-numpy-1.25.1.txt @@ -0,0 +1,14 @@ +pip==23.2.1 +setuptools==63.4.3 +wheel==0.41.2 +# +cffi==1.15.1 +cryptography==41.0.3 +Cython==0.29.36 +flit==3.9.0 +maturin==1.2.3 +msgpack==1.0.5 +poetry==1.6.1 +scikit-build==0.17.6 +setuptools-rust==1.7.0 +setuptools-scm==7.1.0 diff --git a/spk/python312/crossenv/requirements-pydantic_core.txt b/spk/python312/crossenv/requirements-pydantic_core.txt new file mode 100644 index 00000000000..aab8e3a040e --- /dev/null +++ b/spk/python312/crossenv/requirements-pydantic_core.txt @@ -0,0 +1,10 @@ +pip==24.3.1 +pip-tools==7.4.1 +setuptools==75.4.0 +build==1.2.2 +wheel==0.45.0 +# +# [pydantic_core] depends on Cython < 3.x +Cython==0.29.37 +maturin==1.7.4 +typing_extensions==4.12.2 diff --git a/spk/python312/crossenv/requirements-yarl.txt b/spk/python312/crossenv/requirements-yarl.txt new file mode 100644 index 00000000000..4edc3b107fb --- /dev/null +++ b/spk/python312/crossenv/requirements-yarl.txt @@ -0,0 +1,8 @@ +pip==24.3.1 +pip-tools==7.4.1 +setuptools==75.4.0 +build==1.2.2 +wheel==0.45.0 +# +Cython==3.0.11 +expandvars==0.12.0 diff --git a/spk/python313/crossenv/requirements-default.txt b/spk/python313/crossenv/requirements-default.txt new file mode 100644 index 00000000000..9400a96724e --- /dev/null +++ b/spk/python313/crossenv/requirements-default.txt @@ -0,0 +1,19 @@ +pip==24.3.1 +pip-tools==7.4.1 +setuptools==75.4.0 +build==1.2.2 +wheel==0.45.0 +# +cffi==1.17.1 +cryptography==43.0.3 +Cython==3.0.11 +flit==3.10.1 +maturin==1.7.4 +meson-python==0.17.1 +msgpack==1.0.5 +poetry==1.8.4 +scikit-build==0.18.1 +scikit-build-core==0.10.7 +setuptools-rust==1.10.2 +setuptools-scm==8.1.0 +typing_extensions==4.12.2 diff --git a/spk/python313/crossenv/requirements-frozenlist.txt b/spk/python313/crossenv/requirements-frozenlist.txt new file mode 100644 index 00000000000..4edc3b107fb --- /dev/null +++ b/spk/python313/crossenv/requirements-frozenlist.txt @@ -0,0 +1,8 @@ +pip==24.3.1 +pip-tools==7.4.1 +setuptools==75.4.0 +build==1.2.2 +wheel==0.45.0 +# +Cython==3.0.11 +expandvars==0.12.0 diff --git a/spk/python313/crossenv/requirements-numpy-1.22.4.txt b/spk/python313/crossenv/requirements-numpy-1.22.4.txt new file mode 100644 index 00000000000..e740501ce2d --- /dev/null +++ b/spk/python313/crossenv/requirements-numpy-1.22.4.txt @@ -0,0 +1,14 @@ +pip==23.2.1 +setuptools==63.4.3 +wheel==0.41.2 +# +cffi==1.15.1 +cryptography==41.0.3 +Cython==0.29.36 +flit==3.9.0 +maturin==1.2.3 +msgpack==1.0.5 +poetry==1.6.1 +scikit-build==0.17.6 +setuptools-rust==1.7.0 +setuptools-scm==7.1.0 diff --git a/spk/python313/crossenv/requirements-numpy-1.24.4.txt b/spk/python313/crossenv/requirements-numpy-1.24.4.txt new file mode 100644 index 00000000000..e740501ce2d --- /dev/null +++ b/spk/python313/crossenv/requirements-numpy-1.24.4.txt @@ -0,0 +1,14 @@ +pip==23.2.1 +setuptools==63.4.3 +wheel==0.41.2 +# +cffi==1.15.1 +cryptography==41.0.3 +Cython==0.29.36 +flit==3.9.0 +maturin==1.2.3 +msgpack==1.0.5 +poetry==1.6.1 +scikit-build==0.17.6 +setuptools-rust==1.7.0 +setuptools-scm==7.1.0 diff --git a/spk/python313/crossenv/requirements-numpy-1.25.1.txt b/spk/python313/crossenv/requirements-numpy-1.25.1.txt new file mode 100644 index 00000000000..e740501ce2d --- /dev/null +++ b/spk/python313/crossenv/requirements-numpy-1.25.1.txt @@ -0,0 +1,14 @@ +pip==23.2.1 +setuptools==63.4.3 +wheel==0.41.2 +# +cffi==1.15.1 +cryptography==41.0.3 +Cython==0.29.36 +flit==3.9.0 +maturin==1.2.3 +msgpack==1.0.5 +poetry==1.6.1 +scikit-build==0.17.6 +setuptools-rust==1.7.0 +setuptools-scm==7.1.0 diff --git a/spk/python313/crossenv/requirements-pydantic_core.txt b/spk/python313/crossenv/requirements-pydantic_core.txt new file mode 100644 index 00000000000..aab8e3a040e --- /dev/null +++ b/spk/python313/crossenv/requirements-pydantic_core.txt @@ -0,0 +1,10 @@ +pip==24.3.1 +pip-tools==7.4.1 +setuptools==75.4.0 +build==1.2.2 +wheel==0.45.0 +# +# [pydantic_core] depends on Cython < 3.x +Cython==0.29.37 +maturin==1.7.4 +typing_extensions==4.12.2 diff --git a/spk/python313/crossenv/requirements-yarl.txt b/spk/python313/crossenv/requirements-yarl.txt new file mode 100644 index 00000000000..4edc3b107fb --- /dev/null +++ b/spk/python313/crossenv/requirements-yarl.txt @@ -0,0 +1,8 @@ +pip==24.3.1 +pip-tools==7.4.1 +setuptools==75.4.0 +build==1.2.2 +wheel==0.45.0 +# +Cython==3.0.11 +expandvars==0.12.0 From 3ddf5418360d28691a93ddb26742bb5e65f8fd0a Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Sun, 5 Jan 2025 20:57:01 +0000 Subject: [PATCH 118/130] python311-wheels: Update numpy requirements Numpy fails to build starting with version >= 1.26. May require to be migrated to use cross/numpy with proper wheel building including meson toolchain file parameter passing. --- .../src/requirements-crossenv-numpy.txt | 9 +++++---- .../crossenv/requirements-numpy-1.22.4.txt | 7 ------- .../crossenv/requirements-numpy-1.24.4.txt | 7 ------- .../crossenv/requirements-numpy-1.25.1.txt | 14 -------------- .../crossenv/requirements-numpy-1.25.2.txt | 7 +++++++ .../crossenv/requirements-numpy-1.26.4.txt | 5 +++++ 6 files changed, 17 insertions(+), 32 deletions(-) delete mode 100644 spk/python311/crossenv/requirements-numpy-1.25.1.txt create mode 100644 spk/python311/crossenv/requirements-numpy-1.25.2.txt create mode 100644 spk/python311/crossenv/requirements-numpy-1.26.4.txt diff --git a/spk/python311-wheels/src/requirements-crossenv-numpy.txt b/spk/python311-wheels/src/requirements-crossenv-numpy.txt index 60f1dd705bd..3e96eb87910 100644 --- a/spk/python311-wheels/src/requirements-crossenv-numpy.txt +++ b/spk/python311-wheels/src/requirements-crossenv-numpy.txt @@ -6,11 +6,12 @@ # [numpy] # - Require Cython in cross/python310 crossenv -# - Numpy 1.25.x require c++17 -# - Numpy 1.26.x requires: +# - Numpy >= 1.25.x require c++17 +# - Numpy >= 1.26.x requires: <-- FAIILS to build # c++17, meson-python, scikit-build-core numpy==1.24.4 -numpy==1.25.1 +numpy==1.25.2 #numpy==1.26.4 #numpy==2.0.2 -numpy==2.1.3 +#numpy==2.1.3 +#numpy==2.2.1 diff --git a/spk/python311/crossenv/requirements-numpy-1.22.4.txt b/spk/python311/crossenv/requirements-numpy-1.22.4.txt index e740501ce2d..2268dcdffc4 100644 --- a/spk/python311/crossenv/requirements-numpy-1.22.4.txt +++ b/spk/python311/crossenv/requirements-numpy-1.22.4.txt @@ -2,13 +2,6 @@ pip==23.2.1 setuptools==63.4.3 wheel==0.41.2 # -cffi==1.15.1 -cryptography==41.0.3 Cython==0.29.36 -flit==3.9.0 -maturin==1.2.3 -msgpack==1.0.5 -poetry==1.6.1 scikit-build==0.17.6 -setuptools-rust==1.7.0 setuptools-scm==7.1.0 diff --git a/spk/python311/crossenv/requirements-numpy-1.24.4.txt b/spk/python311/crossenv/requirements-numpy-1.24.4.txt index e740501ce2d..2268dcdffc4 100644 --- a/spk/python311/crossenv/requirements-numpy-1.24.4.txt +++ b/spk/python311/crossenv/requirements-numpy-1.24.4.txt @@ -2,13 +2,6 @@ pip==23.2.1 setuptools==63.4.3 wheel==0.41.2 # -cffi==1.15.1 -cryptography==41.0.3 Cython==0.29.36 -flit==3.9.0 -maturin==1.2.3 -msgpack==1.0.5 -poetry==1.6.1 scikit-build==0.17.6 -setuptools-rust==1.7.0 setuptools-scm==7.1.0 diff --git a/spk/python311/crossenv/requirements-numpy-1.25.1.txt b/spk/python311/crossenv/requirements-numpy-1.25.1.txt deleted file mode 100644 index e740501ce2d..00000000000 --- a/spk/python311/crossenv/requirements-numpy-1.25.1.txt +++ /dev/null @@ -1,14 +0,0 @@ -pip==23.2.1 -setuptools==63.4.3 -wheel==0.41.2 -# -cffi==1.15.1 -cryptography==41.0.3 -Cython==0.29.36 -flit==3.9.0 -maturin==1.2.3 -msgpack==1.0.5 -poetry==1.6.1 -scikit-build==0.17.6 -setuptools-rust==1.7.0 -setuptools-scm==7.1.0 diff --git a/spk/python311/crossenv/requirements-numpy-1.25.2.txt b/spk/python311/crossenv/requirements-numpy-1.25.2.txt new file mode 100644 index 00000000000..2268dcdffc4 --- /dev/null +++ b/spk/python311/crossenv/requirements-numpy-1.25.2.txt @@ -0,0 +1,7 @@ +pip==23.2.1 +setuptools==63.4.3 +wheel==0.41.2 +# +Cython==0.29.36 +scikit-build==0.17.6 +setuptools-scm==7.1.0 diff --git a/spk/python311/crossenv/requirements-numpy-1.26.4.txt b/spk/python311/crossenv/requirements-numpy-1.26.4.txt new file mode 100644 index 00000000000..1e314bd472f --- /dev/null +++ b/spk/python311/crossenv/requirements-numpy-1.26.4.txt @@ -0,0 +1,5 @@ +Cython==3.0.11 +meson-python==0.17.1 +scikit-build==0.18.1 +scikit-build-core==0.10.7 +setuptools-scm==8.1.0 From 883f7dec2ddeaf8683613f84cf10e6aa8f2bf71a Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Sun, 5 Jan 2025 21:01:39 +0000 Subject: [PATCH 119/130] python-wheels: Cleanups and comment regarding late WHEELS definitions --- spk/python311-wheels/Makefile | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/spk/python311-wheels/Makefile b/spk/python311-wheels/Makefile index 9581caa9c85..4e788f243de 100644 --- a/spk/python311-wheels/Makefile +++ b/spk/python311-wheels/Makefile @@ -26,8 +26,11 @@ LICENSE = PSF # Enable debug_info symgols #GCC_DEBUG_INFO := 1 -WHEELS = src/requirements-crossenv.txt -WHEELS += src/requirements-abi3.txt +WHEELS = src/requirements-abi3.txt +WHEELS += src/requirements-crossenv.txt +WHEELS += src/requirements-pure.txt + +include ../../mk/spksrc.common.mk # [borgbackup] # Use OpenSSL path as defined by either @@ -83,8 +86,6 @@ ENV += SODIUM_INSTALL=system # [PyYAML] DEPENDS += cross/libyaml -include ../../mk/spksrc.common.mk - # [rpds-py] # maturin canot be built as pre-requisite crossenv ifneq ($(findstring $(ARCH),$(ARMv5_ARCHS)),$(ARCH)) @@ -93,6 +94,13 @@ WHEELS += src/requirements-crossenv-rpds-py.txt ENV += PATH=$(WORK_DIR)/crossenv/build/bin:$(PATH) endif +## +## Addition of requirements files beyond spksrc.python.mk +## will not be taken into consideration for processing +## unless WHEELS has been previously populated. This is due to +## the makefile analysis phase which discard ifeq instructions. +## + include ../../mk/spksrc.python.mk # [greenlet] @@ -150,7 +158,3 @@ WHEELS_CFLAGS += [pydantic_core] -std=c99 endif # Requires path to maturin from crossenv ENV += PATH=$(WORK_DIR)/crossenv/build/bin:$(PATH) - -# [rpds-py] -# Requires path to maturin from crossenv -ENV += PATH=$(WORK_DIR)/crossenv/build/bin:$(PATH) From 62600f1eb225315c9fade9361bd79c1d410db566 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Sun, 5 Jan 2025 21:03:56 +0000 Subject: [PATCH 120/130] python-wheels: Add pure python wheel serving as example --- .../src/requirements-pure.txt | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 spk/python311-wheels/src/requirements-pure.txt diff --git a/spk/python311-wheels/src/requirements-pure.txt b/spk/python311-wheels/src/requirements-pure.txt new file mode 100644 index 00000000000..617e77197ba --- /dev/null +++ b/spk/python311-wheels/src/requirements-pure.txt @@ -0,0 +1,29 @@ +# basic default wheels +# ==> Always install latest version (service-setup.sh:install_python_virtualenv) +pip==24.3.1 +setuptools==75.6.0 +wheel==0.45.1 + +# Always use latest version available +# certifi==2024.8.30 +certifi + +# Mandatory for python application +# to create their local virtualenv +# in order to install wheels within +# their running environment +virtualenv==20.28.0 + +# Other mandatory wheels that +# gets install by default as +# basic dependencies of above +distlib==0.3.9 +filelock==3.16.1 +platformdirs==4.3.6 +six==1.16.0 + +## +## All configurations below are optional and +## are provided to demonstrate how to build +## various wheels. Uncoment to enable. +## From 3f5f44968642cb3c503611f6a05eeb87f1f4d361 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Sun, 5 Jan 2025 21:04:19 +0000 Subject: [PATCH 121/130] spksrc.wheel.mk: Numerous cleanups & reduced shell calls --- mk/spksrc.wheel.mk | 167 +++++++++++++++++++++++---------------------- 1 file changed, 86 insertions(+), 81 deletions(-) diff --git a/mk/spksrc.wheel.mk b/mk/spksrc.wheel.mk index 8c78cdb58f0..933c89c3823 100644 --- a/mk/spksrc.wheel.mk +++ b/mk/spksrc.wheel.mk @@ -44,9 +44,23 @@ else $(POST_WHEEL_TARGET): $(WHEEL_TARGET) endif +wheel_msg_target: + @$(MSG) "Processing wheels of $(NAME)" + wheeldownload: SHELL:=/bin/bash wheeldownload: +ifeq ($(wildcard $(PIP_DISTRIB_DIR)),) + @$(MSG) Creating pip download directory: $(PIP_DISTRIB_DIR) @mkdir -p $(PIP_DISTRIB_DIR) +else + @$(MSG) Using existing pip download directory: $(PIP_DISTRIB_DIR) +endif +ifeq ($(wildcard $(PIP_CACHE_DIR)),) + @$(MSG) Creating pip caching directory: $(PIP_CACHE_DIR) + @mkdir -p $(PIP_CACHE_DIR) +else + @$(MSG) Using existing pip cache directory: $(PIP_CACHE_DIR) +endif @if [ -n "$(WHEELS)" ] ; then \ for wheel in $(WHEELS_2_DOWNLOAD) ; do \ $(MSG) "Downloading wheels from $$wheel ..." ; \ @@ -100,9 +114,6 @@ wheeldownload: $(MSG) "No wheels to download for [$(SPK_NAME)]" ; \ fi -wheel_msg_target: - @$(MSG) "Processing wheels of $(NAME)" - # # PIP_CACHE_OPT defaults to "--cache-dir $(PIP_CACHE_DIR)" # PIP_CACHE_DIR defaults to $(WORK_DIR)/pip @@ -116,31 +127,28 @@ wheel_msg_target: # it actually used a cache built from x64-7.1 # pre_wheel_target: wheel_msg_target wheeldownload -ifneq ($(strip $(WHEELS)),) - @if [ -n "$(PIP_CACHE_OPT)" ] ; then \ - mkdir -p $(PIP_CACHE_DIR) ; \ - fi; \ - mkdir -p $(WHEELHOUSE) ; \ - for wheel in $(WHEELS) ; do \ - if [ -f $$wheel ] ; then \ - if [ $$(basename $$wheel) = $(WHEELS_PURE_PYTHON) ]; then \ - $(MSG) "Adding existing $$wheel file as pure-python (discarding any cross-compiled)" ; \ - sed -e '/^cross:\|^#\|^$$/d' -e /^pure:/s/^pure://g $$wheel >> $(WHEELHOUSE)/$(WHEELS_PURE_PYTHON) ; \ - elif [ $$(basename $$wheel) = $(WHEELS_CROSSENV_COMPILE) ]; then \ - $(MSG) "Adding existing $$wheel file as cross-compiled (discarding any pure-python)" ; \ - sed -e '/^pure:\|^#\|^$$/d' -e /^cross:/s/^cross://g $$wheel >> $(WHEELHOUSE)/$(WHEELS_CROSSENV_COMPILE) ; \ - elif [ $$(basename $$wheel) = $(WHEELS_LIMITED_API) ]; then \ - $(MSG) "Adding existing $$wheel file as ABI-limited" ; \ - sed -e '/^#\|^$$/d' $$wheel >> $(WHEELHOUSE)/$(WHEELS_LIMITED_API) ; \ - else \ - $(MSG) "Adapting existing $$wheel file" ; \ - sed -rn /^pure:/s/^pure://gp $$wheel >> $(WHEELHOUSE)/$(WHEELS_PURE_PYTHON) ; \ - sed -rn /^cross:/s/^cross://gp $$wheel >> $(WHEELHOUSE)/$(WHEELS_CROSSENV_COMPILE) ; \ - sed -e '/^pure:\|^cross:\|^#\|^$$/d' $$wheel >> $(WHEELHOUSE)/$(WHEELS_DEFAULT_REQUIREMENT) ; \ - fi ;\ +ifneq ($(wildcard $(abspath $(addprefix $(WORK_DIR)/../,$(WHEELS)))),) +ifeq ($(wildcard $(WHEELHOUSE)),) + @$(MSG) Creating wheelhouse directory: $(WHEELHOUSE) + @mkdir -p $(WHEELHOUSE) +else + @$(MSG) Using existing wheelhouse directory: $(WHEELHOUSE) +endif + @$(MSG) Processing requirement files: + @for wheel in $(WHEELS) ; do \ + if [ $$(basename $$wheel) = $(WHEELS_PURE_PYTHON) ]; then \ + echo "===> Adding $$wheel as pure-python (wheelhouse/$(WHEELS_PURE_PYTHON))" ; \ + sed -e '/^[[:blank:]]*$$\|^#/d' $$wheel >> $(WHEELHOUSE)/$(WHEELS_PURE_PYTHON) ; \ + elif [ $$(basename $$wheel) = $(WHEELS_CROSSENV_COMPILE) ]; then \ + echo "===> Adding $$wheel as cross-compiled (wheelhouse/$(WHEELS_CROSSENV_COMPILE))" ; \ + sed -e '/^[[:blank:]]*$$\|^#/d' $$wheel >> $(WHEELHOUSE)/$(WHEELS_CROSSENV_COMPILE) ; \ + elif [ $$(basename $$wheel) = $(WHEELS_LIMITED_API) ]; then \ + echo "===> Adding $$wheel as ABI-limited (wheelhouse/$(WHEELS_LIMITED_API))" ; \ + sed -e '/^[[:blank:]]*$$\|^#/d' $$wheel >> $(WHEELHOUSE)/$(WHEELS_LIMITED_API) ; \ else \ - $(MSG) "ERROR: File $$wheel does not exist" ; \ - fi ; \ + echo "===> Adding $$wheel to default (wheelhouse/$(WHEELS_DEFAULT_REQUIREMENT))" ; \ + sed -e '/^[[:blank:]]*$$\|^#/d' $$wheel >> $(WHEELHOUSE)/$(WHEELS_DEFAULT_REQUIREMENT) ; \ + fi ;\ done @for file in $$(ls -1 $(WHEELHOUSE)/requirements-*.txt) ; do \ sort -u -o $${file}{,} ; \ @@ -148,61 +156,59 @@ ifneq ($(strip $(WHEELS)),) endif # Build cross compiled wheels first, to fail fast. -# There might be an issue with some pure python wheels when built after that. build_wheel_target: SHELL:=/bin/bash build_wheel_target: $(PRE_WHEEL_TARGET) -ifneq ($(strip $(WHEELS)),) - @if [ -s $(WHEELHOUSE)/$(WHEELS_CROSSENV_COMPILE) -o -s $(WHEELHOUSE)/$(WHEELS_LIMITED_API) ]; then \ - while IFS= read -r requirement ; do \ - wheel=$${requirement#*:} ; \ - file=$$(basename $${requirement%%:*}) ; \ - [ "$$(grep -s egg <<< $${wheel})" ] && name=$$(echo $${wheel#*egg=} | cut -f1 -d=) || name=$${wheel%%[<>=]=*} ; \ - version=$$(echo $${requirement#*[<>=]=} | cut -f1 -d' ') ; \ - $(MSG) "WHEEL=\"$${name}-$${version}\" $(MAKE) crossenv-$(ARCH)-$(TCVERSION)" ; \ - MAKEFLAGS= WHEEL="$${name}-$${version}" $(MAKE) crossenv-$(ARCH)-$(TCVERSION) ; \ - for crossenv in $(WORK_DIR)/crossenv-$${name}-$${version} $(WORK_DIR)/crossenv-$${name} $(WORK_DIR)/crossenv ; do \ - [ -d $${crossenv} ] && . $${crossenv}/build/python-cc.mk && break ; \ - done ; \ - crossenvPIP=$(PIP) ; \ - $(MSG) "WHEEL: activate crossenv found: $${CROSSENV}" ; \ - if [ -s "$${CROSSENV}" ] ; then \ - crossenvPIP=$$(. $${CROSSENV} && which pip) ; \ - $(MSG) "Python crossenv found: [$${CROSSENV}]" ; \ - $(MSG) "pip crossenv found: [$${crossenvPIP}]" ; \ - elif [ "$${PYTHON_VERSION}" != "2.7" ] ; then \ - $(MSG) "WARNING: Python crossenv NOT found!" ; \ - $(MSG) "WARNING: pip crossenv NOT found!" ; \ - else \ - $(MSG) "Python $${PYTHON_VERSION} uses pip: $${crossenvPIP}" ; \ - fi ; \ - $(MSG) "Cross-compiling [$${wheel%% *}] wheel using $${CROSSENV_PATH}" ; \ - [ "$${file}" = "$(WHEELS_LIMITED_API)" ] && abi3="--build-option=--py-limited-api=$(PYTHON_LIMITED_API)" || abi3="" ; \ - global_options=$$(echo $(WHEELS_BUILD_ARGS) | sed -e 's/ \[/\n\[/g' | grep -i $${name} | cut -f2 -d] | xargs) ; \ - localCFLAGS=($$(echo $(WHEELS_CFLAGS) | sed -e 's/ \[/\n\[/g' | grep -i $${name} | cut -f2 -d] | xargs)) ; \ - localLDFLAGS=($$(echo $(WHEELS_LDFLAGS) | sed -e 's/ \[/\n\[/g' | grep -i $${name} | cut -f2 -d] | xargs)) ; \ - localCPPFLAGS=($$(echo $(WHEELS_CPPFLAGS) | sed -e 's/ \[/\n\[/g' | grep -i $${name} | cut -f2 -d] | xargs)) ; \ - localCXXFLAGS=($$(echo $(WHEELS_CXXFLAGS) | sed -e 's/ \[/\n\[/g' | grep -i $${name} | cut -f2 -d] | xargs)) ; \ - $(MSG) [$${name}] \ - $$([ "$$(echo $${localCFLAGS[@]})" ] && echo "CFLAGS=\"$${localCFLAGS[@]}\" ") \ - $$([ "$$(echo $${localCPPFLAGS[@]})" ] && echo "CPPFLAGS=\"$${localCPPFLAGS[@]}\" ") \ - $$([ "$$(echo $${localCXXFLAGS[@]})" ] && echo "CXXFLAGS=\"$${localCXXFLAGS[@]}\" ") \ - $$([ "$$(echo $${localLDFLAGS[@]})" ] && echo "LDFLAGS=\"$${localLDFLAGS[@]}\" ") \ - $$([ "$$(echo $${abi3})" ] && echo "$${abi3} ")" \ - $${global_options}" ; \ - PIP_CROSSENV=$${crossenvPIP} \ - REQUIREMENT=$$(echo $${wheel%% *}) \ - ADDITIONAL_CFLAGS="-I$(STAGING_INSTALL_PREFIX)/$(PYTHON_INC_DIR) $${localCFLAGS[@]}" \ - ADDITIONAL_CPPFLAGS="-I$(STAGING_INSTALL_PREFIX)/$(PYTHON_INC_DIR) $${localCPPFLAGS[@]}" \ - ADDITIONAL_CXXFLAGS="-I$(STAGING_INSTALL_PREFIX)/$(PYTHON_INC_DIR) $${localCXXFLAGS[@]}" \ - ADDITIONAL_LDFLAGS="$${localLDFLAGS[@]}" \ - ABI3="$${abi3}" \ - PIP_GLOBAL_OPTION="$${global_options}" \ - $(MAKE) \ - cross-compile-wheel-$${name} || exit 1 ; \ - done < <(grep -svH -e "^\#" -e "^\$$" $(WHEELHOUSE)/$(WHEELS_CROSSENV_COMPILE) $(WHEELHOUSE)/$(WHEELS_LIMITED_API)) ; \ - else \ - $(MSG) "[SKIP] Cross-compiling wheels" ; \ - fi +ifneq ($(wildcard $(abspath $(addprefix $(WORK_DIR)/../,$(patsubst %-pure.txt,,$(WHEELS))))),) + @while IFS= read -r requirement ; do \ + wheel=$${requirement#*:} ; \ + file=$$(basename $${requirement%%:*}) ; \ + [ "$$(grep -s egg <<< $${wheel})" ] && name=$$(echo $${wheel#*egg=} | cut -f1 -d=) || name=$${wheel%%[<>=]=*} ; \ + version=$$(echo $${requirement#*[<>=]=} | cut -f1 -d' ') ; \ + $(MSG) "WHEEL=\"$${name}-$${version}\" $(MAKE) crossenv-$(ARCH)-$(TCVERSION)" ; \ + MAKEFLAGS= WHEEL="$${name}-$${version}" $(MAKE) crossenv-$(ARCH)-$(TCVERSION) ; \ + for crossenv in $(WORK_DIR)/crossenv-$${name}-$${version} $(WORK_DIR)/crossenv-$${name} $(WORK_DIR)/crossenv ; do \ + [ -d $${crossenv} ] && . $${crossenv}/build/python-cc.mk && break ; \ + done ; \ + crossenvPIP=$(PIP) ; \ + $(MSG) "WHEEL: activate crossenv found: $${CROSSENV}" ; \ + if [ -s "$${CROSSENV}" ] ; then \ + crossenvPIP=$$(. $${CROSSENV} && which pip) ; \ + $(MSG) "Python crossenv found: [$${CROSSENV}]" ; \ + $(MSG) "pip crossenv found: [$${crossenvPIP}]" ; \ + elif [ "$${PYTHON_VERSION}" != "2.7" ] ; then \ + $(MSG) "WARNING: Python crossenv NOT found!" ; \ + $(MSG) "WARNING: pip crossenv NOT found!" ; \ + else \ + $(MSG) "Python $${PYTHON_VERSION} uses pip: $${crossenvPIP}" ; \ + fi ; \ + $(MSG) "Cross-compiling [$${wheel%% *}] wheel using $${CROSSENV_PATH}" ; \ + [ "$${file}" = "$(WHEELS_LIMITED_API)" ] && abi3="--build-option=--py-limited-api=$(PYTHON_LIMITED_API)" || abi3="" ; \ + global_options=$$(echo $(WHEELS_BUILD_ARGS) | sed -e 's/ \[/\n\[/g' | grep -i $${name} | cut -f2 -d] | xargs) ; \ + localCFLAGS=($$(echo $(WHEELS_CFLAGS) | sed -e 's/ \[/\n\[/g' | grep -i $${name} | cut -f2 -d] | xargs)) ; \ + localLDFLAGS=($$(echo $(WHEELS_LDFLAGS) | sed -e 's/ \[/\n\[/g' | grep -i $${name} | cut -f2 -d] | xargs)) ; \ + localCPPFLAGS=($$(echo $(WHEELS_CPPFLAGS) | sed -e 's/ \[/\n\[/g' | grep -i $${name} | cut -f2 -d] | xargs)) ; \ + localCXXFLAGS=($$(echo $(WHEELS_CXXFLAGS) | sed -e 's/ \[/\n\[/g' | grep -i $${name} | cut -f2 -d] | xargs)) ; \ + $(MSG) [$${name}] \ + $$([ "$$(echo $${localCFLAGS[@]})" ] && echo "CFLAGS=\"$${localCFLAGS[@]}\" ") \ + $$([ "$$(echo $${localCPPFLAGS[@]})" ] && echo "CPPFLAGS=\"$${localCPPFLAGS[@]}\" ") \ + $$([ "$$(echo $${localCXXFLAGS[@]})" ] && echo "CXXFLAGS=\"$${localCXXFLAGS[@]}\" ") \ + $$([ "$$(echo $${localLDFLAGS[@]})" ] && echo "LDFLAGS=\"$${localLDFLAGS[@]}\" ") \ + $$([ "$$(echo $${abi3})" ] && echo "$${abi3} ")" \ + $${global_options}" ; \ + PIP_CROSSENV=$${crossenvPIP} \ + REQUIREMENT=$$(echo $${wheel%% *}) \ + ADDITIONAL_CFLAGS="-I$(STAGING_INSTALL_PREFIX)/$(PYTHON_INC_DIR) $${localCFLAGS[@]}" \ + ADDITIONAL_CPPFLAGS="-I$(STAGING_INSTALL_PREFIX)/$(PYTHON_INC_DIR) $${localCPPFLAGS[@]}" \ + ADDITIONAL_CXXFLAGS="-I$(STAGING_INSTALL_PREFIX)/$(PYTHON_INC_DIR) $${localCXXFLAGS[@]}" \ + ADDITIONAL_LDFLAGS="$${localLDFLAGS[@]}" \ + ABI3="$${abi3}" \ + PIP_GLOBAL_OPTION="$${global_options}" \ + $(MAKE) \ + cross-compile-wheel-$${name} || exit 1 ; \ + done < <(grep -svH -e "^\#" -e "^\$$" $(wildcard $(abspath $(addprefix $(WORK_DIR)/../,$(patsubst %-pure.txt,,$(WHEELS)))))) +else + @$(MSG) "[SKIP] Cross-compiling wheels" +endif ifneq ($(filter 1 ON TRUE,$(WHEELS_PURE_PYTHON_PACKAGING_ENABLE)),) @if [ -s "$(WHEELHOUSE)/$(WHEELS_PURE_PYTHON)" ]; then \ $(MSG) "Building pure-python" ; \ @@ -215,7 +221,6 @@ ifneq ($(filter 1 ON TRUE,$(WHEELS_PURE_PYTHON_PACKAGING_ENABLE)),) else @$(MSG) "[SKIP] Building pure-python" endif -endif # PATH modified to access native/python* linked to crossenv-/build/bin # this also provides access to maturin and its dependencies needed for building wheels From fa2b1bfec0f98bf45413b0d5dc8d5e0dbc0aafa9 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Mon, 6 Jan 2025 02:10:10 +0000 Subject: [PATCH 122/130] python311-wheels: Fix numpy for x64 DSM-7.1 Fails to build numpy 1.25.2 but ok with 1.25.1 --- spk/python311-wheels/Makefile | 5 +++++ .../requirements-crossenv-numpy-gcc85-x64.txt | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 spk/python311-wheels/src/requirements-crossenv-numpy-gcc85-x64.txt diff --git a/spk/python311-wheels/Makefile b/spk/python311-wheels/Makefile index 4e788f243de..3c7bc6ec97e 100644 --- a/spk/python311-wheels/Makefile +++ b/spk/python311-wheels/Makefile @@ -124,9 +124,14 @@ else ifeq ($(call version_le, $(TC_GCC), 5.0),1) WHEELS += src/requirements-crossenv-numpy-gcc4.txt # [numpy] >= 1.25.0 requires c++17 else ifeq ($(call version_gt, $(TC_GCC), 5.0),1) +# BUG numpy==1.25.2 only on x86_64 gcc-8.5.0 DSM-7.1 -> Fallback to 1.25.1 +ifeq ($(findstring $(ARCH),$(x64_ARCHS)),$(ARCH)) +WHEELS += src/requirements-crossenv-numpy-gcc85-x64.txt +else WHEELS += src/requirements-crossenv-numpy.txt endif endif +endif # workaround for compiler bug: # https://github.com/numpy/numpy/issues/13622 diff --git a/spk/python311-wheels/src/requirements-crossenv-numpy-gcc85-x64.txt b/spk/python311-wheels/src/requirements-crossenv-numpy-gcc85-x64.txt new file mode 100644 index 00000000000..dfc8a75442c --- /dev/null +++ b/spk/python311-wheels/src/requirements-crossenv-numpy-gcc85-x64.txt @@ -0,0 +1,18 @@ +## +## All configurations below are optional and +## are provided to demonstrate how to build +## various wheels. Uncoment to enable. +## + +# [numpy] +# - Require Cython in cross/python310 crossenv +# - Numpy >= 1.25.x require c++17 +# - Numpy >= 1.26.x requires: <-- FAIILS to build +# c++17, meson-python, scikit-build-core +numpy==1.24.4 +numpy==1.25.1 +#numpy==1.25.2 <<-- FAILS only on x86_64 with GCC-8.5 (DSM-7.1) +#numpy==1.26.4 +#numpy==2.0.2 +#numpy==2.1.3 +#numpy==2.2.1 From ad092552fb90f60feadc34af309deb6150060000 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Mon, 6 Jan 2025 02:11:20 +0000 Subject: [PATCH 123/130] python311: Add crossenv definition for numpy-1.25.1 for x64 DSM-7.1 --- spk/python311/crossenv/requirements-numpy-1.25.1.txt | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 spk/python311/crossenv/requirements-numpy-1.25.1.txt diff --git a/spk/python311/crossenv/requirements-numpy-1.25.1.txt b/spk/python311/crossenv/requirements-numpy-1.25.1.txt new file mode 100644 index 00000000000..2268dcdffc4 --- /dev/null +++ b/spk/python311/crossenv/requirements-numpy-1.25.1.txt @@ -0,0 +1,7 @@ +pip==23.2.1 +setuptools==63.4.3 +wheel==0.41.2 +# +Cython==0.29.36 +scikit-build==0.17.6 +setuptools-scm==7.1.0 From bd4f26da2fbe4ca5cc604dc3dbff8c62b668c92a Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Mon, 6 Jan 2025 02:12:03 +0000 Subject: [PATCH 124/130] python311-wheels: Extend Pillows dependencies webp, tiff, imagequant --- spk/python311-wheels/Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/spk/python311-wheels/Makefile b/spk/python311-wheels/Makefile index 3c7bc6ec97e..f7ec63a6580 100644 --- a/spk/python311-wheels/Makefile +++ b/spk/python311-wheels/Makefile @@ -63,12 +63,16 @@ ENV += MYSQLCLIENT_CFLAGS="$(CFLAGS) -I$(STAGING_INSTALL_PREFIX)/include/mysql - ENV += MYSQLCLIENT_LDFLAGS="$(LDFLAGS)" # [Pillow] -DEPENDS += cross/freetype cross/libjpeg cross/zlib +DEPENDS += cross/freetype cross/libimagequant cross/libjpeg +DEPENDS += cross/libtiff cross/libwebp cross/zlib WHEELS_BUILD_ARGS += [Pillow] WHEELS_BUILD_ARGS += build_ext WHEELS_BUILD_ARGS += --disable-platform-guessing WHEELS_BUILD_ARGS += --enable-freetype +WHEELS_BUILD_ARGS += --enable-imagequant WHEELS_BUILD_ARGS += --enable-jpeg +WHEELS_BUILD_ARGS += --enable-tiff +WHEELS_BUILD_ARGS += --enable-webp WHEELS_BUILD_ARGS += --enable-zlib # [pycares] From 4e246e95aaf992b1a1330c8083a0636bd80a289b Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Mon, 6 Jan 2025 23:10:36 +0000 Subject: [PATCH 125/130] wheel.mk: Remove unused PATH and LD_LIBRARY_PATH to cross building --- mk/spksrc.wheel.mk | 7 ------- 1 file changed, 7 deletions(-) diff --git a/mk/spksrc.wheel.mk b/mk/spksrc.wheel.mk index 933c89c3823..e9650383488 100644 --- a/mk/spksrc.wheel.mk +++ b/mk/spksrc.wheel.mk @@ -222,9 +222,6 @@ else @$(MSG) "[SKIP] Building pure-python" endif -# PATH modified to access native/python* linked to crossenv-/build/bin -# this also provides access to maturin and its dependencies needed for building wheels -# LD_LIBRARY_PATH modified to access native/python libraries so related binary works cross-compile-wheel-%: SHELL:=/bin/bash cross-compile-wheel-%: @if [ "$(PIP_GLOBAL_OPTION)" ]; then \ @@ -233,8 +230,6 @@ cross-compile-wheel-%: fi ; \ $(MSG) \ _PYTHON_HOST_PLATFORM="$(TC_TARGET)" \ - PATH="$(CROSSENV_PATH)/build/bin:$(PATH)" \ - LD_LIBRARY_PATH="$(abspath $(WORK_DIR)/../../../native/$(PYTHON_PKG_NAME)/work-native/install/usr/local/lib):$(LD_LIBRARY_PATH)" \ MESON_CROSS_FILE="$(MESON_TOOLCHAIN_WRK)" \ $(PIP_CROSSENV) \ $(PIP_WHEEL_ARGS_CROSSENV) \ @@ -244,8 +239,6 @@ cross-compile-wheel-%: $(REQUIREMENT) ; \ $(RUN) \ _PYTHON_HOST_PLATFORM="$(TC_TARGET)" \ - PATH="$(CROSSENV_PATH)/build/bin:$(PATH)" \ - LD_LIBRARY_PATH="$(abspath $(WORK_DIR)/../../../native/$(PYTHON_PKG_NAME)/work-native/install/usr/local/lib):$(LD_LIBRARY_PATH)" \ MESON_CROSS_FILE="$(MESON_TOOLCHAIN_WRK)" \ $(PIP_CROSSENV) \ $(PIP_WHEEL_ARGS_CROSSENV) \ From 830fd4677d810ff849dcf6284d164834a78fe16b Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Tue, 7 Jan 2025 02:46:48 +0000 Subject: [PATCH 126/130] deluge: Update to latest wheel versions --- spk/deluge/Makefile | 13 +++------ spk/deluge/src/requirements-crossenv.txt | 10 +++---- spk/deluge/src/requirements-pure.txt | 34 ++++++++++++------------ 3 files changed, 25 insertions(+), 32 deletions(-) diff --git a/spk/deluge/Makefile b/spk/deluge/Makefile index 18f16a6f2ba..70b5699fc52 100644 --- a/spk/deluge/Makefile +++ b/spk/deluge/Makefile @@ -1,6 +1,6 @@ SPK_NAME = deluge -SPK_VERS = 2.1.1.61 -SPK_REV = 23 +SPK_VERS = 2.1.1.127 +SPK_REV = 24 SPK_ICON = src/deluge.png PYTHON_PACKAGE = python311 @@ -15,7 +15,7 @@ MAINTAINER = SynoCommunity DESCRIPTION = Deluge is a cross platform BitTorrent client, based on libtorrent rasterbar. This package integrates both the deluge deamon \(deluged\), as well as its web counterpart \(deluge-web\), which serves the deluge web UI. DESCRIPTION_FRE = Deluge est un client BitTorrent multi-plateforme, basé sur libtorrent rasterbar. Ce paquet intègre à la fois le démon deluge \(deluged\) ainsi que son penchant web \(deluge-web\), desservant l\'interface utilisateur web deluge. STARTABLE = yes -CHANGELOG = "1. Update to latest github development commit
2. Update to libtorrent 2.0.10" +CHANGELOG = "1. Update to latest github development commit
2. Update to libtorrent 2.0.10
3. Update all other wheels" DISPLAY_NAME = Deluge HOMEPAGE = https://deluge-torrent.org @@ -38,13 +38,6 @@ ADMIN_PORT = $(SERVICE_PORT) POST_STRIP_TARGET = deluge_extra_install -# [cryptography] -# To generate py36-abi3 limited API -DEPENDS += cross/cryptography - -# [rencode] -PYTHON_LIMITED_API=cp36 - include ../../mk/spksrc.python.mk # [libtorrent] diff --git a/spk/deluge/src/requirements-crossenv.txt b/spk/deluge/src/requirements-crossenv.txt index 84b59626879..03b533cc060 100644 --- a/spk/deluge/src/requirements-crossenv.txt +++ b/spk/deluge/src/requirements-crossenv.txt @@ -11,11 +11,11 @@ git+https://github.com/deluge-torrent/deluge.git@8df36c454be320571005231a1c77ced # [rencode] 1.0.6 ==> abi3 -cffi==1.15.1 -#cryptography==41.0.1 ==> cross/cryptography (py36-abi3) +cffi==1.17.1 +cryptography==44.0.0 GeoIP==1.3.2 -MarkupSafe==2.1.3 -zope.interface==6.0 +MarkupSafe==3.0.2 +zope.interface==7.2 # [libtorrent] 2.0.10 # Depends: openssl3, boost 1.82, geoip @@ -23,6 +23,6 @@ zope.interface==6.0 # BOOST_LIBRARIES # BOOST_BUILD_PATH # Only supported on DSM7 armv7, aarch64, x64 -git+https://github.com/arvidn/libtorrent.git@v2.0.9#egg=libtorrent==2.0.10 +git+https://github.com/arvidn/libtorrent.git@v2.0.10#egg=libtorrent==2.0.10 # Use RC_2_0 for latest development snapshots # git+https://github.com/arvidn/libtorrent.git@RC_2_0#egg=libtorrent==2.0.10 diff --git a/spk/deluge/src/requirements-pure.txt b/spk/deluge/src/requirements-pure.txt index 48c3e429071..1da7aced26e 100644 --- a/spk/deluge/src/requirements-pure.txt +++ b/spk/deluge/src/requirements-pure.txt @@ -5,22 +5,22 @@ #deluge==2.1.1 ==> Using crossenv when building dev version # Other requirements -attrs==23.1.0 -Automat==22.10.0 -chardet==5.1.0 -constantly==15.1.0 -#distlib==0.3.4 ==> python311 -#filelock==3.6.0 ==> python311 +attrs==24.3.0 +Automat==24.8.1 +chardet==5.2.0 +constantly==23.10.4 +#distlib ==> python311 +#filelock ==> python311 hyperlink==21.0.0 -idna==3.4 -incremental==22.10.0 -Mako==1.2.4 -pyasn1==0.5.0 -pyasn1-modules==0.3.0 -pycparser==2.21 -pyOpenSSL==23.2.0 +idna==3.10 +incremental==24.7.2 +Mako==1.3.8 +pyasn1==0.6.1 +pyasn1-modules==0.4.1 +pycparser==2.22 +pyOpenSSL==24.3.0 pyxdg==0.28 -service-identity==23.1.0 -#six==1.16.0 ==> python311 -Twisted==22.10.0 -typing_extensions==4.7.1 +service-identity==24.2.0 +#six ==> python311 +Twisted==24.11.0 +typing_extensions==4.12.2 From 69a00e5ca8626bb861c643bf3fdd1a60a8134ba9 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Tue, 7 Jan 2025 02:47:59 +0000 Subject: [PATCH 127/130] wheel.mk: pip build environment variable fixes + cleanups --- mk/spksrc.crossenv.mk | 6 ++-- mk/spksrc.directories.mk | 2 +- mk/spksrc.wheel.mk | 66 ++++++++++++++++++++++++---------------- 3 files changed, 44 insertions(+), 30 deletions(-) diff --git a/mk/spksrc.crossenv.mk b/mk/spksrc.crossenv.mk index 14a25cf3feb..b96f6d464f7 100644 --- a/mk/spksrc.crossenv.mk +++ b/mk/spksrc.crossenv.mk @@ -115,10 +115,10 @@ post_crossenv_target: $(CROSSENV_TARGET) crossenv-%: ifneq ($(filter error-%, $(CROSSENV_BUILD_WHEEL)),) @$(MSG) $(MAKE) $(CROSSENV_BUILD_WHEEL) - @$(MAKE) $(CROSSENV_BUILD_WHEEL) + @$(MAKE) $(CROSSENV_BUILD_WHEEL) --no-print-directory else @$(MSG) $(MAKE) ARCH=$(firstword $(subst -, ,$*)) TCVERSION=$(lastword $(subst -, ,$*)) WHEEL=$(CROSSENV_BUILD_WHEEL) crossenv - -@MAKEFLAGS= $(MAKE) ARCH=$(firstword $(subst -, ,$*)) TCVERSION=$(lastword $(subst -, ,$*)) WHEEL=$(CROSSENV_BUILD_WHEEL) crossenv + -@MAKEFLAGS= $(MAKE) ARCH=$(firstword $(subst -, ,$*)) TCVERSION=$(lastword $(subst -, ,$*)) WHEEL=$(CROSSENV_BUILD_WHEEL) crossenv --no-print-directory endif #### @@ -242,6 +242,8 @@ $(CROSSENV_PATH)/build/python-cc.mk: @echo PYTHON_INC_DIR=include/python$(PYTHON_PKG_VERS_MAJOR_MINOR) >> $@ @echo PYO3_CROSS_LIB_DIR=$(abspath $(PYTHON_STAGING_INSTALL_PREFIX)/lib) >> $@ @echo PYO3_CROSS_INCLUDE_DIR=$(abspath $(PYTHON_STAGING_INSTALL_PREFIX)/include) >> $@ + @echo CMAKE_TOOLCHAIN_FILE=$(abspath $(CMAKE_TOOLCHAIN_WRK)) >> $@ + @echo MESON_CROSS_FILE=$(abspath $(MESON_TOOLCHAIN_WRK)) >> $@ @echo OPENSSL_LIB_DIR=$(abspath $(PYTHON_STAGING_INSTALL_PREFIX)/lib) >> $@ @echo OPENSSL_INCLUDE_DIR=$(abspath $(PYTHON_STAGING_INSTALL_PREFIX)/include) >> $@ @echo PIP=$(abspath $(WORK_DIR)/../../../native/$(PYTHON_PKG_NAME)/work-native/install/usr/local/bin/pip) >> $@ diff --git a/mk/spksrc.directories.mk b/mk/spksrc.directories.mk index c4d823efe13..66faf45af23 100644 --- a/mk/spksrc.directories.mk +++ b/mk/spksrc.directories.mk @@ -10,7 +10,7 @@ # * The full content of $(STAGING_DIR) is packed, it will then be unpacked on the target in $(INSTALL_PREFIX) BASE_DISTRIB_DIR = $(CURDIR)/../../distrib -PIP_DISTRIB_DIR = $(DISTRIB_DIR)/pip +PIP_DISTRIB_DIR = $(abspath $(DISTRIB_DIR)/pip) PIP_CACHE_DIR = $(WORK_DIR)/pip TOOLCHAIN_DIR = $(BASE_DISTRIB_DIR)/toolchain TOOLKIT_DIR = $(BASE_DISTRIB_DIR)/toolkit diff --git a/mk/spksrc.wheel.mk b/mk/spksrc.wheel.mk index e9650383488..33818fc0e39 100644 --- a/mk/spksrc.wheel.mk +++ b/mk/spksrc.wheel.mk @@ -165,45 +165,30 @@ ifneq ($(wildcard $(abspath $(addprefix $(WORK_DIR)/../,$(patsubst %-pure.txt,,$ [ "$$(grep -s egg <<< $${wheel})" ] && name=$$(echo $${wheel#*egg=} | cut -f1 -d=) || name=$${wheel%%[<>=]=*} ; \ version=$$(echo $${requirement#*[<>=]=} | cut -f1 -d' ') ; \ $(MSG) "WHEEL=\"$${name}-$${version}\" $(MAKE) crossenv-$(ARCH)-$(TCVERSION)" ; \ - MAKEFLAGS= WHEEL="$${name}-$${version}" $(MAKE) crossenv-$(ARCH)-$(TCVERSION) ; \ - for crossenv in $(WORK_DIR)/crossenv-$${name}-$${version} $(WORK_DIR)/crossenv-$${name} $(WORK_DIR)/crossenv ; do \ - [ -d $${crossenv} ] && . $${crossenv}/build/python-cc.mk && break ; \ - done ; \ - crossenvPIP=$(PIP) ; \ - $(MSG) "WHEEL: activate crossenv found: $${CROSSENV}" ; \ - if [ -s "$${CROSSENV}" ] ; then \ - crossenvPIP=$$(. $${CROSSENV} && which pip) ; \ - $(MSG) "Python crossenv found: [$${CROSSENV}]" ; \ - $(MSG) "pip crossenv found: [$${crossenvPIP}]" ; \ - elif [ "$${PYTHON_VERSION}" != "2.7" ] ; then \ - $(MSG) "WARNING: Python crossenv NOT found!" ; \ - $(MSG) "WARNING: pip crossenv NOT found!" ; \ - else \ - $(MSG) "Python $${PYTHON_VERSION} uses pip: $${crossenvPIP}" ; \ - fi ; \ - $(MSG) "Cross-compiling [$${wheel%% *}] wheel using $${CROSSENV_PATH}" ; \ + MAKEFLAGS= WHEEL="$${name}-$${version}" $(MAKE) crossenv-$(ARCH)-$(TCVERSION) --no-print-directory ; \ [ "$${file}" = "$(WHEELS_LIMITED_API)" ] && abi3="--build-option=--py-limited-api=$(PYTHON_LIMITED_API)" || abi3="" ; \ global_options=$$(echo $(WHEELS_BUILD_ARGS) | sed -e 's/ \[/\n\[/g' | grep -i $${name} | cut -f2 -d] | xargs) ; \ localCFLAGS=($$(echo $(WHEELS_CFLAGS) | sed -e 's/ \[/\n\[/g' | grep -i $${name} | cut -f2 -d] | xargs)) ; \ localLDFLAGS=($$(echo $(WHEELS_LDFLAGS) | sed -e 's/ \[/\n\[/g' | grep -i $${name} | cut -f2 -d] | xargs)) ; \ localCPPFLAGS=($$(echo $(WHEELS_CPPFLAGS) | sed -e 's/ \[/\n\[/g' | grep -i $${name} | cut -f2 -d] | xargs)) ; \ localCXXFLAGS=($$(echo $(WHEELS_CXXFLAGS) | sed -e 's/ \[/\n\[/g' | grep -i $${name} | cut -f2 -d] | xargs)) ; \ - $(MSG) [$${name}] \ + $(MSG) pip build [$${name}], version: [$${version}] \ $$([ "$$(echo $${localCFLAGS[@]})" ] && echo "CFLAGS=\"$${localCFLAGS[@]}\" ") \ $$([ "$$(echo $${localCPPFLAGS[@]})" ] && echo "CPPFLAGS=\"$${localCPPFLAGS[@]}\" ") \ $$([ "$$(echo $${localCXXFLAGS[@]})" ] && echo "CXXFLAGS=\"$${localCXXFLAGS[@]}\" ") \ $$([ "$$(echo $${localLDFLAGS[@]})" ] && echo "LDFLAGS=\"$${localLDFLAGS[@]}\" ") \ $$([ "$$(echo $${abi3})" ] && echo "$${abi3} ")" \ $${global_options}" ; \ - PIP_CROSSENV=$${crossenvPIP} \ - REQUIREMENT=$$(echo $${wheel%% *}) \ + REQUIREMENT=$$(echo $${wheel%% *}) \ + WHEEL_NAME=$${name} \ + WHEEL_VERSION=$${version} \ ADDITIONAL_CFLAGS="-I$(STAGING_INSTALL_PREFIX)/$(PYTHON_INC_DIR) $${localCFLAGS[@]}" \ ADDITIONAL_CPPFLAGS="-I$(STAGING_INSTALL_PREFIX)/$(PYTHON_INC_DIR) $${localCPPFLAGS[@]}" \ ADDITIONAL_CXXFLAGS="-I$(STAGING_INSTALL_PREFIX)/$(PYTHON_INC_DIR) $${localCXXFLAGS[@]}" \ ADDITIONAL_LDFLAGS="$${localLDFLAGS[@]}" \ ABI3="$${abi3}" \ PIP_GLOBAL_OPTION="$${global_options}" \ - $(MAKE) \ + $(MAKE) --no-print-directory \ cross-compile-wheel-$${name} || exit 1 ; \ done < <(grep -svH -e "^\#" -e "^\$$" $(wildcard $(abspath $(addprefix $(WORK_DIR)/../,$(patsubst %-pure.txt,,$(WHEELS)))))) else @@ -224,14 +209,34 @@ endif cross-compile-wheel-%: SHELL:=/bin/bash cross-compile-wheel-%: - @if [ "$(PIP_GLOBAL_OPTION)" ]; then \ + @for crossenv in $(WORK_DIR)/crossenv-$(WHEEL_NAME)-$(WHEEL_VERSION) $(WORK_DIR)/crossenv-$(WHEEL_NAME) $(WORK_DIR)/crossenv ; do \ + [ -d $${crossenv} ] && . $${crossenv}/build/python-cc.mk && break ; \ + done ; \ + if [ -s "$${CROSSENV}" ] ; then \ + . $${CROSSENV} ; \ + $(MSG) "crossenv: [$${CROSSENV}]" ; \ + $(MSG) "PATH = [$${PATH}]" ; \ + $(MSG) "pip: [$$(which pip)]" ; \ + $(MSG) "maturin: [$$(which maturin)]" ; \ + else \ + echo "ERROR: crossenv not found!" ; \ + exit 2 ; \ + fi ; \ + if [ "$(PIP_GLOBAL_OPTION)" ]; then \ pip_global_option=$$(echo $(PIP_GLOBAL_OPTION) | sed 's/=\([^ ]*\)/="\1"/g; s/[^ ]*/--global-option=&/g') ; \ pip_global_option=$${pip_global_option}" --no-use-pep517" ; \ fi ; \ $(MSG) \ - _PYTHON_HOST_PLATFORM="$(TC_TARGET)" \ - MESON_CROSS_FILE="$(MESON_TOOLCHAIN_WRK)" \ - $(PIP_CROSSENV) \ + _PYTHON_HOST_PLATFORM=\"$(TC_TARGET)\" \ + PATH=$(subst PATH=,,$(subst $(PATH),,$(filter PATH=%,$(ENV))))$${PATH} \ + CFLAGS=\"$(CFLAGS)\" \ + CPPFLAGS=\"$(CPPFLAGS)\" \ + CXXFLAGS=\"$(CXXFLAGS)\" \ + LDFLAGS=\"$(LDFLAGS)\" \ + LDFLAGS=\"$(LDFLAGS)\" \ + CMAKE_TOOLCHAIN_FILE=$${CMAKE_TOOLCHAIN_FILE} \ + MESON_CROSS_FILE=$${MESON_CROSS_FILE} \ + $$(which pip) \ $(PIP_WHEEL_ARGS_CROSSENV) \ $${pip_global_option} \ --no-build-isolation \ @@ -239,8 +244,15 @@ cross-compile-wheel-%: $(REQUIREMENT) ; \ $(RUN) \ _PYTHON_HOST_PLATFORM="$(TC_TARGET)" \ - MESON_CROSS_FILE="$(MESON_TOOLCHAIN_WRK)" \ - $(PIP_CROSSENV) \ + PATH=$(subst PATH=,,$(subst $(PATH),,$(filter PATH=%,$(ENV))))$${PATH} \ + CFLAGS="$(CFLAGS)" \ + CPPFLAGS="$(CPPFLAGS)" \ + CXXFLAGS="$(CXXFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + CMAKE_TOOLCHAIN_FILE=$${CMAKE_TOOLCHAIN_FILE} \ + MESON_CROSS_FILE=$${MESON_CROSS_FILE} \ + $$(which pip) \ $(PIP_WHEEL_ARGS_CROSSENV) \ $${pip_global_option} \ --no-build-isolation \ From cb680b403645e2050905b9dce2047c79e303a220 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Tue, 7 Jan 2025 02:55:46 +0000 Subject: [PATCH 128/130] boost*: Fix loading crossenv python-cc.mk --- cross/boost/Makefile | 2 +- cross/boost_1.68/Makefile | 2 +- cross/boost_1.70/Makefile | 2 +- cross/boost_1.78/Makefile | 2 +- cross/boost_1.82/Makefile | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cross/boost/Makefile b/cross/boost/Makefile index 93e707b42bd..f13d175492c 100644 --- a/cross/boost/Makefile +++ b/cross/boost/Makefile @@ -24,7 +24,7 @@ WITH_PYTHON_LIBRARY = ifneq ($(findstring python,$(BOOST_LIBRARIES)),) WITH_PYTHON_LIBRARY = 1 # The packages depending on boost with python, must build python before. -include $(WORK_DIR)/python-cc.mk +include $(or $(wildcard $(WORK_DIR)/crossenv/build/python-cc.mk), $(wildcard $(PYTHON_PACKAGE_WORK_DIR)/crossenv/build/python-cc.mk)) PYTHON_NAME = $(basename $(notdir $(PYTHON_INTERPRETER))) else ifneq ($(findstring $(BOOST_LIBRARIES), all),) # exclude python library if "all" selected diff --git a/cross/boost_1.68/Makefile b/cross/boost_1.68/Makefile index 5e9e53dfc19..7632acf7ca2 100644 --- a/cross/boost_1.68/Makefile +++ b/cross/boost_1.68/Makefile @@ -26,7 +26,7 @@ WITH_PYTHON_LIBRARY = ifneq ($(findstring python,$(BOOST_LIBRARIES)),) WITH_PYTHON_LIBRARY = 1 # The packages depending on boost with python, must build python before. -include $(WORK_DIR)/python-cc.mk +include $(or $(wildcard $(WORK_DIR)/crossenv/build/python-cc.mk), $(wildcard $(PYTHON_PACKAGE_WORK_DIR)/crossenv/build/python-cc.mk)) PYTHON_NAME = $(basename $(notdir $(PYTHON_INTERPRETER))) else ifneq ($(findstring $(BOOST_LIBRARIES), all),) # exclude python library if "all" selected diff --git a/cross/boost_1.70/Makefile b/cross/boost_1.70/Makefile index e0e7b5bfb9f..7cdf9150721 100644 --- a/cross/boost_1.70/Makefile +++ b/cross/boost_1.70/Makefile @@ -27,7 +27,7 @@ WITH_PYTHON_LIBRARY = ifneq ($(findstring python,$(BOOST_LIBRARIES)),) WITH_PYTHON_LIBRARY = 1 # The packages depending on boost with python, must build python before. -include $(WORK_DIR)/python-cc.mk +include $(or $(wildcard $(WORK_DIR)/crossenv/build/python-cc.mk), $(wildcard $(PYTHON_PACKAGE_WORK_DIR)/crossenv/build/python-cc.mk)) PYTHON_NAME = $(basename $(notdir $(PYTHON_INTERPRETER))) else ifneq ($(findstring $(BOOST_LIBRARIES), all),) # exclude python library if "all" selected diff --git a/cross/boost_1.78/Makefile b/cross/boost_1.78/Makefile index 93e707b42bd..f13d175492c 100644 --- a/cross/boost_1.78/Makefile +++ b/cross/boost_1.78/Makefile @@ -24,7 +24,7 @@ WITH_PYTHON_LIBRARY = ifneq ($(findstring python,$(BOOST_LIBRARIES)),) WITH_PYTHON_LIBRARY = 1 # The packages depending on boost with python, must build python before. -include $(WORK_DIR)/python-cc.mk +include $(or $(wildcard $(WORK_DIR)/crossenv/build/python-cc.mk), $(wildcard $(PYTHON_PACKAGE_WORK_DIR)/crossenv/build/python-cc.mk)) PYTHON_NAME = $(basename $(notdir $(PYTHON_INTERPRETER))) else ifneq ($(findstring $(BOOST_LIBRARIES), all),) # exclude python library if "all" selected diff --git a/cross/boost_1.82/Makefile b/cross/boost_1.82/Makefile index a9a8f660814..22dc8039cbf 100644 --- a/cross/boost_1.82/Makefile +++ b/cross/boost_1.82/Makefile @@ -24,7 +24,7 @@ WITH_PYTHON_LIBRARY = ifneq ($(findstring python,$(BOOST_LIBRARIES)),) WITH_PYTHON_LIBRARY = 1 # The packages depending on boost with python, must build python before. -include $(WORK_DIR)/crossenv/build/python-cc.mk +include $(or $(wildcard $(WORK_DIR)/crossenv/build/python-cc.mk), $(wildcard $(PYTHON_PACKAGE_WORK_DIR)/crossenv/build/python-cc.mk)) PYTHON_NAME = $(basename $(notdir $(PYTHON_INTERPRETER))) else ifneq ($(findstring $(BOOST_LIBRARIES), all),) # exclude python library if "all" selected From 2d31802cd91d1ce19583a0cf712878764a4215ed Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Thu, 9 Jan 2025 01:58:36 +0000 Subject: [PATCH 129/130] wheel.mk: Additional fixes mainly around PATH handling --- mk/spksrc.common.mk | 30 +++++++++++++++++++++++++++++- mk/spksrc.crossenv.mk | 5 ++++- mk/spksrc.wheel.mk | 37 +++++++++++++++++-------------------- 3 files changed, 50 insertions(+), 22 deletions(-) diff --git a/mk/spksrc.common.mk b/mk/spksrc.common.mk index 0ac7e8cfe24..27b27744445 100644 --- a/mk/spksrc.common.mk +++ b/mk/spksrc.common.mk @@ -132,8 +132,36 @@ RED=$$(tput setaf 1) GREEN=$$(tput setaf 2) NC=$$(tput sgr0) -# Version Comparison +# Macro: Version Comparison version_le = $(shell if printf '%s\n' "$(1)" "$(2)" | sort -VC ; then echo 1; fi) version_ge = $(shell if printf '%s\n' "$(1)" "$(2)" | sort -VCr ; then echo 1; fi) version_lt = $(shell if [ "$(1)" != "$(2)" ] && printf "%s\n" "$(1)" "$(2)" | sort -VC ; then echo 1; fi) version_gt = $(shell if [ "$(1)" != "$(2)" ] && printf "%s\n" "$(1)" "$(2)" | sort -VCr ; then echo 1; fi) + +# Macro: dedup +# removes duplicate entries from a specified delimiter, +# preserving the order of unique elements. +dedup = $(shell /bin/bash -c '\ + input="$$(echo "$1" | xargs)"; \ + delimiter="$$(echo "$2" | xargs)"; \ + echo "$$input" | \ + tr "$$delimiter" "\n" | \ + awk '\''!seen[$$0]++ {print $$0}'\'' | \ + tr "\n" "$$delimiter" | \ + sed "s/$$delimiter$$//" \ +') + +# Macro: merge +# merges multiple environment variable values from a given input string, +# inverting their order and separating them with a specified delimiter +merge = $(shell /bin/bash -c '\ + input="$$(echo "$1" | xargs)"; \ + var_name="$$(echo "$2" | xargs)"; \ + delimiter="$$(echo "$3" | xargs)"; \ + echo "$$input" | \ + grep -o "$$var_name=[^ ]*" | \ + tac | \ + sed "s/^$$var_name=//" | \ + tr "\n" "$$delimiter" | \ + sed "s/$$delimiter$$//" \ +') diff --git a/mk/spksrc.crossenv.mk b/mk/spksrc.crossenv.mk index b96f6d464f7..900cde068ec 100644 --- a/mk/spksrc.crossenv.mk +++ b/mk/spksrc.crossenv.mk @@ -25,7 +25,8 @@ PYTHON_PKG_NAME = python$(subst .,,$(PYTHON_PKG_VERS_MAJOR_MINOR)) PYTHON_PKG_DIR = Python-$(PYTHON_PKG_VERS) # HOSTPYTHON_LIB_NATIVE = $(abspath $(WORK_DIR)/../../../native/$(PYTHON_PKG_NAME)/work-native/$(PYTHON_PKG_DIR)/build/lib.linux-$(shell uname -m)-$(PYTHON_PKG_VERS_MAJOR_MINOR)) -PYTHON_NATIVE = $(abspath $(WORK_DIR)/../../../native/$(PYTHON_PKG_NAME)/work-native/install/usr/local/bin/python3) +PYTHON_NATIVE_PATH = $(abspath $(WORK_DIR)/../../../native/$(PYTHON_PKG_NAME)/work-native/install/usr/local/bin) +PYTHON_NATIVE = $(PYTHON_NATIVE_PATH)/python3 PYTHON_LIB_NATIVE = $(abspath $(PYTHON_WORK_DIR)/$(PYTHON_PKG_DIR)/build/lib.linux-$(shell uname -m)-$(PYTHON_PKG_VERS_MAJOR_MINOR)) PYTHON_LIB_CROSS = $(abspath $(PYTHON_WORK_DIR)/$(PYTHON_PKG_DIR)/build/lib.linux-$(shell expr "$(TC_TARGET)" : '\([^-]*\)' )-$(PYTHON_PKG_VERS_MAJOR_MINOR)) @@ -233,6 +234,8 @@ $(CROSSENV_PATH)/build/python-cc.mk: @echo CROSSENV=$(CROSSENV_PATH)/bin/activate >> $@ @echo HOSTPYTHON=$(abspath $(PYTHON_WORK_DIR)/$(PYTHON_PKG_DIR)/hostpython) >> $@ @echo HOSTPYTHON_LIB_NATIVE=$(HOSTPYTHON_LIB_NATIVE) >> $@ + @echo PYTHON_NATIVE=$(PYTHON_NATIVE) >> $@ + @echo PYTHON_NATIVE_PATH=$(PYTHON_NATIVE_PATH) >> $@ @echo PYTHON_LIB_NATIVE=$(PYTHON_LIB_NATIVE) >> $@ @echo PYTHON_LIB_CROSS=$(PYTHON_LIB_CROSS) >> $@ @echo PYTHON_SITE_PACKAGES_NATIVE=$(abspath $(WORK_DIR)/../../../native/$(PYTHON_PKG_NAME)/work-native/install/usr/local/lib/python$(PYTHON_PKG_VERS_MAJOR_MINOR)/site-packages) >> $@ diff --git a/mk/spksrc.wheel.mk b/mk/spksrc.wheel.mk index 33818fc0e39..c816c0c6999 100644 --- a/mk/spksrc.wheel.mk +++ b/mk/spksrc.wheel.mk @@ -207,16 +207,23 @@ else @$(MSG) "[SKIP] Building pure-python" endif +## +## crossenv PATH environment requires a combination of: +## 1) unique PATH variable from $(ENV) -> using merge + dedup macros +## Note: Multiple declarations of ENV += PATH=bla creates confusion in its interpretation. +## Solution implemented fetches all PATH from ENV and combine them in reversed order. +## 2) access to maturin from native/python/.../bin -> ${PYTHON_NATIVE_PATH}/bin +## 3) access to crossenv/bin/cross* tools, mainly cross-pip -> ${CROSSENV_PATH}/bin +## cross-compile-wheel-%: SHELL:=/bin/bash cross-compile-wheel-%: @for crossenv in $(WORK_DIR)/crossenv-$(WHEEL_NAME)-$(WHEEL_VERSION) $(WORK_DIR)/crossenv-$(WHEEL_NAME) $(WORK_DIR)/crossenv ; do \ [ -d $${crossenv} ] && . $${crossenv}/build/python-cc.mk && break ; \ done ; \ - if [ -s "$${CROSSENV}" ] ; then \ - . $${CROSSENV} ; \ - $(MSG) "crossenv: [$${CROSSENV}]" ; \ - $(MSG) "PATH = [$${PATH}]" ; \ - $(MSG) "pip: [$$(which pip)]" ; \ + if [ -d "$${CROSSENV_PATH}" ] ; then \ + PATH=$(call dedup, $(call merge, $(ENV), PATH, :), :):$${PYTHON_NATIVE_PATH}:$${CROSSENV_PATH}/bin:$${PATH} ; \ + $(MSG) "crossenv: [$${CROSSENV_PATH}]" ; \ + $(MSG) "pip: [$$(which cross-pip)]" ; \ $(MSG) "maturin: [$$(which maturin)]" ; \ else \ echo "ERROR: crossenv not found!" ; \ @@ -226,17 +233,12 @@ cross-compile-wheel-%: pip_global_option=$$(echo $(PIP_GLOBAL_OPTION) | sed 's/=\([^ ]*\)/="\1"/g; s/[^ ]*/--global-option=&/g') ; \ pip_global_option=$${pip_global_option}" --no-use-pep517" ; \ fi ; \ - $(MSG) \ + $(RUN) $(MSG) \ _PYTHON_HOST_PLATFORM=\"$(TC_TARGET)\" \ - PATH=$(subst PATH=,,$(subst $(PATH),,$(filter PATH=%,$(ENV))))$${PATH} \ - CFLAGS=\"$(CFLAGS)\" \ - CPPFLAGS=\"$(CPPFLAGS)\" \ - CXXFLAGS=\"$(CXXFLAGS)\" \ - LDFLAGS=\"$(LDFLAGS)\" \ - LDFLAGS=\"$(LDFLAGS)\" \ + PATH=$${PATH} \ CMAKE_TOOLCHAIN_FILE=$${CMAKE_TOOLCHAIN_FILE} \ MESON_CROSS_FILE=$${MESON_CROSS_FILE} \ - $$(which pip) \ + cross-pip \ $(PIP_WHEEL_ARGS_CROSSENV) \ $${pip_global_option} \ --no-build-isolation \ @@ -244,15 +246,10 @@ cross-compile-wheel-%: $(REQUIREMENT) ; \ $(RUN) \ _PYTHON_HOST_PLATFORM="$(TC_TARGET)" \ - PATH=$(subst PATH=,,$(subst $(PATH),,$(filter PATH=%,$(ENV))))$${PATH} \ - CFLAGS="$(CFLAGS)" \ - CPPFLAGS="$(CPPFLAGS)" \ - CXXFLAGS="$(CXXFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ + PATH=$${PATH} \ CMAKE_TOOLCHAIN_FILE=$${CMAKE_TOOLCHAIN_FILE} \ MESON_CROSS_FILE=$${MESON_CROSS_FILE} \ - $$(which pip) \ + cross-pip \ $(PIP_WHEEL_ARGS_CROSSENV) \ $${pip_global_option} \ --no-build-isolation \ From 4bfb1cd1ad4d1cb661d6962440e218ebd3b54d00 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Thu, 9 Jan 2025 12:10:36 +0000 Subject: [PATCH 130/130] tc.mk: Remove sysroot from meson definition as breaking glib --- mk/spksrc.tc.mk | 3 --- 1 file changed, 3 deletions(-) diff --git a/mk/spksrc.tc.mk b/mk/spksrc.tc.mk index fc887f10957..338adf1a6ff 100644 --- a/mk/spksrc.tc.mk +++ b/mk/spksrc.tc.mk @@ -151,9 +151,6 @@ meson_vars: fi ; \ done @echo - @echo "[properties]" ; \ - echo "sys_root = '$(WORK_DIR)/$(TC_TARGET)/$(TC_SYSROOT)'" - @echo @echo "[built-in]" ; \ echo "c_args = ['$(MESON_BUILTIN_C_ARGS)']" ; \ echo "c_link_args = ['$(MESON_BUILTIN_C_LINK_ARGS)']" ; \