From 2ef484615dc9acf9d243847c4f1ab3c73dffc37e Mon Sep 17 00:00:00 2001 From: Alexandru Ardelean Date: Thu, 3 May 2018 13:08:52 +0300 Subject: [PATCH 1/2] python: update to version 2.7.15 This also updates pip and setuptools. With this occasion, they also get PKG_RELEASEs of their own. Dropped patch 011-remove-setupterm-definition.patch Manually re-applied 005-fix-bluetooth-support.patch Ran make package/python/refresh to refresh other patches. Signed-off-by: Alexandru Ardelean --- lang/python/python-version.mk | 12 +++++++++--- lang/python/python/Makefile | 4 ++-- .../003-do-not-compile-tests-at-build.patch | 4 ++-- .../patches/004-do-not-write-bytes-codes.patch | 11 +---------- .../patches/005-fix-bluetooth-support.patch | 18 +++++++----------- .../011-remove-setupterm-definition.patch | 10 ---------- ...012-add-support-source-date-epoch-pyc.patch | 2 +- ...buildinfo-date-time-source-date-epoch.patch | 4 ++-- 8 files changed, 24 insertions(+), 41 deletions(-) delete mode 100644 lang/python/python/patches/011-remove-setupterm-definition.patch diff --git a/lang/python/python-version.mk b/lang/python/python-version.mk index 200461d4f..f41321511 100644 --- a/lang/python/python-version.mk +++ b/lang/python/python-version.mk @@ -6,8 +6,14 @@ # PYTHON_VERSION:=2.7 -PYTHON_VERSION_MICRO:=14 +PYTHON_VERSION_MICRO:=15 -PYTHON_SETUPTOOLS_VERSION:=28.8.0 -PYTHON_PIP_VERSION:=9.0.1 +PYTHON_SETUPTOOLS_PKG_RELEASE:=1 +PYTHON_PIP_PKG_RELEASE:=1 + +PYTHON_SETUPTOOLS_VERSION:=39.0.1 +PYTHON_PIP_VERSION:=9.0.3 + +PYTHON_SETUPTOOLS_VERSION:=$(PYTHON_SETUPTOOLS_VERSION)-$(PYTHON_SETUPTOOLS_PKG_RELEASE) +PYTHON_PIP_VERSION:=$(PYTHON_PIP_VERSION)-$(PYTHON_PIP_PKG_RELEASE) diff --git a/lang/python/python/Makefile b/lang/python/python/Makefile index 26c9ada9c..5febe512d 100644 --- a/lang/python/python/Makefile +++ b/lang/python/python/Makefile @@ -12,11 +12,11 @@ include ../python-version.mk PKG_NAME:=python PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO) -PKG_RELEASE:=10 +PKG_RELEASE:=1 PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://www.python.org/ftp/python/$(PKG_VERSION) -PKG_HASH:=71ffb26e09e78650e424929b2b457b9c912ac216576e6bd9e7d204ed03296a66 +PKG_HASH:=22d9b1ac5b26135ad2b8c2901a9413537e08749a753356ee913c84dbd2df5574 PKG_LICENSE:=PSF PKG_LICENSE_FILES:=LICENSE Modules/_ctypes/libffi_msvc/LICENSE Modules/_ctypes/darwin/LICENSE Modules/_ctypes/libffi/LICENSE Modules/_ctypes/libffi_osx/LICENSE Tools/pybench/LICENSE diff --git a/lang/python/python/patches/003-do-not-compile-tests-at-build.patch b/lang/python/python/patches/003-do-not-compile-tests-at-build.patch index 5bd07b122..f86e33a16 100644 --- a/lang/python/python/patches/003-do-not-compile-tests-at-build.patch +++ b/lang/python/python/patches/003-do-not-compile-tests-at-build.patch @@ -1,6 +1,6 @@ --- a/Makefile.pre.in +++ b/Makefile.pre.in -@@ -1110,6 +1110,7 @@ libinstall: build_all $(srcdir)/Lib/$(PL +@@ -1127,6 +1127,7 @@ libinstall: build_all $(srcdir)/Lib/$(PL done; \ done $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt @@ -8,7 +8,7 @@ if test -d $(DESTDIR)$(LIBDEST)/distutils/tests; then \ $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \ $(DESTDIR)$(LIBDEST)/distutils/tests ; \ -@@ -1136,6 +1137,7 @@ libinstall: build_all $(srcdir)/Lib/$(PL +@@ -1153,6 +1154,7 @@ libinstall: build_all $(srcdir)/Lib/$(PL $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt diff --git a/lang/python/python/patches/004-do-not-write-bytes-codes.patch b/lang/python/python/patches/004-do-not-write-bytes-codes.patch index 66c007799..5173cb971 100644 --- a/lang/python/python/patches/004-do-not-write-bytes-codes.patch +++ b/lang/python/python/patches/004-do-not-write-bytes-codes.patch @@ -1,6 +1,6 @@ --- a/Python/pythonrun.c +++ b/Python/pythonrun.c -@@ -79,7 +79,7 @@ int Py_InteractiveFlag; /* Needed by Py_ +@@ -71,7 +71,7 @@ int Py_InteractiveFlag; /* Needed by Py_ int Py_InspectFlag; /* Needed to determine whether to exit at SystemExit */ int Py_NoSiteFlag; /* Suppress 'import site' */ int Py_BytesWarningFlag; /* Warn on str(bytes) and str(buffer) */ @@ -9,12 +9,3 @@ int Py_UseClassExceptionsFlag = 1; /* Needed by bltinmodule.c: deprecated */ int Py_FrozenFlag; /* Needed by getpath.c */ int Py_UnicodeFlag = 0; /* Needed by compile.c */ -@@ -185,7 +185,7 @@ Py_InitializeEx(int install_sigs) - if ((p = Py_GETENV("PYTHONOPTIMIZE")) && *p != '\0') - Py_OptimizeFlag = add_flag(Py_OptimizeFlag, p); - if ((p = Py_GETENV("PYTHONDONTWRITEBYTECODE")) && *p != '\0') -- Py_DontWriteBytecodeFlag = add_flag(Py_DontWriteBytecodeFlag, p); -+ Py_DontWriteBytecodeFlag = atoi(p); - /* The variable is only tested for existence here; _PyRandom_Init will - check its value further. */ - if ((p = Py_GETENV("PYTHONHASHSEED")) && *p != '\0') diff --git a/lang/python/python/patches/005-fix-bluetooth-support.patch b/lang/python/python/patches/005-fix-bluetooth-support.patch index ccc2936d3..5e6e34b3a 100644 --- a/lang/python/python/patches/005-fix-bluetooth-support.patch +++ b/lang/python/python/patches/005-fix-bluetooth-support.patch @@ -1,17 +1,15 @@ -diff --git a/configure b/configure -index 4c0435e..0068a9d 100755 --- a/configure +++ b/configure -@@ -7045,7 +7045,7 @@ sys/param.h sys/poll.h sys/random.h sys/select.h sys/socket.h sys/statvfs.h sys/ +@@ -7077,7 +7077,7 @@ sys/param.h sys/poll.h sys/random.h sys/ sys/termio.h sys/time.h \ sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \ sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \ --bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h -+linux/tipc.h spawn.h util.h alloca.h +-bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h sys/sysmacros.h ++linux/tipc.h spawn.h util.h alloca.h sys/sysmacros.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -@@ -7267,6 +7267,24 @@ fi +@@ -7299,6 +7299,24 @@ fi fi @@ -36,16 +34,14 @@ index 4c0435e..0068a9d 100755 # On Linux, netlink.h requires asm/types.h for ac_header in linux/netlink.h do : -diff --git a/configure.ac b/configure.ac -index 780f275..dceca1c 100644 --- a/configure.ac +++ b/configure.ac -@@ -1702,10 +1702,17 @@ sys/param.h sys/poll.h sys/random.h sys/select.h sys/socket.h sys/statvfs.h sys/ +@@ -1732,10 +1732,17 @@ sys/param.h sys/poll.h sys/random.h sys/ sys/termio.h sys/time.h \ sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \ sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \ --bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h) -+linux/tipc.h spawn.h util.h alloca.h) +-bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h sys/sysmacros.h) ++linux/tipc.h spawn.h util.h alloca.h sys/sysmacros.h) AC_HEADER_DIRENT AC_HEADER_MAJOR diff --git a/lang/python/python/patches/011-remove-setupterm-definition.patch b/lang/python/python/patches/011-remove-setupterm-definition.patch deleted file mode 100644 index 6cad20434..000000000 --- a/lang/python/python/patches/011-remove-setupterm-definition.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/Modules/_cursesmodule.c -+++ b/Modules/_cursesmodule.c -@@ -117,7 +117,6 @@ char *PyCursesVersion = "2.2"; - #defines many common symbols (such as "lines") which breaks the - curses module in other ways. So the code will just specify - explicit prototypes here. */ --extern int setupterm(char *,int,int *); - #ifdef __sgi - #include - #endif diff --git a/lang/python/python/patches/012-add-support-source-date-epoch-pyc.patch b/lang/python/python/patches/012-add-support-source-date-epoch-pyc.patch index 6f33bed1e..282a6fbd5 100644 --- a/lang/python/python/patches/012-add-support-source-date-epoch-pyc.patch +++ b/lang/python/python/patches/012-add-support-source-date-epoch-pyc.patch @@ -1,6 +1,6 @@ --- a/Lib/py_compile.py +++ b/Lib/py_compile.py -@@ -108,6 +108,7 @@ def compile(file, cfile=None, dfile=None, doraise=False): +@@ -108,6 +108,7 @@ def compile(file, cfile=None, dfile=None timestamp = long(os.fstat(f.fileno()).st_mtime) except AttributeError: timestamp = long(os.stat(file).st_mtime) diff --git a/lang/python/python/patches/013-getbuildinfo-date-time-source-date-epoch.patch b/lang/python/python/patches/013-getbuildinfo-date-time-source-date-epoch.patch index de7605d1e..f6891d73e 100644 --- a/lang/python/python/patches/013-getbuildinfo-date-time-source-date-epoch.patch +++ b/lang/python/python/patches/013-getbuildinfo-date-time-source-date-epoch.patch @@ -1,6 +1,6 @@ --- a/Makefile.pre.in +++ b/Makefile.pre.in -@@ -625,6 +625,16 @@ regen-all: regen-opcode-targets regen-gr +@@ -634,6 +634,16 @@ regen-all: regen-opcode-targets regen-gr ############################################################################ # Special rules for object files @@ -17,7 +17,7 @@ Modules/getbuildinfo.o: $(PARSER_OBJS) \ $(OBJECT_OBJS) \ $(PYTHON_OBJS) \ -@@ -633,6 +643,8 @@ Modules/getbuildinfo.o: $(PARSER_OBJS) \ +@@ -642,6 +652,8 @@ Modules/getbuildinfo.o: $(PARSER_OBJS) \ $(MODOBJS) \ $(srcdir)/Modules/getbuildinfo.c $(CC) -c $(PY_CFLAGS) \ From b7d1d2149ee094ba3b530d5c168878c8198f286a Mon Sep 17 00:00:00 2001 From: Alexandru Ardelean Date: Thu, 3 May 2018 14:46:30 +0300 Subject: [PATCH 2/2] python3: update to version 3.6.5 Add PKG_RELEASE for setuptools and pip. Refresh all patches. Signed-off-by: Alexandru Ardelean --- lang/python/python3-version.mk | 12 +++++++++--- lang/python/python3/Makefile | 4 ++-- .../patches/004-do-not-write-bytes-codes.patch | 9 --------- .../patches/014-remove-platform-so-suffix.patch | 4 ++-- .../python3/patches/016-adjust-config-paths.patch | 8 ++++---- 5 files changed, 17 insertions(+), 20 deletions(-) diff --git a/lang/python/python3-version.mk b/lang/python/python3-version.mk index e42eeb8a0..dd6c947ac 100644 --- a/lang/python/python3-version.mk +++ b/lang/python/python3-version.mk @@ -8,10 +8,16 @@ # Note: keep in sync with setuptools & pip PYTHON3_VERSION_MAJOR:=3 PYTHON3_VERSION_MINOR:=6 -PYTHON3_VERSION_MICRO:=4 +PYTHON3_VERSION_MICRO:=5 PYTHON3_VERSION:=$(PYTHON3_VERSION_MAJOR).$(PYTHON3_VERSION_MINOR) -PYTHON3_SETUPTOOLS_VERSION:=28.8.0 -PYTHON3_PIP_VERSION:=9.0.1 +PYTHON3_SETUPTOOLS_PKG_RELEASE:=1 +PYTHON3_PIP_PKG_RELEASE:=1 + +PYTHON3_SETUPTOOLS_VERSION:=39.0.1 +PYTHON3_PIP_VERSION:=9.0.3 + +PYTHON3_SETUPTOOLS_VERSION:=$(PYTHON3_SETUPTOOLS_VERSION)-$(PYTHON3_SETUPTOOLS_PKG_RELEASE) +PYTHON3_PIP_VERSION:=$(PYTHON3_PIP_VERSION)-$(PYTHON3_PIP_PKG_RELEASE) diff --git a/lang/python/python3/Makefile b/lang/python/python3/Makefile index c14e3ee95..9f1886094 100644 --- a/lang/python/python3/Makefile +++ b/lang/python/python3/Makefile @@ -14,12 +14,12 @@ PYTHON_VERSION:=$(PYTHON3_VERSION) PYTHON_VERSION_MICRO:=$(PYTHON3_VERSION_MICRO) PKG_NAME:=python3 -PKG_RELEASE:=5 +PKG_RELEASE:=1 PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO) PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://www.python.org/ftp/python/$(PKG_VERSION) -PKG_HASH:=159b932bf56aeaa76fd66e7420522d8c8853d486b8567c459b84fe2ed13bcaba +PKG_HASH:=f434053ba1b5c8a5cc597e966ead3c5143012af827fd3f0697d21450bb8d87a6 PKG_LICENSE:=PSF PKG_LICENSE_FILES:=LICENSE Modules/_ctypes/libffi_msvc/LICENSE Modules/_ctypes/darwin/LICENSE Modules/_ctypes/libffi/LICENSE Modules/_ctypes/libffi_osx/LICENSE Tools/pybench/LICENSE diff --git a/lang/python/python3/patches/004-do-not-write-bytes-codes.patch b/lang/python/python3/patches/004-do-not-write-bytes-codes.patch index 558ee4a1c..463263222 100644 --- a/lang/python/python3/patches/004-do-not-write-bytes-codes.patch +++ b/lang/python/python3/patches/004-do-not-write-bytes-codes.patch @@ -9,12 +9,3 @@ int Py_NoUserSiteDirectory = 0; /* for -s and site.py */ int Py_UnbufferedStdioFlag = 0; /* Unbuffered binary std{in,out,err} */ int Py_HashRandomizationFlag = 0; /* for -R and PYTHONHASHSEED */ -@@ -329,7 +329,7 @@ _Py_InitializeEx_Private(int install_sig - if ((p = Py_GETENV("PYTHONOPTIMIZE")) && *p != '\0') - Py_OptimizeFlag = add_flag(Py_OptimizeFlag, p); - if ((p = Py_GETENV("PYTHONDONTWRITEBYTECODE")) && *p != '\0') -- Py_DontWriteBytecodeFlag = add_flag(Py_DontWriteBytecodeFlag, p); -+ Py_DontWriteBytecodeFlag = atoi(p); - /* The variable is only tested for existence here; _PyRandom_Init will - check its value further. */ - if ((p = Py_GETENV("PYTHONHASHSEED")) && *p != '\0') diff --git a/lang/python/python3/patches/014-remove-platform-so-suffix.patch b/lang/python/python3/patches/014-remove-platform-so-suffix.patch index 88fff6591..c209fa745 100644 --- a/lang/python/python3/patches/014-remove-platform-so-suffix.patch +++ b/lang/python/python3/patches/014-remove-platform-so-suffix.patch @@ -1,6 +1,6 @@ --- a/configure +++ b/configure -@@ -14986,7 +14986,7 @@ $as_echo_n "checking ABIFLAGS... " >&6; +@@ -14995,7 +14995,7 @@ $as_echo_n "checking ABIFLAGS... " >&6; $as_echo "$ABIFLAGS" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5 $as_echo_n "checking SOABI... " >&6; } @@ -11,7 +11,7 @@ --- a/configure.ac +++ b/configure.ac -@@ -4639,7 +4639,7 @@ AC_SUBST(SOABI) +@@ -4647,7 +4647,7 @@ AC_SUBST(SOABI) AC_MSG_CHECKING(ABIFLAGS) AC_MSG_RESULT($ABIFLAGS) AC_MSG_CHECKING(SOABI) diff --git a/lang/python/python3/patches/016-adjust-config-paths.patch b/lang/python/python3/patches/016-adjust-config-paths.patch index 0345dd975..c08388729 100644 --- a/lang/python/python3/patches/016-adjust-config-paths.patch +++ b/lang/python/python3/patches/016-adjust-config-paths.patch @@ -20,7 +20,7 @@ abi=sys.abiflags, --- a/Makefile.pre.in +++ b/Makefile.pre.in -@@ -1338,7 +1338,7 @@ libinstall: build_all $(srcdir)/Modules/ +@@ -1350,7 +1350,7 @@ libinstall: build_all $(srcdir)/Modules/ esac; \ done; \ done @@ -29,7 +29,7 @@ $(DESTDIR)$(LIBDEST); \ $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt ifeq (@COMPILE_ALL_TESTS@,yes) -@@ -1475,7 +1475,7 @@ sharedinstall: sharedmods +@@ -1487,7 +1487,7 @@ sharedinstall: sharedmods --install-scripts=$(BINDIR) \ --install-platlib=$(DESTSHARED) \ --root=$(DESTDIR)/ @@ -40,7 +40,7 @@ # Here are a couple of targets for MacOSX again, to install a full --- a/configure +++ b/configure -@@ -15005,7 +15005,7 @@ LDVERSION='$(VERSION)$(ABIFLAGS)' +@@ -15014,7 +15014,7 @@ LDVERSION='$(VERSION)$(ABIFLAGS)' $as_echo "$LDVERSION" >&6; } @@ -51,7 +51,7 @@ LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}" --- a/configure.ac +++ b/configure.ac -@@ -4656,7 +4656,7 @@ AC_MSG_RESULT($LDVERSION) +@@ -4664,7 +4664,7 @@ AC_MSG_RESULT($LDVERSION) dnl define LIBPL after ABIFLAGS and LDVERSION is defined. AC_SUBST(PY_ENABLE_SHARED)