Browse Source

Merge pull request #13709 from commodo/python-bump

python3: bump to version 3.9.0
lilik-openwrt-22.03
Hannu Nyman 4 years ago
committed by GitHub
parent
commit
4c3e32eea5
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 31 additions and 48 deletions
  1. +4
    -4
      lang/python/python3-version.mk
  2. +2
    -2
      lang/python/python3/Makefile
  3. +0
    -3
      lang/python/python3/files/python3-package-setuptools.mk
  4. +0
    -14
      lang/python/python3/patches-setuptools/004-site-patch.patch
  5. +1
    -1
      lang/python/python3/patches/001-enable-zlib.patch
  6. +2
    -2
      lang/python/python3/patches/003-do-not-run-distutils-tests.patch
  7. +1
    -1
      lang/python/python3/patches/004-do-not-write-bytes-codes.patch
  8. +1
    -1
      lang/python/python3/patches/006-do-not-add-multiarch-paths-when-cross-compiling.patch
  9. +2
    -2
      lang/python/python3/patches/008-distutils-use-python-sysroot.patch
  10. +1
    -1
      lang/python/python3/patches/010-do-not-add-rt-lib-dirs-when-cross-compiling.patch
  11. +2
    -2
      lang/python/python3/patches/013-getbuildinfo-date-time-source-date-epoch.patch
  12. +2
    -2
      lang/python/python3/patches/014-remove-platform-so-suffix.patch
  13. +1
    -1
      lang/python/python3/patches/015-abort-on-failed-modules.patch
  14. +12
    -12
      lang/python/python3/patches/016-adjust-config-paths.patch

+ 4
- 4
lang/python/python3-version.mk View File

@ -7,13 +7,13 @@
# Note: keep in sync with setuptools & pip # Note: keep in sync with setuptools & pip
PYTHON3_VERSION_MAJOR:=3 PYTHON3_VERSION_MAJOR:=3
PYTHON3_VERSION_MINOR:=8
PYTHON3_VERSION_MICRO:=5
PYTHON3_VERSION_MINOR:=9
PYTHON3_VERSION_MICRO:=0
PYTHON3_VERSION:=$(PYTHON3_VERSION_MAJOR).$(PYTHON3_VERSION_MINOR) PYTHON3_VERSION:=$(PYTHON3_VERSION_MAJOR).$(PYTHON3_VERSION_MINOR)
PYTHON3_SETUPTOOLS_PKG_RELEASE:=1 PYTHON3_SETUPTOOLS_PKG_RELEASE:=1
PYTHON3_PIP_PKG_RELEASE:=1 PYTHON3_PIP_PKG_RELEASE:=1
PYTHON3_SETUPTOOLS_VERSION:=47.1.0
PYTHON3_PIP_VERSION:=20.1.1
PYTHON3_SETUPTOOLS_VERSION:=49.2.1
PYTHON3_PIP_VERSION:=20.2.3

+ 2
- 2
lang/python/python3/Makefile View File

@ -11,12 +11,12 @@ include $(TOPDIR)/rules.mk
include ../python3-version.mk include ../python3-version.mk
PKG_NAME:=python3 PKG_NAME:=python3
PKG_RELEASE:=2
PKG_RELEASE:=1
PKG_VERSION:=$(PYTHON3_VERSION).$(PYTHON3_VERSION_MICRO) PKG_VERSION:=$(PYTHON3_VERSION).$(PYTHON3_VERSION_MICRO)
PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://www.python.org/ftp/python/$(PKG_VERSION) PKG_SOURCE_URL:=https://www.python.org/ftp/python/$(PKG_VERSION)
PKG_HASH:=e3003ed57db17e617acb382b0cade29a248c6026b1bd8aad1f976e9af66a83b0
PKG_HASH:=9c73e63c99855709b9be0b3cc9e5b072cb60f37311e8c4e50f15576a0bf82854
PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>, Jeffery To <jeffery.to@gmail.com> PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>, Jeffery To <jeffery.to@gmail.com>
PKG_LICENSE:=Python/2.0 PKG_LICENSE:=Python/2.0


+ 0
- 3
lang/python/python3/files/python3-package-setuptools.mk View File

