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
- }
- }
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/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)]" ; \
diff --git a/spk/bazarr/Makefile b/spk/bazarr/Makefile
index 7356cba3a83..8b3b6a98849 100644
--- a/spk/bazarr/Makefile
+++ b/spk/bazarr/Makefile
@@ -33,18 +33,20 @@ 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.common.mk
+include ../../mk/spksrc.spk.mk
-# [numpy] Fix wheel building with older compilers
-ifeq ($(call version_lt, ${TCVERSION}, 7.0),1)
+# [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
-
-include ../../mk/spksrc.spk.mk
diff --git a/spk/homeassistant/Makefile b/spk/homeassistant/Makefile
index 70be7fdbef0..3af538e828a 100644
--- a/spk/homeassistant/Makefile
+++ b/spk/homeassistant/Makefile
@@ -7,23 +7,41 @@ 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
# [DTLSSocket] Required for postinst [tradfri]
DEPENDS += cross/dtlssocket
-# [flunearyou]
-DEPENDS += cross/ujson
-
# [PyYAML]
DEPENDS += cross/libyaml
@@ -44,32 +62,24 @@ 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
-
-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
+# [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
+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
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 1c0a457d9c5..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
@@ -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/Makefile b/spk/python310/Makefile
index 22718aa5a10..70a2f737975 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,24 @@ 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
+# [numpy]
+# gcc-4.6.4 failed with exit status 1
# https://github.com/numpy/numpy/issues/20664
# UNSUPPORTED_ARCHS = $(ARMv5_ARCHS)
-# [numpy] Fix wheel building with older compilers
-# ifeq ($(call version_lt, ${TCVERSION}, 7.0),1)
+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
-# 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
-
.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 f0be79a9ba5..cfbeda2164c 100644
--- a/spk/python310/src/requirements-crossenv.txt
+++ b/spk/python310/src/requirements-crossenv.txt
@@ -40,6 +40,10 @@
# 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