From c96ee9bdc50fc6ad6214100c4fa396a7c78a2f1d Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Sun, 23 Jan 2022 21:13:13 +0000 Subject: [PATCH 1/9] homeassistant: Migrate ujson to using pip through setuptools-scm --- cross/python310/Makefile | 2 ++ cross/ujson/Makefile | 14 -------------- cross/ujson/PLIST | 0 cross/ujson/digests | 3 --- spk/homeassistant/Makefile | 3 --- spk/homeassistant/src/requirements-crossenv.txt | 1 + spk/python310/src/requirements-crossenv.txt | 1 + 7 files changed, 4 insertions(+), 20 deletions(-) delete mode 100644 cross/ujson/Makefile delete mode 100644 cross/ujson/PLIST delete mode 100644 cross/ujson/digests diff --git a/cross/python310/Makefile b/cross/python310/Makefile index 5ce997cd076..99f7f9fe4ba 100644 --- a/cross/python310/Makefile +++ b/cross/python310/Makefile @@ -137,6 +137,8 @@ python310_post_install: $(WORK_DIR)/python-cc.mk . $(WORK_DIR)/crossenv/bin/activate && $(RUN) python get-pip.py "pip==21.3.1" . $(WORK_DIR)/crossenv/bin/activate && $(RUN) build-pip install "setuptools==60.2.0" . $(WORK_DIR)/crossenv/bin/activate && $(RUN) pip install "setuptools==60.2.0" + . $(WORK_DIR)/crossenv/bin/activate && $(RUN) build-pip install "setuptools-scm==6.4.2" + . $(WORK_DIR)/crossenv/bin/activate && $(RUN) pip install "setuptools-scm==6.4.2" . $(WORK_DIR)/crossenv/bin/activate && $(RUN) build-pip install "wheel==0.37.1" . $(WORK_DIR)/crossenv/bin/activate && $(RUN) pip install "wheel==0.37.1" . $(WORK_DIR)/crossenv/bin/activate && $(RUN) build-pip install "cffi==1.15.0" diff --git a/cross/ujson/Makefile b/cross/ujson/Makefile deleted file mode 100644 index f07f77277f3..00000000000 --- a/cross/ujson/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -PKG_NAME = ujson -PKG_VERS = 4.2.0 -PKG_EXT = tar.gz -PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT) -PKG_DIST_SITE = https://files.pythonhosted.org/packages/source/u/$(PKG_NAME) -PKG_DIR = $(PKG_NAME)-$(PKG_VERS) - -DEPENDS = - -HOMEPAGE = https://github.com/ultrajson/ultrajson -COMMENT = Ultra fast JSON decoder and encoder written in C with Python bindings. -LICENSE = https://github.com/ultrajson/ultrajson/blob/main/LICENSE.txt - -include ../../mk/spksrc.python-wheel.mk diff --git a/cross/ujson/PLIST b/cross/ujson/PLIST deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/cross/ujson/digests b/cross/ujson/digests deleted file mode 100644 index 2b41063e0a3..00000000000 --- a/cross/ujson/digests +++ /dev/null @@ -1,3 +0,0 @@ -ujson-4.2.0.tar.gz SHA1 20d6d48da518a7be60e42faa9cc5db2975a0163d -ujson-4.2.0.tar.gz SHA256 fffe509f556861c7343c6cba57ed05fe7bcf4b48a934a5b946ccb45428cf8883 -ujson-4.2.0.tar.gz MD5 9a90e2e9f1d465c2121b8d10f837f53a diff --git a/spk/homeassistant/Makefile b/spk/homeassistant/Makefile index 70be7fdbef0..ef35a0ba873 100644 --- a/spk/homeassistant/Makefile +++ b/spk/homeassistant/Makefile @@ -21,9 +21,6 @@ DEPENDS += cross/nmap # [DTLSSocket] Required for postinst [tradfri] DEPENDS += cross/dtlssocket -# [flunearyou] -DEPENDS += cross/ujson - # [PyYAML] DEPENDS += cross/libyaml diff --git a/spk/homeassistant/src/requirements-crossenv.txt b/spk/homeassistant/src/requirements-crossenv.txt index 1c0a457d9c5..a6a2858cc90 100644 --- a/spk/homeassistant/src/requirements-crossenv.txt +++ b/spk/homeassistant/src/requirements-crossenv.txt @@ -31,6 +31,7 @@ PyNaCl==1.4.0 PyYAML==5.4.1 # requests==2.26.0 ==> pure # ruamel.yaml==0.15.100 ==> pure +ujson==4.2.0 # voluptuous==0.12.1 # voluptuous-serialize==2.4.0 yarl==1.6.3 diff --git a/spk/python310/src/requirements-crossenv.txt b/spk/python310/src/requirements-crossenv.txt index f0be79a9ba5..76559d4574f 100644 --- a/spk/python310/src/requirements-crossenv.txt +++ b/spk/python310/src/requirements-crossenv.txt @@ -29,6 +29,7 @@ # PyYAML==6.0 # regex==2021.11.10 # SQLAlchemy==1.4.29 +ujson==5.1.0 # zope.interface==5.4.0 # Require environment variables From d58279bd57f2dfccc0ca89cdce752f35cf0226d8 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Tue, 25 Jan 2022 01:36:49 +0000 Subject: [PATCH 2/9] wheel.mk: Add missing @ to avoid printing code output --- mk/spksrc.wheel.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mk/spksrc.wheel.mk b/mk/spksrc.wheel.mk index de684f3b889..b56cc7902e1 100644 --- a/mk/spksrc.wheel.mk +++ b/mk/spksrc.wheel.mk @@ -78,7 +78,7 @@ 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))) - $(MSG) "Cross-compiling wheels" ; \ + @$(MSG) "Cross-compiling wheels" ; \ localPIP=$(PIP) ; \ if [ -s "$(CROSSENV)" ] ; then \ $(MSG) "Python crossenv found: [$(CROSSENV)]" ; \ From a0628dcfd88cda1b1a583d1ccbefc7fd10887fe3 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Tue, 25 Jan 2022 01:50:26 +0000 Subject: [PATCH 3/9] python310: Adjust howto for numpy --- spk/python310/Makefile | 68 +++++++++++---------- spk/python310/src/requirements-crossenv.txt | 8 ++- 2 files changed, 42 insertions(+), 34 deletions(-) diff --git a/spk/python310/Makefile b/spk/python310/Makefile index 22718aa5a10..90450380172 100644 --- a/spk/python310/Makefile +++ b/spk/python310/Makefile @@ -7,6 +7,31 @@ SPK_ICON = src/python3.png DEPENDS = cross/$(SPK_NAME) DEPENDS += cross/pip +MAINTAINER = SynoCommunity +DESCRIPTION = Python Programming Language. +DESCRIPTION_FRE = Langage de programmation Python. +DESCRIPTION_SPN = Lenguaje de programaciĆ³n Python. +STARTABLE = no +DISPLAY_NAME = Python 3.10 +CHANGELOG = "1. Update to python 3.10.1" + +HOMEPAGE = https://www.python.org +LICENSE = PSF + +SERVICE_SETUP = src/service-setup.sh + +ENV += PYTHON_OPTIMIZE=1 +PYTHON_LIB_DIR = lib/python$(SPK_VERS_MAJOR_MINOR) + +POST_STRIP_TARGET = python310_extra_install + +SPK_USR_LOCAL_LINKS = bin:bin/python3.10 + +WHEELS = src/requirements-crossenv.txt src/requirements-pure.txt src/requirements-abi3.txt + +# Force building pure-python wheels +# WHEELS_PURE_PYTHON_PACKAGING_ENABLE = 1 + ## ## All configurations below are optional and ## are provided to demonstrate how to build @@ -51,48 +76,27 @@ DEPENDS += cross/pip # 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)" -include ../../mk/spksrc.common.mk - # [numpy] gcc-4.6.4 failed with exit status 1 # https://github.com/numpy/numpy/issues/20664 -# UNSUPPORTED_ARCHS = $(ARMv5_ARCHS) +UNSUPPORTED_ARCHS = $(ARMv5_ARCHS) -# [numpy] Fix wheel building with older compilers -# ifeq ($(call version_lt, ${TCVERSION}, 7.0),1) -# WHEELS_CPPFLAGS = [numpy] -std=c++0x +include ../../mk/spksrc.common.mk + +# [numpy==1.21.*] workaround for compiler bug +# https://github.com/numpy/numpy/issues/13622 +# ifeq ($(call version_ge, $(TCVERSION), 7.0),1) # ifeq ($(findstring $(ARCH),$(ARMv8_ARCHS)),$(ARCH)) # WHEELS_CFLAGS = [numpy] -O0 # endif # endif -# Force building pure-python wheels -# WHEELS_PURE_PYTHON_PACKAGING_ENABLE = 1 - -WHEELS = src/requirements-crossenv.txt src/requirements-pure.txt src/requirements-abi3.txt - -MAINTAINER = SynoCommunity -DESCRIPTION = Python Programming Language. -DESCRIPTION_FRE = Langage de programmation Python. -DESCRIPTION_SPN = Lenguaje de programaciĆ³n Python. -STARTABLE = no -DISPLAY_NAME = Python 3.10 -CHANGELOG = "1. Update to python 3.10.1" - -HOMEPAGE = https://www.python.org -LICENSE = PSF - -SERVICE_SETUP = src/service-setup.sh - -ENV += PYTHON_OPTIMIZE=1 - -PYTHON_LIB_DIR = lib/python$(SPK_VERS_MAJOR_MINOR) - -POST_STRIP_TARGET = python310_extra_install - -SPK_USR_LOCAL_LINKS = bin:bin/python3.10 - include ../../mk/spksrc.spk.mk +# [numpy] Fix wheel building with older compilers +ifeq ($(call version_lt, $(TC_GCC), 5.0),1) +WHEELS_CPPFLAGS = [numpy] -std=c++0x +endif + .PHONY: python310_extra_install python310_extra_install: rm -f $(STAGING_DIR)/$(PYTHON_LIB_DIR)/config/libpython*.a diff --git a/spk/python310/src/requirements-crossenv.txt b/spk/python310/src/requirements-crossenv.txt index 76559d4574f..70556d69e88 100644 --- a/spk/python310/src/requirements-crossenv.txt +++ b/spk/python310/src/requirements-crossenv.txt @@ -29,7 +29,6 @@ # PyYAML==6.0 # regex==2021.11.10 # SQLAlchemy==1.4.29 -ujson==5.1.0 # zope.interface==5.4.0 # Require environment variables @@ -41,12 +40,17 @@ ujson==5.1.0 # WHEELS_BUILD_ARGS = [Pillow] build_ext --disable-platform-guessing # Pillow==9.0.0 +# ujson: +# - Require setuptools-scm in cross/python310 crossenv +ujson==5.1.0 + # numpy: # - Require Cython in cross/python310 crossenv # - DSM6 require WHEELS_CFLAGS=-std=c++0x +# numpy==1.21.*: # - aarch64-6.1 require workaround WHEELS_CFLAGS=-O0 # ref: https://github.com/numpy/numpy/issues/13622 -# numpy==1.22.0 +numpy==1.22.0 # 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 ef487e8121067cfd407d3cd0cdd508bfdab1355b Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Tue, 25 Jan 2022 01:50:47 +0000 Subject: [PATCH 4/9] bazarr: Fix numpy gcc handling --- spk/bazarr/Makefile | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/spk/bazarr/Makefile b/spk/bazarr/Makefile index 7356cba3a83..db0d7ef6574 100644 --- a/spk/bazarr/Makefile +++ b/spk/bazarr/Makefile @@ -37,14 +37,9 @@ WHEELS = src/requirements-crossenv.txt src/requirements-pure.txt # https://github.com/numpy/numpy/issues/20664 UNSUPPORTED_ARCHS = $(ARMv5_ARCHS) -include ../../mk/spksrc.common.mk +include ../../mk/spksrc.spk.mk # [numpy] Fix wheel building with older compilers -ifeq ($(call version_lt, ${TCVERSION}, 7.0),1) +ifeq ($(call version_lt, $(TC_GCC), 5.0),1) WHEELS_CPPFLAGS = [numpy] -std=c++0x -ifeq ($(findstring $(ARCH),$(ARMv8_ARCHS)),$(ARCH)) -WHEELS_CFLAGS = [numpy] -O0 -endif endif - -include ../../mk/spksrc.spk.mk From 5114103bfe89e265576485e069ede6f091989a91 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Tue, 25 Jan 2022 01:51:19 +0000 Subject: [PATCH 5/9] homeassistant: Migrate to pip numpy --- spk/homeassistant/Makefile | 64 ++++++++++++------- .../src/requirements-crossenv.txt | 2 +- 2 files changed, 41 insertions(+), 25 deletions(-) diff --git a/spk/homeassistant/Makefile b/spk/homeassistant/Makefile index ef35a0ba873..f0f0dab2fc8 100644 --- a/spk/homeassistant/Makefile +++ b/spk/homeassistant/Makefile @@ -7,14 +7,35 @@ SPK_DEPENDS = "python310" BUILD_DEPENDS = cross/python310 +MAINTAINER = hgy59 +DESCRIPTION = "Home Assistant is an open-source home automation platform running on Python 3. Track and control all devices at home and automate control." +DISPLAY_NAME = Home Assistant Core +CHANGELOG = "Update homeassistant to 2021.9.7.
Only arch specific python modules are included in the package. Other modules are downloaded at installation time." +STARTABLE = yes + +HOMEPAGE = https://www.home-assistant.io/ +LICENSE = Apache-2.0 + +WIZARDS_DIR = src/wizard + +SERVICE_USER = auto +SERVICE_SETUP = src/service-setup.sh +SERVICE_PORT = 8123 +SERVICE_PORT_TITLE = $(DISPLAY_NAME) +ADMIN_PORT = $(SERVICE_PORT) + +USE_ALTERNATE_TMPDIR = 1 + +POST_STRIP_TARGET = homeassistant_extra_install + +# Include cross compiled wheels only, the package installer downloads pure python wheels at installation time. +WHEELS = src/requirements-crossenv.txt src/requirements-pure.txt src/requirements-abi3.txt + # [gevent] DEPENDS += cross/libev cross/c-ares ENV += GEVENTSETUP_EMBED_CARES=FALSE ENV += GEVENTSETUP_EMBED_LIBEV=FALSE -# for iqvia -DEPENDS += cross/numpy - # [python-libnmap] DEPENDS += cross/nmap @@ -41,32 +62,27 @@ WHEELS_BUILD_ARGS += --enable-freetype WHEELS_BUILD_ARGS += --enable-jpeg WHEELS_BUILD_ARGS += --enable-zlib -# Include cross compiled wheels only, the package installer downloads pure python wheels at installation time. -WHEELS = src/requirements-crossenv.txt src/requirements-pure.txt src/requirements-abi3.txt - -MAINTAINER = hgy59 -DESCRIPTION = "Home Assistant is an open-source home automation platform running on Python 3. Track and control all devices at home and automate control." -DISPLAY_NAME = Home Assistant Core -CHANGELOG = "Update homeassistant to 2021.9.7.
Only arch specific python modules are included in the package. Other modules are downloaded at installation time." -STARTABLE = yes +# [numpy] gcc-4.6.4 failed with exit status 1 +# https://github.com/numpy/numpy/issues/20664 +UNSUPPORTED_ARCHS = $(ARMv5_ARCHS) -HOMEPAGE = https://www.home-assistant.io/ -LICENSE = Apache-2.0 +include ../../mk/spksrc.common.mk -WIZARDS_DIR = src/wizard - -SERVICE_USER = auto -SERVICE_SETUP = src/service-setup.sh -SERVICE_PORT = 8123 -SERVICE_PORT_TITLE = $(DISPLAY_NAME) -ADMIN_PORT = $(SERVICE_PORT) - -USE_ALTERNATE_TMPDIR = 1 - -POST_STRIP_TARGET = homeassistant_extra_install +# [numpy==1.21.*] workaround for compiler bug +# https://github.com/numpy/numpy/issues/13622 +ifeq ($(call version_ge, $(TCVERSION), 7.0),1) +ifeq ($(findstring $(ARCH),$(ARMv8_ARCHS)),$(ARCH)) +WHEELS_CFLAGS = [numpy] -O0 +endif +endif include ../../mk/spksrc.spk.mk +# [numpy] Fix wheel building with older compilers +ifeq ($(call version_lt, $(TC_GCC), 5.0),1) +WHEELS_CPPFLAGS = [numpy] -std=c++0x +endif + .PHONY: homeassistant_extra_install homeassistant_extra_install: @install -m 755 -d $(STAGING_DIR)/share diff --git a/spk/homeassistant/src/requirements-crossenv.txt b/spk/homeassistant/src/requirements-crossenv.txt index a6a2858cc90..9f9db312047 100644 --- a/spk/homeassistant/src/requirements-crossenv.txt +++ b/spk/homeassistant/src/requirements-crossenv.txt @@ -23,7 +23,7 @@ cryptography==3.3.2 # httpx==0.19.0 # idna==3.3 ==> pure # jinja2==3.0.3 ==> pure -# numpy==1.21.4 # requires to be built as cross/numpy +numpy==1.21.4 # PyJWT==1.7.1 ==> pure PyNaCl==1.4.0 ## pip>=8.0.3,<20.3 From 5bb64aee66ff71972e23017d3fbfde4f953c51d5 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Tue, 25 Jan 2022 01:51:43 +0000 Subject: [PATCH 6/9] numpy: Superseeded by pip numpy --- cross/numpy/Makefile | 27 ------------------- cross/numpy/PLIST | 0 cross/numpy/digests | 3 --- ...-pragma_not_allowed_inside_functions.patch | 22 --------------- 4 files changed, 52 deletions(-) delete mode 100644 cross/numpy/Makefile delete mode 100644 cross/numpy/PLIST delete mode 100644 cross/numpy/digests delete mode 100644 cross/numpy/patches/ppc853x/001-remove-error-pragma_not_allowed_inside_functions.patch diff --git a/cross/numpy/Makefile b/cross/numpy/Makefile deleted file mode 100644 index 669efb6458a..00000000000 --- a/cross/numpy/Makefile +++ /dev/null @@ -1,27 +0,0 @@ -PKG_NAME = numpy -PKG_VERS = 1.21.4 -PKG_EXT = zip -PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT) -PKG_DIST_SITE = https://files.pythonhosted.org/packages/source/n/$(PKG_NAME) -PKG_DIR = $(PKG_NAME)-$(PKG_VERS) - -BUILD_DEPENDS = cross/cython - -HOMEPAGE = https://numpy.org/ -COMMENT = The fundamental package for scientific computing with Python -LICENSE = https://numpy.org/doc/stable/license.html - -include ../../mk/spksrc.archs.mk - -ifeq ($(findstring $(ARCH),$(ARMv8_ARCHS)),$(ARCH)) -# workaround for compiler bug, see: https://github.com/numpy/numpy/issues/13622 -# still required for numpy 1.21.1 -ADDITIONAL_CFLAGS += -O0 -endif - -include ../../mk/spksrc.python-wheel.mk - -ifeq ($(PYTHON_LIB_NATIVE),$(PYTHON_LIB_CROSS)) -LD_LIBRARY_PATH := $(INSTALL_DIR)$(INSTALL_PREFIX)/lib:$(LD_LIBRARY_PATH) -export LD_LIBRARY_PATH -endif diff --git a/cross/numpy/PLIST b/cross/numpy/PLIST deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/cross/numpy/digests b/cross/numpy/digests deleted file mode 100644 index a71cce3ed9c..00000000000 --- a/cross/numpy/digests +++ /dev/null @@ -1,3 +0,0 @@ -numpy-1.21.4.zip SHA1 91a1faeb617601453ebf6e2855e5ce6bf94d3588 -numpy-1.21.4.zip SHA256 e6c76a87633aa3fa16614b61ccedfae45b91df2767cf097aa9c933932a7ed1e0 -numpy-1.21.4.zip MD5 b3c4477a027d5b6fba5e1065064fd076 diff --git a/cross/numpy/patches/ppc853x/001-remove-error-pragma_not_allowed_inside_functions.patch b/cross/numpy/patches/ppc853x/001-remove-error-pragma_not_allowed_inside_functions.patch deleted file mode 100644 index 1bc80382895..00000000000 --- a/cross/numpy/patches/ppc853x/001-remove-error-pragma_not_allowed_inside_functions.patch +++ /dev/null @@ -1,22 +0,0 @@ -# Suppress error for ppc compiler "#pragma GCC diagnostic not allowed inside functions" -# ---- numpy/core/src/multiarray/einsum.c.src.orig 2020-07-20 20:33:00.000000000 +0000 -+++ numpy/core/src/multiarray/einsum.c.src 2020-11-23 20:32:27.175290941 +0000 -@@ -2153,9 +2153,6 @@ - /* A repeated label, find the original one and merge them. */ - else { - #ifdef __GNUC__ --#pragma GCC diagnostic push --#pragma GCC diagnostic ignored "-Wuninitialized" --#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" - #endif - int i = icombinemap[idim + label]; - -@@ -2170,7 +2167,6 @@ - } - new_strides[i] += stride; - #ifdef __GNUC__ --#pragma GCC diagnostic pop - #endif - } - } From 156df902bb1404c9a9d5541c8b6d847a08a64ffc Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Tue, 25 Jan 2022 12:19:02 +0000 Subject: [PATCH 7/9] Fix workaround for armv8 on DSM -le 7 --- spk/bazarr/Makefile | 5 +++++ spk/homeassistant/Makefile | 15 +++++---------- spk/python310/Makefile | 5 +++++ 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/spk/bazarr/Makefile b/spk/bazarr/Makefile index db0d7ef6574..9881c9dd833 100644 --- a/spk/bazarr/Makefile +++ b/spk/bazarr/Makefile @@ -42,4 +42,9 @@ include ../../mk/spksrc.spk.mk # [numpy] Fix wheel building with older compilers ifeq ($(call version_lt, $(TC_GCC), 5.0),1) WHEELS_CPPFLAGS = [numpy] -std=c++0x +# workaround for compiler bug: +# https://github.com/numpy/numpy/issues/13622 +ifeq ($(findstring $(ARCH),$(ARMv8_ARCHS)),$(ARCH)) +WHEELS_CFLAGS = [numpy] -O0 +endif endif diff --git a/spk/homeassistant/Makefile b/spk/homeassistant/Makefile index f0f0dab2fc8..3f86fa269f4 100644 --- a/spk/homeassistant/Makefile +++ b/spk/homeassistant/Makefile @@ -66,21 +66,16 @@ WHEELS_BUILD_ARGS += --enable-zlib # https://github.com/numpy/numpy/issues/20664 UNSUPPORTED_ARCHS = $(ARMv5_ARCHS) -include ../../mk/spksrc.common.mk - -# [numpy==1.21.*] workaround for compiler bug -# https://github.com/numpy/numpy/issues/13622 -ifeq ($(call version_ge, $(TCVERSION), 7.0),1) -ifeq ($(findstring $(ARCH),$(ARMv8_ARCHS)),$(ARCH)) -WHEELS_CFLAGS = [numpy] -O0 -endif -endif - include ../../mk/spksrc.spk.mk # [numpy] Fix wheel building with older compilers ifeq ($(call version_lt, $(TC_GCC), 5.0),1) WHEELS_CPPFLAGS = [numpy] -std=c++0x +# workaround for compiler bug: +# https://github.com/numpy/numpy/issues/13622 +ifeq ($(findstring $(ARCH),$(ARMv8_ARCHS)),$(ARCH)) +WHEELS_CFLAGS = [numpy] -O0 +endif endif .PHONY: homeassistant_extra_install diff --git a/spk/python310/Makefile b/spk/python310/Makefile index 90450380172..82dd0d52787 100644 --- a/spk/python310/Makefile +++ b/spk/python310/Makefile @@ -95,6 +95,11 @@ include ../../mk/spksrc.spk.mk # [numpy] Fix wheel building with older compilers ifeq ($(call version_lt, $(TC_GCC), 5.0),1) WHEELS_CPPFLAGS = [numpy] -std=c++0x +# workaround for compiler bug: +# https://github.com/numpy/numpy/issues/13622 +ifeq ($(findstring $(ARCH),$(ARMv8_ARCHS)),$(ARCH)) +WHEELS_CFLAGS = [numpy] -O0 +endif endif .PHONY: python310_extra_install From e790c6a4afd54be57cdf22a07004f058fd302368 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Tue, 25 Jan 2022 12:21:26 +0000 Subject: [PATCH 8/9] python310: Disable numpy example --- spk/python310/Makefile | 26 +++++++-------------- spk/python310/src/requirements-crossenv.txt | 5 ++-- 2 files changed, 11 insertions(+), 20 deletions(-) diff --git a/spk/python310/Makefile b/spk/python310/Makefile index 82dd0d52787..70a2f737975 100644 --- a/spk/python310/Makefile +++ b/spk/python310/Makefile @@ -76,32 +76,24 @@ WHEELS = src/requirements-crossenv.txt src/requirements-pure.txt src/requirement # 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] gcc-4.6.4 failed with exit status 1 +# [numpy] +# gcc-4.6.4 failed with exit status 1 # https://github.com/numpy/numpy/issues/20664 -UNSUPPORTED_ARCHS = $(ARMv5_ARCHS) +# UNSUPPORTED_ARCHS = $(ARMv5_ARCHS) -include ../../mk/spksrc.common.mk +include ../../mk/spksrc.spk.mk -# [numpy==1.21.*] workaround for compiler bug +# [numpy] +# Fix wheel building with older compilers +# ifeq ($(call version_lt, $(TC_GCC), 5.0),1) +# WHEELS_CPPFLAGS = [numpy] -std=c++0x +# workaround for compiler bug: # https://github.com/numpy/numpy/issues/13622 -# ifeq ($(call version_ge, $(TCVERSION), 7.0),1) # ifeq ($(findstring $(ARCH),$(ARMv8_ARCHS)),$(ARCH)) # WHEELS_CFLAGS = [numpy] -O0 # endif # endif -include ../../mk/spksrc.spk.mk - -# [numpy] Fix wheel building with older compilers -ifeq ($(call version_lt, $(TC_GCC), 5.0),1) -WHEELS_CPPFLAGS = [numpy] -std=c++0x -# workaround for compiler bug: -# https://github.com/numpy/numpy/issues/13622 -ifeq ($(findstring $(ARCH),$(ARMv8_ARCHS)),$(ARCH)) -WHEELS_CFLAGS = [numpy] -O0 -endif -endif - .PHONY: python310_extra_install python310_extra_install: rm -f $(STAGING_DIR)/$(PYTHON_LIB_DIR)/config/libpython*.a diff --git a/spk/python310/src/requirements-crossenv.txt b/spk/python310/src/requirements-crossenv.txt index 70556d69e88..cfbeda2164c 100644 --- a/spk/python310/src/requirements-crossenv.txt +++ b/spk/python310/src/requirements-crossenv.txt @@ -42,15 +42,14 @@ # ujson: # - Require setuptools-scm in cross/python310 crossenv -ujson==5.1.0 +# ujson==5.1.0 # numpy: # - Require Cython in cross/python310 crossenv # - DSM6 require WHEELS_CFLAGS=-std=c++0x -# numpy==1.21.*: # - aarch64-6.1 require workaround WHEELS_CFLAGS=-O0 # ref: https://github.com/numpy/numpy/issues/13622 -numpy==1.22.0 +# numpy==1.22.0 # 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 47363b6aaab40f718a521dfe86b4c80afcdcc952 Mon Sep 17 00:00:00 2001 From: Vincent Fortier Date: Tue, 25 Jan 2022 12:22:33 +0000 Subject: [PATCH 9/9] numpy: adjust Makefile's comments --- spk/bazarr/Makefile | 6 ++++-- spk/homeassistant/Makefile | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/spk/bazarr/Makefile b/spk/bazarr/Makefile index 9881c9dd833..8b3b6a98849 100644 --- a/spk/bazarr/Makefile +++ b/spk/bazarr/Makefile @@ -33,13 +33,15 @@ ADMIN_PORT = $(SERVICE_PORT) WHEELS = src/requirements-crossenv.txt src/requirements-pure.txt -# [numpy] gcc-4.6.4 failed with exit status 1 +# [numpy] +# gcc-4.6.4 failed with exit status 1 # https://github.com/numpy/numpy/issues/20664 UNSUPPORTED_ARCHS = $(ARMv5_ARCHS) include ../../mk/spksrc.spk.mk -# [numpy] Fix wheel building with older compilers +# [numpy] +# Fix wheel building with older compilers ifeq ($(call version_lt, $(TC_GCC), 5.0),1) WHEELS_CPPFLAGS = [numpy] -std=c++0x # workaround for compiler bug: diff --git a/spk/homeassistant/Makefile b/spk/homeassistant/Makefile index 3f86fa269f4..3af538e828a 100644 --- a/spk/homeassistant/Makefile +++ b/spk/homeassistant/Makefile @@ -62,13 +62,15 @@ WHEELS_BUILD_ARGS += --enable-freetype WHEELS_BUILD_ARGS += --enable-jpeg WHEELS_BUILD_ARGS += --enable-zlib -# [numpy] gcc-4.6.4 failed with exit status 1 +# [numpy] +# gcc-4.6.4 failed with exit status 1 # https://github.com/numpy/numpy/issues/20664 UNSUPPORTED_ARCHS = $(ARMv5_ARCHS) include ../../mk/spksrc.spk.mk -# [numpy] Fix wheel building with older compilers +# [numpy] +# Fix wheel building with older compilers ifeq ($(call version_lt, $(TC_GCC), 5.0),1) WHEELS_CPPFLAGS = [numpy] -std=c++0x # workaround for compiler bug: