python3: Update to 3.4.3

This commit is contained in:
Alexpux
2015-05-07 10:37:12 +03:00
parent 92a245866c
commit e697dbb2db
29 changed files with 1707 additions and 1935 deletions

View File

@@ -1,6 +1,6 @@
--- Python-3.3.2-orig/setup.py 2013-05-15 20:33:00.000000000 +0400
+++ Python-3.3.2/setup.py 2013-08-01 23:45:32.806640600 +0400
@@ -1137,7 +1137,7 @@
--- 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
@@ -1165,7 +1165,7 @@ class PyBuildExt(build_ext):
dbm_setup_debug = False # verbose debug prints from this script?
dbm_order = ['gdbm']
# The standard Unix dbm module:
@@ -9,12 +9,12 @@
config_args = [arg.strip("'")
for arg in sysconfig.get_config_var("CONFIG_ARGS").split()]
dbm_args = [arg for arg in config_args
@@ -1192,6 +1192,15 @@
@@ -1220,6 +1220,15 @@ class PyBuildExt(build_ext):
],
libraries = gdbm_libs)
break
+ if find_file("ndbm.h", inc_dirs, []) is not None:
+ print("building dbm using gdbm")
+ if dbm_setup_debug: print("building dbm using gdbm")
+ dbmext = Extension(
+ '_dbm', ['_dbmmodule.c'],
+ define_macros=[
@@ -23,5 +23,5 @@
+ libraries = gdbm_libs)
+ break
elif cand == "bdb":
if db_incs is not None:
if dblibs:
if dbm_setup_debug: print("building dbm using bdb")

View File

@@ -1,6 +1,8 @@
--- Python-3.3.2-orig/Lib/distutils/unixccompiler.py 2013-05-15 20:32:54.000000000 +0400
+++ Python-3.3.2/Lib/distutils/unixccompiler.py 2013-08-01 23:49:16.568359300 +0400
@@ -222,7 +222,7 @@
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/Lib/distutils/unixccompiler.py 2009-08-19 22:46:55.222993300 -0500
@@ -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"))

View File

@@ -1,6 +1,6 @@
--- Python-3.3.2-orig/setup.py 2013-08-01 23:45:32.806640600 +0400
+++ Python-3.3.2/setup.py 2013-08-01 23:54:03.430664000 +0400
@@ -1696,12 +1696,6 @@
--- 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
@@ -1763,12 +1772,6 @@ class PyBuildExt(build_ext):
include_dirs.append('/usr/X11/include')
added_lib_dirs.append('/usr/X11/lib')
@@ -13,7 +13,7 @@
# Check for BLT extension
if self.compiler.find_library_file(lib_dirs + added_lib_dirs,
'BLT8.0'):
@@ -1719,9 +1713,8 @@
@@ -1786,9 +1789,8 @@ class PyBuildExt(build_ext):
if host_platform in ['aix3', 'aix4']:
libs.append('ld')

View File

@@ -1,6 +1,18 @@
--- Python-3.3.2-orig/Lib/ctypes/util.py 2013-05-15 20:32:54.000000000 +0400
+++ Python-3.3.2/Lib/ctypes/util.py 2013-08-01 23:57:43.715820300 +0400
@@ -83,6 +83,25 @@
--- 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
@@ -434,7 +434,8 @@ pydll = LibraryLoader(PyDLL)
if _os.name in ("nt", "ce"):
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
@@ -83,6 +83,25 @@ if os.name == "posix" and sys.platform =
continue
return None
@@ -25,15 +37,15 @@
+
elif os.name == "posix":
# Andreas Degert's find functions, using gcc, /sbin/ldconfig, objdump
import re, tempfile, errno
@@ -256,6 +275,10 @@
import re, tempfile
@@ -258,6 +277,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(find_library("crypt"))
+ print(cdll.LoadLibrary("cygcrypt-0.dll"))
+ print(find_library("crypt"))
else:
print(cdll.LoadLibrary("libm.so"))
print(cdll.LoadLibrary("libcrypt.so"))

View File

@@ -1,5 +1,7 @@
--- Python-3.3.2-orig/Modules/main.c 2013-05-15 20:32:59.000000000 +0400
+++ Python-3.3.2/Modules/main.c 2013-08-02 00:00:38.549804600 +0400
Avoid redefine error.
--- Python-3.1/Modules/main.c.orig 2009-02-12 09:55:38.000000000 -0600
+++ Python-3.1/Modules/main.c 2009-07-22 22:50:19.981100800 -0500
@@ -14,9 +14,11 @@
#include <windows.h>
#ifdef HAVE_FCNTL_H

View File

@@ -1,5 +1,5 @@
--- Python-3.3.2-orig/Include/py_curses.h 2013-05-15 20:32:53.000000000 +0400
+++ Python-3.3.2/Include/py_curses.h 2013-08-02 00:05:13.842773400 +0400
--- 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 @@
#define NCURSES_OPAQUE 0
#endif /* __APPLE__ */

View File

@@ -1,6 +1,6 @@
--- Python-3.3.2-orig/Include/pyerrors.h 2013-05-15 20:32:54.000000000 +0400
+++ Python-3.3.2/Include/pyerrors.h 2013-08-02 00:09:05.202148400 +0400
@@ -290,7 +290,7 @@
--- Python-3.2/Include/pyerrors.h.orig
+++ Python-3.2/Include/pyerrors.h
@@ -244,7 +244,7 @@ PyAPI_FUNC(int) PyErr_CheckSignals(void)
/* In signalmodule.c */
#ifndef Py_LIMITED_API

View File

@@ -1,8 +1,8 @@
--- Python-3.3.2-orig/Lib/distutils/command/build_ext.py 2013-05-15 20:32:54.000000000 +0400
+++ Python-3.3.2/Lib/distutils/command/build_ext.py 2013-08-02 00:15:05.345703100 +0400
@@ -730,9 +730,9 @@
# extensions, it is a reference to the original list
return ext.libraries + [pythonlib]
--- Python-3.4.3/Lib/distutils/command/build_ext.py.orig 2015-02-25 05:27:44.000000000 -0600
+++ Python-3.4.3/Lib/distutils/command/build_ext.py 2015-05-05 11:15:40.666175000 -0500
@@ -696,9 +696,9 @@ class build_ext(Command):
else:
return ext.libraries
elif sys.platform[:6] == "cygwin":
- template = "python%d.%d"
+ template = "python%d.%d%s"
@@ -12,30 +12,9 @@
# don't extend ext.libraries, it may be shared with other
# extensions, it is a reference to the original list
return ext.libraries + [pythonlib]
--- Python-3.3.2-orig/Modules/makesetup 2013-05-15 20:32:59.000000000 +0400
+++ Python-3.3.2/Modules/makesetup 2013-08-02 00:17:46.703125000 +0400
@@ -91,7 +91,7 @@
else
ExtraLibDir='$(LIBPL)'
fi
- ExtraLibs="-L$ExtraLibDir -lpython\$(VERSION)";;
+ ExtraLibs="-L$ExtraLibDir -lpython\$(LDVERSION)";;
esac
# Main loop
--- Python-3.3.2-orig/configure.ac 2013-05-15 20:33:00.000000000 +0400
+++ Python-3.3.2/configure.ac 2013-08-02 00:18:22.859375000 +0400
@@ -921,6 +921,7 @@
case $ac_sys_system in
CYGWIN*)
LDLIBRARY='libpython$(LDVERSION).dll.a'
+ BLDLIBRARY='-L. -lpython$(LDVERSION)'
DLLLIBRARY='libpython$(LDVERSION).dll'
;;
SunOS*)
--- Python-3.3.2-orig/Makefile.pre.in 2013-05-15 20:32:57.000000000 +0400
+++ Python-3.3.2/Makefile.pre.in 2013-08-02 00:16:23.352539000 +0400
@@ -560,7 +560,7 @@
--- Python-3.4.3/Makefile.pre.in.orig 2015-02-25 05:27:45.000000000 -0600
+++ Python-3.4.3/Makefile.pre.in 2015-05-05 11:15:40.672175700 -0500
@@ -638,7 +638,7 @@ $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION
# This rule builds the Cygwin Python DLL and import library if configured
# for a shared core library; otherwise, this rule is a noop.
@@ -44,3 +23,24 @@
if test -n "$(DLLLIBRARY)"; then \
$(LDSHARED) -Wl,--out-implib=$@ -o $(DLLLIBRARY) $^ \
$(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST); \
--- Python-3.4.3/Modules/makesetup.orig 2015-02-25 05:27:46.000000000 -0600
+++ Python-3.4.3/Modules/makesetup 2015-05-05 11:15:40.676676300 -0500
@@ -91,7 +91,7 @@ CYGWIN*) if test $libdir = .
else
ExtraLibDir='$(LIBPL)'
fi
- ExtraLibs="-L$ExtraLibDir -lpython\$(VERSION)";;
+ ExtraLibs="-L$ExtraLibDir -lpython\$(LDVERSION)";;
esac
# Main loop
--- Python-3.4.3/configure.ac.orig 2015-02-25 05:27:46.000000000 -0600
+++ Python-3.4.3/configure.ac 2015-05-05 11:24:25.915873200 -0500
@@ -944,6 +944,7 @@ if test $enable_shared = "yes"; then
case $ac_sys_system in
CYGWIN*)
LDLIBRARY='libpython$(LDVERSION).dll.a'
+ BLDLIBRARY='-L. -lpython$(LDVERSION)'
DLLLIBRARY='libpython$(LDVERSION).dll'
;;
SunOS*)

View File

@@ -1,6 +1,9 @@
--- Python-3.3.2-orig/Lib/distutils/cygwinccompiler.py 2013-05-15 20:32:54.000000000 +0400
+++ Python-3.3.2/Lib/distutils/cygwinccompiler.py 2013-08-02 00:24:11.022460900 +0400
@@ -91,9 +91,7 @@
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
@@ -88,9 +88,7 @@ class CygwinCCompiler(UnixCCompiler):
compiler_type = 'cygwin'
obj_extension = ".o"
static_lib_extension = ".a"
@@ -11,9 +14,9 @@
exe_extension = ".exe"
def __init__(self, verbose=0, dry_run=0, force=0):
--- Python-3.3.2-orig/Lib/distutils/unixccompiler.py 2013-08-01 23:49:16.568359300 +0400
+++ Python-3.3.2/Lib/distutils/unixccompiler.py 2013-08-02 00:25:54.459960900 +0400
@@ -79,6 +79,7 @@
--- 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
@@ -79,6 +79,7 @@ class UnixCCompiler(CCompiler):
static_lib_format = shared_lib_format = dylib_lib_format = "lib%s%s"
if sys.platform == "cygwin":
exe_extension = ".exe"

View File

@@ -0,0 +1,22 @@
--- 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.4.3/configure.ac.orig 2015-02-25 05:27:46.000000000 -0600
+++ Python-3.4.3/configure.ac 2015-05-05 11:24:25.915873200 -0500
@@ -4096,7 +4097,7 @@ AC_MSG_RESULT($SOABI)
AC_SUBST(EXT_SUFFIX)
case $ac_sys_system in
- Linux*|GNU*)
+ Linux*|GNU*|CYGWIN*)
EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
*)
EXT_SUFFIX=${SHLIB_SUFFIX};;

View File

