python: pretend to be cygwin in more places
The main change here is that sys.platform == 'cygwin', which allows
us to drop various changes for extending cygwin checks. Fewer patches
and less likely that we miss to patch a new cygwin check on updates.
If one really needs to check for msys Python then this still works:
sysconfig.get_platform().startswith("msys")
This commit is contained in:
@@ -11,38 +11,36 @@ diff -Naur Python-3.8.2-orig/config.guess Python-3.8.2/config.guess
|
||||
prep*:SunOS:5.*:*)
|
||||
echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
|
||||
exit ;;
|
||||
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*)
|
||||
--- Python-3.8.7.cygwin/configure.ac 2021-05-11 21:07:52.839122100 +0200
|
||||
+++ Python-3.8.7/configure.ac 2021-05-11 21:10:48.366063600 +0200
|
||||
@@ -371,7 +371,7 @@
|
||||
*-*-linux*)
|
||||
ac_sys_system=Linux
|
||||
;;
|
||||
- *-*-cygwin*)
|
||||
+ *-*-cygwin*|*-*-msys*)
|
||||
ac_sys_system=Cygwin
|
||||
;;
|
||||
+ *-*-msys*)
|
||||
+ ac_sys_system=Msys
|
||||
+ ;;
|
||||
*-*-vxworks*)
|
||||
ac_sys_system=VxWorks
|
||||
;;
|
||||
@@ -402,6 +405,7 @@
|
||||
@@ -401,7 +401,7 @@
|
||||
case $MACHDEP in
|
||||
aix*) MACHDEP="aix";;
|
||||
linux*) MACHDEP="linux";;
|
||||
cygwin*) MACHDEP="cygwin";;
|
||||
+ msys*) MACHDEP="msys";;
|
||||
- cygwin*) MACHDEP="cygwin";;
|
||||
+ cygwin*|msys*) MACHDEP="cygwin";;
|
||||
darwin*) MACHDEP="darwin";;
|
||||
'') MACHDEP="unknown";;
|
||||
esac
|
||||
@@ -423,6 +427,9 @@
|
||||
*-*-cygwin*)
|
||||
@@ -420,7 +420,7 @@
|
||||
_host_cpu=$host_cpu
|
||||
esac
|
||||
;;
|
||||
- *-*-cygwin*)
|
||||
+ *-*-cygwin*|*-*-msys*)
|
||||
_host_cpu=
|
||||
;;
|
||||
+ *-*-msys*)
|
||||
+ _host_cpu=
|
||||
+ ;;
|
||||
*-*-vxworks*)
|
||||
_host_cpu=$host_cpu
|
||||
;;
|
||||
@@ -845,6 +852,14 @@
|
||||
@@ -845,6 +845,14 @@
|
||||
darwin
|
||||
#elif defined(__VXWORKS__)
|
||||
vxworks
|
||||
@@ -57,7 +55,7 @@ diff -Naur Python-3.8.2-orig/configure.ac Python-3.8.2/configure.ac
|
||||
#elif defined(__CYGWIN__)
|
||||
# if defined(__x86_64__)
|
||||
x86_64-cygwin
|
||||
@@ -1064,7 +1071,7 @@
|
||||
@@ -1064,7 +1072,7 @@
|
||||
if test -z "$enable_shared"
|
||||
then
|
||||
case $ac_sys_system in
|
||||
@@ -66,7 +64,7 @@ diff -Naur Python-3.8.2-orig/configure.ac Python-3.8.2/configure.ac
|
||||
enable_shared="yes";;
|
||||
*)
|
||||
enable_shared="no";;
|
||||
@@ -1118,6 +1125,10 @@
|
||||
@@ -1118,6 +1126,10 @@
|
||||
LDLIBRARY='libpython$(LDVERSION).dll.a'
|
||||
DLLLIBRARY='libpython$(LDVERSION).dll'
|
||||
;;
|
||||
@@ -77,7 +75,7 @@ diff -Naur Python-3.8.2-orig/configure.ac Python-3.8.2/configure.ac
|
||||
SunOS*)
|
||||
LDLIBRARY='libpython$(LDVERSION).so'
|
||||
BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
|
||||
@@ -1164,7 +1175,7 @@
|
||||
@@ -1164,7 +1176,7 @@
|
||||
else # shared is disabled
|
||||
PY_ENABLE_SHARED=0
|
||||
case $ac_sys_system in
|
||||
@@ -86,7 +84,7 @@ diff -Naur Python-3.8.2-orig/configure.ac Python-3.8.2/configure.ac
|
||||
BLDLIBRARY='$(LIBRARY)'
|
||||
LDLIBRARY='libpython$(LDVERSION).dll.a'
|
||||
;;
|
||||
@@ -1213,7 +1224,7 @@
|
||||
@@ -1213,7 +1225,7 @@
|
||||
AC_SUBST(LN)
|
||||
if test -z "$LN" ; then
|
||||
case $ac_sys_system in
|
||||
@@ -95,7 +93,7 @@ diff -Naur Python-3.8.2-orig/configure.ac Python-3.8.2/configure.ac
|
||||
*) LN=ln;;
|
||||
esac
|
||||
fi
|
||||
@@ -2507,7 +2518,7 @@
|
||||
@@ -2514,7 +2526,7 @@
|
||||
*) SHLIB_SUFFIX=.sl;;
|
||||
esac
|
||||
;;
|
||||
@@ -104,7 +102,7 @@ diff -Naur Python-3.8.2-orig/configure.ac Python-3.8.2/configure.ac
|
||||
*) SHLIB_SUFFIX=.so;;
|
||||
esac
|
||||
fi
|
||||
@@ -2641,7 +2652,7 @@
|
||||
@@ -2648,7 +2660,7 @@
|
||||
SCO_SV*)
|
||||
LDSHARED='$(CC) -Wl,-G,-Bexport'
|
||||
LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
|
||||
@@ -113,7 +111,7 @@ diff -Naur Python-3.8.2-orig/configure.ac Python-3.8.2/configure.ac
|
||||
LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
|
||||
LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
|
||||
*) LDSHARED="ld";;
|
||||
@@ -2727,7 +2738,7 @@
|
||||
@@ -2734,7 +2746,7 @@
|
||||
LINKFORSHARED="-Xlinker --export-dynamic"
|
||||
fi;;
|
||||
esac;;
|
||||
@@ -122,7 +120,7 @@ diff -Naur Python-3.8.2-orig/configure.ac Python-3.8.2/configure.ac
|
||||
if test $enable_shared = "no"
|
||||
then
|
||||
LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
|
||||
@@ -2751,7 +2762,7 @@
|
||||
@@ -2758,7 +2770,7 @@
|
||||
if test ! "$LIBRARY" = "$LDLIBRARY"
|
||||
then
|
||||
case $ac_sys_system in
|
||||
@@ -131,7 +129,7 @@ diff -Naur Python-3.8.2-orig/configure.ac Python-3.8.2/configure.ac
|
||||
# Cygwin needs CCSHARED when building extension DLLs
|
||||
# but not when building the interpreter DLL.
|
||||
CFLAGSFORSHARED='';;
|
||||
@@ -3206,7 +3217,7 @@
|
||||
@@ -3228,7 +3240,7 @@
|
||||
fi
|
||||
AC_CHECK_FUNCS(pthread_sigmask,
|
||||
[case $ac_sys_system in
|
||||
@@ -140,42 +138,8 @@ diff -Naur Python-3.8.2-orig/configure.ac Python-3.8.2/configure.ac
|
||||
AC_DEFINE(HAVE_BROKEN_PTHREAD_SIGMASK, 1,
|
||||
[Define if pthread_sigmask() does not work on your system.])
|
||||
;;
|
||||
@@ -4990,7 +4990,7 @@
|
||||
|
||||
# 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')
|
||||
|
||||
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.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
|
||||
--- Python-3.8.7.orig/Lib/ctypes/__init__.py 2020-12-21 17:25:24.000000000 +0100
|
||||
+++ Python-3.8.7/Lib/ctypes/__init__.py 2021-05-11 22:26:25.866873900 +0200
|
||||
@@ -1,6 +1,6 @@
|
||||
"""create and manipulate C data types in Python"""
|
||||
|
||||
@@ -184,99 +148,39 @@ diff -Naur Python-3.8.2-orig/Lib/ctypes/__init__.py Python-3.8.2/Lib/ctypes/__in
|
||||
|
||||
__version__ = "1.1.0"
|
||||
|
||||
@@ -457,6 +457,8 @@
|
||||
@@ -456,7 +456,7 @@
|
||||
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])
|
||||
+elif _sys.platform == 'msys':
|
||||
- pythonapi = PyDLL("libpython%d.%d.dll" % _sys.version_info[:2])
|
||||
+ pythonapi = PyDLL("msys-python%d.%d.dll" % _sys.version_info[:2])
|
||||
else:
|
||||
pythonapi = PyDLL(None)
|
||||
|
||||
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 @@
|
||||
--- Python-3.8.7.orig/Lib/ctypes/test/test_loading.py 2020-12-21 17:25:24.000000000 +0100
|
||||
+++ Python-3.8.7/Lib/ctypes/test/test_loading.py 2021-05-11 22:27:51.108283400 +0200
|
||||
@@ -15,7 +15,7 @@
|
||||
if os.name == "nt":
|
||||
libc_name = find_library("c")
|
||||
elif sys.platform == "cygwin":
|
||||
libc_name = "cygwin1.dll"
|
||||
+ elif sys.platform == "msys":
|
||||
- libc_name = "cygwin1.dll"
|
||||
+ libc_name = "msys-2.0.dll"
|
||||
else:
|
||||
libc_name = find_library("c")
|
||||
|
||||
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]:
|
||||
@@ -372,6 +372,10 @@
|
||||
print(cdll.LoadLibrary("cygbz2-1.dll"))
|
||||
print(cdll.LoadLibrary("cygcrypt-0.dll"))
|
||||
print(find_library("crypt"))
|
||||
+ elif sys.platform == "msys":
|
||||
--- Python-3.8.7/Lib/ctypes/util.py.orig 2021-05-11 22:31:37.409285900 +0200
|
||||
+++ Python-3.8.7/Lib/ctypes/util.py 2021-05-11 22:33:22.371550100 +0200
|
||||
@@ -387,8 +387,8 @@
|
||||
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(cdll.LoadLibrary("msys-bz2-1.dll"))
|
||||
+ print(cdll.LoadLibrary("msys-crypt-0.dll"))
|
||||
+ print(find_library("crypt"))
|
||||
print(find_library("crypt"))
|
||||
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'),
|
||||
+ ('msys.*', 'unix'),
|
||||
|
||||
# OS name mappings
|
||||
('posix', 'unix'),
|
||||
@@ -964,6 +965,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.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
|
||||
- if sys.platform[:6] == 'cygwin':
|
||||
+ if sys.platform[:6] == 'cygwin' or sys.platform[:4] == 'msys':
|
||||
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",
|
||||
@@ -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
|
||||
@@ -286,27 +190,6 @@ diff -Naur Python-3.8.2-orig/Lib/distutils/cygwinccompiler.py Python-3.8.2/Lib/d
|
||||
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.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"
|
||||
xcode_stub_lib_format = dylib_lib_format
|
||||
- if sys.platform == "cygwin":
|
||||
+ if sys.platform in ["cygwin", "msys"]:
|
||||
exe_extension = ".exe"
|
||||
dylib_lib_extension = ".dll.a"
|
||||
|
||||
@@ -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"))
|
||||
- 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[:7] == "freebsd":
|
||||
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
|
||||
@@ -323,30 +206,6 @@ diff -Naur Python-3.8.2-orig/Lib/distutils/util.py Python-3.8.2/Lib/distutils/ut
|
||||
elif osname[:6] == "darwin":
|
||||
import _osx_support, distutils.sysconfig
|
||||
osname, release, machine = _osx_support.get_platform_osx(
|
||||
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',
|
||||
-_CASE_INSENSITIVE_PLATFORMS_BYTES_KEY = 'cygwin', 'darwin'
|
||||
+_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.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
|
||||
@@ -364,111 +223,6 @@ diff -Naur Python-3.8.2-orig/Lib/sysconfig.py Python-3.8.2/Lib/sysconfig.py
|
||||
elif osname[:6] == "darwin":
|
||||
import _osx_support
|
||||
osname, release, machine = _osx_support.get_platform_osx(
|
||||
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 _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.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")
|
||||
+@unittest.skipIf(sys.platform == "msys",
|
||||
+ "msys's curses mostly just hangs")
|
||||
class TestCurses(unittest.TestCase):
|
||||
|
||||
@classmethod
|
||||
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).
|
||||
-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.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):
|
||||
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.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'
|
||||
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()
|
||||
- shutil.rmtree(d, os.name in ('nt', 'cygwin'))
|
||||
+ shutil.rmtree(d, os.name in ('nt', 'cygwin', 'msys'))
|
||||
|
||||
|
||||
def mkdtemp(self):
|
||||
@@ -311,7 +311,7 @@
|
||||
self.assertIn(errors[1][2][1].filename, possible_args)
|
||||
|
||||
|
||||
- @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.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):
|
||||
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.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
|
||||
@@ -481,23 +235,3 @@ diff -Naur Python-3.8.2-orig/Modules/makesetup Python-3.8.2/Modules/makesetup
|
||||
then
|
||||
ExtraLibDir=.
|
||||
else
|
||||
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 CYGWIN:
|
||||
+ if CYGWIN or MSYS:
|
||||
self.announce('WARNING: skipping import check for Cygwin-based "%s"'
|
||||
% ext.name)
|
||||
return
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
- return s.startswith(sep)
|
||||
+ altsep = _get_altsep(s)
|
||||
+ return s.startswith(sep) or \
|
||||
+ (sys.platform == 'msys' and \
|
||||
+ (sys.platform == 'cygwin' and \
|
||||
+ len(s) > 2 and \
|
||||
+ s[1] == ':' and \
|
||||
+ (s[2] == sep or s[2] == altsep))
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
pkgbase=python
|
||||
pkgname=('python' 'python-devel')
|
||||
pkgver=3.8.7
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
_pybasever=${pkgver%.*}
|
||||
pkgdesc="Next generation of the python high-level scripting language"
|
||||
arch=('i686' 'x86_64')
|
||||
@@ -55,8 +55,8 @@ sha256sums=('ddcc1df16bb5b87aa42ec5d20a5b902f2d088caa269b28e01590f97a798ec50a'
|
||||
'5b1083e9b50e149d623d863dee38ac1fb8d142f1bb78c8a01dcb09bfd97f4118'
|
||||
'fc6164a90f0ca2a9341aaf4448b4334c3393459ca5cbad6d7149f8bcf70da5fe'
|
||||
'b4042475c5c75e0b4c7c08ccad2891eb8098c066c5ba524a988a0519102e8e5d'
|
||||
'f1a1e381ece51e2531cb71002fe2e1a9642b1846d55055657c4e4aefda60b6da'
|
||||
'387a2b7931fb4958e2526991760d85677f44fa13cff0aeb0f41a267f1f7fd214'
|
||||
'4ea589b58daa03e8cd9a6f4e95851e5edeb9e04f2eb1771fe9a624efb7bdf047'
|
||||
'85d9d042e0fa3493ec54b364e6b4fb6d2b12ba09641e01047bc84a09605ef76b'
|
||||
'17e4ac1b5f0fa8a6c410fb80d1ad99ec9185efef51b8450a31932b553c354ed1'
|
||||
'b439ff4f0a1f13858f8fb596414b74ed2c14fc3103d90287bb8e461ee89288b9'
|
||||
'612bc5bcbe24c2f623713172d318c65a69ae601d72bcc5a170fe7c4eee458d18'
|
||||
|
||||
Reference in New Issue
Block a user