Skip to content

Commit c8e616f

Browse files
authored
Update python 3.8 and 3.10 (SynoCommunity#5318)
* Update Python 3.8 and 3.10 - update Python 3.10.4 to v3.10.5 and Python 3.8.12 to v3.8.13 - remove static libpython (3.10 has configure arg, 3.8 needs manual removal) - pip: install specific version of pip with get-pip.py (revert change by SynoCommunity#5316) - pip: avoid unintended update of pip with --disable-pip-version-check * vim: use Python 3.10 for python support * ffsync does not build anymore - requirements file handling to create wheels has changed - might never be working, as still python 2 - future update is redesigned using rust * fix (optimized) build for DSM 5.2 and 88f6281 (ARMv5)
1 parent 34af6b8 commit c8e616f

36 files changed

+191
-307
lines changed

cross/cffi/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
PKG_NAME = cffi
2-
PKG_VERS = 1.14.6
2+
PKG_VERS = 1.15.0
33
PKG_EXT = tar.gz
44
PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT)
55
PKG_DIST_SITE = https://files.pythonhosted.org/packages/source/c/$(PKG_NAME)

cross/cffi/digests

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
cffi-1.14.6.tar.gz SHA1 35bb24955834ecb5b7173e625fa95b02d638fcfd
2-
cffi-1.14.6.tar.gz SHA256 c9a875ce9d7fe32887784274dd533c57909b7b1dcadcc128a2ac21331a9765dd
3-
cffi-1.14.6.tar.gz MD5 5c118a18ea897df164dbff67a32876fc
1+
cffi-1.15.0.tar.gz SHA1 9c51c29e35510adf7f94542e1f8e05611930b07b
2+
cffi-1.15.0.tar.gz SHA256 920f0d66a896c2d99f0adbb391f990a84091179542c205fa53ce5787aff87954
3+
cffi-1.15.0.tar.gz MD5 f3a3f26cd3335fc597479c9475da0a0b

cross/greenlet/PLIST

Whitespace-only changes.

cross/pycparser/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
PKG_NAME = pycparser
2-
PKG_VERS = 2.20
2+
PKG_VERS = 2.21
33
PKG_EXT = tar.gz
44
PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT)
55
PKG_DIST_SITE = https://files.pythonhosted.org/packages/source/p/$(PKG_NAME)

cross/pycparser/digests

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
pycparser-2.20.tar.gz SHA1 0ae93d89b69fab48af3a407a2f8663bcea270c3d
2-
pycparser-2.20.tar.gz SHA256 2d475327684562c3a96cc71adf7dc8c4f0565175cf86b6d7a404ff4c771f15f0
3-
pycparser-2.20.tar.gz MD5 b8f88de737db8c346ee8d31c07c7a25a
1+
pycparser-2.21.tar.gz SHA1 359c718c6ece361047f61846b9fa4ea0239576dc
2+
pycparser-2.21.tar.gz SHA256 e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206
3+
pycparser-2.21.tar.gz MD5 48f7d743bf018f7bb2ffc5fb976d1492

cross/python310/Makefile

+12-29
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
PKG_NAME = python310
2-
PKG_VERS = 3.10.4
2+
PKG_VERS = 3.10.5
33
PKG_VERS_MAJOR_MINOR = $(word 1,$(subst ., ,$(PKG_VERS))).$(word 2,$(subst ., ,$(PKG_VERS)))
44
PKG_EXT = tar.xz
55
PKG_DIST_NAME = Python-$(PKG_VERS).$(PKG_EXT)
@@ -21,7 +21,9 @@ LICENSE = PSF
2121
GNU_CONFIGURE = 1
2222

2323
CONFIGURE_ARGS = --enable-shared
24+
CONFIGURE_ARGS += --without-static-libpython
2425
CONFIGURE_ARGS += --enable-ipv6
26+
# installed pip is not on PATH
2527
CONFIGURE_ARGS += --without-ensurepip
2628
CONFIGURE_ARGS += --enable-loadable-sqlite-extensions
2729
CONFIGURE_ARGS += --with-computed-gotos=yes
@@ -30,18 +32,15 @@ include ../../mk/spksrc.archs.mk
3032