@ -25,9 +25,6 @@ define Py3Package/python3-setuptools/install
$(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON3_VERSION)/site-packages/setuptools-$(PYTHON3_SETUPTOOLS_VERSION).dist-info \ $(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON3_VERSION)/site-packages/setuptools-$(PYTHON3_SETUPTOOLS_VERSION).dist-info \
$(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON3_VERSION)/site-packages/easy_install.py \ $(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON3_VERSION)/site-packages/easy_install.py \
$(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages
$(CP) \
$(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/setuptools/site-patch.py \
$(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/setuptools/site-patch.py.txt
find $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/ -path '*/__pycache__/*' -delete find $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/ -path '*/__pycache__/*' -delete
find $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/ -type d -name __pycache__ -delete find $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/ -type d -name __pycache__ -delete
endef endef


+ 0
- 14
lang/python/python3/patches-setuptools/004-site-patch.patch View File

@ -1,14 +0,0 @@
--- a/setuptools/command/easy_install.py
+++ b/setuptools/command/easy_install.py
@@ -1324,7 +1324,10 @@ class easy_install(Command):
return # already did it, or don't need to
sitepy = os.path.join(self.install_dir, "site.py")
- source = resource_string("setuptools", "site-patch.py")
+ try:
+ source = resource_string("setuptools", "site-patch.py")
+ except FileNotFoundError:
+ source = resource_string("setuptools", "site-patch.py.txt")
source = source.decode('utf-8')
current = ""

+ 1
- 1
lang/python/python3/patches/001-enable-zlib.patch View File

@ -1,6 +1,6 @@
--- a/Modules/Setup --- a/Modules/Setup
+++ b/Modules/Setup +++ b/Modules/Setup
@@ -334,7 +334,7 @@ _symtable symtablemodule.c
@@ -338,7 +338,7 @@ _symtable symtablemodule.c
# Andrew Kuchling's zlib module. # Andrew Kuchling's zlib module.
# This require zlib 1.1.3 (or later). # This require zlib 1.1.3 (or later).
# See http://www.gzip.org/zlib/ # See http://www.gzip.org/zlib/


+ 2
- 2
lang/python/python3/patches/003-do-not-run-distutils-tests.patch View File

@ -1,6 +1,6 @@
--- a/Makefile.pre.in --- a/Makefile.pre.in
+++ b/Makefile.pre.in +++ b/Makefile.pre.in
@@ -1451,6 +1451,7 @@ libinstall: build_all $(srcdir)/Modules/
@@ -1524,6 +1524,7 @@ libinstall: build_all $(srcdir)/Modules/
$(INSTALL_DATA) `cat pybuilddir.txt`/_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH).py \ $(INSTALL_DATA) `cat pybuilddir.txt`/_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH).py \
$(DESTDIR)$(LIBDEST); \ $(DESTDIR)$(LIBDEST); \
$(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt
@ -8,7 +8,7 @@
if test -d $(DESTDIR)$(LIBDEST)/distutils/tests; then \ if test -d $(DESTDIR)$(LIBDEST)/distutils/tests; then \
$(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \ $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \
$(DESTDIR)$(LIBDEST)/distutils/tests ; \ $(DESTDIR)$(LIBDEST)/distutils/tests ; \
@@ -1486,6 +1487,7 @@ libinstall: build_all $(srcdir)/Modules/
@@ -1559,6 +1560,7 @@ libinstall: build_all $(srcdir)/Modules/
$(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
$(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt


+ 1
- 1
lang/python/python3/patches/004-do-not-write-bytes-codes.patch View File

@ -1,6 +1,6 @@
--- a/Python/initconfig.c --- a/Python/initconfig.c
+++ b/Python/initconfig.c +++ b/Python/initconfig.c
@@ -152,7 +152,7 @@ int Py_NoSiteFlag = 0; /* Suppress 'impo
@@ -157,7 +157,7 @@ int Py_NoSiteFlag = 0; /* Suppress 'impo
int Py_BytesWarningFlag = 0; /* Warn on str(bytes) and str(buffer) */ int Py_BytesWarningFlag = 0; /* Warn on str(bytes) and str(buffer) */
int Py_FrozenFlag = 0; /* Needed by getpath.c */ int Py_FrozenFlag = 0; /* Needed by getpath.c */
int Py_IgnoreEnvironmentFlag = 0; /* e.g. PYTHONPATH, PYTHONHOME */ int Py_IgnoreEnvironmentFlag = 0; /* e.g. PYTHONPATH, PYTHONHOME */


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

@ -1,6 +1,6 @@
--- a/setup.py --- a/setup.py
+++ b/setup.py +++ b/setup.py
@@ -654,7 +654,8 @@ class PyBuildExt(build_ext):
@@ -749,7 +749,8 @@ class PyBuildExt(build_ext):
# only change this for cross builds for 3.3, issues on Mageia # only change this for cross builds for 3.3, issues on Mageia
if CROSS_COMPILING: if CROSS_COMPILING:
self.add_cross_compiling_paths() self.add_cross_compiling_paths()


+ 2
- 2
lang/python/python3/patches/008-distutils-use-python-sysroot.patch View File

@ -36,8 +36,8 @@ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
self.library_dirs.append('.') self.library_dirs.append('.')
--- a/Lib/distutils/sysconfig.py --- a/Lib/distutils/sysconfig.py
+++ b/Lib/distutils/sysconfig.py +++ b/Lib/distutils/sysconfig.py
@@ -18,10 +18,17 @@ from .errors import DistutilsPlatformErr
from .util import get_platform, get_host_platform
@@ -17,10 +17,17 @@ import sys
from .errors import DistutilsPlatformError
# These are needed in a couple of spots, so just compute them once. # These are needed in a couple of spots, so just compute them once.
-PREFIX = os.path.normpath(sys.prefix) -PREFIX = os.path.normpath(sys.prefix)


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

@ -1,6 +1,6 @@
--- a/setup.py --- a/setup.py
+++ b/setup.py +++ b/setup.py
@@ -631,8 +631,9 @@ class PyBuildExt(build_ext):
@@ -726,8 +726,9 @@ class PyBuildExt(build_ext):
# directly since an inconsistently reproducible issue comes up where # directly since an inconsistently reproducible issue comes up where
# the environment variable is not set even though the value were passed # the environment variable is not set even though the value were passed
# into configure and stored in the Makefile (issue found on OS X 10.3). # into configure and stored in the Makefile (issue found on OS X 10.3).


+ 2
- 2
lang/python/python3/patches/013-getbuildinfo-date-time-source-date-epoch.patch View File

@ -1,6 +1,6 @@
--- a/Makefile.pre.in --- a/Makefile.pre.in
+++ b/Makefile.pre.in +++ b/Makefile.pre.in
@@ -735,6 +735,16 @@ regen-all: regen-opcode regen-opcode-tar
@@ -764,6 +764,16 @@ regen-all: regen-opcode regen-opcode-tar
############################################################################ ############################################################################
# Special rules for object files # Special rules for object files
@ -17,7 +17,7 @@
Modules/getbuildinfo.o: $(PARSER_OBJS) \ Modules/getbuildinfo.o: $(PARSER_OBJS) \
$(OBJECT_OBJS) \ $(OBJECT_OBJS) \
$(PYTHON_OBJS) \ $(PYTHON_OBJS) \
@@ -743,6 +753,8 @@ Modules/getbuildinfo.o: $(PARSER_OBJS) \
@@ -772,6 +782,8 @@ Modules/getbuildinfo.o: $(PARSER_OBJS) \
$(DTRACE_OBJS) \ $(DTRACE_OBJS) \
$(srcdir)/Modules/getbuildinfo.c $(srcdir)/Modules/getbuildinfo.c
$(CC) -c $(PY_CORE_CFLAGS) \ $(CC) -c $(PY_CORE_CFLAGS) \


+ 2
- 2
lang/python/python3/patches/014-remove-platform-so-suffix.patch View File

@ -1,6 +1,6 @@
--- a/configure --- a/configure
+++ b/configure +++ b/configure
@@ -15174,7 +15174,7 @@ $as_echo_n "checking ABIFLAGS... " >&6;
@@ -15308,7 +15308,7 @@ $as_echo_n "checking ABIFLAGS... " >&6;
$as_echo "$ABIFLAGS" >&6; } $as_echo "$ABIFLAGS" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
$as_echo_n "checking SOABI... " >&6; } $as_echo_n "checking SOABI... " >&6; }
@ -11,7 +11,7 @@
--- a/configure.ac --- a/configure.ac
+++ b/configure.ac +++ b/configure.ac
@@ -4654,7 +4654,7 @@ AC_SUBST(SOABI)
@@ -4749,7 +4749,7 @@ AC_SUBST(SOABI)
AC_MSG_CHECKING(ABIFLAGS) AC_MSG_CHECKING(ABIFLAGS)
AC_MSG_RESULT($ABIFLAGS) AC_MSG_RESULT($ABIFLAGS)
AC_MSG_CHECKING(SOABI) AC_MSG_CHECKING(SOABI)


+ 1
- 1
lang/python/python3/patches/015-abort-on-failed-modules.patch View File

@ -1,6 +1,6 @@
--- a/setup.py --- a/setup.py
+++ b/setup.py +++ b/setup.py
@@ -441,6 +441,7 @@ class PyBuildExt(build_ext):
@@ -536,6 +536,7 @@ class PyBuildExt(build_ext):
print("Failed to build these modules:") print("Failed to build these modules:")
print_three_column(failed) print_three_column(failed)
print() print()


+ 12
- 12
lang/python/python3/patches/016-adjust-config-paths.patch View File

@ -1,6 +1,6 @@
--- a/Lib/distutils/sysconfig.py --- a/Lib/distutils/sysconfig.py
+++ b/Lib/distutils/sysconfig.py +++ b/Lib/distutils/sysconfig.py
@@ -445,6 +445,7 @@ def _init_posix():
@@ -451,6 +451,7 @@ def _init_posix():
platform=sys.platform, platform=sys.platform,
multiarch=getattr(sys.implementation, '_multiarch', ''), multiarch=getattr(sys.implementation, '_multiarch', ''),
)) ))
@ -10,7 +10,7 @@
global _config_vars global _config_vars
--- a/Lib/sysconfig.py --- a/Lib/sysconfig.py
+++ b/Lib/sysconfig.py +++ b/Lib/sysconfig.py
@@ -344,6 +344,7 @@ def get_makefile_filename():
@@ -342,6 +342,7 @@ def get_makefile_filename():
def _get_sysconfigdata_name(): def _get_sysconfigdata_name():
@ -20,7 +20,7 @@
abi=sys.abiflags, abi=sys.abiflags,
--- a/Makefile.pre.in --- a/Makefile.pre.in
+++ b/Makefile.pre.in +++ b/Makefile.pre.in
@@ -1460,7 +1460,7 @@ libinstall: build_all $(srcdir)/Modules/
@@ -1533,7 +1533,7 @@ libinstall: build_all $(srcdir)/Modules/
esac; \ esac; \
done; \ done; \
done done
@ -29,7 +29,7 @@
$(DESTDIR)$(LIBDEST); \ $(DESTDIR)$(LIBDEST); \
$(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt
ifeq (@COMPILE_ALL_TESTS@,yes) ifeq (@COMPILE_ALL_TESTS@,yes)
@@ -1618,7 +1618,7 @@ sharedinstall: sharedmods
@@ -1691,7 +1691,7 @@ sharedinstall: sharedmods
--install-scripts=$(BINDIR) \ --install-scripts=$(BINDIR) \
--install-platlib=$(DESTSHARED) \ --install-platlib=$(DESTSHARED) \
--root=$(DESTDIR)/ --root=$(DESTDIR)/
@ -40,7 +40,7 @@
# Here are a couple of targets for MacOSX again, to install a full # Here are a couple of targets for MacOSX again, to install a full
--- a/configure --- a/configure
+++ b/configure +++ b/configure
@@ -2951,7 +2951,7 @@ $as_echo_n "checking for python interpre
@@ -2977,7 +2977,7 @@ $as_echo_n "checking for python interpre
fi fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
$as_echo "$interp" >&6; } $as_echo "$interp" >&6; }
@ -49,15 +49,15 @@
fi fi
elif test "$cross_compiling" = maybe; then elif test "$cross_compiling" = maybe; then
as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
@@ -15213,7 +15213,7 @@ else
fi
@@ -15383,7 +15383,7 @@ fi
-if test x$PLATFORM_TRIPLET = x; then -if test x$PLATFORM_TRIPLET = x; then
+if true ; then +if true ; then
LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}"
else else
LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
--- a/configure.ac --- a/configure.ac
+++ b/configure.ac +++ b/configure.ac
@@ -75,7 +75,7 @@ if test "$cross_compiling" = yes; then @@ -75,7 +75,7 @@ if test "$cross_compiling" = yes; then
@ -69,12 +69,12 @@
fi fi
elif test "$cross_compiling" = maybe; then elif test "$cross_compiling" = maybe; then
AC_MSG_ERROR([Cross compiling required --host=HOST-TUPLE and --build=ARCH]) AC_MSG_ERROR([Cross compiling required --host=HOST-TUPLE and --build=ARCH])
@@ -4688,7 +4688,7 @@ fi
@@ -4812,7 +4812,7 @@ fi],
dnl define LIBPL after ABIFLAGS and LDVERSION is defined. dnl define LIBPL after ABIFLAGS and LDVERSION is defined.
AC_SUBST(PY_ENABLE_SHARED) AC_SUBST(PY_ENABLE_SHARED)
-if test x$PLATFORM_TRIPLET = x; then -if test x$PLATFORM_TRIPLET = x; then
+if true ; then +if true ; then
LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}"
else else
LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"

Loading…
Cancel
Save