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 diff --git a/cross/python310/Makefile b/cross/python310/Makefile index b9256f25de9..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 @@ -86,21 +83,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 +121,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==75.1.0" "wheel==0.44.0" "pip-tools==7.4.1" - . $(WORK_DIR)/crossenv/bin/activate && $(RUN) pip --disable-pip-version-check install "setuptools==75.1.0" "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..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 @@ -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 new file mode 100644 index 00000000000..285ad45f2cc --- /dev/null +++ b/cross/python313/Makefile @@ -0,0 +1,123 @@ +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 +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 + +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 + +# 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 + +include ../../mk/spksrc.cross-cc.mk + +PYTHON_NATIVE = $(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 + +.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) 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/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/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/mk/crossenv/requirements-default.txt b/mk/crossenv/requirements-default.txt new file mode 100644 index 00000000000..d85e19dc3cf --- /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..6472ca713db --- /dev/null +++ b/mk/spksrc.crossenv.mk @@ -0,0 +1,164 @@ +# 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)/) + +# 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 = default +CROSSENV_BUILD_REQUIREMENTS = $(CROSSENV_CONFIG_DEFAULT) +endif + +### + +.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_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) +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_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 +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) + @$(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) \ + --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 $(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 \ + --sysroot $(TC_SYSROOT) \ + --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 ; \ + $(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) + @. $(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 +#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_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_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) >> $@ diff --git a/mk/spksrc.python-module.mk b/mk/spksrc.python-module.mk index 5881f02113d..0cbd5a72c76 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 diff --git a/mk/spksrc.python.mk b/mk/spksrc.python.mk index 60101cf763c..8de8ef142ab 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/ @@ -71,8 +68,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* diff --git a/mk/spksrc.wheel.mk b/mk/spksrc.wheel.mk index ab8a7e36633..58742fc4c5c 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,32 @@ 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%%[<>=]=*} ; \ + 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) ; \ + 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)) ; \ 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/borgbackup/Makefile b/spk/borgbackup/Makefile index a0c94257fcb..e5e1988f0f0 100644 --- a/spk/borgbackup/Makefile +++ b/spk/borgbackup/Makefile @@ -1,6 +1,6 @@ SPK_NAME = borgbackup SPK_VERS = 1.2.6 -SPK_REV = 14 +SPK_REV = 15 SPK_ICON = src/borgbackup.png PYTHON_PACKAGE = python311 diff --git a/spk/python-wheels/Makefile b/spk/python-wheels/Makefile new file mode 100644 index 00000000000..0a773a6f3c0 --- /dev/null +++ b/spk/python-wheels/Makefile @@ -0,0 +1,155 @@ +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 +#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-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) + +# [rpds-py] +# 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 00000000000..d195821833d Binary files /dev/null and b/spk/python-wheels/src/python3-pip.png differ diff --git a/spk/python311/src/requirements-abi3.txt b/spk/python-wheels/src/requirements-abi3.txt similarity index 100% rename from spk/python311/src/requirements-abi3.txt rename to spk/python-wheels/src/requirements-abi3.txt diff --git a/spk/python311/src/requirements-crossenv-greenlet-v1.txt b/spk/python-wheels/src/requirements-crossenv-greenlet-v1.txt similarity index 100% rename from spk/python311/src/requirements-crossenv-greenlet-v1.txt rename to spk/python-wheels/src/requirements-crossenv-greenlet-v1.txt diff --git a/spk/python311/src/requirements-crossenv-greenlet-v2.txt b/spk/python-wheels/src/requirements-crossenv-greenlet-v2.txt similarity index 92% rename from spk/python311/src/requirements-crossenv-greenlet-v2.txt rename to spk/python-wheels/src/requirements-crossenv-greenlet-v2.txt index c2b4802c7ad..8a8c42e83ad 100644 --- a/spk/python311/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/python311/src/requirements-crossenv-numpy-armv7l.txt b/spk/python-wheels/src/requirements-crossenv-numpy-armv7l.txt similarity index 100% rename from spk/python311/src/requirements-crossenv-numpy-armv7l.txt rename to spk/python-wheels/src/requirements-crossenv-numpy-armv7l.txt diff --git a/spk/python311/src/requirements-crossenv-numpy-gcc4.txt b/spk/python-wheels/src/requirements-crossenv-numpy-gcc4.txt similarity index 100% rename from spk/python311/src/requirements-crossenv-numpy-gcc4.txt rename to spk/python-wheels/src/requirements-crossenv-numpy-gcc4.txt diff --git a/spk/python311/src/requirements-crossenv-numpy.txt b/spk/python-wheels/src/requirements-crossenv-numpy.txt similarity index 100% rename from spk/python311/src/requirements-crossenv-numpy.txt rename to spk/python-wheels/src/requirements-crossenv-numpy.txt diff --git a/spk/python311/src/requirements-crossenv-rpds-py.txt b/spk/python-wheels/src/requirements-crossenv-rpds-py.txt similarity index 100% rename from spk/python311/src/requirements-crossenv-rpds-py.txt rename to spk/python-wheels/src/requirements-crossenv-rpds-py.txt diff --git a/spk/python311/src/requirements-crossenv.txt b/spk/python-wheels/src/requirements-crossenv.txt similarity index 84% rename from spk/python311/src/requirements-crossenv.txt rename to spk/python-wheels/src/requirements-crossenv.txt index 40c49bdcdb1..1d239a2e534 100644 --- a/spk/python311/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/python311/Makefile b/spk/python311/Makefile index 87eba19e7ee..61a902c88d2 100644 --- a/spk/python311/Makefile +++ b/spk/python311/Makefile @@ -23,13 +23,13 @@ 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 -# 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 +38,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/python313/Makefile b/spk/python313/Makefile new file mode 100644 index 00000000000..a8740e0d9e5 --- /dev/null +++ b/spk/python313/Makefile @@ -0,0 +1,46 @@ +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 (both OLD_PPC_ARCHS and ARMv5_ARCHS now fails). +UNSUPPORTED_ARCHS = $(OLD_PPC_ARCHS) $(ARMv5_ARCHS) + +DEPENDS = cross/python313 +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 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 = 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 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 00000000000..1d3d99794de Binary files /dev/null and b/spk/python313/src/python3.png differ diff --git a/spk/python313/src/python3.svg b/spk/python313/src/python3.svg new file mode 100644 index 00000000000..5d4ba4b925b --- /dev/null +++ b/spk/python313/src/python3.svg @@ -0,0 +1,261 @@ + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + 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 & +} +