3133
# optionally generate optimized code
3234
ifeq ($(strip $(PYTHON_OPTIMIZE)),1)
33-
34-
# old compilers fail with: unrecognized command line option "-fprofile-correction"
35-
ifneq ($(findstring $(ARCH),$(OLD_PPC_ARCHS)),$(ARCH))
3635
CONFIGURE_ARGS += --enable-optimizations
37-
endif
38-
3936
# old compilers fail with unrecognized command line options: -flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none
40-
ifneq ($(findstring $(ARCH),$(ARMv5_ARCHS) $(OLD_PPC_ARCHS)),$(ARCH))
37+
ifneq ($(findstring $(ARCH),$(OLD_PPC_ARCHS)),$(ARCH))
4138
# Enable Link-Time Optimization
4239
CONFIGURE_ARGS += --with-lto
4340
endif
44-
41+
else
42+
# test modules are required for optimization only
43+
CONFIGURE_ARGS += --disable-test-modules
4544
endif
4645

4746
ifeq ($(findstring $(ARCH),$(OLD_PPC_ARCHS)),$(ARCH))
@@ -97,8 +96,6 @@ PATH := $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/bi
9796
LD_LIBRARY_PATH := $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/lib:$(LD_LIBRARY_PATH)
9897
export PATH LD_LIBRARY_PATH
9998

100-
ENV += LIBFFI_INCLUDEDIR=$(STAGING_INSTALL_PREFIX)/include/
101-
10299
.PHONY: python310_post_patch
103100
python310_post_patch:
104101
$(RUN) sed -e 's#@INSTALL_PREFIX@#$(INSTALL_PREFIX)#' -i Lib/mimetypes.py
@@ -133,29 +130,15 @@ python310_post_install: $(WORK_DIR)/python-cc.mk
133130
cp -R $(HOSTPYTHON_LIB_NATIVE) $(PYTHON_LIB_CROSS)/../
134131
@$(RUN) $(PYTHON_NATIVE) -m crossenv $(STAGING_INSTALL_PREFIX)/bin/python$(PKG_VERS_MAJOR_MINOR) $(WORK_DIR)/crossenv/
135132
. $(WORK_DIR)/crossenv/bin/activate && $(RUN) wget https://bootstrap.pypa.io/get-pip.py
136-
. $(WORK_DIR)/crossenv/bin/activate && $(RUN) build-python get-pip.py --no-setuptools --no-wheel
137-
. $(WORK_DIR)/crossenv/bin/activate && $(RUN) python get-pip.py --no-setuptools --no-wheel
138-
. $(WORK_DIR)/crossenv/bin/activate && $(RUN) build-pip install "setuptools==62.4.0"
139-
. $(WORK_DIR)/crossenv/bin/activate && $(RUN) pip install "setuptools==62.4.0"
140-
. $(WORK_DIR)/crossenv/bin/activate && $(RUN) build-pip install "setuptools-scm==6.4.2"
141-
. $(WORK_DIR)/crossenv/bin/activate && $(RUN) pip install "setuptools-scm==6.4.2"
142-
. $(WORK_DIR)/crossenv/bin/activate && $(RUN) build-pip install "wheel==0.37.1"
143-
. $(WORK_DIR)/crossenv/bin/activate && $(RUN) pip install "wheel==0.37.1"
144-
. $(WORK_DIR)/crossenv/bin/activate && $(RUN) build-pip install "cffi==1.15.0"
145-
. $(WORK_DIR)/crossenv/bin/activate && $(RUN) pip install "cffi==1.15.0"
146-
. $(WORK_DIR)/crossenv/bin/activate && $(RUN) build-pip install "cryptography==3.3.2"
147-
. $(WORK_DIR)/crossenv/bin/activate && $(RUN) pip install "cryptography==3.3.2"
148-
. $(WORK_DIR)/crossenv/bin/activate && $(RUN) build-pip install "poetry==1.1.13"
149-
. $(WORK_DIR)/crossenv/bin/activate && $(RUN) pip install "poetry==1.1.13"
150-
. $(WORK_DIR)/crossenv/bin/activate && $(RUN) build-pip install "Cython==0.29.28"
151-
. $(WORK_DIR)/crossenv/bin/activate && $(RUN) pip install "Cython==0.29.28"
152-
. $(WORK_DIR)/crossenv/bin/activate && $(RUN) build-pip install "flit==3.7.1"
153-
. $(WORK_DIR)/crossenv/bin/activate && $(RUN) pip install "flit==3.7.1"
133+
. $(WORK_DIR)/crossenv/bin/activate && $(RUN) build-python get-pip.py "pip==22.0.4" --no-setuptools --no-wheel --disable-pip-version-check
134+
. $(WORK_DIR)/crossenv/bin/activate && $(RUN) build-pip --disable-pip-version-check install "setuptools==62.4.0" "setuptools-scm==6.4.2" "wheel==0.37.1" "cffi==1.15.0" "cryptography==3.3.2" "poetry==1.1.13" "Cython==0.29.28" "flit==3.7.1"
135+
. $(WORK_DIR)/crossenv/bin/activate && $(RUN) python get-pip.py "pip==22.0.4" --no-setuptools --no-wheel --disable-pip-version-check
136+
. $(WORK_DIR)/crossenv/bin/activate && $(RUN) pip --disable-pip-version-check install "setuptools==62.4.0" "setuptools-scm==6.4.2" "wheel==0.37.1" "cffi==1.15.0" "cryptography==3.3.2" "poetry==1.1.13" "Cython==0.29.28" "flit==3.7.1"
154137
ifneq ($(PYTHON_LIB_NATIVE),$(PYTHON_LIB_CROSS))
155138
cp $(PYTHON_LIB_CROSS)/_sysconfigdata_*.py $(PYTHON_LIB_NATIVE)/_sysconfigdata.py
156139
endif
157140

