From 1660549e92882b420d8720104dfb7afd10bc9b3e Mon Sep 17 00:00:00 2001 From: Alexandru Ardelean Date: Wed, 26 Jul 2017 23:55:21 +0300 Subject: [PATCH] python: refresh patches `make package/python/refresh` cmd This was a bit overdue. I did not know about this methodology. Reduces patch fuzz. Signed-off-by: Alexandru Ardelean --- lang/python/python/patches/001-enable-zlib.patch | 7 +------ ...002-do-not-add-include-dirs-when-cross-compiling.patch | 4 +--- .../patches/003-do-not-compile-tests-at-build.patch | 6 ++---- .../python/patches/004-do-not-write-bytes-codes.patch | 6 ++---- .../patches/006-remove-multi-arch-and-local-paths.patch | 2 -- .../python/patches/008-distutils-use-python-sysroot.patch | 8 ++------ .../009-do-not-use-dblib_dir-when-cross-compiling.patch | 8 +++----- .../010-do-not-add-rt-lib-dirs-when-cross-compiling.patch | 4 +--- .../python/patches/011-remove-setupterm-definition.patch | 2 -- 9 files changed, 12 insertions(+), 35 deletions(-) diff --git a/lang/python/python/patches/001-enable-zlib.patch b/lang/python/python/patches/001-enable-zlib.patch index 780831e86..e85b53c8d 100644 --- a/lang/python/python/patches/001-enable-zlib.patch +++ b/lang/python/python/patches/001-enable-zlib.patch @@ -7,11 +7,9 @@ Subject: [PATCH] enable zlib Modules/Setup.dist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/Modules/Setup.dist b/Modules/Setup.dist -index 01fb85f..01ac492 100644 --- a/Modules/Setup.dist +++ b/Modules/Setup.dist -@@ -358,7 +358,7 @@ _symtable symtablemodule.c +@@ -464,7 +464,7 @@ GLHACK=-Dclear=__GLclear # Andrew Kuchling's zlib module. # This require zlib 1.1.3 (or later). # See http://www.gzip.org/zlib/ @@ -20,6 +18,3 @@ index 01fb85f..01ac492 100644 # Interface to the Expat XML parser # --- -1.8.4.5 - diff --git a/lang/python/python/patches/002-do-not-add-include-dirs-when-cross-compiling.patch b/lang/python/python/patches/002-do-not-add-include-dirs-when-cross-compiling.patch index fb2fe8a77..0099abf74 100644 --- a/lang/python/python/patches/002-do-not-add-include-dirs-when-cross-compiling.patch +++ b/lang/python/python/patches/002-do-not-add-include-dirs-when-cross-compiling.patch @@ -1,8 +1,6 @@ -diff --git a/setup.py b/setup.py -index cbdeaf3..5154412 100644 --- a/setup.py +++ b/setup.py -@@ -480,7 +480,8 @@ class PyBuildExt(build_ext): +@@ -497,7 +497,8 @@ class PyBuildExt(build_ext): add_dir_to_list(dir_list, directory) if os.path.normpath(sys.prefix) != '/usr' \ 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 a6774e174..6543bba79 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,8 +1,6 @@ -diff --git a/Makefile.pre.in b/Makefile.pre.in -index 7f4ec2f..e270bf2 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in -@@ -1038,6 +1038,7 @@ libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c +@@ -1116,6 +1116,7 @@ libinstall: build_all $(srcdir)/Lib/$(PL done; \ done $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt @@ -10,7 +8,7 @@ index 7f4ec2f..e270bf2 100644 if test -d $(DESTDIR)$(LIBDEST)/distutils/tests; then \ $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \ $(DESTDIR)$(LIBDEST)/distutils/tests ; \ -@@ -1064,6 +1065,7 @@ libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c +@@ -1142,6 +1143,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 f67e7dcad..66c007799 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,8 +1,6 @@ -diff --git a/Python/pythonrun.c b/Python/pythonrun.c -index 748a63b..cb6e291 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c -@@ -79,7 +79,7 @@ int Py_InteractiveFlag; /* Needed by Py_FdIsInteractive() below */ +@@ -79,7 +79,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) */ @@ -11,7 +9,7 @@ index 748a63b..cb6e291 100644 int Py_UseClassExceptionsFlag = 1; /* Needed by bltinmodule.c: deprecated */ int Py_FrozenFlag; /* Needed by getpath.c */ int Py_UnicodeFlag = 0; /* Needed by compile.c */ -@@ -174,7 +174,7 @@ Py_InitializeEx(int install_sigs) +@@ -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') diff --git a/lang/python/python/patches/006-remove-multi-arch-and-local-paths.patch b/lang/python/python/patches/006-remove-multi-arch-and-local-paths.patch index 1ecc153fa..5d886dfec 100644 --- a/lang/python/python/patches/006-remove-multi-arch-and-local-paths.patch +++ b/lang/python/python/patches/006-remove-multi-arch-and-local-paths.patch @@ -1,5 +1,3 @@ -diff --git a/setup.py b/setup.py -index 54054c2..d043761 100644 --- a/setup.py +++ b/setup.py @@ -454,13 +454,8 @@ class PyBuildExt(build_ext): diff --git a/lang/python/python/patches/008-distutils-use-python-sysroot.patch b/lang/python/python/patches/008-distutils-use-python-sysroot.patch index 7cd748761..4aeb7ff31 100644 --- a/lang/python/python/patches/008-distutils-use-python-sysroot.patch +++ b/lang/python/python/patches/008-distutils-use-python-sysroot.patch @@ -16,11 +16,9 @@ taken from the sysconfigdata module. Signed-off-by: Thomas Petazzoni -Index: b/Lib/distutils/sysconfig.py -=================================================================== --- a/Lib/distutils/sysconfig.py +++ b/Lib/distutils/sysconfig.py -@@ -19,8 +19,13 @@ +@@ -19,8 +19,13 @@ import sys from distutils.errors import DistutilsPlatformError # These are needed in a couple of spots, so just compute them once. @@ -36,11 +34,9 @@ Index: b/Lib/distutils/sysconfig.py # Path to the base directory of the project. On Windows the binary may # live in project/PCBuild9. If we're dealing with an x64 Windows build, -Index: b/Lib/distutils/command/build_ext.py -=================================================================== --- a/Lib/distutils/command/build_ext.py +++ b/Lib/distutils/command/build_ext.py -@@ -237,7 +237,10 @@ +@@ -240,7 +240,10 @@ class build_ext (Command): if (sysconfig.get_config_var('Py_ENABLE_SHARED')): if not sysconfig.python_build: # building third party extensions diff --git a/lang/python/python/patches/009-do-not-use-dblib_dir-when-cross-compiling.patch b/lang/python/python/patches/009-do-not-use-dblib_dir-when-cross-compiling.patch index b59809754..ffc80a418 100644 --- a/lang/python/python/patches/009-do-not-use-dblib_dir-when-cross-compiling.patch +++ b/lang/python/python/patches/009-do-not-use-dblib_dir-when-cross-compiling.patch @@ -1,8 +1,6 @@ -diff --git a/setup.py b/setup.py -index 7868b7b..10ec68f 100644 --- a/setup.py +++ b/setup.py -@@ -1067,6 +1067,7 @@ class PyBuildExt(build_ext): +@@ -1083,6 +1083,7 @@ class PyBuildExt(build_ext): if db_setup_debug: print "db lib: ", dblib, "not found" except db_found: @@ -10,7 +8,7 @@ index 7868b7b..10ec68f 100644 if db_setup_debug: print "bsddb using BerkeleyDB lib:", db_ver, dblib print "bsddb lib dir:", dblib_dir, " inc dir:", db_incdir -@@ -1081,7 +1082,7 @@ class PyBuildExt(build_ext): +@@ -1097,7 +1098,7 @@ class PyBuildExt(build_ext): exts.append(Extension('_bsddb', ['_bsddb.c'], depends = ['bsddb.h'], library_dirs=dblib_dir, @@ -19,7 +17,7 @@ index 7868b7b..10ec68f 100644 include_dirs=db_incs, libraries=dblibs)) else: -@@ -1292,10 +1293,11 @@ class PyBuildExt(build_ext): +@@ -1308,10 +1309,11 @@ class PyBuildExt(build_ext): break elif cand == "bdb": if db_incs is not None: diff --git a/lang/python/python/patches/010-do-not-add-rt-lib-dirs-when-cross-compiling.patch b/lang/python/python/patches/010-do-not-add-rt-lib-dirs-when-cross-compiling.patch index 5a106d4e8..c319fd5f3 100644 --- a/lang/python/python/patches/010-do-not-add-rt-lib-dirs-when-cross-compiling.patch +++ b/lang/python/python/patches/010-do-not-add-rt-lib-dirs-when-cross-compiling.patch @@ -1,8 +1,6 @@ -diff --git a/setup.py b/setup.py -index 7868b7b..544fa7e 100644 --- a/setup.py +++ b/setup.py -@@ -452,8 +452,9 @@ class PyBuildExt(build_ext): +@@ -463,8 +463,9 @@ class PyBuildExt(build_ext): # directly since an inconsistently reproducible issue comes up where # 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). diff --git a/lang/python/python/patches/011-remove-setupterm-definition.patch b/lang/python/python/patches/011-remove-setupterm-definition.patch index e55d70818..6cad20434 100644 --- a/lang/python/python/patches/011-remove-setupterm-definition.patch +++ b/lang/python/python/patches/011-remove-setupterm-definition.patch @@ -1,5 +1,3 @@ -diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c -index e478a57..eb297b4 100644 --- a/Modules/_cursesmodule.c +++ b/Modules/_cursesmodule.c @@ -117,7 +117,6 @@ char *PyCursesVersion = "2.2";