diff --git a/python/002-3.1-enable-new-dtags.patch b/python/001-3.1-enable-new-dtags.patch similarity index 84% rename from python/002-3.1-enable-new-dtags.patch rename to python/001-3.1-enable-new-dtags.patch index 05954faf..38cd2097 100644 --- a/python/002-3.1-enable-new-dtags.patch +++ b/python/001-3.1-enable-new-dtags.patch @@ -1,8 +1,8 @@ Cygwin ld (as of binutils-2.19.51) does not understand --enable-new-dtags. ---- Python-3.1/Lib/distutils/unixccompiler.py.orig 2009-05-09 06:55:12.000000000 -0500 +--- Python-3.1-orig/Lib/distutils/unixccompiler.py 2009-05-09 06:55:12.000000000 -0500 +++ Python-3.1/Lib/distutils/unixccompiler.py 2009-08-19 22:46:55.222993300 -0500 -@@ -224,7 +224,7 @@ class UnixCCompiler(CCompiler): +@@ -279,7 +279,7 @@ class UnixCCompiler(CCompiler): # the configuration data stored in the Python installation, so # we use this hack. compiler = os.path.basename(sysconfig.get_config_var("CC")) diff --git a/python/001-3.4-dbm-cygwin.patch b/python/001-3.4-dbm-cygwin.patch deleted file mode 100644 index 27a89aa5..00000000 --- a/python/001-3.4-dbm-cygwin.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- Python-3.4.3/setup.py.orig 2015-02-25 05:27:46.000000000 -0600 -+++ Python-3.4.3/setup.py 2015-05-05 11:18:04.030880000 -0500 -@@ -1241,7 +1241,7 @@ class PyBuildExt(build_ext): - dbm_setup_debug = False # verbose debug prints from this script? - dbm_order = ['gdbm'] - # The standard Unix dbm module: -- if host_platform not in ['cygwin']: -+ if host_platform not in ['win32']: - config_args = [arg.strip("'") - for arg in sysconfig.get_config_var("CONFIG_ARGS").split()] - dbm_args = [arg for arg in config_args -@@ -1296,6 +1296,15 @@ class PyBuildExt(build_ext): - ], - libraries = gdbm_libs) - break -+ if find_file("ndbm.h", inc_dirs, []) is not None: -+ if dbm_setup_debug: print("building dbm using gdbm") -+ dbmext = Extension( -+ '_dbm', ['_dbmmodule.c'], -+ define_macros=[ -+ ('HAVE_NDBM_H', None), -+ ], -+ libraries = gdbm_libs) -+ break - elif cand == "bdb": - if dblibs: - if dbm_setup_debug: print("building dbm using bdb") diff --git a/python/00155-avoid-ctypes-thunks.patch b/python/00155-avoid-ctypes-thunks.patch deleted file mode 100644 index edb6028a..00000000 --- a/python/00155-avoid-ctypes-thunks.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -up Python-3.2.3/Lib/ctypes/__init__.py.rhbz814391 Python-3.2.3/Lib/ctypes/__init__.py ---- Python-3.2.3/Lib/ctypes/__init__.py.rhbz814391 2012-04-20 15:12:49.017867692 -0400 -+++ Python-3.2.3/Lib/ctypes/__init__.py 2012-04-20 15:15:09.501111408 -0400 -@@ -266,11 +266,6 @@ def _reset_cache(): - # _SimpleCData.c_char_p_from_param - POINTER(c_char).from_param = c_char_p.from_param - _pointer_type_cache[None] = c_void_p -- # XXX for whatever reasons, creating the first instance of a callback -- # function is needed for the unittests on Win64 to succeed. This MAY -- # be a compiler bug, since the problem occurs only when _ctypes is -- # compiled with the MS SDK compiler. Or an uninitialized variable? -- CFUNCTYPE(c_int)(lambda: None) - - def create_unicode_buffer(init, size=None): - """create_unicode_buffer(aString) -> character array diff --git a/python/00170-gc-assertions.patch b/python/00170-gc-assertions.patch deleted file mode 100644 index fb3ad85f..00000000 --- a/python/00170-gc-assertions.patch +++ /dev/null @@ -1,311 +0,0 @@ -diff --git a/Include/object.h b/Include/object.h -index c772dea..5729797 100644 ---- a/Include/object.h -+++ b/Include/object.h -@@ -1098,6 +1098,49 @@ PyAPI_FUNC(void) - _PyObject_DebugTypeStats(FILE *out); - #endif /* ifndef Py_LIMITED_API */ - -+/* -+ Define a pair of assertion macros. -+ -+ These work like the regular C assert(), in that they will abort the -+ process with a message on stderr if the given condition fails to hold, -+ but compile away to nothing if NDEBUG is defined. -+ -+ However, before aborting, Python will also try to call _PyObject_Dump() on -+ the given object. This may be of use when investigating bugs in which a -+ particular object is corrupt (e.g. buggy a tp_visit method in an extension -+ module breaking the garbage collector), to help locate the broken objects. -+ -+ The WITH_MSG variant allows you to supply an additional message that Python -+ will attempt to print to stderr, after the object dump. -+*/ -+#ifdef NDEBUG -+/* No debugging: compile away the assertions: */ -+#define PyObject_ASSERT_WITH_MSG(obj, expr, msg) ((void)0) -+#else -+/* With debugging: generate checks: */ -+#define PyObject_ASSERT_WITH_MSG(obj, expr, msg) \ -+ ((expr) \ -+ ? (void)(0) \ -+ : _PyObject_AssertFailed((obj), \ -+ (msg), \ -+ (__STRING(expr)), \ -+ (__FILE__), \ -+ (__LINE__), \ -+ (__PRETTY_FUNCTION__))) -+#endif -+ -+#define PyObject_ASSERT(obj, expr) \ -+ PyObject_ASSERT_WITH_MSG(obj, expr, NULL) -+ -+/* -+ Declare and define the entrypoint even when NDEBUG is defined, to avoid -+ causing compiler/linker errors when building extensions without NDEBUG -+ against a Python built with NDEBUG defined -+*/ -+PyAPI_FUNC(void) _PyObject_AssertFailed(PyObject *, const char *, -+ const char *, const char *, int, -+ const char *); -+ - #ifdef __cplusplus - } - #endif -diff --git a/Lib/test/test_gc.py b/Lib/test/test_gc.py -index 8d806db..dc8bb16 100644 ---- a/Lib/test/test_gc.py -+++ b/Lib/test/test_gc.py -@@ -1,10 +1,12 @@ - import unittest - from test.support import (verbose, refcount_test, run_unittest, - strip_python_stderr, cpython_only, start_threads, -- temp_dir, requires_type_collecting, TESTFN, unlink) -+ temp_dir, requires_type_collecting, TESTFN, unlink, -+ import_module) - from test.support.script_helper import assert_python_ok, make_script - - import sys -+import sysconfig - import time - import gc - import weakref -@@ -46,6 +48,8 @@ class GC_Detector(object): - # gc collects it. - self.wr = weakref.ref(C1055820(666), it_happened) - -+BUILD_WITH_NDEBUG = ('-DNDEBUG' in sysconfig.get_config_vars()['PY_CFLAGS']) -+ - @with_tp_del - class Uncollectable(object): - """Create a reference cycle with multiple __del__ methods. -@@ -878,6 +882,50 @@ class GCCallbackTests(unittest.TestCase): - self.assertEqual(len(gc.garbage), 0) - - -+ @unittest.skipIf(BUILD_WITH_NDEBUG, -+ 'built with -NDEBUG') -+ def test_refcount_errors(self): -+ self.preclean() -+ # Verify the "handling" of objects with broken refcounts -+ import_module("ctypes") #skip if not supported -+ -+ import subprocess -+ code = '''if 1: -+ a = [] -+ b = [a] -+ -+ # Simulate the refcount of "a" being too low (compared to the -+ # references held on it by live data), but keeping it above zero -+ # (to avoid deallocating it): -+ import ctypes -+ ctypes.pythonapi.Py_DecRef(ctypes.py_object(a)) -+ -+ # The garbage collector should now have a fatal error when it reaches -+ # the broken object: -+ import gc -+ gc.collect() -+ ''' -+ p = subprocess.Popen([sys.executable, "-c", code], -+ stdout=subprocess.PIPE, -+ stderr=subprocess.PIPE) -+ stdout, stderr = p.communicate() -+ p.stdout.close() -+ p.stderr.close() -+ # Verify that stderr has a useful error message: -+ self.assertRegex(stderr, -+ b'Modules/gcmodule.c:[0-9]+: visit_decref: Assertion "\(\(gc\)->gc.gc_refs >> \(1\)\) != 0" failed.') -+ self.assertRegex(stderr, -+ b'refcount was too small') -+ self.assertRegex(stderr, -+ b'object : \[\]') -+ self.assertRegex(stderr, -+ b'type : list') -+ self.assertRegex(stderr, -+ b'refcount: 1') -+ self.assertRegex(stderr, -+ b'address : 0x[0-9a-f]+') -+ -+ - class GCTogglingTests(unittest.TestCase): - def setUp(self): - gc.enable() -diff --git a/Modules/gcmodule.c b/Modules/gcmodule.c -index 4d701cb..388dd78 100644 ---- a/Modules/gcmodule.c -+++ b/Modules/gcmodule.c -@@ -239,7 +239,8 @@ update_refs(PyGC_Head *containers) - { - PyGC_Head *gc = containers->gc.gc_next; - for (; gc != containers; gc = gc->gc.gc_next) { -- assert(_PyGCHead_REFS(gc) == GC_REACHABLE); -+ PyObject_ASSERT(FROM_GC(gc), -+ _PyGCHead_REFS(gc) == GC_REACHABLE); - _PyGCHead_SET_REFS(gc, Py_REFCNT(FROM_GC(gc))); - /* Python's cyclic gc should never see an incoming refcount - * of 0: if something decref'ed to 0, it should have been -@@ -259,7 +260,8 @@ update_refs(PyGC_Head *containers) - * so serious that maybe this should be a release-build - * check instead of an assert? - */ -- assert(_PyGCHead_REFS(gc) != 0); -+ PyObject_ASSERT(FROM_GC(gc), -+ _PyGCHead_REFS(gc) != 0); - } - } - -@@ -274,7 +276,9 @@ visit_decref(PyObject *op, void *data) - * generation being collected, which can be recognized - * because only they have positive gc_refs. - */ -- assert(_PyGCHead_REFS(gc) != 0); /* else refcount was too small */ -+ PyObject_ASSERT_WITH_MSG(FROM_GC(gc), -+ _PyGCHead_REFS(gc) != 0, -+ "refcount was too small"); /* else refcount was too small */ - if (_PyGCHead_REFS(gc) > 0) - _PyGCHead_DECREF(gc); - } -@@ -334,9 +338,10 @@ visit_reachable(PyObject *op, PyGC_Head *reachable) - * If gc_refs == GC_UNTRACKED, it must be ignored. - */ - else { -- assert(gc_refs > 0 -- || gc_refs == GC_REACHABLE -- || gc_refs == GC_UNTRACKED); -+ PyObject_ASSERT(FROM_GC(gc), -+ gc_refs > 0 -+ || gc_refs == GC_REACHABLE -+ || gc_refs == GC_UNTRACKED); - } - } - return 0; -@@ -378,7 +383,7 @@ move_unreachable(PyGC_Head *young, PyGC_Head *unreachable) - */ - PyObject *op = FROM_GC(gc); - traverseproc traverse = Py_TYPE(op)->tp_traverse; -- assert(_PyGCHead_REFS(gc) > 0); -+ PyObject_ASSERT(op, _PyGCHead_REFS(gc) > 0); - _PyGCHead_SET_REFS(gc, GC_REACHABLE); - (void) traverse(op, - (visitproc)visit_reachable, -@@ -441,7 +446,7 @@ move_legacy_finalizers(PyGC_Head *unreachable, PyGC_Head *finalizers) - for (gc = unreachable->gc.gc_next; gc != unreachable; gc = next) { - PyObject *op = FROM_GC(gc); - -- assert(IS_TENTATIVELY_UNREACHABLE(op)); -+ PyObject_ASSERT(op, IS_TENTATIVELY_UNREACHABLE(op)); - next = gc->gc.gc_next; - - if (has_legacy_finalizer(op)) { -@@ -517,7 +522,7 @@ handle_weakrefs(PyGC_Head *unreachable, PyGC_Head *old) - PyWeakReference **wrlist; - - op = FROM_GC(gc); -- assert(IS_TENTATIVELY_UNREACHABLE(op)); -+ PyObject_ASSERT(op, IS_TENTATIVELY_UNREACHABLE(op)); - next = gc->gc.gc_next; - - if (! PyType_SUPPORTS_WEAKREFS(Py_TYPE(op))) -@@ -538,9 +543,9 @@ handle_weakrefs(PyGC_Head *unreachable, PyGC_Head *old) - * the callback pointer intact. Obscure: it also - * changes *wrlist. - */ -- assert(wr->wr_object == op); -+ PyObject_ASSERT(wr->wr_object, wr->wr_object == op); - _PyWeakref_ClearRef(wr); -- assert(wr->wr_object == Py_None); -+ PyObject_ASSERT(wr->wr_object, wr->wr_object == Py_None); - if (wr->wr_callback == NULL) - continue; /* no callback */ - -@@ -574,7 +579,7 @@ handle_weakrefs(PyGC_Head *unreachable, PyGC_Head *old) - */ - if (IS_TENTATIVELY_UNREACHABLE(wr)) - continue; -- assert(IS_REACHABLE(wr)); -+ PyObject_ASSERT(op, IS_REACHABLE(wr)); - - /* Create a new reference so that wr can't go away - * before we can process it again. -@@ -583,7 +588,8 @@ handle_weakrefs(PyGC_Head *unreachable, PyGC_Head *old) - - /* Move wr to wrcb_to_call, for the next pass. */ - wrasgc = AS_GC(wr); -- assert(wrasgc != next); /* wrasgc is reachable, but -+ PyObject_ASSERT(op, wrasgc != next); -+ /* wrasgc is reachable, but - next isn't, so they can't - be the same */ - gc_list_move(wrasgc, &wrcb_to_call); -@@ -599,11 +605,11 @@ handle_weakrefs(PyGC_Head *unreachable, PyGC_Head *old) - - gc = wrcb_to_call.gc.gc_next; - op = FROM_GC(gc); -- assert(IS_REACHABLE(op)); -- assert(PyWeakref_Check(op)); -+ PyObject_ASSERT(op, IS_REACHABLE(op)); -+ PyObject_ASSERT(op, PyWeakref_Check(op)); - wr = (PyWeakReference *)op; - callback = wr->wr_callback; -- assert(callback != NULL); -+ PyObject_ASSERT(op, callback != NULL); - - /* copy-paste of weakrefobject.c's handle_callback() */ - temp = PyObject_CallFunctionObjArgs(callback, wr, NULL); -@@ -717,12 +723,14 @@ check_garbage(PyGC_Head *collectable) - for (gc = collectable->gc.gc_next; gc != collectable; - gc = gc->gc.gc_next) { - _PyGCHead_SET_REFS(gc, Py_REFCNT(FROM_GC(gc))); -- assert(_PyGCHead_REFS(gc) != 0); -+ PyObject_ASSERT(FROM_GC(gc), -+ _PyGCHead_REFS(gc) != 0); - } - subtract_refs(collectable); - for (gc = collectable->gc.gc_next; gc != collectable; - gc = gc->gc.gc_next) { -- assert(_PyGCHead_REFS(gc) >= 0); -+ PyObject_ASSERT(FROM_GC(gc), -+ _PyGCHead_REFS(gc) >= 0); - if (_PyGCHead_REFS(gc) != 0) - return -1; - } -diff --git a/Objects/object.c b/Objects/object.c -index 220aa90..f6c7161 100644 ---- a/Objects/object.c -+++ b/Objects/object.c -@@ -2177,6 +2177,35 @@ _PyTrash_thread_destroy_chain(void) - --tstate->trash_delete_nesting; - } - -+PyAPI_FUNC(void) -+_PyObject_AssertFailed(PyObject *obj, const char *msg, const char *expr, -+ const char *file, int line, const char *function) -+{ -+ fprintf(stderr, -+ "%s:%d: %s: Assertion \"%s\" failed.\n", -+ file, line, function, expr); -+ if (msg) { -+ fprintf(stderr, "%s\n", msg); -+ } -+ -+ fflush(stderr); -+ -+ if (obj) { -+ /* This might succeed or fail, but we're about to abort, so at least -+ try to provide any extra info we can: */ -+ _PyObject_Dump(obj); -+ } -+ else { -+ fprintf(stderr, "NULL object\n"); -+ } -+ -+ fflush(stdout); -+ fflush(stderr); -+ -+ /* Terminate the process: */ -+ abort(); -+} -+ - #ifndef Py_TRACE_REFS - /* For Py_LIMITED_API, we need an out-of-line version of _Py_Dealloc. - Define this here, so we can undefine the macro. */ diff --git a/python/012-3.2-getpath-exe-extension.patch b/python/002-3.2-getpath-exe-extension.patch similarity index 93% rename from python/012-3.2-getpath-exe-extension.patch rename to python/002-3.2-getpath-exe-extension.patch index fb449dce..b425db2f 100644 --- a/python/012-3.2-getpath-exe-extension.patch +++ b/python/002-3.2-getpath-exe-extension.patch @@ -1,6 +1,6 @@ ---- Python-3.2.3/Modules/getpath.c.orig 2012-04-11 02:54:07.000000000 -0400 +--- Python-3.2.3-orig/Modules/getpath.c 2012-04-11 02:54:07.000000000 -0400 +++ Python-3.2.3/Modules/getpath.c 2012-06-14 13:33:30.179375000 -0400 -@@ -551,6 +551,28 @@ +@@ -491,6 +491,28 @@ break; } diff --git a/python/013-3.4-select-cygwin.patch b/python/003-3.4-select-cygwin.patch similarity index 91% rename from python/013-3.4-select-cygwin.patch rename to python/003-3.4-select-cygwin.patch index 48686858..5d1b43ef 100644 --- a/python/013-3.4-select-cygwin.patch +++ b/python/003-3.4-select-cygwin.patch @@ -1,6 +1,6 @@ ---- Python-3.4.3/Modules/selectmodule.c.orig 2015-02-25 05:27:46.000000000 -0600 +--- Python-3.4.3-orig/Modules/selectmodule.c 2015-02-25 05:27:46.000000000 -0600 +++ Python-3.4.3/Modules/selectmodule.c 2015-05-05 13:58:58.914394500 -0500 -@@ -8,6 +8,16 @@ +@@ -4,6 +4,16 @@ #define _GNU_SOURCE #endif @@ -17,7 +17,7 @@ #include "Python.h" #include -@@ -26,16 +36,6 @@ +@@ -22,16 +32,6 @@ #undef HAVE_BROKEN_POLL #endif diff --git a/python/004-3.4-ctypes-cygwin.patch b/python/004-3.4-ctypes-cygwin.patch deleted file mode 100644 index 4e70b9b8..00000000 --- a/python/004-3.4-ctypes-cygwin.patch +++ /dev/null @@ -1,51 +0,0 @@ ---- Python-3.4.3/Lib/ctypes/__init__.py.orig 2015-02-25 05:27:44.000000000 -0600 -+++ Python-3.4.3/Lib/ctypes/__init__.py 2015-05-05 11:39:39.945940300 -0500 -@@ -431,7 +431,8 @@ pydll = LibraryLoader(PyDLL) - if _os.name == "nt": - pythonapi = PyDLL("python dll", None, _sys.dllhandle) - elif _sys.platform == "cygwin": -- pythonapi = PyDLL("libpython%d.%d.dll" % _sys.version_info[:2]) -+ pythonapi = PyDLL("libpython%d.%d%s.dll" % \ -+ (_sys.version_info[:2] + tuple(_sys.abiflags))) - else: - pythonapi = PyDLL(None) - ---- Python-3.4.3/Lib/ctypes/util.py.orig 2015-02-25 05:27:44.000000000 -0600 -+++ Python-3.4.3/Lib/ctypes/util.py 2015-05-05 11:10:45.202655900 -0500 -@@ -80,6 +80,25 @@ if os.name == "posix" and sys.platform = - continue - return None - -+elif sys.platform == "cygwin": -+ def find_library(name): -+ for libdir in ['/usr/lib', '/usr/local/lib']: -+ for libext in ['lib%s.dll.a' % name, 'lib%s.a' % name]: -+ implib = os.path.join(libdir, libext) -+ if not os.path.exists(implib): -+ continue -+ cmd = "dlltool -I " + implib + " 2>/dev/null" -+ f = os.popen(cmd) -+ try: -+ data = f.read() -+ finally: -+ f.close() -+ res = data.replace("\n","") -+ if not res: -+ continue -+ return res -+ return None -+ - elif os.name == "posix": - # Andreas Degert's find functions, using gcc, /sbin/ldconfig, objdump - import re, tempfile -@@ -328,6 +347,10 @@ def test(): - print(cdll.LoadLibrary("libcrypto.dylib")) - print(cdll.LoadLibrary("libSystem.dylib")) - print(cdll.LoadLibrary("System.framework/System")) -+ elif sys.platform == "cygwin": -+ print(cdll.LoadLibrary("cygbz2-1.dll")) -+ print(cdll.LoadLibrary("cygcrypt-0.dll")) -+ print(find_library("crypt")) - # issue-26439 - fix broken test call for AIX - elif sys.platform.startswith("aix"): - from ctypes import CDLL diff --git a/python/005-3.6-PATH_MAX.patch b/python/005-3.6-PATH_MAX.patch deleted file mode 100644 index b9903c1c..00000000 --- a/python/005-3.6-PATH_MAX.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- Python-3.6.0/Modules/main.c.orig 2017-02-08 04:28:31.840450700 -0500 -+++ Python-3.6.0/Modules/main.c 2017-02-08 04:31:01.757513100 -0500 -@@ -12,6 +12,9 @@ - #endif - #ifdef HAVE_FCNTL_H - #include -+#ifndef PATH_MAX -+#define PATH_MAX MAXPATHLEN -+#endif - #endif - #endif - diff --git a/python/005-3.7-ctypes-cygwin.patch b/python/005-3.7-ctypes-cygwin.patch new file mode 100644 index 00000000..24906250 --- /dev/null +++ b/python/005-3.7-ctypes-cygwin.patch @@ -0,0 +1,39 @@ +--- Python-3.7.2-orig/Lib/ctypes/util.py 2018-12-23 15:37:36.000000000 -0600 ++++ Python-3.7.2/Lib/ctypes/util.py 2019-01-06 18:44:31.650250202 -0600 +@@ -89,6 +89,25 @@ elif sys.platform.startswith("aix"): + + from ctypes._aix import find_library + ++elif sys.platform == "cygwin": ++ def find_library(name): ++ for libdir in ['/usr/lib', '/usr/local/lib']: ++ for libext in ['lib%s.dll.a' % name, 'lib%s.a' % name]: ++ implib = os.path.join(libdir, libext) ++ if not os.path.exists(implib): ++ continue ++ cmd = "dlltool -I " + implib + " 2>/dev/null" ++ f = os.popen(cmd) ++ try: ++ data = f.read() ++ finally: ++ f.close() ++ res = data.replace("\n","") ++ if not res: ++ continue ++ return res ++ return None ++ + elif os.name == "posix": + # Andreas Degert's find functions, using gcc, /sbin/ldconfig, objdump + import re, tempfile +@@ -349,6 +368,10 @@ def test(): + print(f"crypt\t:: {cdll.LoadLibrary(find_library('crypt'))}") + print(f"crypto\t:: {find_library('crypto')}") + print(f"crypto\t:: {cdll.LoadLibrary(find_library('crypto'))}") ++ elif sys.platform == "cygwin": ++ print(cdll.LoadLibrary("cygbz2-1.dll")) ++ print(cdll.LoadLibrary("cygcrypt-0.dll")) ++ print(find_library("crypt")) + else: + print(cdll.LoadLibrary("libm.so")) + print(cdll.LoadLibrary("libcrypt.so")) diff --git a/python/006-3.1-ncurses-abi6.patch b/python/006-3.1-ncurses-abi6.patch deleted file mode 100644 index baaf4fbb..00000000 --- a/python/006-3.1-ncurses-abi6.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- Python-3.1.2/Include/py_curses.h.orig 2009-09-06 16:26:46.000000000 -0500 -+++ Python-3.1.2/Include/py_curses.h 2010-05-03 01:25:11.226933700 -0500 -@@ -17,6 +17,13 @@ - #endif - #endif /* __APPLE__ */ - -+#ifdef __CYGWIN__ -+/* the following define is necessary for Cygwin; without it, the -+ Cygwin-supplied ncurses.h sets NCURSES_OPAQUE to 1, and then Python -+ can't get at the WINDOW flags field. */ -+#define NCURSES_INTERNALS -+#endif /* __CYGWIN__ */ -+ - /* On FreeBSD, [n]curses.h and stdlib.h/wchar.h use different guards - against multiple definition of wchar_t and wint_t. */ - #if defined(__FreeBSD__) && defined(_XOPEN_SOURCE_EXTENDED) diff --git a/python/016-3.6-ftm.patch b/python/006-3.7-ftm.patch similarity index 73% rename from python/016-3.6-ftm.patch rename to python/006-3.7-ftm.patch index f24dc467..ceed0b02 100644 --- a/python/016-3.6-ftm.patch +++ b/python/006-3.7-ftm.patch @@ -1,6 +1,6 @@ ---- Python-3.6.1rc1/configure.ac 2017-03-12 14:28:34.395001700 -0500 -+++ Python-3.6.1rc1/configure.ac 2017-03-21 00:27:44.595584900 -0500 -@@ -138,11 +138,6 @@ AC_DEFINE(_GNU_SOURCE, 1, [Define on Lin +--- Python-3.7.2-orig/configure.ac 2019-01-06 19:25:12.660930750 -0600 ++++ Python-3.7.2/configure.ac 2019-01-06 19:27:23.594427904 -0600 +@@ -131,11 +131,6 @@ AC_DEFINE(_GNU_SOURCE, 1, [Define on Lin AC_DEFINE(_NETBSD_SOURCE, 1, [Define on NetBSD to activate all library features]) # The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables diff --git a/python/007-3.2-export-PySignal_SetWakeupFd.patch b/python/007-3.2-export-PySignal_SetWakeupFd.patch deleted file mode 100644 index 70dd247a..00000000 --- a/python/007-3.2-export-PySignal_SetWakeupFd.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- Python-3.2/Include/pyerrors.h.orig -+++ Python-3.2/Include/pyerrors.h -@@ -358,7 +358,7 @@ PyAPI_FUNC(int) PyErr_CheckSignals(void) - - /* In signalmodule.c */ - #ifndef Py_LIMITED_API --int PySignal_SetWakeupFd(int fd); -+PyAPI_FUNC(int) PySignal_SetWakeupFd(int fd); - #endif - - /* Support for adding program text to SyntaxErrors */ diff --git a/python/007-3.8-dbm-cygwin.patch b/python/007-3.8-dbm-cygwin.patch new file mode 100644 index 00000000..4b8ab0a6 --- /dev/null +++ b/python/007-3.8-dbm-cygwin.patch @@ -0,0 +1,11 @@ +--- Python-3.8.0a3-orig/setup.py 2019-03-29 13:42:31.711914000 -0400 ++++ Python-3.8.0a3/setup.py 2019-03-29 13:40:09.958984300 -0400 +@@ -1208,7 +1208,7 @@ class PyBuildExt(build_ext): + dbm_setup_debug = False # verbose debug prints from this script? + dbm_order = ['gdbm'] + # The standard Unix dbm module: +- if not CYGWIN: ++ if not MS_WINDOWS: + config_args = [arg.strip("'") + for arg in sysconfig.get_config_var("CONFIG_ARGS").split()] + dbm_args = [arg for arg in config_args diff --git a/python/009-3.2-distutils-shlibext.patch b/python/008-3.8-distutils-cygwin.patch similarity index 50% rename from python/009-3.2-distutils-shlibext.patch rename to python/008-3.8-distutils-cygwin.patch index 9fb2697d..bf1f9276 100644 --- a/python/009-3.2-distutils-shlibext.patch +++ b/python/008-3.8-distutils-cygwin.patch @@ -1,8 +1,5 @@ -This is necessary for find_library_file to work where a library has only -an implib but no static lib (e.g. sqlite3). - ---- Python-3.2.3/Lib/distutils/cygwinccompiler.py.orig 2012-04-11 01:54:02.000000000 -0500 -+++ Python-3.2.3/Lib/distutils/cygwinccompiler.py 2012-06-22 19:37:11.740576800 -0500 +--- Python-3.8.0a4-orig/Lib/distutils/cygwinccompiler.py 2019-05-06 14:30:25.000000000 -0400 ++++ Python-3.8.0a4/Lib/distutils/cygwinccompiler.py 2019-05-19 14:35:55.872267300 -0400 @@ -92,9 +92,7 @@ class CygwinCCompiler(UnixCCompiler): compiler_type = 'cygwin' obj_extension = ".o" @@ -14,8 +11,8 @@ an implib but no static lib (e.g. sqlite3). exe_extension = ".exe" def __init__(self, verbose=0, dry_run=0, force=0): ---- Python-3.2.5/Lib/distutils/unixccompiler.py.orig 2013-07-30 16:39:21.092550800 -0500 -+++ Python-3.2.5/Lib/distutils/unixccompiler.py 2013-07-30 20:01:52.168552600 -0500 +--- Python-3.8.0a4-orig/Lib/distutils/unixccompiler.py 2019-05-19 14:24:27.779442200 -0400 ++++ Python-3.8.0a4/Lib/distutils/unixccompiler.py 2019-05-19 14:35:55.872267300 -0400 @@ -81,6 +81,7 @@ class UnixCCompiler(CCompiler): xcode_stub_lib_format = dylib_lib_format if sys.platform == "cygwin": @@ -24,3 +21,12 @@ an implib but no static lib (e.g. sqlite3). def preprocess(self, source, output_file=None, macros=None, include_dirs=None, extra_preargs=None, extra_postargs=None): +--- Python-3.8.0b2-orig/Misc/python.pc.in 2019-07-04 06:50:19.000000000 -0400 ++++ Python-3.8.0b2/Misc/python.pc.in 2019-07-21 15:33:35.374399700 -0400 +@@ -9,5 +9,5 @@ Description: Build a C extension for Pyt + Requires: + Version: @VERSION@ + Libs.private: @LIBS@ +-Libs: ++Libs: @LIBPYTHON@ + Cflags: -I${includedir}/python@VERSION@@ABIFLAGS@ diff --git a/python/009-3.8-export-PySignal_SetWakeupFd.patch b/python/009-3.8-export-PySignal_SetWakeupFd.patch new file mode 100644 index 00000000..5164aba6 --- /dev/null +++ b/python/009-3.8-export-PySignal_SetWakeupFd.patch @@ -0,0 +1,11 @@ +--- Python-3.8.0a2-orig/Include/cpython/pyerrors.h 2019-02-25 07:08:32.000000000 -0500 ++++ Python-3.8.0a2/Include/cpython/pyerrors.h 2019-03-11 11:35:44.868187500 -0400 +@@ -132,7 +132,7 @@ PyAPI_FUNC(PyObject *) _PyErr_TrySetFrom + + /* In signalmodule.c */ + +-int PySignal_SetWakeupFd(int fd); ++PyAPI_FUNC(int) PySignal_SetWakeupFd(int fd); + PyAPI_FUNC(int) _PyErr_CheckSignals(void); + + /* Support for adding program text to SyntaxErrors */ diff --git a/python/010-3.6-pep3149-cygwin.patch b/python/010-3.6-pep3149-cygwin.patch deleted file mode 100644 index 685ec1e0..00000000 --- a/python/010-3.6-pep3149-cygwin.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- Python-3.4.3/Python/dynload_shlib.c.orig 2015-02-25 05:27:46.000000000 -0600 -+++ Python-3.4.3/Python/dynload_shlib.c 2015-05-05 11:25:41.882019700 -0500 -@@ -34,6 +34,8 @@ - - const char *_PyImport_DynLoadFiletab[] = { - #ifdef __CYGWIN__ -+ "." SOABI ".dll", -+ ".abi" PYTHON_ABI_STRING ".dll", - ".dll", - #else /* !__CYGWIN__ */ - "." SOABI ".so", ---- Python-3.6.0/configure.ac.orig 2017-02-08 04:39:39.793333600 -0500 -+++ Python-3.6.0/configure.ac 2017-02-08 04:45:44.649752400 -0500 -@@ -4614,7 +4614,7 @@ - - AC_SUBST(EXT_SUFFIX) - case $ac_sys_system in -- Linux*|GNU*|Darwin) -+ Linux*|GNU*|Darwin|CYGWIN*) - EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};; - *) - EXT_SUFFIX=${SHLIB_SUFFIX};; diff --git a/python/010-3.8-nis-cygwin.patch b/python/010-3.8-nis-cygwin.patch new file mode 100644 index 00000000..7c96636a --- /dev/null +++ b/python/010-3.8-nis-cygwin.patch @@ -0,0 +1,11 @@ +--- Python-3.8.0a4-orig/setup.py 2019-05-19 12:20:42.157823300 -0400 ++++ Python-3.8.0a4/setup.py 2019-05-19 14:13:32.603602100 -0400 +@@ -2216,7 +2216,7 @@ class PyBuildExt(build_ext): + depends=sha3_deps)) + + def detect_nis(self): +- if MS_WINDOWS or CYGWIN or HOST_PLATFORM == 'qnx6': ++ if MS_WINDOWS or HOST_PLATFORM == 'qnx6': + self.missing.append('nis') + return + diff --git a/python/011-3.6-thread-cygwin64.patch b/python/011-3.6-thread-cygwin64.patch deleted file mode 100644 index edddbd4f..00000000 --- a/python/011-3.6-thread-cygwin64.patch +++ /dev/null @@ -1,88 +0,0 @@ ---- Python-3.4.3/Include/pythread.h.orig 2015-02-25 05:27:44.000000000 -0600 -+++ Python-3.4.3/Include/pythread.h 2015-05-05 11:27:20.117994100 -0500 -@@ -74,11 +74,11 @@ PyAPI_FUNC(int) PyThread_set_stacksize(s - platforms, but it is not POSIX-compliant. Therefore, the new TSS API uses - opaque data type to represent TSS keys to be compatible (see PEP 539). - */ --PyAPI_FUNC(int) PyThread_create_key(void) Py_DEPRECATED(3.7); --PyAPI_FUNC(void) PyThread_delete_key(int key) Py_DEPRECATED(3.7); --PyAPI_FUNC(int) PyThread_set_key_value(int key, void *value) Py_DEPRECATED(3.7); --PyAPI_FUNC(void *) PyThread_get_key_value(int key) Py_DEPRECATED(3.7); --PyAPI_FUNC(void) PyThread_delete_key_value(int key) Py_DEPRECATED(3.7); -+PyAPI_FUNC(long) PyThread_create_key(void) Py_DEPRECATED(3.7); -+PyAPI_FUNC(void) PyThread_delete_key(long key) Py_DEPRECATED(3.7); -+PyAPI_FUNC(int) PyThread_set_key_value(long key, void *value) Py_DEPRECATED(3.7); -+PyAPI_FUNC(void *) PyThread_get_key_value(long key) Py_DEPRECATED(3.7); -+PyAPI_FUNC(void) PyThread_delete_key_value(long key) Py_DEPRECATED(3.7); - - /* Cleanup after a fork */ - PyAPI_FUNC(void) PyThread_ReInitTLS(void) Py_DEPRECATED(3.7); ---- Python-3.6.0/Python/thread_pthread.h.orig 2016-12-22 21:21:22.000000000 -0500 -+++ Python-3.6.0/Python/thread_pthread.h 2017-02-08 05:18:45.791168100 -0500 -@@ -603,44 +603,47 @@ - removing this API. - */ - --int -+long - PyThread_create_key(void) - { - #ifdef PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT - pthread_key_t key; - int fail = pthread_key_create(&key, NULL); - if (fail) -- return -1; -- if (key > INT_MAX) { -+ return -1L; -+#ifndef __CYGWIN__ -+ /* Cygwin pthread types are pointers, which may "overflow" signed long */ -+ if (key > LONG_MAX) { - /* Issue #22206: handle integer overflow */ - pthread_key_delete(key); - errno = ENOMEM; -- return -1; -+ return -1L; - } -- return (int)key; -+ return (long)key; -+#endif - #else -- return -1; /* never return valid key value. */ -+ return -1L; /* never return valid key value. */ - #endif - } - - void --PyThread_delete_key(int key) -+PyThread_delete_key(long key) - { - #ifdef PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT - pthread_key_delete(key); - #endif - } - - void --PyThread_delete_key_value(int key) -+PyThread_delete_key_value(long key) - { - #ifdef PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT - pthread_setspecific(key, NULL); - #endif - } - - int --PyThread_set_key_value(int key, void *value) -+PyThread_set_key_value(long key, void *value) - { - #ifdef PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT - int fail; -@@ -640,7 +640,7 @@ PyThread_set_key_value(int key, void *va - } - - void * --PyThread_get_key_value(int key) -+PyThread_get_key_value(long key) - { - #ifdef PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT - return pthread_getspecific(key); - #else diff --git a/python/011-3.8-parser-cygwin.patch b/python/011-3.8-parser-cygwin.patch new file mode 100644 index 00000000..d072a13b --- /dev/null +++ b/python/011-3.8-parser-cygwin.patch @@ -0,0 +1,13 @@ +Modules/parsermodule.o:parsermodule.c: undefined reference to `_PyParser_Grammar' + +--- Python-3.8.0a4-orig/Modules/Setup 2019-05-06 14:30:25.000000000 -0400 ++++ Python-3.8.0a4/Modules/Setup 2019-05-19 14:14:54.663297000 -0400 +@@ -327,7 +327,7 @@ _symtable symtablemodule.c + #binascii binascii.c + + # Fred Drake's interface to the Python parser +-#parser parsermodule.c ++parser parsermodule.c + + + # Andrew Kuchling's zlib module. diff --git a/python/012-3.8-pep3149-cygwin.patch b/python/012-3.8-pep3149-cygwin.patch new file mode 100644 index 00000000..f2df94f9 --- /dev/null +++ b/python/012-3.8-pep3149-cygwin.patch @@ -0,0 +1,37 @@ +--- Python-3.8.0a3-orig/Python/dynload_shlib.c 2019-03-25 15:36:40.000000000 -0400 ++++ Python-3.8.0a3/Python/dynload_shlib.c 2019-03-29 13:18:23.024414000 -0400 +@@ -35,6 +35,8 @@ + + const char *_PyImport_DynLoadFiletab[] = { + #ifdef __CYGWIN__ ++ "." SOABI ".dll", ++ ".abi" PYTHON_ABI_STRING ".dll", + ".dll", + #else /* !__CYGWIN__ */ + "." SOABI ".so", +--- Python-3.8.0a3-orig/configure.ac 2019-03-29 13:16:29.207031200 -0400 ++++ Python-3.8.0a3/configure.ac 2019-03-29 13:20:15.713867100 -0400 +@@ -837,6 +837,14 @@ cat >> conftest.c < +Date: Wed, 13 Jan 2010 21:25:18 +0000 +Subject: [PATCH] 00001: Fixup distutils/unixccompiler.py to remove standard + library path from rpath Was Patch0 in ivazquez' python3000 specfile + +--- + Lib/distutils/unixccompiler.py | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/Lib/distutils/unixccompiler.py b/Lib/distutils/unixccompiler.py +index d10a78da31..4df4b67810 100644 +--- a/Lib/distutils/unixccompiler.py ++++ b/Lib/distutils/unixccompiler.py +@@ -82,6 +82,15 @@ class UnixCCompiler(CCompiler): + if sys.platform == "cygwin": + exe_extension = ".exe" + ++ def _fix_lib_args(self, libraries, library_dirs, runtime_library_dirs): ++ """Remove standard library path from rpath""" ++ libraries, library_dirs, runtime_library_dirs = super()._fix_lib_args( ++ libraries, library_dirs, runtime_library_dirs) ++ libdir = sysconfig.get_config_var('LIBDIR') ++ if runtime_library_dirs and (libdir in runtime_library_dirs): ++ runtime_library_dirs.remove(libdir) ++ return libraries, library_dirs, runtime_library_dirs ++ + def preprocess(self, source, output_file=None, macros=None, + include_dirs=None, extra_preargs=None, extra_postargs=None): + fixed_args = self._fix_compile_args(None, macros, include_dirs) +-- +2.24.1 + diff --git a/python/016-no-static-lib.patch b/python/016-no-static-lib.patch new file mode 100644 index 00000000..2a58b217 --- /dev/null +++ b/python/016-no-static-lib.patch @@ -0,0 +1,78 @@ +From fb93392b0f4975a02775a608611dc9ceb20c06ad Mon Sep 17 00:00:00 2001 +From: David Malcolm +Date: Mon, 18 Jan 2010 17:59:07 +0000 +Subject: [PATCH] 00111: Don't try to build a libpythonMAJOR.MINOR.a +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Downstream only: not appropriate for upstream. + +See https://bugzilla.redhat.com/show_bug.cgi?id=556092 + +Co-authored-by: David Malcolm +Co-authored-by: Bohuslav Kabrda +Co-authored-by: Matej Stuchlik +Co-authored-by: Robert Kuska +Co-authored-by: Charalampos Stratakis +Co-authored-by: Miro HronĨok +--- + Makefile.pre.in | 21 ++------------------- + 1 file changed, 2 insertions(+), 19 deletions(-) + +diff --git a/Makefile.pre.in b/Makefile.pre.in +index 406a441082..917303dd92 100644 +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -562,7 +562,7 @@ clinic: check-clean-src $(srcdir)/Modules/_blake2/blake2s_impl.c + $(PYTHON_FOR_REGEN) $(srcdir)/Tools/clinic/clinic.py --make --srcdir $(srcdir) + + # Build the interpreter +-$(BUILDPYTHON): Programs/python.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY) ++$(BUILDPYTHON): Programs/python.o $(LDLIBRARY) $(PY3LIBRARY) + $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) + + platform: $(BUILDPYTHON) pybuilddir.txt +@@ -610,12 +610,6 @@ sharedmods: $(BUILDPYTHON) pybuilddir.txt Modules/_math.o + _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \ + $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build + +- +-# Build static library +-$(LIBRARY): $(LIBRARY_OBJS) +- -rm -f $@ +- $(AR) $(ARFLAGS) $@ $(LIBRARY_OBJS) +- + libpython$(LDVERSION).so: $(LIBRARY_OBJS) $(DTRACE_OBJS) + if test $(INSTSONAME) != $(LDLIBRARY); then \ + $(BLDSHARED) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM); \ +@@ -693,7 +687,7 @@ Makefile Modules/config.c: Makefile.pre \ + @echo "The Makefile was updated, you may need to re-run make." + + +-Programs/_testembed: Programs/_testembed.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY) ++Programs/_testembed: Programs/_testembed.o $(LDLIBRARY) $(PY3LIBRARY) + $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/_testembed.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) + + ############################################################################ +@@ -1557,17 +1551,6 @@ libainstall: @DEF_MAKE_RULE@ python-config + else true; \ + fi; \ + done +- @if test -d $(LIBRARY); then :; else \ +- if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \ +- if test "$(SHLIB_SUFFIX)" = .dll; then \ +- $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \ +- else \ +- $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \ +- fi; \ +- else \ +- echo Skip install of $(LIBRARY) - use make frameworkinstall; \ +- fi; \ +- fi + $(INSTALL_DATA) Modules/config.c $(DESTDIR)$(LIBPL)/config.c + $(INSTALL_DATA) Programs/python.o $(DESTDIR)$(LIBPL)/python.o + $(INSTALL_DATA) $(srcdir)/Modules/config.c.in $(DESTDIR)$(LIBPL)/config.c.in +-- +2.24.1 + diff --git a/python/017-3.6-mpdec-cygwin.patch b/python/026-3.7-mpdec-msys.patch similarity index 61% rename from python/017-3.6-mpdec-cygwin.patch rename to python/026-3.7-mpdec-msys.patch index 3787d502..27c1f6bd 100644 --- a/python/017-3.6-mpdec-cygwin.patch +++ b/python/026-3.7-mpdec-msys.patch @@ -1,6 +1,7 @@ ---- a/setup.py -+++ b/setup.py -@@ -2061,7 +2061,7 @@ class PyBuildExt(build_ext): +diff -Naur Python-3.8.0-orig/setup.py Python-3.8.0/setup.py +--- Python-3.8.0-orig/setup.py 2019-10-22 10:04:50.085546300 +0300 ++++ Python-3.8.0/setup.py 2019-10-22 10:04:54.016753200 +0300 +@@ -2165,7 +2165,7 @@ undef_macros = [] if '--with-system-libmpdec' in sysconfig.get_config_var("CONFIG_ARGS"): include_dirs = [] diff --git a/python/027-install-import-library.patch b/python/027-install-import-library.patch new file mode 100644 index 00000000..c6cd2d6c --- /dev/null +++ b/python/027-install-import-library.patch @@ -0,0 +1,10 @@ +--- Python-3.8.2/Makefile.pre.in.orig 2020-04-16 14:57:03.823588900 +0300 ++++ Python-3.8.2/Makefile.pre.in 2020-04-16 15:06:58.593432800 +0300 +@@ -1235,6 +1235,7 @@ + if test -f $(LDLIBRARY) && test "$(PYTHONFRAMEWORKDIR)" = "no-framework" ; then \ + if test -n "$(DLLLIBRARY)" ; then \ + $(INSTALL_SHARED) $(DLLLIBRARY) $(DESTDIR)$(BINDIR); \ ++ $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBDIR); \ + else \ + $(INSTALL_SHARED) $(LDLIBRARY) $(DESTDIR)$(LIBDIR)/$(INSTSONAME); \ + if test $(LDLIBRARY) != $(INSTSONAME); then \ diff --git a/python/3.6-getrandom.patch b/python/3.6-getrandom.patch deleted file mode 100644 index 3c3e93af..00000000 --- a/python/3.6-getrandom.patch +++ /dev/null @@ -1,19 +0,0 @@ -getrandom(2) without GRND_RANDOM is broken prior to Cygwin 2.8.0: - -https://sourceware.org/git/?p=newlib-cygwin.git;a=commitdiff;h=6c420fa - ---- origsrc/Python-3.6.1/configure.ac 2017-03-21 21:36:53.153779000 -0500 -+++ src/Python-3.6.1/configure.ac 2017-03-21 21:42:30.270960000 -0500 -@@ -5372,6 +5372,12 @@ AC_MSG_CHECKING(for the getrandom() func - AC_LINK_IFELSE( - [ - AC_LANG_SOURCE([[ -+ #ifdef __CYGWIN__ -+ #include -+ #if CYGWIN_VERSION_DLL_MAJOR < 2008 -+ #error getrandom(2) is broken prior to Cygwin 2.8.0 -+ #endif -+ #endif - #include - - int main() { diff --git a/python/900-msysize.patch b/python/900-msysize.patch index c940f259..dc7d56e3 100644 --- a/python/900-msysize.patch +++ b/python/900-msysize.patch @@ -1,7 +1,7 @@ -diff -Naur Python-3.7.0-orig/config.guess Python-3.7.0/config.guess ---- Python-3.7.0-orig/config.guess 2015-02-25 14:27:46.000000000 +0300 -+++ Python-3.7.0/config.guess 2015-05-07 09:58:31.810000000 +0300 -@@ -866,6 +866,9 @@ +diff -Naur Python-3.8.2-orig/config.guess Python-3.8.2/config.guess +--- Python-3.8.2-orig/config.guess 2020-02-25 00:36:25.000000000 +0300 ++++ Python-3.8.2/config.guess 2020-04-16 11:24:20.093487400 +0300 +@@ -883,6 +883,9 @@ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; @@ -11,38 +11,53 @@ diff -Naur Python-3.7.0-orig/config.guess Python-3.7.0/config.guess prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; -diff -Naur Python-3.6.0/configure.ac.orig Python-3.6.0/configure.ac ---- Python-3.6.0/configure.ac.orig 2017-02-08 09:14:49.544766100 -0500 -+++ Python-3.6.0/configure.ac 2017-02-08 09:23:26.742594900 -0500 -@@ -383,6 +383,9 @@ +diff -Naur Python-3.8.2-orig/configure.ac Python-3.8.2/configure.ac +--- Python-3.8.2-orig/configure.ac 2020-04-16 11:05:52.937126000 +0300 ++++ Python-3.8.2/configure.ac 2020-04-16 11:55:47.954736700 +0300 +@@ -374,6 +374,9 @@ *-*-cygwin*) ac_sys_system=Cygwin ;; + *-*-msys*) + ac_sys_system=Msys + ;; - *) - # for now, limit cross builds to known configurations - MACHDEP="unknown" -@@ -407,6 +410,7 @@ - case $MACHDEP in + *-*-vxworks*) + ac_sys_system=VxWorks + ;; +@@ -402,6 +405,7 @@ + aix*) MACHDEP="aix";; linux*) MACHDEP="linux";; cygwin*) MACHDEP="cygwin";; + msys*) MACHDEP="msys";; darwin*) MACHDEP="darwin";; - irix646) MACHDEP="irix6";; '') MACHDEP="unknown";; -@@ -428,6 +432,9 @@ + esac +@@ -423,6 +427,9 @@ *-*-cygwin*) _host_cpu= ;; + *-*-msys*) + _host_cpu= + ;; - *) - # for now, limit cross builds to known configurations - MACHDEP="unknown" -@@ -1087,7 +1094,7 @@ + *-*-vxworks*) + _host_cpu=$host_cpu + ;; +@@ -845,6 +852,14 @@ + darwin + #elif defined(__VXWORKS__) + vxworks ++#elif defined(__MSYS__) ++# if defined(__x86_64__) ++ x86_64-msys ++# elif defined(__i386__) ++ i386-msys ++# else ++# error unknown platform triplet ++# endif + #elif defined(__CYGWIN__) + # if defined(__x86_64__) + x86_64-cygwin +@@ -1064,7 +1071,7 @@ if test -z "$enable_shared" then case $ac_sys_system in @@ -51,7 +66,7 @@ diff -Naur Python-3.6.0/configure.ac.orig Python-3.6.0/configure.ac enable_shared="yes";; *) enable_shared="no";; -@@ -1142,6 +1149,10 @@ +@@ -1118,6 +1125,10 @@ LDLIBRARY='libpython$(LDVERSION).dll.a' DLLLIBRARY='libpython$(LDVERSION).dll' ;; @@ -62,7 +77,7 @@ diff -Naur Python-3.6.0/configure.ac.orig Python-3.6.0/configure.ac SunOS*) LDLIBRARY='libpython$(LDVERSION).so' BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)' -@@ -1188,7 +1200,7 @@ +@@ -1164,7 +1175,7 @@ else # shared is disabled PY_ENABLE_SHARED=0 case $ac_sys_system in @@ -71,7 +86,7 @@ diff -Naur Python-3.6.0/configure.ac.orig Python-3.6.0/configure.ac BLDLIBRARY='$(LIBRARY)' LDLIBRARY='libpython$(LDVERSION).dll.a' ;; -@@ -1238,7 +1250,7 @@ +@@ -1213,7 +1224,7 @@ AC_SUBST(LN) if test -z "$LN" ; then case $ac_sys_system in @@ -80,7 +95,7 @@ diff -Naur Python-3.6.0/configure.ac.orig Python-3.6.0/configure.ac *) LN=ln;; esac fi -@@ -2380,7 +2392,7 @@ +@@ -2507,7 +2518,7 @@ *) SHLIB_SUFFIX=.sl;; esac ;; @@ -89,7 +104,7 @@ diff -Naur Python-3.6.0/configure.ac.orig Python-3.6.0/configure.ac *) SHLIB_SUFFIX=.so;; esac fi -@@ -2518,7 +2530,7 @@ +@@ -2641,7 +2652,7 @@ SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport' LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';; @@ -98,7 +113,7 @@ diff -Naur Python-3.6.0/configure.ac.orig Python-3.6.0/configure.ac LDSHARED="gcc -shared -Wl,--enable-auto-image-base" LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";; *) LDSHARED="ld";; -@@ -2606,7 +2618,7 @@ +@@ -2727,7 +2738,7 @@ LINKFORSHARED="-Xlinker --export-dynamic" fi;; esac;; @@ -107,7 +122,7 @@ diff -Naur Python-3.6.0/configure.ac.orig Python-3.6.0/configure.ac if test $enable_shared = "no" then LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)' -@@ -2628,7 +2640,7 @@ +@@ -2751,7 +2762,7 @@ if test ! "$LIBRARY" = "$LDLIBRARY" then case $ac_sys_system in @@ -116,7 +131,7 @@ diff -Naur Python-3.6.0/configure.ac.orig Python-3.6.0/configure.ac # Cygwin needs CCSHARED when building extension DLLs # but not when building the interpreter DLL. CFLAGSFORSHARED='';; -@@ -3061,7 +3073,7 @@ +@@ -3206,7 +3217,7 @@ fi AC_CHECK_FUNCS(pthread_sigmask, [case $ac_sys_system in @@ -125,39 +140,51 @@ diff -Naur Python-3.6.0/configure.ac.orig Python-3.6.0/configure.ac AC_DEFINE(HAVE_BROKEN_PTHREAD_SIGMASK, 1, [Define if pthread_sigmask() does not work on your system.]) ;; -@@ -4609,7 +4621,7 @@ +@@ -4656,7 +4667,7 @@ AC_SUBST(EXT_SUFFIX) case $ac_sys_system in -- Linux*|GNU*|Darwin|CYGWIN*) -+ Linux*|GNU*|Darwin|CYGWIN*|MSYS*) +- Linux*|GNU*|Darwin|VxWorks|CYGWIN*) ++ Linux*|GNU*|Darwin|VxWorks|CYGWIN*|MSYS*) EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};; *) EXT_SUFFIX=${SHLIB_SUFFIX};; -diff -Naur Python-3.6.0/Lib/asyncio/base_events.py.orig Python-3.6.0/Lib/asyncio/base_events.py ---- Python-3.6.0/Lib/asyncio/base_events.py.orig 2016-12-22 21:21:19.000000000 -0500 -+++ Python-3.6.0/Lib/asyncio/base_events.py 2017-02-08 08:59:15.247005800 -0500 -@@ -895,7 +895,7 @@ - exceptions = [] +@@ -4990,7 +4990,7 @@ - if reuse_address is None: -- reuse_address = os.name == 'posix' and sys.platform != 'cygwin' -+ reuse_address = os.name == 'posix' and sys.platform != 'cygwin' and sys.platform != 'msys' + # On Android and Cygwin the shared libraries must be linked with libpython. + AC_SUBST(LIBPYTHON) +-if test -n "$ANDROID_API_LEVEL" -o "$MACHDEP" = "cygwin"; then ++if test -n "$ANDROID_API_LEVEL" -o "$MACHDEP" = "cygwin" -o "$MACHDEP" = "msys" -o "$MACHDEP" = "win"; then + LIBPYTHON="-lpython${VERSION}${ABIFLAGS}" + else + LIBPYTHON='' +diff -Naur Python-3.8.2-orig/Lib/_pyio.py Python-3.8.2/Lib/_pyio.py +--- Python-3.8.2-orig/Lib/_pyio.py 2020-02-25 00:36:25.000000000 +0300 ++++ Python-3.8.2/Lib/_pyio.py 2020-04-16 11:24:20.888354800 +0300 +@@ -10,7 +10,7 @@ + import sys + # Import _thread instead of threading to reduce startup cost + from _thread import allocate_lock as Lock +-if sys.platform in {'win32', 'cygwin'}: ++if sys.platform in {'win32', 'cygwin', 'msys'}: + from msvcrt import setmode as _setmode + else: + _setmode = None +diff -Naur Python-3.8.2-orig/Lib/asyncio/base_events.py Python-3.8.2/Lib/asyncio/base_events.py +--- Python-3.8.2-orig/Lib/asyncio/base_events.py 2020-02-25 00:36:25.000000000 +0300 ++++ Python-3.8.2/Lib/asyncio/base_events.py 2020-04-16 11:24:20.187260800 +0300 +@@ -1413,7 +1413,7 @@ + 'host/port and sock can not be specified at the same time') - for ((family, proto), - (local_address, remote_address)) in addr_pairs_info: -@@ -997,7 +997,7 @@ - - AF_INET6 = getattr(socket, 'AF_INET6', 0) if reuse_address is None: - reuse_address = os.name == 'posix' and sys.platform != 'cygwin' + reuse_address = os.name == 'posix' and sys.platform != 'cygwin' and sys.platform != 'msys' sockets = [] if host == '': hosts = [None] -diff -Naur Python-3.7.0-orig/Lib/ctypes/__init__.py Python-3.7.0/Lib/ctypes/__init__.py ---- Python-3.7.0-orig/Lib/ctypes/__init__.py 2015-05-07 09:55:34.078000000 +0300 -+++ Python-3.7.0/Lib/ctypes/__init__.py 2015-05-07 09:58:31.825600000 +0300 +diff -Naur Python-3.8.2-orig/Lib/ctypes/__init__.py Python-3.8.2/Lib/ctypes/__init__.py +--- Python-3.8.2-orig/Lib/ctypes/__init__.py 2020-02-25 00:36:25.000000000 +0300 ++++ Python-3.8.2/Lib/ctypes/__init__.py 2020-04-16 12:15:47.765039500 +0300 @@ -1,6 +1,6 @@ """create and manipulate C data types in Python""" @@ -166,22 +193,19 @@ diff -Naur Python-3.7.0-orig/Lib/ctypes/__init__.py Python-3.7.0/Lib/ctypes/__in __version__ = "1.1.0" -@@ -430,9 +430,8 @@ - - if _os.name == "nt": +@@ -457,6 +457,8 @@ pythonapi = PyDLL("python dll", None, _sys.dllhandle) --elif _sys.platform == "cygwin": -- pythonapi = PyDLL("libpython%d.%d%s.dll" % \ -- (_sys.version_info[:2] + tuple(_sys.abiflags))) -+elif _sys.platform in ['cygwin', 'msys']: -+ pythonapi = PyDLL(_sysconfig.get_config_var('DLLLIBRARY')) + elif _sys.platform == "cygwin": + pythonapi = PyDLL("libpython%d.%d.dll" % _sys.version_info[:2]) ++elif _sys.platform == 'msys': ++ pythonapi = PyDLL("msys-python%d.%d.dll" % _sys.version_info[:2]) else: pythonapi = PyDLL(None) -diff -Naur Python-3.7.0-orig/Lib/ctypes/test/test_loading.py Python-3.7.0/Lib/ctypes/test/test_loading.py ---- Python-3.7.0-orig/Lib/ctypes/test/test_loading.py 2015-02-25 14:27:44.000000000 +0300 -+++ Python-3.7.0/Lib/ctypes/test/test_loading.py 2015-05-07 09:58:31.841200000 +0300 -@@ -13,6 +13,8 @@ +diff -Naur Python-3.8.2-orig/Lib/ctypes/test/test_loading.py Python-3.8.2/Lib/ctypes/test/test_loading.py +--- Python-3.8.2-orig/Lib/ctypes/test/test_loading.py 2020-02-25 00:36:25.000000000 +0300 ++++ Python-3.8.2/Lib/ctypes/test/test_loading.py 2020-04-16 11:24:20.297938600 +0300 +@@ -16,6 +16,8 @@ libc_name = find_library("c") elif sys.platform == "cygwin": libc_name = "cygwin1.dll" @@ -190,19 +214,19 @@ diff -Naur Python-3.7.0-orig/Lib/ctypes/test/test_loading.py Python-3.7.0/Lib/ct else: libc_name = find_library("c") -diff -Naur Python-3.7.0-orig/Lib/ctypes/util.py Python-3.7.0/Lib/ctypes/util.py ---- Python-3.7.0-orig/Lib/ctypes/util.py 2015-05-07 09:55:34.078000000 +0300 -+++ Python-3.7.0/Lib/ctypes/util.py 2015-05-07 10:01:40.261800000 +0300 -@@ -80,7 +80,7 @@ - continue - return None +diff -Naur Python-3.8.2-orig/Lib/ctypes/util.py Python-3.8.2/Lib/ctypes/util.py +--- Python-3.8.2-orig/Lib/ctypes/util.py 2020-04-16 11:05:52.177167300 +0300 ++++ Python-3.8.2/Lib/ctypes/util.py 2020-04-16 12:13:21.118796400 +0300 +@@ -89,7 +89,7 @@ + + from ctypes._aix import find_library -elif sys.platform == "cygwin": +elif sys.platform in ["cygwin", "msys"]: def find_library(name): for libdir in ['/usr/lib', '/usr/local/lib']: for libext in ['lib%s.dll.a' % name, 'lib%s.a' % name]: -@@ -351,6 +351,10 @@ +@@ -372,6 +372,10 @@ print(cdll.LoadLibrary("cygbz2-1.dll")) print(cdll.LoadLibrary("cygcrypt-0.dll")) print(find_library("crypt")) @@ -210,13 +234,13 @@ diff -Naur Python-3.7.0-orig/Lib/ctypes/util.py Python-3.7.0/Lib/ctypes/util.py + print(cdll.LoadLibrary("msys-bz2-1.dll")) + print(cdll.LoadLibrary("msys-crypt-0.dll")) + print(find_library("crypt")) - # issue-26439 - fix broken test call for AIX - elif sys.platform.startswith("aix"): - from ctypes import CDLL -diff -Naur Python-3.7.0-orig/Lib/distutils/ccompiler.py Python-3.7.0/Lib/distutils/ccompiler.py ---- Python-3.7.0-orig/Lib/distutils/ccompiler.py 2015-02-25 14:27:44.000000000 +0300 -+++ Python-3.7.0/Lib/distutils/ccompiler.py 2015-05-07 09:58:31.841200000 +0300 -@@ -926,6 +926,7 @@ + else: + print(cdll.LoadLibrary("libm.so")) + print(cdll.LoadLibrary("libcrypt.so")) +diff -Naur Python-3.8.2-orig/Lib/distutils/ccompiler.py Python-3.8.2/Lib/distutils/ccompiler.py +--- Python-3.8.2-orig/Lib/distutils/ccompiler.py 2020-02-25 00:36:25.000000000 +0300 ++++ Python-3.8.2/Lib/distutils/ccompiler.py 2020-04-16 11:24:20.389719900 +0300 +@@ -927,6 +927,7 @@ # on a cygwin built python we can use gcc like an ordinary UNIXish # compiler ('cygwin.*', 'unix'), @@ -224,7 +248,7 @@ diff -Naur Python-3.7.0-orig/Lib/distutils/ccompiler.py Python-3.7.0/Lib/distuti # OS name mappings ('posix', 'unix'), -@@ -963,6 +964,8 @@ +@@ -964,6 +965,8 @@ "Microsoft Visual C++"), 'cygwin': ('cygwinccompiler', 'CygwinCCompiler', "Cygwin port of GNU C Compiler for Win32"), @@ -233,10 +257,10 @@ diff -Naur Python-3.7.0-orig/Lib/distutils/ccompiler.py Python-3.7.0/Lib/distuti 'mingw32': ('cygwinccompiler', 'Mingw32CCompiler', "Mingw32 port of GNU C Compiler for Win32"), 'bcpp': ('bcppcompiler', 'BCPPCompiler', -diff -Naur Python-3.7.0-orig/Lib/distutils/command/build_ext.py Python-3.7.0/Lib/distutils/command/build_ext.py ---- Python-3.7.0-orig/Lib/distutils/command/build_ext.py 2015-05-07 09:55:34.811200000 +0300 -+++ Python-3.7.0/Lib/distutils/command/build_ext.py 2015-05-07 09:58:31.856800000 +0300 -@@ -217,7 +217,7 @@ +diff -Naur Python-3.8.2-orig/Lib/distutils/command/build_ext.py Python-3.8.2/Lib/distutils/command/build_ext.py +--- Python-3.8.2-orig/Lib/distutils/command/build_ext.py 2020-02-25 00:36:25.000000000 +0300 ++++ Python-3.8.2/Lib/distutils/command/build_ext.py 2020-04-16 12:23:32.423489500 +0300 +@@ -218,7 +218,7 @@ # For extensions under Cygwin, Python's library directory must be # appended to library_dirs @@ -245,51 +269,35 @@ diff -Naur Python-3.7.0-orig/Lib/distutils/command/build_ext.py Python-3.7.0/Lib if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")): # building third party extensions self.library_dirs.append(os.path.join(sys.prefix, "lib", -diff -Naur Python-3.7.0-orig/Lib/distutils/cygwinccompiler.py Python-3.7.0/Lib/distutils/cygwinccompiler.py ---- Python-3.7.0-orig/Lib/distutils/cygwinccompiler.py 2015-05-07 09:55:43.001200000 +0300 -+++ Python-3.7.0/Lib/distutils/cygwinccompiler.py 2015-05-07 09:58:31.856800000 +0300 +@@ -739,12 +739,16 @@ + link_libpython = True + elif sys.platform == 'cygwin': + link_libpython = True ++ elif sys.platform == 'msys': ++ link_libpython = True + elif '_PYTHON_HOST_PLATFORM' in os.environ: + # We are cross-compiling for one of the relevant platforms + if get_config_var('ANDROID_API_LEVEL') != 0: + link_libpython = True + elif get_config_var('MACHDEP') == 'cygwin': + link_libpython = True ++ elif get_config_var('MACHDEP') == 'msys': ++ link_libpython = True + + if link_libpython: + ldversion = get_config_var('LDVERSION') +diff -Naur Python-3.8.2-orig/Lib/distutils/cygwinccompiler.py Python-3.8.2/Lib/distutils/cygwinccompiler.py +--- Python-3.8.2-orig/Lib/distutils/cygwinccompiler.py 2020-04-16 11:05:52.457414700 +0300 ++++ Python-3.8.2/Lib/distutils/cygwinccompiler.py 2020-04-16 11:24:20.464492200 +0300 @@ -400,4 +400,4 @@ def is_cygwingcc(): '''Try to determine if the gcc that would be used is from cygwin.''' out_string = check_output(['gcc', '-dumpmachine']) - return out_string.strip().endswith(b'cygwin') + return (out_string.strip().endswith(b'cygwin') or out_string.strip().endswith(b'msys')) -diff -Naur Python-3.7.0-orig/Lib/distutils/sysconfig.py Python-3.7.0/Lib/distutils/sysconfig.py ---- Python-3.7.0-orig/Lib/distutils/sysconfig.py 2015-05-07 09:55:46.604800000 +0300 -+++ Python-3.7.0/Lib/distutils/sysconfig.py 2015-05-07 10:07:03.222600000 +0300 -@@ -157,7 +157,7 @@ - varies across Unices and is stored in Python's Makefile. - """ - global _config_vars -- if compiler.compiler_type in ["cygwin", "mingw32"]: -+ if compiler.compiler_type in ["cygwin", "msys", "mingw32"]: - # Note that cygwin use posix build and 'unix' compiler. - # If build is not based on posix then we must predefine - # some environment variables corresponding to posix -@@ -172,7 +172,7 @@ - _config_vars['AR'] = "ar" - _config_vars['ARFLAGS'] = "rc" - -- if compiler.compiler_type in ["unix", "cygwin", "mingw32"]: -+ if compiler.compiler_type in ["unix", "cygwin", "msys", "mingw32"]: - if sys.platform == "darwin": - # Perform first-time customization of compiler-related - # config vars on OS X now that we know we need a compiler. -diff -Naur Python-3.7.0-orig/Lib/distutils/tests/support.py Python-3.7.0/Lib/distutils/tests/support.py ---- Python-3.7.0-orig/Lib/distutils/tests/support.py 2015-02-25 14:27:44.000000000 +0300 -+++ Python-3.7.0/Lib/distutils/tests/support.py 2015-05-07 09:58:31.856800000 +0300 -@@ -65,7 +65,7 @@ - super().tearDown() - while self.tempdirs: - d = self.tempdirs.pop() -- shutil.rmtree(d, os.name in ('nt', 'cygwin')) -+ shutil.rmtree(d, os.name in ('nt', 'cygwin', 'msys')) - - def mkdtemp(self): - """Create a temporary directory that will be cleaned up. -diff -Naur Python-3.6.0/Lib/distutils/unixccompiler.py.orig Python-3.6.0/Lib/distutils/unixccompiler.py ---- Python-3.6.0/Lib/distutils/unixccompiler.py.orig 2017-02-08 08:22:40.592815800 -0500 -+++ Python-3.6.0/Lib/distutils/unixccompiler.py 2017-02-08 08:32:38.946960100 -0500 +diff -Naur Python-3.8.2-orig/Lib/distutils/unixccompiler.py Python-3.8.2/Lib/distutils/unixccompiler.py +--- Python-3.8.2-orig/Lib/distutils/unixccompiler.py 2020-04-16 11:05:53.222360600 +0300 ++++ Python-3.8.2/Lib/distutils/unixccompiler.py 2020-04-16 11:24:20.529346500 +0300 @@ -79,7 +79,7 @@ xcode_stub_lib_extension = ".tbd" static_lib_format = shared_lib_format = dylib_lib_format = "lib%s%s" @@ -299,7 +307,7 @@ diff -Naur Python-3.6.0/Lib/distutils/unixccompiler.py.orig Python-3.6.0/Lib/dis exe_extension = ".exe" dylib_lib_extension = ".dll.a" -@@ -225,7 +225,7 @@ +@@ -242,7 +242,7 @@ # the configuration data stored in the Python installation, so # we use this hack. compiler = os.path.basename(sysconfig.get_config_var("CC")) @@ -308,10 +316,10 @@ diff -Naur Python-3.6.0/Lib/distutils/unixccompiler.py.orig Python-3.6.0/Lib/dis # MacOSX's linker doesn't understand the -R flag at all return "-L" + dir elif sys.platform[:7] == "freebsd": -diff -Naur Python-3.7.0-orig/Lib/distutils/util.py Python-3.7.0/Lib/distutils/util.py ---- Python-3.7.0-orig/Lib/distutils/util.py 2015-02-25 14:27:44.000000000 +0300 -+++ Python-3.7.0/Lib/distutils/util.py 2015-05-07 09:58:31.872400000 +0300 -@@ -97,6 +97,12 @@ +diff -Naur Python-3.8.2-orig/Lib/distutils/util.py Python-3.8.2/Lib/distutils/util.py +--- Python-3.8.2-orig/Lib/distutils/util.py 2020-02-25 00:36:25.000000000 +0300 ++++ Python-3.8.2/Lib/distutils/util.py 2020-04-16 11:24:20.569211200 +0300 +@@ -86,6 +86,12 @@ m = rel_re.match(release) if m: release = m.group() @@ -324,10 +332,10 @@ diff -Naur Python-3.7.0-orig/Lib/distutils/util.py Python-3.7.0/Lib/distutils/ut elif osname[:6] == "darwin": import _osx_support, distutils.sysconfig osname, release, machine = _osx_support.get_platform_osx( -diff -Naur Python-3.6.0/Lib/importlib/_bootstrap_external.py.orig Python-3.6.0/Lib/importlib/_bootstrap_external.py ---- Python-3.6.0/Lib/importlib/_bootstrap_external.py.orig 2017-02-08 08:43:48.316520300 -0500 -+++ Python-3.6.0/Lib/importlib/_bootstrap_external.py 2017-02-08 08:44:28.339129300 -0500 -@@ -22,7 +22,7 @@ +diff -Naur Python-3.8.2-orig/Lib/importlib/_bootstrap_external.py Python-3.8.2/Lib/importlib/_bootstrap_external.py +--- Python-3.8.2-orig/Lib/importlib/_bootstrap_external.py 2020-02-25 00:36:25.000000000 +0300 ++++ Python-3.8.2/Lib/importlib/_bootstrap_external.py 2020-04-16 11:24:20.608135500 +0300 +@@ -21,7 +21,7 @@ # Bootstrap-related code ###################################################### _CASE_INSENSITIVE_PLATFORMS_STR_KEY = 'win', @@ -335,11 +343,23 @@ diff -Naur Python-3.6.0/Lib/importlib/_bootstrap_external.py.orig Python-3.6.0/L +_CASE_INSENSITIVE_PLATFORMS_BYTES_KEY = 'cygwin', 'msys', 'darwin' _CASE_INSENSITIVE_PLATFORMS = (_CASE_INSENSITIVE_PLATFORMS_BYTES_KEY + _CASE_INSENSITIVE_PLATFORMS_STR_KEY) - -diff -Naur Python-3.7.0-orig/Lib/sysconfig.py Python-3.7.0/Lib/sysconfig.py ---- Python-3.7.0-orig/Lib/sysconfig.py 2015-02-25 14:27:44.000000000 +0300 -+++ Python-3.7.0/Lib/sysconfig.py 2015-05-07 09:58:34.087600000 +0300 -@@ -683,6 +683,13 @@ + +diff -Naur Python-3.8.2-orig/Lib/socket.py Python-3.8.2/Lib/socket.py +--- Python-3.8.2-orig/Lib/socket.py 2020-02-25 00:36:25.000000000 +0300 ++++ Python-3.8.2/Lib/socket.py 2020-04-16 12:25:52.240577100 +0300 +@@ -866,7 +866,7 @@ + # connections. Also, it may set the process in a state where + # it'll no longer respond to any signals or graceful kills. + # See: msdn2.microsoft.com/en-us/library/ms740621(VS.85).aspx +- if os.name not in ('nt', 'cygwin') and \ ++ if os.name not in ('nt', 'cygwin', 'msys') and \ + hasattr(_socket, 'SO_REUSEADDR'): + try: + sock.setsockopt(SOL_SOCKET, SO_REUSEADDR, 1) +diff -Naur Python-3.8.2-orig/Lib/sysconfig.py Python-3.8.2/Lib/sysconfig.py +--- Python-3.8.2-orig/Lib/sysconfig.py 2020-02-25 00:36:25.000000000 +0300 ++++ Python-3.8.2/Lib/sysconfig.py 2020-04-16 11:24:20.643039800 +0300 +@@ -673,6 +673,13 @@ m = rel_re.match(release) if m: release = m.group() @@ -353,22 +373,34 @@ diff -Naur Python-3.7.0-orig/Lib/sysconfig.py Python-3.7.0/Lib/sysconfig.py elif osname[:6] == "darwin": import _osx_support osname, release, machine = _osx_support.get_platform_osx( -diff -Naur Python-3.7.0-orig/Lib/tempfile.py Python-3.7.0/Lib/tempfile.py ---- Python-3.7.0-orig/Lib/tempfile.py 2015-02-25 14:27:44.000000000 +0300 -+++ Python-3.7.0/Lib/tempfile.py 2015-05-07 09:58:35.086000000 +0300 -@@ -557,7 +557,7 @@ +diff -Naur Python-3.8.2-orig/Lib/tempfile.py Python-3.8.2/Lib/tempfile.py +--- Python-3.8.2-orig/Lib/tempfile.py 2020-02-25 00:36:25.000000000 +0300 ++++ Python-3.8.2/Lib/tempfile.py 2020-04-16 12:10:16.483289300 +0300 +@@ -549,7 +549,7 @@ _os.close(fd) raise --if _os.name != 'posix' or _os.sys.platform == 'cygwin': -+if _os.name != 'posix' or _os.sys.platform == 'cygwin' or _os.sys.platform == 'msys': +-if _os.name != 'posix' or _sys.platform == 'cygwin': ++if _os.name != 'posix' or _sys.platform == 'cygwin' or _sys.platform == 'msys': # On non-POSIX and Cygwin systems, assume that we cannot unlink a file # while it is open. TemporaryFile = NamedTemporaryFile -diff -Naur Python-3.7.0-orig/Lib/test/test_curses.py Python-3.7.0/Lib/test/test_curses.py ---- Python-3.7.0-orig/Lib/test/test_curses.py 2015-02-25 14:27:45.000000000 +0300 -+++ Python-3.7.0/Lib/test/test_curses.py 2015-05-07 09:58:35.086000000 +0300 -@@ -40,6 +40,8 @@ +diff -Naur Python-3.8.2-orig/Lib/test/test_c_locale_coercion.py Python-3.8.2/Lib/test/test_c_locale_coercion.py +--- Python-3.8.2-orig/Lib/test/test_c_locale_coercion.py 2020-02-25 00:36:25.000000000 +0300 ++++ Python-3.8.2/Lib/test/test_c_locale_coercion.py 2020-04-16 12:27:51.690076700 +0300 +@@ -44,7 +44,7 @@ + elif sys.platform == "darwin": + # FS encoding is UTF-8 on macOS + EXPECTED_C_LOCALE_FS_ENCODING = "utf-8" +-elif sys.platform == "cygwin": ++elif sys.platform == "cygwin" or sys.platform == "msys": + # Cygwin defaults to using C.UTF-8 + # TODO: Work out a robust dynamic test for this that doesn't rely on + # CPython's own locale handling machinery +diff -Naur Python-3.8.2-orig/Lib/test/test_curses.py Python-3.8.2/Lib/test/test_curses.py +--- Python-3.8.2-orig/Lib/test/test_curses.py 2020-02-25 00:36:25.000000000 +0300 ++++ Python-3.8.2/Lib/test/test_curses.py 2020-04-16 11:24:20.700885900 +0300 +@@ -43,6 +43,8 @@ "$TERM=%r, calling initscr() may cause exit" % term) @unittest.skipIf(sys.platform == "cygwin", "cygwin's curses mostly just hangs") @@ -377,10 +409,10 @@ diff -Naur Python-3.7.0-orig/Lib/test/test_curses.py Python-3.7.0/Lib/test/test_ class TestCurses(unittest.TestCase): @classmethod -diff -Naur Python-3.7.0-orig/Lib/test/test_importlib/util.py Python-3.7.0/Lib/test/test_importlib/util.py ---- Python-3.7.0-orig/Lib/test/test_importlib/util.py 2015-02-25 14:27:45.000000000 +0300 -+++ Python-3.7.0/Lib/test/test_importlib/util.py 2015-05-07 09:58:35.086000000 +0300 -@@ -85,7 +85,7 @@ +diff -Naur Python-3.8.2-orig/Lib/test/test_importlib/util.py Python-3.8.2/Lib/test/test_importlib/util.py +--- Python-3.8.2-orig/Lib/test/test_importlib/util.py 2020-02-25 00:36:25.000000000 +0300 ++++ Python-3.8.2/Lib/test/test_importlib/util.py 2020-04-16 11:24:20.738756200 +0300 +@@ -92,7 +92,7 @@ CASE_INSENSITIVE_FS = True # Windows is the only OS that is *always* case-insensitive # (OS X *can* be case-sensitive). @@ -389,9 +421,9 @@ diff -Naur Python-3.7.0-orig/Lib/test/test_importlib/util.py Python-3.7.0/Lib/te changed_name = __file__.upper() if changed_name == __file__: changed_name = __file__.lower() -diff -Naur Python-3.7.0-orig/Lib/test/test_mailbox.py Python-3.7.0/Lib/test/test_mailbox.py ---- Python-3.7.0-orig/Lib/test/test_mailbox.py 2015-02-25 14:27:45.000000000 +0300 -+++ Python-3.7.0/Lib/test/test_mailbox.py 2015-05-07 09:58:35.086000000 +0300 +diff -Naur Python-3.8.2-orig/Lib/test/test_mailbox.py Python-3.8.2/Lib/test/test_mailbox.py +--- Python-3.8.2-orig/Lib/test/test_mailbox.py 2020-02-25 00:36:25.000000000 +0300 ++++ Python-3.8.2/Lib/test/test_mailbox.py 2020-04-16 11:24:20.774689700 +0300 @@ -591,7 +591,7 @@ def setUp(self): @@ -401,22 +433,22 @@ diff -Naur Python-3.7.0-orig/Lib/test/test_mailbox.py Python-3.7.0/Lib/test/test self._box.colon = '!' def assertMailboxEmpty(self): -diff -Naur Python-3.7.0-orig/Lib/test/test_netrc.py Python-3.7.0/Lib/test/test_netrc.py ---- Python-3.7.0-orig/Lib/test/test_netrc.py 2015-02-25 14:27:45.000000000 +0300 -+++ Python-3.7.0/Lib/test/test_netrc.py 2015-05-07 09:58:35.117200000 +0300 -@@ -8,7 +8,7 @@ +diff -Naur Python-3.8.2-orig/Lib/test/test_netrc.py Python-3.8.2/Lib/test/test_netrc.py +--- Python-3.8.2-orig/Lib/test/test_netrc.py 2020-02-25 00:36:25.000000000 +0300 ++++ Python-3.8.2/Lib/test/test_netrc.py 2020-04-16 11:24:20.794640700 +0300 +@@ -7,7 +7,7 @@ def make_nrc(self, test_data): test_data = textwrap.dedent(test_data) mode = 'w' - if sys.platform != 'cygwin': + if sys.platform not in ['cygwin', 'msys']: mode += 't' - with open(temp_filename, mode) as fp: - fp.write(test_data) -diff -Naur Python-3.7.0-orig/Lib/test/test_shutil.py Python-3.7.0/Lib/test/test_shutil.py ---- Python-3.7.0-orig/Lib/test/test_shutil.py 2015-02-25 14:27:45.000000000 +0300 -+++ Python-3.7.0/Lib/test/test_shutil.py 2015-05-07 09:58:35.117200000 +0300 -@@ -97,7 +97,7 @@ + temp_fd, temp_filename = tempfile.mkstemp() + with os.fdopen(temp_fd, mode=mode) as fp: +diff -Naur Python-3.8.2-orig/Lib/test/test_shutil.py Python-3.8.2/Lib/test/test_shutil.py +--- Python-3.8.2-orig/Lib/test/test_shutil.py 2020-02-25 00:36:25.000000000 +0300 ++++ Python-3.8.2/Lib/test/test_shutil.py 2020-04-16 12:09:20.258481700 +0300 +@@ -169,7 +169,7 @@ super(TestShutil, self).tearDown() while self.tempdirs: d = self.tempdirs.pop() @@ -425,30 +457,18 @@ diff -Naur Python-3.7.0-orig/Lib/test/test_shutil.py Python-3.7.0/Lib/test/test_ def mkdtemp(self): -@@ -196,7 +196,7 @@ +@@ -311,7 +311,7 @@ + self.assertIn(errors[1][2][1].filename, possible_args) - @unittest.skipUnless(hasattr(os, 'chmod'), 'requires os.chmod()') - @unittest.skipIf(sys.platform[:6] == 'cygwin', + @unittest.skipIf(sys.platform[:6] == 'cygwin' or sys.platform[:4] == 'msys', "This test can't be run on Cygwin (issue #1071513).") @unittest.skipIf(hasattr(os, 'geteuid') and os.geteuid() == 0, "This test can't be run reliably as root (issue #1076467).") -diff -Naur Python-3.7.0-orig/Lib/_pyio.py Python-3.7.0/Lib/_pyio.py ---- Python-3.7.0-orig/Lib/_pyio.py 2015-02-25 14:27:45.000000000 +0300 -+++ Python-3.7.0/Lib/_pyio.py 2015-05-07 09:58:35.117200000 +0300 -@@ -10,7 +10,7 @@ - import sys - # Import _thread instead of threading to reduce startup cost - from _thread import allocate_lock as Lock --if sys.platform in {'win32', 'cygwin'}: -+if sys.platform in {'win32', 'cygwin', 'msys'}: - from msvcrt import setmode as _setmode - else: - _setmode = None -diff -Naur Python-3.7.0-orig/Lib/tkinter/test/test_tkinter/test_loadtk.py Python-3.7.0/Lib/tkinter/test/test_tkinter/test_loadtk.py ---- Python-3.7.0-orig/Lib/tkinter/test/test_tkinter/test_loadtk.py 2015-02-25 14:27:45.000000000 +0300 -+++ Python-3.7.0/Lib/tkinter/test/test_tkinter/test_loadtk.py 2015-05-07 09:58:35.117200000 +0300 +diff -Naur Python-3.8.2-orig/Lib/tkinter/test/test_tkinter/test_loadtk.py Python-3.8.2/Lib/tkinter/test/test_tkinter/test_loadtk.py +--- Python-3.8.2-orig/Lib/tkinter/test/test_tkinter/test_loadtk.py 2020-02-25 00:36:25.000000000 +0300 ++++ Python-3.8.2/Lib/tkinter/test/test_tkinter/test_loadtk.py 2020-04-16 11:24:20.906330300 +0300 @@ -18,7 +18,7 @@ def testLoadTkFailure(self): @@ -458,10 +478,10 @@ diff -Naur Python-3.7.0-orig/Lib/tkinter/test/test_tkinter/test_loadtk.py Python # no failure possible on windows? # XXX Maybe on tk older than 8.4.13 it would be possible, -diff -Naur Python-3.7.0-orig/Modules/makesetup Python-3.7.0/Modules/makesetup ---- Python-3.7.0-orig/Modules/makesetup 2015-05-07 09:55:42.954400000 +0300 -+++ Python-3.7.0/Modules/makesetup 2015-05-07 09:58:35.132800000 +0300 -@@ -86,7 +86,7 @@ +diff -Naur Python-3.8.2-orig/Modules/makesetup Python-3.8.2/Modules/makesetup +--- Python-3.8.2-orig/Modules/makesetup 2020-02-25 00:36:25.000000000 +0300 ++++ Python-3.8.2/Modules/makesetup 2020-04-16 11:24:20.926282900 +0300 +@@ -88,7 +88,7 @@ # Setup to link with extra libraries when making shared extensions. # Currently, only Cygwin needs this baggage. case `uname -s` in @@ -470,47 +490,23 @@ diff -Naur Python-3.7.0-orig/Modules/makesetup Python-3.7.0/Modules/makesetup then ExtraLibDir=. else -diff -Naur Python-3.7.0-orig/setup.py Python-3.7.0/setup.py ---- Python-3.7.0-orig/setup.py 2015-05-07 09:55:33.329200000 +0300 -+++ Python-3.7.0/setup.py 2015-05-07 09:58:35.132800000 +0300 -@@ -361,7 +361,7 @@ +diff -Naur Python-3.8.2-orig/setup.py Python-3.8.2/setup.py +--- Python-3.8.2-orig/setup.py 2020-04-16 11:05:53.028879500 +0300 ++++ Python-3.8.2/setup.py 2020-04-16 12:07:07.164536800 +0300 +@@ -42,6 +42,7 @@ + HOST_PLATFORM = get_platform() + MS_WINDOWS = (HOST_PLATFORM == 'win32') + CYGWIN = (HOST_PLATFORM == 'cygwin') ++MSYS = (HOST_PLATFORM == 'msys') + MACOS = (HOST_PLATFORM == 'darwin') + AIX = (HOST_PLATFORM.startswith('aix')) + VXWORKS = ('vxworks' in HOST_PLATFORM) +@@ -505,7 +506,7 @@ # Workaround for Cygwin: Cygwin currently has fork issues when many # modules have been imported -- if host_platform == 'cygwin': -+ if host_platform in ['cygwin', 'msys']: +- if CYGWIN: ++ if CYGWIN or MSYS: self.announce('WARNING: skipping import check for Cygwin-based "%s"' % ext.name) return -@@ -1577,6 +1577,10 @@ - macros = dict() - libraries = [] - -+ elif host_platform == 'msys': # MSYS -+ macros = dict() -+ libraries = [] -+ - elif host_platform.startswith('openbsd'): - macros = dict() - libraries = [] -@@ -2223,7 +2223,7 @@ - return ext - - def _detect_nis(self, inc_dirs, lib_dirs): -- if host_platform in {'win32', 'cygwin', 'qnx6'}: -+ if host_platform in {'win32', 'cygwin', 'msys', 'qnx6'}: - return None - - libs = [] -diff -aur Python-3.6.0/Lib/test/test_asyncio/test_base_events.py.orig Python-3.6.0/Lib/test/test_asyncio/test_base_events.py ---- Python-3.6.0/Lib/test/test_asyncio/test_base_events.py.orig 2017-02-08 15:03:29.184676300 -0500 -+++ Python-3.6.0/Lib/test/test_asyncio/test_base_events.py 2017-02-08 15:49:05.932013200 -0500 -@@ -1576,7 +1576,7 @@ - sock = transport.get_extra_info('socket') - - reuse_address_default_on = ( -- os.name == 'posix' and sys.platform != 'cygwin') -+ os.name == 'posix' and sys.platform != 'cygwin' and sys.platform != 'msys') - reuseport_supported = hasattr(socket, 'SO_REUSEPORT') - - if reuse_address_default_on: diff --git a/python/PKGBUILD b/python/PKGBUILD index 084e1835..94065744 100644 --- a/python/PKGBUILD +++ b/python/PKGBUILD @@ -3,9 +3,9 @@ pkgbase=python3 pkgname=python -pkgver=3.7.4 +pkgver=3.8.2 pkgrel=1 -_pybasever=3.7 +_pybasever=${pkgver%.*} pkgdesc="Next generation of the python high-level scripting language" arch=('i686' 'x86_64') license=('custom') @@ -17,45 +17,47 @@ provides=('python3') replaces=('python3') options=('!makeflags') source=(https://www.python.org/ftp/python/${pkgver%rc*}/Python-${pkgver}.tar.xz - 001-3.4-dbm-cygwin.patch - 002-3.1-enable-new-dtags.patch - 003-3.4-tkinter-cygwin.patch - 004-3.4-ctypes-cygwin.patch - 006-3.1-ncurses-abi6.patch - 007-3.2-export-PySignal_SetWakeupFd.patch - 009-3.2-distutils-shlibext.patch - 010-3.6-pep3149-cygwin.patch - 011-3.6-thread-cygwin64.patch - 012-3.2-getpath-exe-extension.patch - 013-3.4-select-cygwin.patch - 016-3.6-ftm.patch - 017-3.6-mpdec-cygwin.patch + 001-3.1-enable-new-dtags.patch + 002-3.2-getpath-exe-extension.patch + 003-3.4-select-cygwin.patch + 005-3.7-ctypes-cygwin.patch + 006-3.7-ftm.patch + 007-3.8-dbm-cygwin.patch + 008-3.8-distutils-cygwin.patch + 009-3.8-export-PySignal_SetWakeupFd.patch + 010-3.8-nis-cygwin.patch + 011-3.8-parser-cygwin.patch + 012-3.8-pep3149-cygwin.patch + 013-3.8-tkinter-cygwin.patch + 014-3.8-xxsubinterpreters-cygwin.patch + 015-rpath.patch + 016-no-static-lib.patch 025-MINGW-compiler-customize-mingw-cygwin-compilers.patch + 026-3.7-mpdec-msys.patch + 027-install-import-library.patch 900-msysize.patch - 920-allow-win-drives-in-os-path-isabs.patch - dont-make-libpython-readonly.patch - 00155-avoid-ctypes-thunks.patch - 00170-gc-assertions.patch) -sha256sums=('fb799134b868199930b75f26678f18932214042639cd52b16da7fd134cd9b13f' - 'de52e4722a6902e09dd6f343fdac0e7d45339f89386c8096b9c582c31aeb82e7' - 'b5a787f02811f46800f98bf242448770492643a4431771bb4283e6ae97016263' - '4d7601b62e73c04553d22d480a873983a28b11df1f06be6898014453ce04afc3' - 'ff56bfe8dc1808484926c338fb5515d2d8cef36e95cc64d4940642a72276620f' - '23bbe23afe90d5085ba7c27956c2df4ceee2acdfdc1d06a289070f045003fa09' - '1ab20d38926aa85e638317620c29c484fcbbc228cd7cdf9543c29b750556d23f' - '6ead37259110c28b16e35e05c93c82b46aa0fbb5152ff61bdaf1eea5f1ad01da' - 'f5b67408d39d3fda539ea90b12c48a05bd950b38460ec3e6a688e3377b071ed3' - 'b1d5a000bd5c9ec0a54f79e5487901d950e7685c57f50a5cea1a87012c034b4c' - '4a6a4cdd0b3c8f0c3ae563005cc0a398d352c98bcb1826600f1ab4c3e0c24219' - 'e668b749e5f0bc584262add2cd7fffb2f6f32393a14918029d791012eda930f3' - '879ef890846d900132c4283ea65351b060bc4760ca40fbe5e80ba5acbe98370c' - 'e3ef181333d5c9d20297849a46a68271a2190b7fc611c40c68c1ae240fa7ec36' + 920-allow-win-drives-in-os-path-isabs.patch) +sha256sums=('2646e7dc233362f59714c6193017bb2d6f7b38d6ab4a0cb5fbac5c36c4d845df' + 'be96ddaca58a39ddaf1e3e5bb7900b34c0e6d00e9b64c4e0f8a3565a74a44e84' + '4044827af3cf0e91a8ddd44cd588f17ea4e17619512edd299b5688ec6e112ad4' + '82cfafc5b31ad4c9bb4c9786044c39c75762dbc2656abdfdc433c23fee69c02f' + 'f0bb75ca69c63894fc43e0f8218c9dbcc746935bf5ea095a724e6fb2f5dcc566' + '098a756dfdb69b43bece4efe9d53a4f6ffc05a9a19a3d48854de787e69fc453c' + 'dc044b0651a67f7c76e4119d65085e42277c0513b8e9653f0972d955c3dde2c5' + '8c460bf9522e50e06aa2c21a921eb42543d7a4cac6c598b13be43940a96966bf' + '70f854f00de71372e49f2ebbff7491e09e9e036e8e3f3646fe2984e30fb4a9da' + '62588723eb4051dccd0c8ab4183455e7ab99a3dca6c3c07e7403e1919b934ef0' + 'd6b15b6624183d64fc77e5a4e5d100f05266ac8a83fc4e21262c7969e2abf4e5' + '89ebefa1acbdbde73d084a93241674d596e61e608a55301784e29903dba4f289' + '4c6d9d786da1673208b0ef2bc3340e1acf08ce861b49193eb1592c53c3a4bd26' + 'e48c719be36cb266ac3ceae834739fb1faae6740524cd672fd367f9304894a39' + '437332e1a7195dd0adcd505ecdeab5c3a7a793efdd7fea7bec55f97957bb8934' + '43aac098b3a6e2b7806653e51f923b25b7afbf93e0e01c94846c5f749a81f5de' '5b1083e9b50e149d623d863dee38ac1fb8d142f1bb78c8a01dcb09bfd97f4118' - '35bf549bca1147a2a596132639d94f7b3a40de774780933e6a7f7fd9b0d309e3' - '387a2b7931fb4958e2526991760d85677f44fa13cff0aeb0f41a267f1f7fd214' - 'f8b15d7079bfa1707e5bea78f600a0fca2077c25428c2bac5793b19b408f276e' - '7a3f8f43b9c9eecb65d80b60c875344950a8b55082401830599d091548a3a985' - 'd8170bb446e5f3022bcc0eeb49f01d7c880161f1e115f4606e34554bf5ad0314') + 'fc6164a90f0ca2a9341aaf4448b4334c3393459ca5cbad6d7149f8bcf70da5fe' + 'b4042475c5c75e0b4c7c08ccad2891eb8098c066c5ba524a988a0519102e8e5d' + 'e833cb6ab8a3d35296f52ad327df7eb4cc4eab94413085bded2943a290cba16d' + '387a2b7931fb4958e2526991760d85677f44fa13cff0aeb0f41a267f1f7fd214') apply_patch_with_msg() { for _patch in "$@" @@ -81,29 +83,26 @@ prepare() { sed -i -e "s|^#.* /usr/local/bin/python|#!/usr/bin/python|" Lib/cgi.py apply_patch_with_msg \ - 001-3.4-dbm-cygwin.patch \ - 002-3.1-enable-new-dtags.patch \ - 003-3.4-tkinter-cygwin.patch \ - 004-3.4-ctypes-cygwin.patch \ - 006-3.1-ncurses-abi6.patch \ - 007-3.2-export-PySignal_SetWakeupFd.patch \ - 009-3.2-distutils-shlibext.patch \ - 010-3.6-pep3149-cygwin.patch \ - 011-3.6-thread-cygwin64.patch \ - 012-3.2-getpath-exe-extension.patch \ - 013-3.4-select-cygwin.patch \ - 016-3.6-ftm.patch \ - 017-3.6-mpdec-cygwin.patch \ + 001-3.1-enable-new-dtags.patch \ + 002-3.2-getpath-exe-extension.patch \ + 003-3.4-select-cygwin.patch \ + 005-3.7-ctypes-cygwin.patch \ + 006-3.7-ftm.patch \ + 007-3.8-dbm-cygwin.patch \ + 008-3.8-distutils-cygwin.patch \ + 009-3.8-export-PySignal_SetWakeupFd.patch \ + 010-3.8-nis-cygwin.patch \ + 011-3.8-parser-cygwin.patch \ + 012-3.8-pep3149-cygwin.patch \ + 013-3.8-tkinter-cygwin.patch \ + 014-3.8-xxsubinterpreters-cygwin.patch \ + 015-rpath.patch \ + 016-no-static-lib.patch \ 025-MINGW-compiler-customize-mingw-cygwin-compilers.patch \ + 026-3.7-mpdec-msys.patch \ + 027-install-import-library.patch \ 900-msysize.patch \ 920-allow-win-drives-in-os-path-isabs.patch - - #archlinux - apply_patch_with_msg dont-make-libpython-readonly.patch - #fedora - apply_patch_with_msg \ - 00155-avoid-ctypes-thunks.patch \ - 00170-gc-assertions.patch # Incomplete patch from Ray Donnelly # patch -p1 -i ${srcdir}/3.3.2-allow-windows-paths-for-executable.patch @@ -149,22 +148,21 @@ check() { package() { cd "${srcdir}/Python-${pkgver}" - make DESTDIR="${pkgdir}" EXTRA_CFLAGS="$CFLAGS" install maninstall + make DESTDIR="${pkgdir}" EXTRA_CFLAGS="$CFLAGS" install # Why are these not done by default... ln -sf python3 "${pkgdir}"/usr/bin/python.exe ln -sf python3-config "${pkgdir}"/usr/bin/python-config ln -sf idle3 "${pkgdir}"/usr/bin/idle ln -sf pydoc3 "${pkgdir}"/usr/bin/pydoc - ln -sf pyvenv-${_pybasever} "${pkgdir}"/usr/bin/pyvenv3 ln -sf python${_pybasever}.1 "${pkgdir}"/usr/share/man/man1/python3.1 ln -sf python${_pybasever}.1 "${pkgdir}"/usr/share/man/man1/python.1 # Fix FS#22552 - cp -f "${pkgdir}"/usr/lib/python${_pybasever}/config-${_pybasever}m/libpython${_pybasever}m.dll.a "${pkgdir}"/usr/lib/libpython${_pybasever}m.dll.a + # cp -f "${pkgdir}"/usr/lib/python${_pybasever}/config-${_pybasever}-*/libpython${_pybasever}.dll.a "${pkgdir}"/usr/lib/libpython${_pybasever}.dll.a # Clean-up reference to build directory - sed -i "s|$srcdir/Python-${pkgver}:||" "${pkgdir}/usr/lib/python${_pybasever}/config-${_pybasever}m/Makefile" + # sed -i "s|${srcdir}/Python-${pkgver}:||" "${pkgdir}/usr/lib/python${_pybasever}/config-${_pybasever}-*/Makefile" # License install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" diff --git a/python/dont-make-libpython-readonly.patch b/python/dont-make-libpython-readonly.patch deleted file mode 100644 index cbf9cf5e..00000000 --- a/python/dont-make-libpython-readonly.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/Makefile.pre.in b/Makefile.pre.in -index ce2c0aa..7d6dcf7 100644 ---- a/Makefile.pre.in -+++ b/Makefile.pre.in -@@ -70,7 +70,7 @@ INSTALL_DATA= @INSTALL_DATA@ - # Shared libraries must be installed with executable mode on some systems; - # rather than figuring out exactly which, we always give them executable mode. - # Also, making them read-only seems to be a good idea... --INSTALL_SHARED= ${INSTALL} -m 555 -+INSTALL_SHARED= ${INSTALL} -m 755 - - MKDIR_P= @MKDIR_P@ -