158-
$(WORK_DIR)/python-cc.mk:
141+
$(WORK_DIR)/python-cc.mk:
159142
@echo HOSTPYTHON=$(HOSTPYTHON) > $@
160143
@echo CROSSENV=$(WORK_DIR)/crossenv/bin/activate >> $@
161144
@echo HOSTPYTHON_LIB_NATIVE=$(HOSTPYTHON_LIB_NATIVE) >> $@

cross/python310/digests

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
Python-3.10.4.tar.xz SHA1 8f684863b92bf43936b16dbb867e392f10e8ffc7
2-
Python-3.10.4.tar.xz SHA256 80bf925f571da436b35210886cf79f6eb5fa5d6c571316b73568343451f77a19
3-
Python-3.10.4.tar.xz MD5 21f2e113e087083a1e8cf10553d93599
1+
Python-3.10.5.tar.xz SHA1 b80b9c13bb6ba5eb8762ca0d2b888c404582a405
2+
Python-3.10.5.tar.xz SHA256 8437efd5b106ef0a75aabfbf23d880625120a73a86a22ade4d2e2e68d7b74486
3+
Python-3.10.5.tar.xz MD5 f05727cb3489aa93cd57eb561c16747b

cross/python310/patches/002-xcompile.patch

-17
This file was deleted.

cross/python310/patches/003-rpath.patch

-45
This file was deleted.

cross/python310/patches/005-configure.ac-libffi.patch

