Skip to content

Commit f78f7a8

Browse files
committed
python3: bump to version 3.9.0
Drop patch 016-adjust-config-paths.patch Implemented this differently; it was kind of on my todo-list, since this patch is a workaround for not dealing with PLATFORM_TRIPLET on OpenWrt. Refreshed other patches. Dropped 'patches-setuptools/004-site-patch.patch' Does not apply anymore. Setuptools has removed site.py support: pypa/setuptools#2165 If this is still needed, we may need to re-think it's implementation. Signed-off-by: Alexandru Ardelean <[email protected]>
1 parent 76441fe commit f78f7a8

14 files changed

+37
-109
lines changed

lang/python/python3-version.mk

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77

88
# Note: keep in sync with setuptools & pip
99
PYTHON3_VERSION_MAJOR:=3
10-
PYTHON3_VERSION_MINOR:=8
11-
PYTHON3_VERSION_MICRO:=5
10+
PYTHON3_VERSION_MINOR:=9
11+
PYTHON3_VERSION_MICRO:=0
1212

1313
PYTHON3_VERSION:=$(PYTHON3_VERSION_MAJOR).$(PYTHON3_VERSION_MINOR)
1414

1515
PYTHON3_SETUPTOOLS_PKG_RELEASE:=1
1616
PYTHON3_PIP_PKG_RELEASE:=1
1717

18-
PYTHON3_SETUPTOOLS_VERSION:=47.1.0
19-
PYTHON3_PIP_VERSION:=20.1.1
18+
PYTHON3_SETUPTOOLS_VERSION:=49.2.1
19+
PYTHON3_PIP_VERSION:=20.2.3

lang/python/python3/Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ include $(TOPDIR)/rules.mk
1111
include ../python3-version.mk
1212

1313
PKG_NAME:=python3
14-
PKG_RELEASE:=2
14+
PKG_RELEASE:=1
1515
PKG_VERSION:=$(PYTHON3_VERSION).$(PYTHON3_VERSION_MICRO)
1616

1717
PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
1818
PKG_SOURCE_URL:=https://www.python.org/ftp/python/$(PKG_VERSION)
19-
PKG_HASH:=e3003ed57db17e617acb382b0cade29a248c6026b1bd8aad1f976e9af66a83b0
19+
PKG_HASH:=9c73e63c99855709b9be0b3cc9e5b072cb60f37311e8c4e50f15576a0bf82854
2020

2121
PKG_MAINTAINER:=Alexandru Ardelean <[email protected]>, Jeffery To <[email protected]>
2222
PKG_LICENSE:=Python/2.0
@@ -140,6 +140,9 @@ DISABLE_BLUETOOTH:= \
140140
ac_cv_header_bluetooth_bluetooth_h=no \
141141
ac_cv_header_bluetooth_h=no
142142

143+
CONFIGURE_VARS+= \
144+
PYTHON_FOR_BUILD="_PYTHON_PROJECT_BASE=$$(abs_builddir) _PYTHON_HOST_PLATFORM=$$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$$(shell test -f pybuilddir.txt && echo $$(abs_builddir)/`cat pybuilddir.txt`:)$$(srcdir)/Lib _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata $(HOST_PYTHON3_BIN)"
145+
143146
CONFIGURE_ARGS+= \
144147
--enable-optimizations \
145148
--enable-shared \