@@ -1,6 +1,6 @@
--- Python-3.3.2-orig/Include/pythread.h 2013-05-15 20:32:54.000000000 +0400
+++ Python-3.3.2/Include/pythread.h 2013-08-02 00:44:41.784179600 +0400
@@ -77,11 +77,11 @@
--- 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
@@ -77,11 +77,11 @@ PyAPI_FUNC(int) PyThread_set_stacksize(s
PyAPI_FUNC(PyObject*) PyThread_GetInfo(void);
/* Thread Local Storage (TLS) API */
@@ -17,20 +17,20 @@
/* Cleanup after a fork */
PyAPI_FUNC(void) PyThread_ReInitTLS(void);
--- Python-3.3.2-orig/Python/pystate.c 2013-05-15 20:33:00.000000000 +0400
+++ Python-3.3.2/Python/pystate.c 2013-08-02 00:46:14.940429600 +0400
@@ -37,7 +37,7 @@
--- Python-3.4.3/Python/pystate.c.orig 2015-02-25 05:27:46.000000000 -0600
+++ Python-3.4.3/Python/pystate.c 2015-05-05 11:27:20.122994700 -0500
@@ -37,7 +37,7 @@ static PyThread_type_lock head_mutex = N
GILState implementation
*/
static PyInterpreterState *autoInterpreterState = NULL;
-static int autoTLSkey = 0;
+static long autoTLSkey = 0;
+static long autoTLSkey = 0L;
#else
#define HEAD_INIT() /* Nothing */
#define HEAD_LOCK() /* Nothing */
--- Python-3.3.2-orig/Python/thread_pthread.h 2013-05-15 20:33:00.000000000 +0400
+++ Python-3.3.2/Python/thread_pthread.h 2013-08-02 00:47:54.674804600 +0400
@@ -600,7 +600,7 @@
--- Python-3.4.3/Python/thread_pthread.h.orig 2015-02-25 05:27:46.000000000 -0600
+++ Python-3.4.3/Python/thread_pthread.h 2015-05-05 11:27:20.126495200 -0500
@@ -603,28 +603,28 @@ _pythread_pthread_set_stacksize(size_t s
#define Py_HAVE_NATIVE_TLS
@@ -39,7 +39,9 @@
PyThread_create_key(void)
{
pthread_key_t key;
@@ -609,19 +609,19 @@
int fail = pthread_key_create(&key, NULL);
- return fail ? -1 : key;
+ return fail ? -1L : (long) key;
}
void
@@ -61,8 +63,8 @@
+PyThread_set_key_value(long key, void *value)
{
int fail;
void *oldValue = pthread_getspecific(key);
@@ -632,7 +632,7 @@
fail = pthread_setspecific(key, value);
@@ -632,7 +632,7 @@ PyThread_set_key_value(int key, void *va
}
void *

View File

@@ -0,0 +1,31 @@
--- Python-3.2.3/Modules/getpath.c.orig 2012-04-11 02:54:07.000000000 -0400
+++ Python-3.2.3/Modules/getpath.c 2012-06-14 13:33:30.179375000 -0400
@@ -491,6 +491,28 @@
if (isxfile(progpath))
break;
+#ifdef __CYGWIN__
+ /*
+ * Cygwin automatically removes the ".exe" extension from argv[0]
+ * to make programs feel like they are in a more Unix-like
+ * environment. Unfortunately, this can make it problemmatic for
+ * Cygwin to distinguish between a directory and an executable with
+ * the same name excluding the ".exe" extension. For example, the
+ * Cygwin Python build directory has a "Python" directory and a
+ * "python.exe" executable. This causes isxfile() to erroneously
+ * return false. If isdir() returns true and there is enough space
+ * to append the ".exe" extension, then we try again with the
+ * extension appended.
+ */
+#define EXE L".exe"
+ if (isdir(progpath) && wcslen(progpath) + wcslen(EXE) <= MAXPATHLEN)
+ {
+ wcscat(progpath, EXE);
+ if (isxfile(progpath))
+ break;
+ }
+#endif /* __CYGWIN__ */
+
if (!delim) {
progpath[0] = L'\0';
break;

View File

@@ -0,0 +1,36 @@
--- Python-3.4.3/Modules/selectmodule.c.orig 2015-02-25 05:27:46.000000000 -0600
+++ Python-3.4.3/Modules/selectmodule.c 2015-05-05 13:58:58.914394500 -0500
@@ -4,6 +4,16 @@
have any value except INVALID_SOCKET.
*/
+/* Windows #defines FD_SETSIZE to 64 if FD_SETSIZE isn't already defined.
+ 64 is too small (too many people have bumped into that limit).
+ Here we boost it.
+ Users who want even more than the boosted limit should #define
+ FD_SETSIZE higher before this; e.g., via compiler /D switch.
+*/
+#if (defined(MS_WINDOWS) || defined(__CYGWIN__)) && !defined(FD_SETSIZE)
+#define FD_SETSIZE 512
+#endif
+
#include "Python.h"
#include <structmember.h>
@@ -22,16 +32,6 @@
#undef HAVE_BROKEN_POLL
#endif
-/* Windows #defines FD_SETSIZE to 64 if FD_SETSIZE isn't already defined.
- 64 is too small (too many people have bumped into that limit).
- Here we boost it.
- Users who want even more than the boosted limit should #define
- FD_SETSIZE higher before this; e.g., via compiler /D switch.
-*/
-#if defined(MS_WINDOWS) && !defined(FD_SETSIZE)
-#define FD_SETSIZE 512
-#endif
-
#if defined(HAVE_POLL_H)
#include <poll.h>
#elif defined(HAVE_SYS_POLL_H)

View File

@@ -0,0 +1,14 @@
--- Python-3.4.3/Modules/signalmodule.c.orig 2015-02-25 05:27:46.000000000 -0600
+++ Python-3.4.3/Modules/signalmodule.c 2015-05-05 16:10:10.357940900 -0500
@@ -741,7 +741,11 @@ fill_siginfo(siginfo_t *si)
PyStructSequence_SET_ITEM(result, 4, _PyLong_FromUid(si->si_uid));
PyStructSequence_SET_ITEM(result, 5,
PyLong_FromLong((long)(si->si_status)));
+#ifdef __CYGWIN__
+ PyStructSequence_SET_ITEM(result, 6, PyLong_FromLong(0L));
+#else
PyStructSequence_SET_ITEM(result, 6, PyLong_FromLong(si->si_band));
+#endif
if (PyErr_Occurred()) {
Py_DECREF(result);
return NULL;

View File

@@ -0,0 +1,11 @@
--- Python-3.4.3/Modules/_struct.c.orig 2015-02-25 05:27:45.000000000 -0600
+++ Python-3.4.3/Modules/_struct.c 2015-05-05 16:17:01.509150400 -0500
@@ -1627,7 +1627,7 @@ unpackiter_iternext(unpackiterobject *se
}
static PyTypeObject unpackiter_type = {
- PyVarObject_HEAD_INIT(&PyType_Type, 0)
+ PyVarObject_HEAD_INIT(NULL, 0)
"unpack_iterator", /* tp_name */
sizeof(unpackiterobject), /* tp_basicsize */
0, /* tp_itemsize */

View File

@@ -0,0 +1,36 @@
diff -urN a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
--- a/Lib/distutils/sysconfig.py 2014-10-11 14:19:27.487874300 +0100
+++ b/Lib/distutils/sysconfig.py 2014-10-11 14:19:30.049020800 +0100
@@ -165,7 +165,23 @@
Mainly needed on Unix, so we can plug in the information that
varies across Unices and is stored in Python's Makefile.
"""
- if compiler.compiler_type == "unix":
+ global _config_vars
+ if compiler.compiler_type in ["cygwin", "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
+ # build rules and defaults.
+ if not 'GCC' in sys.version:
+ _config_vars['CC'] = "gcc"
+ _config_vars['CXX'] = "g++"
+ _config_vars['OPT'] = "-fwrapv -O3 -Wall -Wstrict-prototypes"
+ _config_vars['CFLAGS'] = ""
+ _config_vars['CCSHARED'] = ""
+ _config_vars['LDSHARED'] = "gcc -shared -Wl,--enable-auto-image-base"
+ _config_vars['AR'] = "ar"
+ _config_vars['ARFLAGS'] = "rc"
+
+ if compiler.compiler_type in ["unix", "cygwin", "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.
@@ -175,7 +191,6 @@
# that Python itself was built on. Also the user OS
# version and build tools may not support the same set
# of CPU architectures for universal builds.
- global _config_vars
# Use get_config_var() to ensure _config_vars is initialized.
if not get_config_var('CUSTOMIZED_OSX_COMPILER'):
import _osx_support

View File

@@ -1,12 +0,0 @@
--- Python-3.3.2-orig/Lib/ctypes/__init__.py 2013-08-02 00:29:33.877929600 +0400
+++ Python-3.3.2/Lib/ctypes/__init__.py 2013-05-15 20:32:54.000000000 +0400
@@ -436,7 +436,8 @@
if _os.name in ("nt", "ce"):
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)

View File

@@ -1,11 +0,0 @@
--- Python-3.3.2-orig/Include/node.h 2013-05-15 20:32:53.000000000 +0400
+++ Python-3.3.2/Include/node.h 2013-08-02 00:11:53.044921800 +0400
@@ -21,7 +21,7 @@
char *str, int lineno, int col_offset);
PyAPI_FUNC(void) PyNode_Free(node *n);
#ifndef Py_LIMITED_API
-Py_ssize_t _PyNode_SizeOf(node *n);
+PyAPI_FUNC(Py_ssize_t) _PyNode_SizeOf(node *n);
#endif
/* Node access functions */

View File

@@ -1,18 +0,0 @@
--- Python-3.3.2-orig/Include/pyport.h 2013-05-15 20:32:54.000000000 +0400
+++ Python-3.3.2/Include/pyport.h 2013-08-02 11:50:31.637695300 +0400
@@ -760,7 +760,15 @@
/* http://docs.python.org/extending/windows.html#a-cookbook-approach */
# if !defined(__CYGWIN__)
# define PyAPI_FUNC(RTYPE) __declspec(dllimport) RTYPE
+# else
+# define PyAPI_FUNC(RTYPE) RTYPE
# endif /* !__CYGWIN__ */
+ /* NOTE: The issue3945 "compile error in _fileio.c (cygwin)"
+ * was resolved with modification of code.
+ * This issue was resolved for gcc(mingw) with enabling auto
+ * import feature. Since _fileio.c problem now disappear there
+ * is no more reasons to avoid dllimport for gcc(mingw).
+ */
# define PyAPI_DATA(RTYPE) extern __declspec(dllimport) RTYPE
/* module init functions outside the core must be exported */
# if defined(__cplusplus)

View File

@@ -1,21 +0,0 @@
--- Python-3.3.2-orig/configure.ac 2013-08-02 00:18:22.859375000 +0400
+++ Python-3.3.2/configure.ac 2013-08-02 00:35:10.071289000 +0400
@@ -3945,7 +3945,7 @@
AC_SUBST(EXT_SUFFIX)
case $ac_sys_system in
- Linux*|GNU*)
+ Linux*|GNU*|CYGWIN*)
EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
*)
EXT_SUFFIX=${SHLIB_SUFFIX};;
--- Python-3.3.2-orig/Python/dynload_shlib.c 2013-05-15 20:33:00.000000000 +0400
+++ Python-3.3.2/Python/dynload_shlib.c 2013-08-02 00:38:38.291015600 +0400
@@ -38,6 +38,7 @@
const char *_PyImport_DynLoadFiletab[] = {
#ifdef __CYGWIN__
+ "." SOABI ".dll",
".dll",
#else /* !__CYGWIN__ */
#if defined(PYOS_OS2) && defined(PYCC_GCC)

View File

@@ -1,13 +0,0 @@
--- Python-3.3.2-orig/Modules/_ssl.c 2013-05-15 20:32:58.000000000 +0400
+++ Python-3.3.2/Modules/_ssl.c 2013-08-02 00:03:01.190429600 +0400
@@ -16,6 +16,10 @@
#include "Python.h"
+#ifdef __CYGWIN__
+#undef WITH_THREAD
+#endif
+
#ifdef WITH_THREAD
#include "pythread.h"
#define PySSL_BEGIN_ALLOW_THREADS_S(save) \

View File

@@ -1,20 +0,0 @@
--- a/Modules/_ctypes/_ctypes.c 2013-11-17 08:22:55.000000000 +0100
+++ b/Modules/_ctypes/_ctypes.c 2015-03-13 03:09:39.333858300 +0100
@@ -567,7 +567,7 @@
#ifdef __CYGWIN__
/* dlerror() isn't very helpful on cygwin */
PyErr_Format(PyExc_ValueError,
- "symbol '%s' not found (%s) ",
+ "symbol '%s' not found",
name);
#else
PyErr_SetString(PyExc_ValueError, ctypes_dlerror());
@@ -3251,7 +3251,7 @@
#ifdef __CYGWIN__
/* dlerror() isn't very helpful on cygwin */
PyErr_Format(PyExc_AttributeError,
- "function '%s' not found (%s) ",
+ "function '%s' not found",
name);
#else
PyErr_SetString(PyExc_AttributeError, ctypes_dlerror());

View File

@@ -1,129 +0,0 @@
--- Python-3.3.2/Modules/getpath.c.orig 2013-05-15 20:32:59.000000000 +0400
+++ Python-3.3.2/Modules/getpath.c 2013-10-21 20:41:43.579800000 +0400
@@ -10,6 +10,10 @@
#include <mach-o/dyld.h>
#endif
+#if defined(MS_WINDOWS) || defined(__CYGWIN__)
+#include <windows.h>
+#endif
+
/* Search in some common locations for the associated Python libraries.
*
* Two directories must be found, the platform independent directory
@@ -132,7 +136,11 @@
static wchar_t prefix[MAXPATHLEN+1];
static wchar_t exec_prefix[MAXPATHLEN+1];
-static wchar_t progpath[MAXPATHLEN+1];
+static wchar_t progpath[MAXPATHLEN+1] = {'\0'};
+#if defined(MS_WINDOWS) || defined(__CYGWIN__)
+static wchar_t dllpath[MAXPATHLEN+1] = {'\0'};
+extern HANDLE PyWin_DLLhModule;
+#endif
static wchar_t *module_search_path = NULL;
static int module_search_path_malloced = 0;
static wchar_t *lib_python = L"lib/python" VERSION;
@@ -213,7 +221,11 @@
joinpath(wchar_t *buffer, wchar_t *stuff)
{
size_t n, k;
+#if defined(MS_WINDOWS) || defined(__CYGWIN__)
+ if (stuff[0] == SEP || (wcslen(stuff)>=2 && stuff[0] != 0 && stuff[1] == ':'))
+#else
if (stuff[0] == SEP)
+#endif
n = 0;
else {
n = wcslen(buffer);
@@ -227,6 +239,13 @@
k = MAXPATHLEN - n;
wcsncpy(buffer+n, stuff, k);
buffer[n+k] = '\0';
+#if defined(__CYGWIN__)
+ /* MSYS specific: Turn C:* into /c* */
+ if (wcslen(buffer)>2 && buffer[0] != 0 && buffer[1] == ':') {
+ buffer[1]=buffer[0]|32;
+ buffer[0]='/';
+ }
+#endif
}
/* copy_absolute requires that path be allocated at least
@@ -234,8 +253,21 @@
static void
copy_absolute(wchar_t *path, wchar_t *p, size_t pathlen)
{
- if (p[0] == SEP)
+#if defined(MS_WINDOWS) || defined(__CYGWIN__)
+ if (p[0] == SEP || (wcslen(p)>=2 && p[0] != 0 && p[1] == ':'))
+#else
+ if (p[0] == SEP)
+#endif
+ {
wcscpy(path, p);
+#if defined(__CYGWIN__)
+ /* MSYS specific: Turn C:* into /c* */
+ if (wcslen(path)>2 && path[0] != 0 && path[1] == ':') {
+ path[1]=path[0]|32;
+ path[0]='/';
+ }
+#endif
+ }
else {
if (!_Py_wgetcwd(path, pathlen)) {
/* unable to get the current directory */
@@ -451,6 +483,42 @@
return 0;
}
+#if defined(MS_WINDOWS) || defined(__CYGWIN__)
+/* Calculates dllpath and progpath, replacing \\ with / */
+int GetWindowsModulePaths()
+{
+ int result = 0;
+ wchar_t* seps;
+ result = GetModuleFileNameW(NULL, progpath, MAXPATHLEN);
+ seps = wcschr(progpath, '\\');
+ while(seps) {
+ *seps = '/';
+ seps = wcschr(seps, '\\');
+ }
+ dllpath[0] = '\0';
+#if defined(Py_ENABLE_SHARED) && !defined(__CYGWIN__)
+ // Hmm, cygwin/MSYS2 replacement for PyWin_DLLhModule is needed.
+ if (PyWin_DLLhModule) {
+ if((GetModuleFileNameW(PyWin_DLLhModule, dllpath, MAXPATHLEN) > 0)) {
+ result = 1;
+ seps = wcschr(dllpath, '\\');
+ while(seps) {
+ *seps = '/';
+ seps = wcschr(seps, '\\');
+ }
+ }
+ }
+#endif
+
+ /* Just so that 'MSYS specific: Turn C:* into /c*'
+ is done. */
+ absolutize(progpath);
+ absolutize(dllpath);
+
+ return result;
+}
+#endif /* MS_WINDOWS */
+
static void
calculate_path(void)
{
@@ -527,6 +595,10 @@
}
}
#endif /* __APPLE__ */
+#if defined(MS_WINDOWS) || defined(__CYGWIN__)
+ else if(GetWindowsModulePaths()) {
+ }
+#endif /* MS_WINDOWS */
else if (path) {
while (1) {
wchar_t *delim = wcschr(path, DELIM);

View File

@@ -1,22 +0,0 @@
--- Python-3.3.2-orig/Modules/signalmodule.c 2013-05-15 20:32:59.000000000 +0400
+++ python-3.3.2/Modules/signalmodule.c 2013-10-21 13:17:31.434200000 +0400
@@ -8,8 +8,18 @@
#include "posixmodule.h"
#endif
+#if defined(__CYGWIN__)
+/* Type siginfo_t is different on cygwin. For instance si_band is not
+ * a member of structure, so until fill_siginfo(siginfo_t *si) is
+ * ported properly lets "undef" sigwaitinfo and sigtimedwait to
+ * avoid build failure in fill_siginfo(..).
+ */
+# undef HAVE_SIGWAITINFO
+# undef HAVE_SIGTIMEDWAIT
+#endif
+
#ifdef MS_WINDOWS
-#include <Windows.h>
+#include <windows.h>
#ifdef HAVE_PROCESS_H
#include <process.h>
#endif

493
python3/900-msysize.patch Normal file
View File

@@ -0,0 +1,493 @@
diff -Naur Python-3.4.3-orig/config.guess Python-3.4.3/config.guess
--- Python-3.4.3-orig/config.guess 2015-02-25 14:27:46.000000000 +0300
+++ Python-3.4.3/config.guess 2015-05-07 09:58:31.810000000 +0300
@@ -866,6 +866,9 @@
amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
echo x86_64-unknown-cygwin
exit ;;
+ amd64:MSYS*:*:* | x86_64:MSYS*:*:*)
+ echo x86_64-unknown-msys
+ exit ;;
p*:CYGWIN*:*)
echo powerpcle-unknown-cygwin
exit ;;
diff -Naur Python-3.4.3-orig/configure.ac Python-3.4.3/configure.ac
--- Python-3.4.3-orig/configure.ac 2015-05-07 09:55:44.998000000 +0300
+++ Python-3.4.3/configure.ac 2015-05-07 09:58:31.825600000 +0300
@@ -373,6 +373,9 @@
*-*-cygwin*)
ac_sys_system=Cygwin
;;
+ *-*-msys*)
+ ac_sys_system=Msys
+ ;;
*)
# for now, limit cross builds to known configurations
MACHDEP="unknown"
@@ -397,6 +400,7 @@
case $MACHDEP in
linux*) MACHDEP="linux";;
cygwin*) MACHDEP="cygwin";;
+ msys*) MACHDEP="msys";;
darwin*) MACHDEP="darwin";;
irix646) MACHDEP="irix6";;
'') MACHDEP="unknown";;
@@ -418,6 +422,9 @@
*-*-cygwin*)
_host_cpu=
;;
+ *-*-msys*)
+ _host_cpu=
+ ;;
*)
# for now, limit cross builds to known configurations
MACHDEP="unknown"
@@ -892,7 +899,7 @@
if test -z "$enable_shared"
then
case $ac_sys_system in
- CYGWIN*)
+ CYGWIN*|MSYS*)
enable_shared="yes";;
*)
enable_shared="no";;
@@ -947,6 +954,11 @@
BLDLIBRARY='-L. -lpython$(LDVERSION)'
DLLLIBRARY='libpython$(LDVERSION).dll'
;;
+ MSYS*)
+ LDLIBRARY='libpython$(LDVERSION).dll.a'
+ BLDLIBRARY='-L. -lpython$(LDVERSION)'
+ DLLLIBRARY='msys-python$(LDVERSION).dll'
+ ;;
SunOS*)
LDLIBRARY='libpython$(LDVERSION).so'
BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
@@ -998,7 +1010,7 @@
else # shared is disabled
PY_ENABLE_SHARED=0
case $ac_sys_system in
- CYGWIN*)
+ CYGWIN*|MSYS*)
BLDLIBRARY='$(LIBRARY)'
LDLIBRARY='libpython$(LDVERSION).dll.a'
;;
@@ -1056,7 +1068,7 @@
AC_SUBST(LN)
if test -z "$LN" ; then
case $ac_sys_system in
- CYGWIN*) LN="ln -s";;
+ CYGWIN*|MSYS*) LN="ln -s";;
*) LN=ln;;
esac
fi
@@ -1962,7 +1974,7 @@
*) SHLIB_SUFFIX=.sl;;
esac
;;
- CYGWIN*) SHLIB_SUFFIX=.dll;;
+ CYGWIN*|MSYS*) SHLIB_SUFFIX=.dll;;
*) SHLIB_SUFFIX=.so;;
esac
fi
@@ -2100,7 +2112,7 @@
SCO_SV*)
LDSHARED='$(CC) -Wl,-G,-Bexport'
LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
- CYGWIN*)
+ CYGWIN*|MSYS*)
LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
*) LDSHARED="ld";;
@@ -2186,7 +2198,7 @@
LINKFORSHARED="-Xlinker --export-dynamic"
fi;;
esac;;
- CYGWIN*)
+ CYGWIN*|MSYS*)
if test $enable_shared = "no"
then
LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
@@ -2208,7 +2220,7 @@
if test ! "$LIBRARY" = "$LDLIBRARY"
then
case $ac_sys_system in
- CYGWIN*)
+ CYGWIN*|MSYS*)
# Cygwin needs CCSHARED when building extension DLLs
# but not when building the interpreter DLL.
CFLAGSFORSHARED='';;
@@ -2637,7 +2649,7 @@
fi
AC_CHECK_FUNCS(pthread_sigmask,
[case $ac_sys_system in
- CYGWIN*)
+ CYGWIN*|MSYS*)
AC_DEFINE(HAVE_BROKEN_PTHREAD_SIGMASK, 1,
[Define if pthread_sigmask() does not work on your system.])
;;
@@ -4097,7 +4109,7 @@
AC_SUBST(EXT_SUFFIX)
case $ac_sys_system in
- Linux*|GNU*|CYGWIN*)
+ Linux*|GNU*|CYGWIN*|MSYS*)
EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
*)
EXT_SUFFIX=${SHLIB_SUFFIX};;
diff -Naur Python-3.4.3-orig/Lib/asyncio/base_events.py Python-3.4.3/Lib/asyncio/base_events.py
--- Python-3.4.3-orig/Lib/asyncio/base_events.py 2015-02-25 14:27:44.000000000 +0300
+++ Python-3.4.3/Lib/asyncio/base_events.py 2015-05-07 09:58:31.825600000 +0300
@@ -784,7 +784,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 == '':
host = None
diff -Naur Python-3.4.3-orig/Lib/ctypes/__init__.py Python-3.4.3/Lib/ctypes/__init__.py
--- Python-3.4.3-orig/Lib/ctypes/__init__.py 2015-05-07 09:55:34.078000000 +0300
+++ Python-3.4.3/Lib/ctypes/__init__.py 2015-05-07 09:58:31.825600000 +0300
@@ -1,6 +1,6 @@
"""create and manipulate C data types in Python"""
-import os as _os, sys as _sys
+import os as _os, sys as _sys, sysconfig as _sysconfig
__version__ = "1.1.0"
@@ -433,9 +433,8 @@
if _os.name in ("nt", "ce"):
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'))
else:
pythonapi = PyDLL(None)
diff -Naur Python-3.4.3-orig/Lib/ctypes/test/test_loading.py Python-3.4.3/Lib/ctypes/test/test_loading.py
--- Python-3.4.3-orig/Lib/ctypes/test/test_loading.py 2015-02-25 14:27:44.000000000 +0300
+++ Python-3.4.3/Lib/ctypes/test/test_loading.py 2015-05-07 09:58:31.841200000 +0300
@@ -15,6 +15,8 @@
libc_name = "coredll"
elif sys.platform == "cygwin":
libc_name = "cygwin1.dll"
+ elif sys.platform == "msys":
+ libc_name = "msys-2.0.dll"
else:
libc_name = find_library("c")
diff -Naur Python-3.4.3-orig/Lib/ctypes/util.py Python-3.4.3/Lib/ctypes/util.py
--- Python-3.4.3-orig/Lib/ctypes/util.py 2015-05-07 09:55:34.078000000 +0300
+++ Python-3.4.3/Lib/ctypes/util.py 2015-05-07 10:01:40.261800000 +0300
@@ -83,7 +83,7 @@
continue
return None
-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]:
@@ -281,6 +281,10 @@
print(cdll.LoadLibrary("cygbz2-1.dll"))
print(cdll.LoadLibrary("cygcrypt-0.dll"))
print(find_library("crypt"))
+ elif sys.platform == "msys":
+ print(cdll.LoadLibrary("msys-bz2-1.dll"))
+ print(cdll.LoadLibrary("msys-crypt-0.dll"))
+ print(find_library("crypt"))
else:
print(cdll.LoadLibrary("libm.so"))
print(cdll.LoadLibrary("libcrypt.so"))
diff -Naur Python-3.4.3-orig/Lib/distutils/ccompiler.py Python-3.4.3/Lib/distutils/ccompiler.py
--- Python-3.4.3-orig/Lib/distutils/ccompiler.py 2015-02-25 14:27:44.000000000 +0300
+++ Python-3.4.3/Lib/distutils/ccompiler.py 2015-05-07 09:58:31.841200000 +0300
@@ -926,6 +926,7 @@
# on a cygwin built python we can use gcc like an ordinary UNIXish
# compiler
('cygwin.*', 'unix'),
+ ('msys.*', 'unix'),
# OS name mappings
('posix', 'unix'),
@@ -963,6 +964,8 @@
"Microsoft Visual C++"),
'cygwin': ('cygwinccompiler', 'CygwinCCompiler',
"Cygwin port of GNU C Compiler for Win32"),
+ 'msys': ('cygwinccompiler', 'CygwinCCompiler',
+ "Cygwin port of GNU C Compiler for Win32"),
'mingw32': ('cygwinccompiler', 'Mingw32CCompiler',
"Mingw32 port of GNU C Compiler for Win32"),
'bcpp': ('bcppcompiler', 'BCPPCompiler',
diff -Naur Python-3.4.3-orig/Lib/distutils/command/build_ext.py Python-3.4.3/Lib/distutils/command/build_ext.py
--- Python-3.4.3-orig/Lib/distutils/command/build_ext.py 2015-05-07 09:55:34.811200000 +0300
+++ Python-3.4.3/Lib/distutils/command/build_ext.py 2015-05-07 09:58:31.856800000 +0300
@@ -223,7 +223,7 @@
# for extensions under Cygwin and AtheOS Python's library directory must be
# appended to library_dirs
- if sys.platform[:6] == 'cygwin' or sys.platform[:6] == 'atheos':
+ if sys.platform[:6] == 'cygwin' or sys.platform[:4] == 'msys' or sys.platform[:6] == 'atheos':
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",
@@ -695,7 +695,7 @@
return ext.libraries + [pythonlib]
else:
return ext.libraries
- elif sys.platform[:6] == "cygwin":
+ elif sys.platform[:6] == "cygwin" or sys.platform[:4] == "msys":
template = "python%d.%d%s"
pythonlib = (template %
(sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff, sys.abiflags))
diff -Naur Python-3.4.3-orig/Lib/distutils/cygwinccompiler.py Python-3.4.3/Lib/distutils/cygwinccompiler.py
--- Python-3.4.3-orig/Lib/distutils/cygwinccompiler.py 2015-05-07 09:55:43.001200000 +0300
+++ Python-3.4.3/Lib/distutils/cygwinccompiler.py 2015-05-07 09:58:31.856800000 +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.4.3-orig/Lib/distutils/sysconfig.py Python-3.4.3/Lib/distutils/sysconfig.py
--- Python-3.4.3-orig/Lib/distutils/sysconfig.py 2015-05-07 09:55:46.604800000 +0300
+++ Python-3.4.3/Lib/distutils/sysconfig.py 2015-05-07 10:07:03.222600000 +0300
@@ -166,7 +166,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
@@ -181,7 +181,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.4.3-orig/Lib/distutils/tests/support.py Python-3.4.3/Lib/distutils/tests/support.py
--- Python-3.4.3-orig/Lib/distutils/tests/support.py 2015-02-25 14:27:44.000000000 +0300
+++ Python-3.4.3/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.4.3-orig/Lib/distutils/unixccompiler.py Python-3.4.3/Lib/distutils/unixccompiler.py
--- Python-3.4.3-orig/Lib/distutils/unixccompiler.py 2015-05-07 09:55:44.108800000 +0300
+++ Python-3.4.3/Lib/distutils/unixccompiler.py 2015-05-07 09:58:31.856800000 +0300
@@ -77,7 +77,7 @@
shared_lib_extension = ".so"
dylib_lib_extension = ".dylib"
static_lib_format = shared_lib_format = dylib_lib_format = "lib%s%s"
- if sys.platform == "cygwin":
+ if sys.platform in ["cygwin", "msys"]:
exe_extension = ".exe"
dylib_lib_extension = ".dll.a"
@@ -223,7 +223,7 @@
# the configuration data stored in the Python installation, so
# we use this hack.
compiler = os.path.basename(sysconfig.get_config_var("CC"))
- if sys.platform[:6] == "darwin" or sys.platform[:6] == "cygwin":
+ if sys.platform[:6] == "darwin" or sys.platform[:6] == "cygwin" or sys.platform[:4] == "msys":
# MacOSX's linker doesn't understand the -R flag at all
return "-L" + dir
elif sys.platform[:5] == "hp-ux":
diff -Naur Python-3.4.3-orig/Lib/distutils/util.py Python-3.4.3/Lib/distutils/util.py
--- Python-3.4.3-orig/Lib/distutils/util.py 2015-02-25 14:27:44.000000000 +0300
+++ Python-3.4.3/Lib/distutils/util.py 2015-05-07 09:58:31.872400000 +0300
@@ -97,6 +97,12 @@
m = rel_re.match(release)
if m:
release = m.group()
+ elif osname[:4] == "msys":
+ osname = "msys"
+ rel_re = re.compile (r'[\d.]+', re.ASCII)
+ m = rel_re.match(release)
+ if m:
+ release = m.group()
elif osname[:6] == "darwin":
import _osx_support, distutils.sysconfig
osname, release, machine = _osx_support.get_platform_osx(
diff -Naur Python-3.4.3-orig/Lib/importlib/_bootstrap.py Python-3.4.3/Lib/importlib/_bootstrap.py
--- Python-3.4.3-orig/Lib/importlib/_bootstrap.py 2015-02-25 14:27:44.000000000 +0300
+++ Python-3.4.3/Lib/importlib/_bootstrap.py 2015-05-07 09:58:31.872400000 +0300
@@ -22,7 +22,7 @@
# Bootstrap-related code ######################################################
-_CASE_INSENSITIVE_PLATFORMS = 'win', 'cygwin', 'darwin'
+_CASE_INSENSITIVE_PLATFORMS = 'win', 'cygwin', 'msys', 'darwin'
def _make_relax_case():
diff -Naur Python-3.4.3-orig/Lib/sysconfig.py Python-3.4.3/Lib/sysconfig.py
--- Python-3.4.3-orig/Lib/sysconfig.py 2015-02-25 14:27:44.000000000 +0300
+++ Python-3.4.3/Lib/sysconfig.py 2015-05-07 09:58:34.087600000 +0300
@@ -671,6 +671,13 @@
m = rel_re.match(release)
if m:
release = m.group()
+ elif osname[:4] == "msys":
+ osname = "msys"
+ import re
+ rel_re = re.compile (r'[\d.]+')
+ m = rel_re.match(release)
+ if m:
+ release = m.group()
elif osname[:6] == "darwin":
import _osx_support
osname, release, machine = _osx_support.get_platform_osx(
diff -Naur Python-3.4.3-orig/Lib/tempfile.py Python-3.4.3/Lib/tempfile.py
--- Python-3.4.3-orig/Lib/tempfile.py 2015-02-25 14:27:44.000000000 +0300
+++ Python-3.4.3/Lib/tempfile.py 2015-05-07 09:58:35.086000000 +0300
@@ -467,7 +467,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':
# On non-POSIX and Cygwin systems, assume that we cannot unlink a file
# while it is open.
TemporaryFile = NamedTemporaryFile
diff -Naur Python-3.4.3-orig/Lib/test/test_curses.py Python-3.4.3/Lib/test/test_curses.py
--- Python-3.4.3-orig/Lib/test/test_curses.py 2015-02-25 14:27:45.000000000 +0300
+++ Python-3.4.3/Lib/test/test_curses.py 2015-05-07 09:58:35.086000000 +0300
@@ -33,6 +33,8 @@
"$TERM=%r, calling initscr() may cause exit" % term)
@unittest.skipIf(sys.platform == "cygwin",
"cygwin's curses mostly just hangs")
+@unittest.skipIf(sys.platform == "msys",
+ "msys's curses mostly just hangs")
class TestCurses(unittest.TestCase):
@classmethod
def setUpClass(cls):
diff -Naur Python-3.4.3-orig/Lib/test/test_importlib/util.py Python-3.4.3/Lib/test/test_importlib/util.py
--- Python-3.4.3-orig/Lib/test/test_importlib/util.py 2015-02-25 14:27:45.000000000 +0300
+++ Python-3.4.3/Lib/test/test_importlib/util.py 2015-05-07 09:58:35.086000000 +0300
@@ -31,7 +31,7 @@
CASE_INSENSITIVE_FS = True
# Windows is the only OS that is *always* case-insensitive
# (OS X *can* be case-sensitive).
-if sys.platform not in ('win32', 'cygwin'):
+if sys.platform not in ('win32', 'cygwin', 'msys'):
changed_name = __file__.upper()
if changed_name == __file__:
changed_name = __file__.lower()
diff -Naur Python-3.4.3-orig/Lib/test/test_mailbox.py Python-3.4.3/Lib/test/test_mailbox.py
--- Python-3.4.3-orig/Lib/test/test_mailbox.py 2015-02-25 14:27:45.000000000 +0300
+++ Python-3.4.3/Lib/test/test_mailbox.py 2015-05-07 09:58:35.086000000 +0300
@@ -596,7 +596,7 @@
def setUp(self):
TestMailbox.setUp(self)
- if (os.name == 'nt') or (sys.platform == 'cygwin'):
+ if (os.name == 'nt') or (sys.platform == 'cygwin') or (sys.platform == 'msys'):
self._box.colon = '!'
def assertMailboxEmpty(self):
diff -Naur Python-3.4.3-orig/Lib/test/test_netrc.py Python-3.4.3/Lib/test/test_netrc.py
--- Python-3.4.3-orig/Lib/test/test_netrc.py 2015-02-25 14:27:45.000000000 +0300
+++ Python-3.4.3/Lib/test/test_netrc.py 2015-05-07 09:58:35.117200000 +0300
@@ -8,7 +8,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.4.3-orig/Lib/test/test_shutil.py Python-3.4.3/Lib/test/test_shutil.py
--- Python-3.4.3-orig/Lib/test/test_shutil.py 2015-02-25 14:27:45.000000000 +0300
+++ Python-3.4.3/Lib/test/test_shutil.py 2015-05-07 09:58:35.117200000 +0300
@@ -99,7 +99,7 @@
super(TestShutil, self).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):
@@ -200,7 +200,7 @@
@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.4.3-orig/Lib/tkinter/test/test_tkinter/test_loadtk.py Python-3.4.3/Lib/tkinter/test/test_tkinter/test_loadtk.py
--- Python-3.4.3-orig/Lib/tkinter/test/test_tkinter/test_loadtk.py 2015-02-25 14:27:45.000000000 +0300
+++ Python-3.4.3/Lib/tkinter/test/test_tkinter/test_loadtk.py 2015-05-07 09:58:35.117200000 +0300
@@ -18,7 +18,7 @@
def testLoadTkFailure(self):
old_display = None
- if sys.platform.startswith(('win', 'darwin', 'cygwin')):
+ if sys.platform.startswith(('win', 'darwin', 'cygwin', 'msys')):
# no failure possible on windows?
# XXX Maybe on tk older than 8.4.13 it would be possible,
diff -Naur Python-3.4.3-orig/Modules/makesetup Python-3.4.3/Modules/makesetup
--- Python-3.4.3-orig/Modules/makesetup 2015-05-07 09:55:42.954400000 +0300
+++ Python-3.4.3/Modules/makesetup 2015-05-07 09:58:35.132800000 +0300
@@ -85,7 +85,7 @@
# Setup to link with extra libraries when makeing shared extensions.
# Currently, only Cygwin needs this baggage.
case `uname -s` in
-CYGWIN*) if test $libdir = .
+CYGWIN*|MSYS*) if test $libdir = .
then
ExtraLibDir=.
else
diff -Naur Python-3.4.3-orig/setup.py Python-3.4.3/setup.py
--- Python-3.4.3-orig/setup.py 2015-05-07 09:55:33.329200000 +0300
+++ Python-3.4.3/setup.py 2015-05-07 09:58:35.132800000 +0300
@@ -317,7 +317,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']:
self.announce('WARNING: skipping import check for Cygwin-based "%s"'
% ext.name)
return
@@ -1263,7 +1263,7 @@
exts.append( Extension('resource', ['resource.c']) )
# Sun yellow pages. Some systems have the functions in libc.
- if (host_platform not in ['cygwin', 'qnx6'] and
+ if (host_platform not in ['cygwin', 'msys', 'qnx6'] and
find_file('rpcsvc/yp_prot.h', inc_dirs, []) is not None):
if (self.compiler.find_library_file(lib_dirs, 'nsl')):
libs = ['nsl']
@@ -1500,6 +1500,10 @@
macros = dict()
libraries = []
+ elif host_platform == 'msys': # MSYS
+ macros = dict()
+ libraries = []
+
elif host_platform in ('freebsd4', 'freebsd5', 'freebsd6', 'freebsd7', 'freebsd8'):
# FreeBSD's P1003.1b semaphore support is very experimental
# and has many known problems. (as of June 2008)

View File

@@ -0,0 +1,893 @@
diff -Naur Python-3.4.2-orig/Modules/_ctypes/libffi/acinclude.m4 Python-3.4.2/Modules/_ctypes/libffi/acinclude.m4
--- Python-3.4.2-orig/Modules/_ctypes/libffi/acinclude.m4 2014-10-08 11:18:14.000000000 +0300
+++ Python-3.4.2/Modules/_ctypes/libffi/acinclude.m4 2014-11-10 01:37:49.606000000 +0300
@@ -37,7 +37,7 @@
# Systems known to be in this category are Windows (all variants),
# VMS, and Darwin.
case "$host_os" in
- vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00)
+ vms* | cygwin* | msys* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00)
ac_cv_func_mmap_dev_zero=no ;;
*)
ac_cv_func_mmap_dev_zero=yes;;
@@ -69,7 +69,7 @@
# above for use of /dev/zero.
# Systems known to be in this category are Windows, VMS, and SCO Unix.
case "$host_os" in
- vms* | cygwin* | pe | mingw* | sco* | udk* )
+ vms* | cygwin* | msys* | pe | mingw* | sco* | udk* )
ac_cv_func_mmap_anon=no ;;
*)
ac_cv_func_mmap_anon=yes;;
diff -Naur Python-3.4.2-orig/Modules/_ctypes/libffi/aclocal.m4 Python-3.4.2/Modules/_ctypes/libffi/aclocal.m4
--- Python-3.4.2-orig/Modules/_ctypes/libffi/aclocal.m4 2014-10-08 11:18:14.000000000 +0300
+++ Python-3.4.2/Modules/_ctypes/libffi/aclocal.m4 2014-11-10 01:37:49.606000000 +0300
@@ -725,7 +725,7 @@
beos*)
LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}load_add_on.la"
;;
-cygwin* | mingw* | os2* | pw32*)
+cygwin* | msys* | mingw* | os2* | pw32*)
AC_CHECK_DECLS([cygwin_conv_path], [], [], [[#include <sys/cygwin.h>]])
LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}loadlibrary.la"
;;
diff -Naur Python-3.4.2-orig/Modules/_ctypes/libffi/compile Python-3.4.2/Modules/_ctypes/libffi/compile
--- Python-3.4.2-orig/Modules/_ctypes/libffi/compile 2014-10-08 11:18:14.000000000 +0300
+++ Python-3.4.2/Modules/_ctypes/libffi/compile 2014-11-10 01:40:27.263200000 +0300
@@ -53,7 +53,7 @@
MINGW*)
file_conv=mingw
;;
- CYGWIN*)
+ CYGWIN*|MSYS*)
file_conv=cygwin
;;
*)
@@ -67,7 +67,7 @@
mingw/*)
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
;;
- cygwin/*)
+ cygwin/*|msys/*)
file=`cygpath -m "$file" || echo "$file"`
;;
wine/*)
diff -Naur Python-3.4.2-orig/Modules/_ctypes/libffi/config.guess Python-3.4.2/Modules/_ctypes/libffi/config.guess
--- Python-3.4.2-orig/Modules/_ctypes/libffi/config.guess 2014-10-08 11:18:14.000000000 +0300
+++ Python-3.4.2/Modules/_ctypes/libffi/config.guess 2014-11-10 01:37:49.621600000 +0300
@@ -866,6 +866,9 @@
amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
echo x86_64-unknown-cygwin
exit ;;
+ amd64:MSYS*:*:* | x86_64:MSYS*:*:*)
+ echo x86_64-unknown-msys
+ exit ;;
p*:CYGWIN*:*)
echo powerpcle-unknown-cygwin
exit ;;
diff -Naur Python-3.4.2-orig/Modules/_ctypes/libffi/configure Python-3.4.2/Modules/_ctypes/libffi/configure
--- Python-3.4.2-orig/Modules/_ctypes/libffi/configure 2014-10-08 11:18:14.000000000 +0300
+++ Python-3.4.2/Modules/_ctypes/libffi/configure 2014-11-10 01:42:26.509600000 +0300
@@ -5876,7 +5876,7 @@
lt_cv_sys_max_cmd_len=-1;
;;
- cygwin* | mingw* | cegcc*)
+ cygwin* | msys* | mingw* | cegcc*)
# On Win9x/ME, this test blows up -- it succeeds, but takes
# about 5 minutes as the teststring grows exponentially.
# Worse, since 9x/ME are not pre-emptively multitasking,
@@ -6042,7 +6042,7 @@
*-*-mingw* ) # actually msys
lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
;;
- *-*-cygwin* )
+ *-*-cygwin* | *-*-msys* )
lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
;;
* ) # otherwise, assume *nix
@@ -6050,12 +6050,12 @@
;;
esac
;;
- *-*-cygwin* )
+ *-*-cygwin* | *-*-msys* )
case $build in
*-*-mingw* ) # actually msys
lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
;;
- *-*-cygwin* )
+ *-*-cygwin* | *-*-msys* )
lt_cv_to_host_file_cmd=func_convert_file_noop
;;
* ) # otherwise, assume *nix
@@ -6121,7 +6121,7 @@
esac
reload_cmds='$LD$reload_flag -o $output$reload_objs'
case $host_os in
- cygwin* | mingw* | pw32* | cegcc*)
+ cygwin* | msys* | mingw* | pw32* | cegcc*)
if test yes != "$GCC"; then
reload_cmds=false
fi
@@ -6279,7 +6279,7 @@
lt_cv_file_magic_test_file=/shlib/libc.so
;;
-cygwin*)
+cygwin* | msys*)
# func_win32_libid is a shell function defined in ltmain.sh
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
lt_cv_file_magic_cmd='func_win32_libid'
@@ -6595,7 +6595,7 @@
lt_cv_sharedlib_from_linklib_cmd='unknown'
case $host_os in
-cygwin* | mingw* | pw32* | cegcc*)
+cygwin* | msys* | mingw* | pw32* | cegcc*)
# two different shell functions defined in ltmain.sh;
# decide which one to use based on capabilities of $DLLTOOL
case `$DLLTOOL --help 2>&1` in
@@ -7088,7 +7088,7 @@
aix*)
symcode='[BCDT]'
;;
-cygwin* | mingw* | pw32* | cegcc*)
+cygwin* | msys* | mingw* | pw32* | cegcc*)
symcode='[ABCDGISTW]'
;;
hpux*)
@@ -9288,7 +9288,7 @@
# PIC is the default for these OSes.
;;
- mingw* | cygwin* | pw32* | os2* | cegcc*)
+ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
# Although the cygwin gcc ignores -fPIC, still need this for old-style
@@ -9386,7 +9386,7 @@
esac
;;
- mingw* | cygwin* | pw32* | os2* | cegcc*)
+ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
lt_prog_compiler_pic='-DDLL_EXPORT'
@@ -9883,7 +9883,7 @@
extract_expsyms_cmds=
case $host_os in
- cygwin* | mingw* | pw32* | cegcc*)
+ cygwin* | msys* | mingw* | pw32* | cegcc*)
# FIXME: the MSVC++ port hasn't been tested in a loooong time
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
@@ -9998,7 +9998,7 @@
fi
;;
- cygwin* | mingw* | pw32* | cegcc*)
+ cygwin* | msys* | mingw* | pw32* | cegcc*)
# _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
# as there is no search path for DLLs.
hardcode_libdir_flag_spec='-L$libdir'
@@ -10457,7 +10457,7 @@
export_dynamic_flag_spec=-rdynamic
;;
- cygwin* | mingw* | pw32* | cegcc*)
+ cygwin* | msys* | mingw* | pw32* | cegcc*)
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
# hardcode_libdir_flag_spec is actually meaningless, as there is
@@ -11410,7 +11410,7 @@
# libtool to hard-code these into programs
;;
-cygwin* | mingw* | pw32* | cegcc*)
+cygwin* | msys* | mingw* | pw32* | cegcc*)
version_type=windows
shrext_cmds=.dll
need_version=no
@@ -11442,6 +11442,12 @@
sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
;;
+ msys*)
+ # MSYS DLLs use 'msys-' prefix rather than 'lib'
+ soname_spec='`echo ${libname} | sed -e 's/^lib/msys-/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
+ ;;
mingw* | cegcc*)
# MinGW DLLs use traditional 'lib' prefix
soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
@@ -11476,7 +11482,7 @@
# Convert to MSYS style.
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
;;
- cygwin*)
+ cygwin* | msys*)
# Convert to unix form, then to dos form, then back to unix form
# but this time dos style (no spaces!) so that the unix form looks
# like /cygdrive/c/PROGRA~1:/cygdr...
@@ -12135,7 +12141,7 @@
lt_cv_dlopen_libs=
;;
- cygwin*)
+ cygwin* | msys*)
lt_cv_dlopen=dlopen
lt_cv_dlopen_libs=
;;
@@ -13392,7 +13398,7 @@
esac
;;
- cygwin* | mingw* | pw32* | cegcc*)
+ cygwin* | msys* | mingw* | pw32* | cegcc*)
case $GXX,$cc_basename in
,cl* | no,cl*)
# Native MSVC
@@ -14419,7 +14425,7 @@
beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
# PIC is the default for these OSes.
;;
- mingw* | cygwin* | os2* | pw32* | cegcc*)
+ mingw* | cygwin* | msys* | os2* | pw32* | cegcc*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
# Although the cygwin gcc ignores -fPIC, still need this for old-style
@@ -14489,7 +14495,7 @@
;;
esac
;;
- mingw* | cygwin* | os2* | pw32* | cegcc*)
+ mingw* | cygwin* | msys* | os2* | pw32* | cegcc*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
@@ -14974,7 +14980,7 @@
pw32*)
export_symbols_cmds_CXX=$ltdll_cmds
;;
- cygwin* | mingw* | cegcc*)
+ cygwin* | msys* | mingw* | cegcc*)
case $cc_basename in
cl*)
exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
@@ -15243,7 +15249,7 @@
# libtool to hard-code these into programs
;;
-cygwin* | mingw* | pw32* | cegcc*)
+cygwin* | msys* | mingw* | pw32* | cegcc*)
version_type=windows
shrext_cmds=.dll
need_version=no
@@ -15274,6 +15280,11 @@
soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
;;
+ msys*)
+ # MSYS DLLs use 'msys-' prefix rather than 'lib'
+ soname_spec='`echo $libname | sed -e 's/^lib/msys-/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+
+ ;;
mingw* | cegcc*)
# MinGW DLLs use traditional 'lib' prefix
soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
@@ -17056,7 +17067,7 @@
# Systems known to be in this category are Windows (all variants),
# VMS, and Darwin.
case "$host_os" in
- vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00)
+ vms* | cygwin* | msys* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00)
ac_cv_func_mmap_dev_zero=no ;;
*)
ac_cv_func_mmap_dev_zero=yes;;
@@ -17113,7 +17124,7 @@
# above for use of /dev/zero.
# Systems known to be in this category are Windows, VMS, and SCO Unix.
case "$host_os" in
- vms* | cygwin* | pe | mingw* | sco* | udk* )
+ vms* | cygwin* | msys* | pe | mingw* | sco* | udk* )
ac_cv_func_mmap_anon=no ;;
*)
ac_cv_func_mmap_anon=yes;;
@@ -17212,7 +17223,7 @@
i?86-*-freebsd* | i?86-*-openbsd*)
TARGET=X86_FREEBSD; TARGETDIR=x86
;;
- i?86-win32* | i?86-*-cygwin* | i?86-*-mingw* | i?86-*-os2* | i?86-*-interix*)
+ i?86-win32* | i?86-*-cygwin* | i?86-*-msys* | i?86-*-mingw* | i?86-*-os2* | i?86-*-interix*)
TARGET=X86_WIN32; TARGETDIR=x86
# All mingw/cygwin/win32 builds require -no-undefined for sharedlib.
# We must also check with_cross_host to decide if this is a native
@@ -17244,7 +17255,7 @@
TARGET=X86_DARWIN; TARGETDIR=x86
;;
- x86_64-*-cygwin* | x86_64-*-mingw*)
+ x86_64-*-cygwin* | x86_64-*-msys* | x86_64-*-mingw*)
TARGET=X86_WIN64; TARGETDIR=x86
# All mingw/cygwin/win32 builds require -no-undefined for sharedlib.
# We must also check with_cross_host to decide if this is a native
diff -Naur Python-3.4.2-orig/Modules/_ctypes/libffi/configure.ac Python-3.4.2/Modules/_ctypes/libffi/configure.ac
--- Python-3.4.2-orig/Modules/_ctypes/libffi/configure.ac 2014-10-08 11:18:14.000000000 +0300
+++ Python-3.4.2/Modules/_ctypes/libffi/configure.ac 2014-11-10 01:37:50.947600000 +0300
@@ -135,7 +135,7 @@
i?86-*-freebsd* | i?86-*-openbsd*)
TARGET=X86_FREEBSD; TARGETDIR=x86
;;
- i?86-win32* | i?86-*-cygwin* | i?86-*-mingw* | i?86-*-os2* | i?86-*-interix*)
+ i?86-win32* | i?86-*-cygwin* | i?86-*-msys* | i?86-*-mingw* | i?86-*-os2* | i?86-*-interix*)
TARGET=X86_WIN32; TARGETDIR=x86
# All mingw/cygwin/win32 builds require -no-undefined for sharedlib.
# We must also check with_cross_host to decide if this is a native
@@ -166,7 +166,7 @@
TARGET=X86_DARWIN; TARGETDIR=x86
;;
- x86_64-*-cygwin* | x86_64-*-mingw*)
+ x86_64-*-cygwin* | x86_64-*-msys* | x86_64-*-mingw*)
TARGET=X86_WIN64; TARGETDIR=x86
# All mingw/cygwin/win32 builds require -no-undefined for sharedlib.
# We must also check with_cross_host to decide if this is a native
diff -Naur Python-3.4.2-orig/Modules/_ctypes/libffi/ltmain.sh Python-3.4.2/Modules/_ctypes/libffi/ltmain.sh
--- Python-3.4.2-orig/Modules/_ctypes/libffi/ltmain.sh 2014-10-08 11:18:14.000000000 +0300
+++ Python-3.4.2/Modules/_ctypes/libffi/ltmain.sh 2014-11-10 01:44:06.412000000 +0300
@@ -2315,7 +2315,7 @@
test : = "$debug_cmd" || func_append preserve_args " --debug"
case $host in
- *cygwin* | *mingw* | *pw32* | *cegcc*)
+ *cygwin* | *msys* | *mingw* | *pw32* | *cegcc*)
# don't eliminate duplications in $postdeps and $predeps
opt_duplicate_compiler_generated_deps=:
;;
@@ -3328,7 +3328,7 @@
# On Cygwin there's no "real" PIC flag so we must build both object types
case $host_os in
- cygwin* | mingw* | pw32* | os2* | cegcc*)
+ cygwin* | msys* | mingw* | pw32* | os2* | cegcc*)
pic_mode=default
;;
esac
@@ -4201,7 +4201,7 @@
'exit $?'
tstripme=$stripme
case $host_os in
- cygwin* | mingw* | pw32* | cegcc*)
+ cygwin* | msys* | mingw* | pw32* | cegcc*)
case $realname in
*.dll.a)
tstripme=
@@ -4307,7 +4307,7 @@
# Do a test to see if this is really a libtool program.
case $host in
- *cygwin* | *mingw*)
+ *cygwin* | *msys* | *mingw*)
if func_ltwrapper_executable_p "$file"; then
func_ltwrapper_scriptname "$file"
wrapper=$func_ltwrapper_scriptname_result
@@ -4382,7 +4382,7 @@
# remove .exe since cygwin /usr/bin/install will append another
# one anyway
case $install_prog,$host in
- */usr/bin/install*,*cygwin*)
+ */usr/bin/install*,*cygwin*|*/usr/bin/install*,*msys*)
case $file:$destfile in
*.exe:*.exe)
# this is ok
@@ -4535,7 +4535,7 @@
$RM $export_symbols
eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
case $host in
- *cygwin* | *mingw* | *cegcc* )
+ *cygwin* | *msys* | *mingw* | *cegcc* )
eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
;;
@@ -4547,7 +4547,7 @@
eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
eval '$MV "$nlist"T "$nlist"'
case $host in
- *cygwin* | *mingw* | *cegcc* )
+ *cygwin* | *msys* | *mingw* | *cegcc* )
eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
;;
@@ -4561,7 +4561,7 @@
func_basename "$dlprefile"
name=$func_basename_result
case $host in
- *cygwin* | *mingw* | *cegcc* )
+ *cygwin* | *msys* | *mingw* | *cegcc* )
# if an import library, we need to obtain dlname
if func_win32_import_lib_p "$dlprefile"; then
func_tr_sh "$dlprefile"
@@ -4736,7 +4736,7 @@
# Transform the symbol file into the correct name.
symfileobj=$output_objdir/${my_outputname}S.$objext
case $host in
- *cygwin* | *mingw* | *cegcc* )
+ *cygwin* | *msys* | *mingw* | *cegcc* )
if test -f "$output_objdir/$my_outputname.def"; then
compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
@@ -5629,7 +5629,7 @@
{
EOF
case $host in
- *mingw* | *cygwin* )
+ *mingw* | *cygwin* | *msys* )
# make stdout use "unix" line endings
echo " setmode(1,_O_BINARY);"
;;
@@ -6350,7 +6350,7 @@
$debug_cmd
case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
# It is impossible to link a dll without this setting, and
# we shouldn't force the makefile maintainer to figure out
# what system we are compiling for in order to pass an extra
@@ -6843,7 +6843,7 @@
;;
esac
case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'`
case :$dllsearchpath: in
*":$dir:"*) ;;
@@ -6863,7 +6863,7 @@
-l*)
if test X-lc = "X$arg" || test X-lm = "X$arg"; then
case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
+ *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
# These systems don't actually have a C or math library (as such)
continue
;;
@@ -6946,7 +6946,7 @@
-no-install)
case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
+ *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
# The PATH hackery in wrapper scripts is required on Windows
# and Darwin in order for the loader to find any dlls it needs.
func_warning "'-no-install' is ignored for $host"
@@ -7812,7 +7812,7 @@
fi
case $host in
# special handling for platforms with PE-DLLs.
- *cygwin* | *mingw* | *cegcc* )
+ *cygwin* | *msys* | *mingw* | *cegcc* )
# Linker will automatically link against shared library if both
# static and shared are present. Therefore, ensure we extract
# symbols from the import library if a shared library is present
@@ -7956,7 +7956,7 @@
if test -n "$library_names" &&
{ test no = "$use_static_libs" || test -z "$old_library"; }; then
case $host in
- *cygwin* | *mingw* | *cegcc*)
+ *cygwin* | *msys* | *mingw* | *cegcc*)
# No point in relinking DLLs because paths are not encoded
func_append notinst_deplibs " $lib"
need_relink=no
@@ -8026,7 +8026,7 @@
elif test -n "$soname_spec"; then
# bleh windows
case $host in
- *cygwin* | mingw* | *cegcc*)
+ *cygwin* | *msys* | mingw* | *cegcc*)
func_arith $current - $age
major=$func_arith_result
versuffix=-$major
@@ -8899,7 +8899,7 @@
if test yes = "$build_libtool_libs"; then
if test -n "$rpath"; then
case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
+ *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
# these systems don't actually have a c library (as such)!
;;
*-*-rhapsody* | *-*-darwin1.[012])
@@ -9413,7 +9413,7 @@
orig_export_symbols=
case $host_os in
- cygwin* | mingw* | cegcc*)
+ cygwin* | msys* | mingw* | cegcc*)
if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
# exporting using user supplied symfile
func_dll_def_p "$export_symbols" || {
@@ -9970,7 +9970,7 @@
prog)
case $host in
- *cygwin*) func_stripname '' '.exe' "$output"
+ *cygwin* | *msys*) func_stripname '' '.exe' "$output"
output=$func_stripname_result.exe;;
esac
test -n "$vinfo" && \
@@ -10081,7 +10081,7 @@
esac
fi
case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'`
case :$dllsearchpath: in
*":$libdir:"*) ;;
@@ -10159,7 +10159,7 @@
# Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway.
wrappers_required=false
;;
- *cygwin* | *mingw* )
+ *cygwin* | *msys* | *mingw* )
test yes = "$build_libtool_libs" || wrappers_required=false
;;
*)
@@ -10305,14 +10305,14 @@
esac
# test for cygwin because mv fails w/o .exe extensions
case $host in
- *cygwin*)
+ *cygwin* | *msys*)
exeext=.exe
func_stripname '' '.exe' "$outputname"
outputname=$func_stripname_result ;;
*) exeext= ;;
esac
case $host in
- *cygwin* | *mingw* )
+ *cygwin* | *msys* | *mingw* )
func_dirname_and_basename "$output" "" "."
output_name=$func_basename_result
output_path=$func_dirname_result
@@ -10644,7 +10644,7 @@
# tests/bindir.at for full details.
tdlname=$dlname
case $host,$output,$installed,$module,$dlname in
- *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
+ *cygwin*,*lai,yes,no,*.dll | *msys*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
# If a -bindir argument was supplied, place the dll there.
if test -n "$bindir"; then
func_relative_path "$install_libdir" "$bindir"
diff -Naur Python-3.4.2-orig/Modules/_ctypes/libffi/m4/libtool.m4 Python-3.4.2/Modules/_ctypes/libffi/m4/libtool.m4
--- Python-3.4.2-orig/Modules/_ctypes/libffi/m4/libtool.m4 2014-10-08 11:18:14.000000000 +0300
+++ Python-3.4.2/Modules/_ctypes/libffi/m4/libtool.m4 2014-11-10 01:44:49.608400000 +0300
@@ -1665,7 +1665,7 @@
lt_cv_sys_max_cmd_len=-1;
;;
- cygwin* | mingw* | cegcc*)
+ cygwin* | msys* | mingw* | cegcc*)
# On Win9x/ME, this test blows up -- it succeeds, but takes
# about 5 minutes as the teststring grows exponentially.
# Worse, since 9x/ME are not pre-emptively multitasking,
@@ -1913,7 +1913,7 @@
lt_cv_dlopen_libs=
;;
- cygwin*)
+ cygwin* | msys*)
lt_cv_dlopen=dlopen
lt_cv_dlopen_libs=
;;
@@ -2399,7 +2399,7 @@
# libtool to hard-code these into programs
;;
-cygwin* | mingw* | pw32* | cegcc*)
+cygwin* | msys* | mingw* | pw32* | cegcc*)
version_type=windows
shrext_cmds=.dll
need_version=no
@@ -2431,6 +2431,12 @@
m4_if([$1], [],[
sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
;;
+ msys*)
+ # MSYS DLLs use 'msys-' prefix rather than 'lib'
+ soname_spec='`echo ${libname} | sed -e 's/^lib/msys-/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+m4_if([$1], [],[
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
+ ;;
mingw* | cegcc*)
# MinGW DLLs use traditional 'lib' prefix
soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
@@ -2465,7 +2471,7 @@
# Convert to MSYS style.
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
;;
- cygwin*)
+ cygwin* | msys*)
# Convert to unix form, then to dos form, then back to unix form
# but this time dos style (no spaces!) so that the unix form looks
# like /cygdrive/c/PROGRA~1:/cygdr...
@@ -3203,7 +3209,7 @@
esac
reload_cmds='$LD$reload_flag -o $output$reload_objs'
case $host_os in
- cygwin* | mingw* | pw32* | cegcc*)
+ cygwin* | msys* | mingw* | pw32* | cegcc*)
if test yes != "$GCC"; then
reload_cmds=false
fi
@@ -3259,7 +3265,7 @@
lt_cv_file_magic_test_file=/shlib/libc.so
;;
-cygwin*)
+cygwin* | msys*)
# func_win32_libid is a shell function defined in ltmain.sh
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
lt_cv_file_magic_cmd='func_win32_libid'
@@ -3564,7 +3570,7 @@
[lt_cv_sharedlib_from_linklib_cmd='unknown'
case $host_os in
-cygwin* | mingw* | pw32* | cegcc*)
+cygwin* | msys* | mingw* | pw32* | cegcc*)
# two different shell functions defined in ltmain.sh;
# decide which one to use based on capabilities of $DLLTOOL
case `$DLLTOOL --help 2>&1` in
@@ -3634,7 +3640,7 @@
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
LIBM=
case $host in
-*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
+*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-msys* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
# These system don't have libm, or don't need it
;;
*-ncr-sysv4.3*)
@@ -3709,7 +3715,7 @@
aix*)
symcode='[[BCDT]]'
;;
-cygwin* | mingw* | pw32* | cegcc*)
+cygwin* | msys* | mingw* | pw32* | cegcc*)
symcode='[[ABCDGISTW]]'
;;
hpux*)
@@ -4015,7 +4021,7 @@
beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
# PIC is the default for these OSes.
;;
- mingw* | cygwin* | os2* | pw32* | cegcc*)
+ mingw* | cygwin* | msys* | os2* | pw32* | cegcc*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
# Although the cygwin gcc ignores -fPIC, still need this for old-style
@@ -4086,7 +4092,7 @@
;;
esac
;;
- mingw* | cygwin* | os2* | pw32* | cegcc*)
+ mingw* | cygwin* | msys* | os2* | pw32* | cegcc*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
m4_if([$1], [GCJ], [],
@@ -4334,7 +4340,7 @@
# PIC is the default for these OSes.
;;
- mingw* | cygwin* | pw32* | os2* | cegcc*)
+ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
# Although the cygwin gcc ignores -fPIC, still need this for old-style
@@ -4433,7 +4439,7 @@
esac
;;
- mingw* | cygwin* | pw32* | os2* | cegcc*)
+ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
m4_if([$1], [GCJ], [],
@@ -4699,7 +4705,7 @@
pw32*)
_LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
;;
- cygwin* | mingw* | cegcc*)
+ cygwin* | msys* | mingw* | cegcc*)
case $cc_basename in
cl*)
_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
@@ -4757,7 +4763,7 @@
extract_expsyms_cmds=
case $host_os in
- cygwin* | mingw* | pw32* | cegcc*)
+ cygwin* | msys* | mingw* | pw32* | cegcc*)
# FIXME: the MSVC++ port hasn't been tested in a loooong time
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
@@ -4872,7 +4878,7 @@
fi
;;
- cygwin* | mingw* | pw32* | cegcc*)
+ cygwin* | msys* | mingw* | pw32* | cegcc*)
# _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
# as there is no search path for DLLs.
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
@@ -5247,7 +5253,7 @@
_LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
;;
- cygwin* | mingw* | pw32* | cegcc*)
+ cygwin* | msys* | mingw* | pw32* | cegcc*)
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
# hardcode_libdir_flag_spec is actually meaningless, as there is
@@ -6241,7 +6247,7 @@
esac
;;
- cygwin* | mingw* | pw32* | cegcc*)
+ cygwin* | msys* | mingw* | pw32* | cegcc*)
case $GXX,$cc_basename in
,cl* | no,cl*)
# Native MSVC
@@ -7937,7 +7943,7 @@
*-*-mingw* ) # actually msys
lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
;;
- *-*-cygwin* )
+ *-*-cygwin* | *-*-msys* )
lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
;;
* ) # otherwise, assume *nix
@@ -7945,12 +7951,12 @@
;;
esac
;;
- *-*-cygwin* )
+ *-*-cygwin* | *-*-msys* )
case $build in
*-*-mingw* ) # actually msys
lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
;;
- *-*-cygwin* )
+ *-*-cygwin* | *-*-msys* )
lt_cv_to_host_file_cmd=func_convert_file_noop
;;
* ) # otherwise, assume *nix
diff -Naur Python-3.4.2-orig/Modules/_ctypes/libffi/m4/ltoptions.m4 Python-3.4.2/Modules/_ctypes/libffi/m4/ltoptions.m4
--- Python-3.4.2-orig/Modules/_ctypes/libffi/m4/ltoptions.m4 2014-10-08 11:18:14.000000000 +0300
+++ Python-3.4.2/Modules/_ctypes/libffi/m4/ltoptions.m4 2014-11-10 01:37:50.978800000 +0300
@@ -126,7 +126,7 @@
[enable_win32_dll=yes
case $host in
-*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
+*-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
AC_CHECK_TOOL(AS, as, false)
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
AC_CHECK_TOOL(OBJDUMP, objdump, false)
diff -Naur Python-3.4.2-orig/Modules/_ctypes/libffi/testsuite/lib/target-libpath.exp Python-3.4.2/Modules/_ctypes/libffi/testsuite/lib/target-libpath.exp
--- Python-3.4.2-orig/Modules/_ctypes/libffi/testsuite/lib/target-libpath.exp 2014-10-08 11:18:14.000000000 +0300
+++ Python-3.4.2/Modules/_ctypes/libffi/testsuite/lib/target-libpath.exp 2014-11-10 01:37:50.978800000 +0300
@@ -175,7 +175,7 @@
} else {
setenv DYLD_LIBRARY_PATH "$ld_library_path"
}
- if { [istarget *-*-cygwin*] || [istarget *-*-mingw*] } {
+ if { [istarget *-*-cygwin*] || [istarget *-*-msys*] || [istarget *-*-mingw*] } {
if { $orig_path_saved } {
setenv PATH "$ld_library_path:$orig_path"
} else {
@@ -271,7 +271,7 @@
if { [ istarget *-*-darwin* ] } {
set shlib_ext "dylib"
- } elseif { [ istarget *-*-cygwin* ] || [ istarget *-*-mingw* ] } {
+ } elseif { [ istarget *-*-cygwin* ] || [istarget *-*-msys*] || [ istarget *-*-mingw* ] } {
set shlib_ext "dll"
} elseif { [ istarget hppa*-*-hpux* ] } {
set shlib_ext "sl"
diff -Naur Python-3.4.2-orig/Modules/_ctypes/libffi/testsuite/libffi.call/cls_align_longdouble_split.c Python-3.4.2/Modules/_ctypes/libffi/testsuite/libffi.call/cls_align_longdouble_split.c
--- Python-3.4.2-orig/Modules/_ctypes/libffi/testsuite/libffi.call/cls_align_longdouble_split.c 2014-10-08 11:18:14.000000000 +0300
+++ Python-3.4.2/Modules/_ctypes/libffi/testsuite/libffi.call/cls_align_longdouble_split.c 2014-11-10 01:37:58.092400000 +0300
@@ -4,10 +4,10 @@
PR: none.
Originator: <hos@tamanegi.org> 20031203 */
-/* { dg-excess-errors "no long double format" { xfail x86_64-*-mingw* x86_64-*-cygwin* } } */
+/* { dg-excess-errors "no long double format" { xfail x86_64-*-mingw* x86_64-*-cygwin* x86_64-*-msys* } } */
/* { dg-do run { xfail strongarm*-*-* xscale*-*-* } } */
/* { dg-options -mlong-double-128 { target powerpc64*-*-linux* } } */
-/* { dg-output "" { xfail x86_64-*-mingw* x86_64-*-cygwin* } } */
+/* { dg-output "" { xfail x86_64-*-mingw* x86_64-*-cygwin* x86_64-*-msys* } } */
#include "ffitest.h"
diff -Naur Python-3.4.2-orig/Modules/_ctypes/libffi/testsuite/libffi.call/cls_align_longdouble_split2.c Python-3.4.2/Modules/_ctypes/libffi/testsuite/libffi.call/cls_align_longdouble_split2.c
--- Python-3.4.2-orig/Modules/_ctypes/libffi/testsuite/libffi.call/cls_align_longdouble_split2.c 2014-10-08 11:18:14.000000000 +0300
+++ Python-3.4.2/Modules/_ctypes/libffi/testsuite/libffi.call/cls_align_longdouble_split2.c 2014-11-10 01:37:58.092400000 +0300
@@ -5,10 +5,10 @@
Originator: Blake Chaffin 6/18/2007
*/
-/* { dg-excess-errors "no long double format" { xfail x86_64-*-mingw* x86_64-*-cygwin* } } */
+/* { dg-excess-errors "no long double format" { xfail x86_64-*-mingw* x86_64-*-cygwin* x86_64-*-msys* } } */
/* { dg-do run { xfail strongarm*-*-* } } */
/* { dg-options -mlong-double-128 { target powerpc64*-*-linux* } } */
-/* { dg-output "" { xfail x86_64-*-mingw* x86_64-*-cygwin* } } */
+/* { dg-output "" { xfail x86_64-*-mingw* x86_64-*-cygwin* x86_64-*-msys* } } */
#include "ffitest.h"
diff -Naur Python-3.4.2-orig/Modules/_ctypes/libffi/testsuite/libffi.call/cls_longdouble.c Python-3.4.2/Modules/_ctypes/libffi/testsuite/libffi.call/cls_longdouble.c
--- Python-3.4.2-orig/Modules/_ctypes/libffi/testsuite/libffi.call/cls_longdouble.c 2014-10-08 11:18:14.000000000 +0300
+++ Python-3.4.2/Modules/_ctypes/libffi/testsuite/libffi.call/cls_longdouble.c 2014-11-10 01:37:58.092400000 +0300
@@ -4,12 +4,12 @@
PR: none.
Originator: Blake Chaffin */
-/* { dg-excess-errors "no long double format" { xfail x86_64-*-mingw* x86_64-*-cygwin* } } */
+/* { dg-excess-errors "no long double format" { xfail x86_64-*-mingw* x86_64-*-cygwin* x86_64-*-msys* } } */
/* This test is known to PASS on armv7l-unknown-linux-gnueabihf, so I have
remove the xfail for arm*-*-* below, until we know more. */
/* { dg-do run { xfail strongarm*-*-* xscale*-*-* } } */
/* { dg-options -mlong-double-128 { target powerpc64*-*-linux* } } */
-/* { dg-output "" { xfail x86_64-*-mingw* x86_64-*-cygwin* } } */
+/* { dg-output "" { xfail x86_64-*-mingw* x86_64-*-cygwin* x86_64-*-msys* } } */
#include "ffitest.h"
diff -Naur Python-3.4.2-orig/Modules/_ctypes/libffi/testsuite/libffi.call/float2.c Python-3.4.2/Modules/_ctypes/libffi/testsuite/libffi.call/float2.c
--- Python-3.4.2-orig/Modules/_ctypes/libffi/testsuite/libffi.call/float2.c 2014-10-08 11:18:14.000000000 +0300
+++ Python-3.4.2/Modules/_ctypes/libffi/testsuite/libffi.call/float2.c 2014-11-10 01:38:03.458800000 +0300
@@ -4,8 +4,8 @@
PR: none.
Originator: From the original ffitest.c */
-/* { dg-excess-errors "fails" { target x86_64-*-mingw* x86_64-*-cygwin* } } */
-/* { dg-do run { xfail x86_64-*-mingw* x86_64-*-cygwin* } } */
+/* { dg-excess-errors "fails" { target x86_64-*-mingw* x86_64-*-cygwin* x86_64-*-msys* } } */
+/* { dg-do run { xfail x86_64-*-mingw* x86_64-*-cygwin* x86_64-*-msys* } } */
#include "ffitest.h"
#include "float.h"
diff -Naur Python-3.4.2-orig/Modules/_ctypes/libffi/testsuite/libffi.call/huge_struct.c Python-3.4.2/Modules/_ctypes/libffi/testsuite/libffi.call/huge_struct.c
--- Python-3.4.2-orig/Modules/_ctypes/libffi/testsuite/libffi.call/huge_struct.c 2014-10-08 11:18:14.000000000 +0300
+++ Python-3.4.2/Modules/_ctypes/libffi/testsuite/libffi.call/huge_struct.c 2014-11-10 01:38:03.458800000 +0300
@@ -5,11 +5,11 @@
Originator: Blake Chaffin 6/18/2007
*/
-/* { dg-excess-errors "" { target x86_64-*-mingw* x86_64-*-cygwin* } } */
+/* { dg-excess-errors "" { target x86_64-*-mingw* x86_64-*-cygwin* x86_64-*-msys* } } */
/* { dg-do run { xfail strongarm*-*-* xscale*-*-* } } */
/* { dg-options -mlong-double-128 { target powerpc64*-*-linux* } } */
/* { dg-options -Wformat=0 { target moxie*-*-elf } } */
-/* { dg-output "" { xfail x86_64-*-mingw* x86_64-*-cygwin* } } */
+/* { dg-output "" { xfail x86_64-*-mingw* x86_64-*-cygwin* x86_64-*-msys* } } */
#include "ffitest.h"
diff -Naur Python-3.4.2-orig/Modules/_ctypes/libffi/testsuite/libffi.call/return_ldl.c Python-3.4.2/Modules/_ctypes/libffi/testsuite/libffi.call/return_ldl.c
--- Python-3.4.2-orig/Modules/_ctypes/libffi/testsuite/libffi.call/return_ldl.c 2014-10-08 11:18:14.000000000 +0300
+++ Python-3.4.2/Modules/_ctypes/libffi/testsuite/libffi.call/return_ldl.c 2014-11-10 01:38:06.391600000 +0300
@@ -4,7 +4,7 @@
PR: none.
Originator: <andreast@gcc.gnu.org> 20071113 */
-/* { dg-do run { xfail x86_64-*-mingw* x86_64-*-cygwin* } } */
+/* { dg-do run { xfail x86_64-*-mingw* x86_64-*-cygwin* x86_64-*-msys* } } */
#include "ffitest.h"
static long double return_ldl(long double ldl)

View File

@@ -2,111 +2,118 @@
# Contributor: Ray Donnelly <mingw.android@gmail.com>
pkgname=python
pkgver=3.3.3
pkgrel=4
_pybasever=3.3
pkgver=3.4.3
pkgrel=1
_pybasever=3.4
pkgdesc="Next generation of the python high-level scripting language"
arch=('i686' 'x86_64')
license=('custom')
url="http://www.python.org/"
depends=('libbz2' 'libopenssl' 'zlib' 'libexpat' 'libsqlite' 'libffi' 'ncurses' 'libreadline' 'liblzma')
makedepends=('libbz2-devel' 'openssl-devel' 'zlib-devel' 'libexpat-devel' 'libsqlite-devel' 'libffi-devel' 'ncurses-devel' 'libreadline-devel' 'liblzma-devel')
depends=('libbz2' 'libexpat' 'libffi' 'liblzma' 'ncurses' 'libopenssl' 'libreadline' 'libsqlite' 'zlib')
makedepends=('libbz2-devel' 'libexpat-devel' 'libsqlite-devel' 'libffi-devel' 'ncurses-devel' 'libreadline-devel' 'liblzma-devel' 'openssl-devel' 'zlib-devel')
#optdepends=('tk: for tkinter' 'sqlite')
provides=('python3')
replaces=('python3')
options=('!makeflags')
source=(http://www.python.org/ftp/python/${pkgver%rc*}/Python-${pkgver}.tar.xz
3.3-ctypes-libpython.patch
3.3-ctypes-util-find_library.patch
3.3-cygwin-soname.patch
3.3-dbm.patch
3.3-distutils-shlibext.patch
3.3-enable-new-dtags.patch
3.3-export-PyNode_SizeOf.patch
3.3-export-PySignal_SetWakeupFd.patch
3.3-fix-PyAPI-declaration.patch
3.3-ncurses-abi6.patch
3.3-PATH_MAX.patch
3.3-pep3149.patch
3.3-ssl-threads.patch
3.3-thread-cygwin64.patch
3.3-tkinter.patch
3.3.2-allow-windows-paths-for-executable.patch
3.3.2-cygwin-siginfo.patch
3.3-wrong-parameters.patch
python-3.3.2-msys2.patch
3.3.3-allow-win-drives-in-os-path-isabs.patch)
sha1sums=('af4e75a34bd538c79b9871227c2e7f56569ac107'
'd1bef43a80fbc99524fe599dabb84977fc4f458d'
'92109d70e398605c075cd969a89a7f16abd1ce59'
'a815d4c8b1ec8246be47b7eeeabe84cf47c11af8'
'df5a984858073d75a11500bad9178f842c6a1846'
'a12a1ed5ea15a34b650d407a7f7c4e8718de670f'
'a0b1a90f271f28322b0921820ce3cdf0c108e2ea'
'f505b46785e78c5f23a4228e756795e0e66dd1f3'
'09392741ab3d05d99c977a468ec38c7f94f49429'
'acf8a9ba965764941809404f2cfc5091af63bf8f'
'86a4addb11ef38695b90cc91584b55e1878d21e6'
'e421f2770a7f7bbb85003b83945c8f5b3c0050d4'
'8295e7731fe1b6623365b4c5a789dec588db5769'
'bfe2e722693a7314243b494db5170e68fc36c3d5'
'1fb100b187ae64faa1ab15300a84d6e0e75e55c6'
'b303a2da60abded2ca020dfb63da5d5184c1d92f'
'd3cbd7286fab191a5a9086cea1a9a3dc386e17da'
'1ec44391e21ad83cd149e83e65b2e77af13b9fbd'
'0ff694de5df467fbc1a5152751f5b1f9884a7209'
'4f5ef705c8806900313480e13fb8d34c49aeb77a'
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
005-3.1-PATH_MAX.patch
006-3.1-ncurses-abi6.patch
007-3.2-export-PySignal_SetWakeupFd.patch
008-3.4-distutils-soname.patch
009-3.2-distutils-shlibext.patch
010-3.4-pep3149-cygwin.patch
011-3.4-thread-cygwin64.patch
012-3.2-getpath-exe-extension.patch
013-3.4-select-cygwin.patch
014-3.4-signal-cygwin.patch
015-3.4-struct-cygwin.patch
025-MINGW-compiler-customize-mingw-cygwin-compilers.patch
900-msysize.patch
910-libffi-msys2.patch
920-allow-win-drives-in-os-path-isabs.patch)
sha1sums=('7ca5cd664598bea96eec105aa6453223bb6b4456'
'5e30eb5b1f3d7c6001fc04fbe36a574a8e84ccac'
'688d3f1962ddc8904444db80f432b644a2302dee'
'11dbd1edba0896109746af524b5b4fd34a525bfd'
'ab6ec13e8a6ca745279f0d2c7ade29cba6536972'
'0d4d773527a72a8b872d8b0a241a0d4ff2707936'
'6622e080460b4584ebc8d960abbd7329c69d9b0c'
'4147c504494ac3f219b1945acf680eec50091604'
'42ee5c1fdee88d451af3a23ead7ea58c591b2405'
'25f20c976aa5a08c3d1c36153ee37d3db1b838d0'
'e80a5a4c8e55a77b5f66aee2a2a6390b8a58738b'
'eac6f85289d17a4d8043e562dcb1f86c56663635'
'b022b95b89c3933df2d1ce22bc351c94ed27a794'
'346183ac40b42b9baceb27d5f176989fa2ad2b4e'
'415a2d49249f298f9f399587ae2420f8234bb395'
'1166da89b56c68829884d65dd0d9a6be9bce40e7'
'd3e68ba2091f6b61f2440e2ef491373c68bf1d0d'
'02a0ff9456b62dda9de5b6bd2378367aba17b199'
'4a20a20b7dec2b9e9e87529d2e0347de9fcd6eb8'
'e0f3d9388e888357a920c32a4ca525ef4ec69343')
prepare() {
cd "${srcdir}/Python-${pkgver}"
# FS#23997
sed -i -e "s|^#.* /usr/local/bin/python|#!/usr/bin/python|" Lib/cgi.py
patch -p1 -i ${srcdir}/001-3.4-dbm-cygwin.patch
patch -p1 -i ${srcdir}/002-3.1-enable-new-dtags.patch
patch -p1 -i ${srcdir}/003-3.4-tkinter-cygwin.patch
patch -p1 -i ${srcdir}/004-3.4-ctypes-cygwin.patch
patch -p1 -i ${srcdir}/005-3.1-PATH_MAX.patch
patch -p1 -i ${srcdir}/006-3.1-ncurses-abi6.patch
patch -p1 -i ${srcdir}/007-3.2-export-PySignal_SetWakeupFd.patch
patch -p1 -i ${srcdir}/008-3.4-distutils-soname.patch
patch -p1 -i ${srcdir}/009-3.2-distutils-shlibext.patch
patch -p1 -i ${srcdir}/010-3.4-pep3149-cygwin.patch
patch -p1 -i ${srcdir}/011-3.4-thread-cygwin64.patch
patch -p1 -i ${srcdir}/012-3.2-getpath-exe-extension.patch
patch -p1 -i ${srcdir}/013-3.4-select-cygwin.patch
patch -p1 -i ${srcdir}/014-3.4-signal-cygwin.patch
patch -p1 -i ${srcdir}/015-3.4-struct-cygwin.patch
patch -p1 -i ${srcdir}/025-MINGW-compiler-customize-mingw-cygwin-compilers.patch
patch -p1 -i ${srcdir}/900-msysize.patch
patch -p1 -i ${srcdir}/910-libffi-msys2.patch
patch -p1 -i ${srcdir}/920-allow-win-drives-in-os-path-isabs.patch
patch -p1 -i ${srcdir}/3.3-dbm.patch
patch -p1 -i ${srcdir}/3.3-enable-new-dtags.patch
patch -p1 -i ${srcdir}/3.3-tkinter.patch
patch -p1 -i ${srcdir}/3.3-ctypes-util-find_library.patch
patch -p1 -i ${srcdir}/3.3-PATH_MAX.patch
patch -p1 -i ${srcdir}/3.3-ssl-threads.patch
patch -p1 -i ${srcdir}/3.3-ncurses-abi6.patch
patch -p1 -i ${srcdir}/3.3-export-PySignal_SetWakeupFd.patch
patch -p1 -i ${srcdir}/3.3-export-PyNode_SizeOf.patch
patch -p1 -i ${srcdir}/3.3-cygwin-soname.patch
patch -p1 -i ${srcdir}/3.3-distutils-shlibext.patch
patch -p1 -i ${srcdir}/3.3-ctypes-libpython.patch
patch -p1 -i ${srcdir}/3.3-pep3149.patch
patch -p1 -i ${srcdir}/3.3-thread-cygwin64.patch
patch -p1 -i ${srcdir}/python-3.3.2-msys2.patch
patch -p1 -i ${srcdir}/3.3.2-cygwin-siginfo.patch
patch -p1 -i ${srcdir}/3.3-wrong-parameters.patch
# Incomplete patch from Ray Donnelly
# patch -p1 -i ${srcdir}/3.3.2-allow-windows-paths-for-executable.patch
patch -p1 -i ${srcdir}/3.3.3-allow-win-drives-in-os-path-isabs.patch
# Ensure that we are using the system copy of various libraries (expat, zlib and libffi),
# rather than copies shipped in the tarball
rm -r Modules/expat
rm -r Modules/zlib
rm -r Modules/_ctypes/{darwin,libffi}*
autoreconf -fiv
}
build() {
cd "${srcdir}/Python-${pkgver}"
./configure --build=${CHOST} \
CPPFLAGS+=" -I/usr/include/ncursesw"
LDFLAGS+=" -L."
CXX=/usr/bin/g++ \
./configure \
--prefix=/usr \
--build=$MY_TARGET \
--build=${CHOST} \
--host=${CHOST} \
--enable-shared \
--enable-ipv6 \
--with-dbmliborder=gdbm \
--with-libc= \
--with-libm= \
--with-system-expat \
--with-system-ffi \
ac_cv_func_bind_textdomain_codeset=yes \
--with-threads \
CPPFLAGS="${CPPFLAGS} -I/usr/include/ncursesw" \
LDFLAGS="${LDFLAGS} -L."
--without-ensurepip \
ac_cv_func_bind_textdomain_codeset=yes
make
}
@@ -136,7 +143,7 @@ package() {
# License
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
# fix permissons
find ${pkgdir}/usr -type f \( -name *.dll -o -name *.exe \) | xargs chmod 0755
}

File diff suppressed because it is too large Load Diff