-37
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# remove lto optimization flags unknown by ARMv5 gcc
2+
# - remove -ffat-lto-objects
3+
4+
--- configure.ac.orig 2022-06-06 11:53:30.000000000 +0000
5+
+++ configure.ac 2022-06-19 15:36:23.019811638 +0000
6+
@@ -1427,7 +1427,7 @@
7+
LTOCFLAGS="-flto"
8+
;;
9+
*)
10+
- LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
11+
+ LTOFLAGS="-flto -fuse-linker-plugin -flto-partition=none"
12+
;;
13+
esac
14+
;;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# remove lto optimization flags unknown by older gcc
2+
# - remove -fuse-linker-plugin
3+
# - remove -fprofile-correction
4+
5+
--- configure.ac.orig 2022-06-06 11:53:30.000000000 +0000
6+
+++ configure.ac 2022-06-19 15:36:23.019811638 +0000
7+
@@ -1427,7 +1427,7 @@
8+
LTOCFLAGS="-flto"
9+
;;
10+
*)
11+
- LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
12+
+ LTOFLAGS="-flto -ffat-lto-objects -flto-partition=none"
13+
;;
14+
esac
15+
;;
16+
@@ -1506,7 +1506,7 @@
17+
;;
18+
*)
19+
PGO_PROF_GEN_FLAG="-fprofile-generate"
20+
- PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
21+
+ PGO_PROF_USE_FLAG="-fprofile-use"
22+
LLVM_PROF_MERGER="true"
23+
LLVM_PROF_FILE=""
24+
;;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# remove lto optimization flags unknown by older gcc
2+
# - remove -fuse-linker-plugin
3+
4+
--- configure.ac.orig 2022-06-06 11:53:30.000000000 +0000
5+
+++ configure.ac 2022-06-19 15:36:23.019811638 +0000
6+
@@ -1427,7 +1427,7 @@
7+
LTOCFLAGS="-flto"
8+
;;
9+
*)
10+
- LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
11+
+ LTOFLAGS="-flto -ffat-lto-objects -flto-partition=none"
12+
;;
13+
esac
14+
;;

cross/python38/Makefile

+7-22
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
PKG_NAME = python38
2-
PKG_VERS = 3.8.12
2+
PKG_VERS = 3.8.13
33
PKG_VERS_MAJOR_MINOR = $(word 1,$(subst ., ,$(PKG_VERS))).$(word 2,$(subst ., ,$(PKG_VERS)))
44
PKG_EXT = tar.xz
55
PKG_DIST_NAME = Python-$(PKG_VERS).$(PKG_EXT)
@@ -20,6 +20,7 @@ GNU_CONFIGURE = 1
2020

2121
CONFIGURE_ARGS = --enable-shared
2222
CONFIGURE_ARGS += --enable-ipv6
23+
# installed pip is not on PATH
2324
CONFIGURE_ARGS += --without-ensurepip
2425
CONFIGURE_ARGS += --enable-loadable-sqlite-extensions
2526
CONFIGURE_ARGS += --with-computed-gotos=yes
@@ -28,18 +29,12 @@ include ../../mk/spksrc.archs.mk
2829

2930
# optionally generate optimized code
3031
ifeq ($(strip $(PYTHON_OPTIMIZE)),1)
31-
32-
# old compilers fail with: unrecognized command line option "-fprofile-correction"
33-
ifneq ($(findstring $(ARCH),$(OLD_PPC_ARCHS)),$(ARCH))
3432
CONFIGURE_ARGS += --enable-optimizations
35-
endif
36-
3733
# old compilers fail with unrecognized command line options: -flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none
38-
ifneq ($(findstring $(ARCH),$(ARMv5_ARCHS) $(OLD_PPC_ARCHS)),$(ARCH))
34+
ifneq ($(findstring $(ARCH),$(OLD_PPC_ARCHS)),$(ARCH))
3935
# Enable Link-Time Optimization
4036
CONFIGURE_ARGS += --with-lto
4137
endif
42-
4338
endif
4439

4540
ifeq ($(findstring $(ARCH),$(OLD_PPC_ARCHS)),$(ARCH))
@@ -96,8 +91,6 @@ PATH := $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/bi
9691
LD_LIBRARY_PATH := $(WORK_DIR)/../../../native/$(PKG_NAME)/work-native/install/usr/local/lib:$(LD_LIBRARY_PATH)
9792
export PATH LD_LIBRARY_PATH
9893