lang/python/python3/files/python3-package-setuptools.mk

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ define Py3Package/python3-setuptools/install
2525
$(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON3_VERSION)/site-packages/setuptools-$(PYTHON3_SETUPTOOLS_VERSION).dist-info \
2626
$(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON3_VERSION)/site-packages/easy_install.py \
2727
$(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages
28-
$(CP) \
29-
$(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/setuptools/site-patch.py \
30-
$(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/setuptools/site-patch.py.txt
3128
find $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/ -path '*/__pycache__/*' -delete
3229
find $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/ -type d -name __pycache__ -delete
3330
endef

lang/python/python3/patches-setuptools/004-site-patch.patch

Lines changed: 0 additions & 14 deletions
This file was deleted.

lang/python/python3/patches/001-enable-zlib.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
--- a/Modules/Setup
22
+++ b/Modules/Setup
3-
@@ -334,7 +334,7 @@ _symtable symtablemodule.c
3+
@@ -338,7 +338,7 @@ _symtable symtablemodule.c
44
# Andrew Kuchling's zlib module.
55
# This require zlib 1.1.3 (or later).
66
# See http://www.gzip.org/zlib/

lang/python/python3/patches/003-do-not-run-distutils-tests.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
--- a/Makefile.pre.in
22
+++ b/Makefile.pre.in
3-
@@ -1451,6 +1451,7 @@ libinstall: build_all $(srcdir)/Modules/
3+
@@ -1524,6 +1524,7 @@ libinstall: build_all $(srcdir)/Modules/
44
$(INSTALL_DATA) `cat pybuilddir.txt`/_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH).py \
55
$(DESTDIR)$(LIBDEST); \
66
$(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt
77
+ifeq (@COMPILE_ALL_TESTS@,yes)
88
if test -d $(DESTDIR)$(LIBDEST)/distutils/tests; then \
99
$(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \
1010
$(DESTDIR)$(LIBDEST)/distutils/tests ; \
11-
@@ -1486,6 +1487,7 @@ libinstall: build_all $(srcdir)/Modules/
11+
@@ -1559,6 +1560,7 @@ libinstall: build_all $(srcdir)/Modules/
1212
$(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
1313
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
1414
$(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt

lang/python/python3/patches/004-do-not-write-bytes-codes.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
--- a/Python/initconfig.c
22
+++ b/Python/initconfig.c
3-
@@ -152,7 +152,7 @@ int Py_NoSiteFlag = 0; /* Suppress 'impo
3+
@@ -157,7 +157,7 @@ int Py_NoSiteFlag = 0; /* Suppress 'impo
44
int Py_BytesWarningFlag = 0; /* Warn on str(bytes) and str(buffer) */
55
int Py_FrozenFlag = 0; /* Needed by getpath.c */
66
int Py_IgnoreEnvironmentFlag = 0; /* e.g. PYTHONPATH, PYTHONHOME */

lang/python/python3/patches/006-do-not-add-multiarch-paths-when-cross-compiling.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
--- a/setup.py
22
+++ b/setup.py
3-
@@ -654,7 +654,8 @@ class PyBuildExt(build_ext):
3+
@@ -749,7 +749,8 @@ class PyBuildExt(build_ext):
44
# only change this for cross builds for 3.3, issues on Mageia
55
if CROSS_COMPILING:
66
self.add_cross_compiling_paths()

lang/python/python3/patches/008-distutils-use-python-sysroot.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ Signed-off-by: Thomas Petazzoni <[email protected]>
3636
self.library_dirs.append('.')
3737
--- a/Lib/distutils/sysconfig.py
3838
+++ b/Lib/distutils/sysconfig.py
39-
@@ -18,10 +18,17 @@ from .errors import DistutilsPlatformErr
40-
from .util import get_platform, get_host_platform
39+
@@ -17,10 +17,17 @@ import sys
40+
from .errors import DistutilsPlatformError
4141

4242
# These are needed in a couple of spots, so just compute them once.
4343
-PREFIX = os.path.normpath(sys.prefix)

lang/python/python3/patches/010-do-not-add-rt-lib-dirs-when-cross-compiling.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
--- a/setup.py
22
+++ b/setup.py
3-
@@ -631,8 +631,9 @@ class PyBuildExt(build_ext):
3+
@@ -726,8 +726,9 @@ class PyBuildExt(build_ext):
44
# directly since an inconsistently reproducible issue comes up where
55
# the environment variable is not set even though the value were passed
66
# into configure and stored in the Makefile (issue found on OS X 10.3).

lang/python/python3/patches/013-getbuildinfo-date-time-source-date-epoch.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
--- a/Makefile.pre.in
22
+++ b/Makefile.pre.in
3-
@@ -735,6 +735,16 @@ regen-all: regen-opcode regen-opcode-tar
3+
@@ -764,6 +764,16 @@ regen-all: regen-opcode regen-opcode-tar
44
############################################################################
55
# Special rules for object files
66

@@ -17,7 +17,7 @@
1717
Modules/getbuildinfo.o: $(PARSER_OBJS) \
1818
$(OBJECT_OBJS) \
1919
$(PYTHON_OBJS) \
20-
@@ -743,6 +753,8 @@ Modules/getbuildinfo.o: $(PARSER_OBJS) \
20+
@@ -772,6 +782,8 @@ Modules/getbuildinfo.o: $(PARSER_OBJS) \
2121
$(DTRACE_OBJS) \
2222
$(srcdir)/Modules/getbuildinfo.c
2323
$(CC) -c $(PY_CORE_CFLAGS) \

lang/python/python3/patches/014-remove-platform-so-suffix.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
--- a/configure
22
+++ b/configure
3-
@@ -15174,7 +15174,7 @@ $as_echo_n "checking ABIFLAGS... " >&6;
3+
@@ -15308,7 +15308,7 @@ $as_echo_n "checking ABIFLAGS... " >&6;
44
$as_echo "$ABIFLAGS" >&6; }
55
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
66
$as_echo_n "checking SOABI... " >&6; }
@@ -11,7 +11,7 @@
1111

1212
--- a/configure.ac
1313
+++ b/configure.ac
14-
@@ -4654,7 +4654,7 @@ AC_SUBST(SOABI)
14+
@@ -4749,7 +4749,7 @@ AC_SUBST(SOABI)
1515
AC_MSG_CHECKING(ABIFLAGS)
1616
AC_MSG_RESULT($ABIFLAGS)
1717
AC_MSG_CHECKING(SOABI)

lang/python/python3/patches/015-abort-on-failed-modules.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
--- a/setup.py
22
+++ b/setup.py
3-
@@ -441,6 +441,7 @@ class PyBuildExt(build_ext):
3+
@@ -536,6 +536,7 @@ class PyBuildExt(build_ext):
44
print("Failed to build these modules:")
55
print_three_column(failed)
66
print()
Lines changed: 15 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,22 @@
1-
--- a/Lib/distutils/sysconfig.py
2-
+++ b/Lib/distutils/sysconfig.py
3-
@@ -445,6 +445,7 @@ def _init_posix():
4-
platform=sys.platform,
5-
multiarch=getattr(sys.implementation, '_multiarch', ''),
6-
))
7-
+ name = '_sysconfigdata'
8-
_temp = __import__(name, globals(), locals(), ['build_time_vars'], 0)
9-
build_time_vars = _temp.build_time_vars
10-
global _config_vars
11-
--- a/Lib/sysconfig.py
12-
+++ b/Lib/sysconfig.py
13-
@@ -344,6 +344,7 @@ def get_makefile_filename():
14-
15-
16-
def _get_sysconfigdata_name():
17-
+ return '_sysconfigdata'
18-
return os.environ.get('_PYTHON_SYSCONFIGDATA_NAME',
19-
'_sysconfigdata_{abi}_{platform}_{multiarch}'.format(
20-
abi=sys.abiflags,
21-
--- a/Makefile.pre.in
22-
+++ b/Makefile.pre.in
23-
@@ -1460,7 +1460,7 @@ libinstall: build_all $(srcdir)/Modules/
24-
esac; \
25-
done; \
26-
done
27-
- $(INSTALL_DATA) `cat pybuilddir.txt`/_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH).py \
28-
+ $(INSTALL_DATA) `cat pybuilddir.txt`/_sysconfigdata*.py \
29-
$(DESTDIR)$(LIBDEST); \
30-
$(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt
31-
ifeq (@COMPILE_ALL_TESTS@,yes)
32-
@@ -1618,7 +1618,7 @@ sharedinstall: sharedmods
33-
--install-scripts=$(BINDIR) \
34-
--install-platlib=$(DESTSHARED) \
35-
--root=$(DESTDIR)/
36-
- -rm $(DESTDIR)$(DESTSHARED)/_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH).py
37-
+ -rm $(DESTDIR)$(DESTSHARED)/_sysconfigdata*.py
38-
-rm -r $(DESTDIR)$(DESTSHARED)/__pycache__
39-
40-
# Here are a couple of targets for MacOSX again, to install a full
411
--- a/configure
422
+++ b/configure
43-
@@ -2951,7 +2951,7 @@ $as_echo_n "checking for python interpre
44-
fi
45-
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
46-
$as_echo "$interp" >&6; }
47-
- PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH) '$interp
48-
+ PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata '$interp
49-
fi
50-
elif test "$cross_compiling" = maybe; then
51-
as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
52-
@@ -15213,7 +15213,7 @@ else
3+
@@ -5354,6 +5354,8 @@ $as_echo "none" >&6; }
534
fi
5+
rm -f conftest.c conftest.out
546