99-
ENV += LIBFFI_INCLUDEDIR=$(STAGING_INSTALL_PREFIX)/include/
100-
10194
.PHONY: python38_post_patch
10295
python38_post_patch:
10396
$(RUN) sed -e 's#@INSTALL_PREFIX@#$(INSTALL_PREFIX)#' -i Lib/mimetypes.py
@@ -132,18 +125,10 @@ python38_post_install: $(WORK_DIR)/python-cc.mk
132125
cp -R $(HOSTPYTHON_LIB_NATIVE) $(PYTHON_LIB_CROSS)/../
133126
@$(RUN) $(PYTHON_NATIVE) -m crossenv $(STAGING_INSTALL_PREFIX)/bin/python$(PKG_VERS_MAJOR_MINOR) $(WORK_DIR)/crossenv/
134127
. $(WORK_DIR)/crossenv/bin/activate && $(RUN) wget https://bootstrap.pypa.io/get-pip.py
135-
. $(WORK_DIR)/crossenv/bin/activate && $(RUN) build-python get-pip.py --no-setuptools --no-wheel
136-
. $(WORK_DIR)/crossenv/bin/activate && $(RUN) python get-pip.py --no-setuptools --no-wheel
137-
. $(WORK_DIR)/crossenv/bin/activate && $(RUN) build-pip install "setuptools==62.4.0"
138-
. $(WORK_DIR)/crossenv/bin/activate && $(RUN) pip install "setuptools==62.4.0"
139-
. $(WORK_DIR)/crossenv/bin/activate && $(RUN) build-pip install "wheel==0.37.1"
140-
. $(WORK_DIR)/crossenv/bin/activate && $(RUN) pip install "wheel==0.37.1"
141-
. $(WORK_DIR)/crossenv/bin/activate && $(RUN) build-pip install "cffi==1.15.0"
142-
. $(WORK_DIR)/crossenv/bin/activate && $(RUN) pip install "cffi==1.15.0"
143-
. $(WORK_DIR)/crossenv/bin/activate && $(RUN) build-pip install "cryptography==3.3.2"
144-
. $(WORK_DIR)/crossenv/bin/activate && $(RUN) pip install "cryptography==3.3.2"
145-
. $(WORK_DIR)/crossenv/bin/activate && $(RUN) build-pip install "poetry==1.1.11"
146-
. $(WORK_DIR)/crossenv/bin/activate && $(RUN) pip install "poetry==1.1.11"
128+
. $(WORK_DIR)/crossenv/bin/activate && $(RUN) build-python get-pip.py "pip==22.0.4" --no-setuptools --no-wheel --disable-pip-version-check
129+
. $(WORK_DIR)/crossenv/bin/activate && $(RUN) build-pip --disable-pip-version-check install "setuptools==62.4.0" "wheel==0.37.1" "cffi==1.15.0" "cryptography==3.3.2" "poetry==1.1.13"
130+
. $(WORK_DIR)/crossenv/bin/activate && $(RUN) python get-pip.py "pip==22.0.4" --no-setuptools --no-wheel --disable-pip-version-check
131+
. $(WORK_DIR)/crossenv/bin/activate && $(RUN) pip --disable-pip-version-check install "setuptools==62.4.0" "wheel==0.37.1" "cffi==1.15.0" "cryptography==3.3.2" "poetry==1.1.13"
147132
ifneq ($(PYTHON_LIB_NATIVE),$(PYTHON_LIB_CROSS))
148133
cp $(PYTHON_LIB_CROSS)/_sysconfigdata_*.py $(PYTHON_LIB_NATIVE)/_sysconfigdata.py
149134
endif

cross/python38/digests

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
Python-3.8.12.tar.xz SHA1 7643eccc15f5606bd0dc04affc7ea901e417165d
2-
Python-3.8.12.tar.xz SHA256 b1d3a76420375343b5e8a22fceb1ac65b77193e9ed27146524f0a9db058728ea
3-
Python-3.8.12.tar.xz MD5 9dd8f82e586b776383c82e27923f8795
1+
Python-3.8.13.tar.xz SHA1 fb46587353f092d91caeddb07f82bb66a5115468
2+
Python-3.8.13.tar.xz SHA256 6f309077012040aa39fe8f0c61db8c0fa1c45136763299d375c9e5756f09cf57
3+
Python-3.8.13.tar.xz MD5 c4b7100dcaace9d33ab1fda9a3a038d6

cross/python38/patches/002-xcompile.patch

-17
This file was deleted.

0 commit comments

Comments
 (0)