55-
56-
-if test x$PLATFORM_TRIPLET = x; then
57-
+if true ; then
58-
LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
59-
else
60-
LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
7+
+PLATFORM_TRIPLET=
8+
+
9+
if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
10+
if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
11+
as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
6112
--- a/configure.ac
6213
+++ b/configure.ac
63-
@@ -75,7 +75,7 @@ if test "$cross_compiling" = yes; then
64-
AC_MSG_ERROR([python$PACKAGE_VERSION interpreter not found])
65-
fi
66-
AC_MSG_RESULT($interp)
67-
- PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH) '$interp
68-
+ PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata '$interp
69-
fi
70-
elif test "$cross_compiling" = maybe; then
71-
AC_MSG_ERROR([Cross compiling required --host=HOST-TUPLE and --build=ARCH])
72-
@@ -4688,7 +4688,7 @@ fi
14+
@@ -876,6 +876,8 @@ else
15+
fi
16+
rm -f conftest.c conftest.out
7317

74-
dnl define LIBPL after ABIFLAGS and LDVERSION is defined.
75-
AC_SUBST(PY_ENABLE_SHARED)
76-
-if test x$PLATFORM_TRIPLET = x; then
77-
+if true ; then
78-
LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
79-
else
80-
LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
18+
+PLATFORM_TRIPLET=
19+
+
20+
if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
21+
if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
22+
AC_MSG_ERROR([internal configure error for the platform triplet, please file a bug report])

0 commit comments

Comments
 (0)