python: Update to 3.10.5
This commit is contained in:
parent
ba09c2d6eb
commit
2c86cf7311
1
mingw-w64-python/.gitignore
vendored
1
mingw-w64-python/.gitignore
vendored
@ -1 +1,2 @@
|
||||
cpython/
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
From 9cf336304ee9441103bf04fb571abad50d8d4f3c Mon Sep 17 00:00:00 2001
|
||||
From e3af38085c2e263cf6efe1dc199b9f6c6af05310 Mon Sep 17 00:00:00 2001
|
||||
From: Ray Donnelly <mingw.android@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 18:51:10 +0530
|
||||
Subject: [PATCH 001/N] sysconfig: make _sysconfigdata.py relocatable
|
||||
@ -13,7 +13,7 @@ Co-authored-by: lovetox <8661218+lovetox@users.noreply.github.com>
|
||||
1 file changed, 20 insertions(+)
|
||||
|
||||
diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
|
||||
index e3f79bf..45eab2a 100644
|
||||
index daf9f00..eadb99c 100644
|
||||
--- a/Lib/sysconfig.py
|
||||
+++ b/Lib/sysconfig.py
|
||||
@@ -2,6 +2,7 @@
|
||||
@ -24,7 +24,7 @@ index e3f79bf..45eab2a 100644
|
||||
from os.path import pardir, realpath
|
||||
|
||||
__all__ = [
|
||||
@@ -413,11 +414,30 @@ def _generate_posix_vars():
|
||||
@@ -460,11 +461,30 @@ def _generate_posix_vars():
|
||||
os.makedirs(pybuilddir, exist_ok=True)
|
||||
destfile = os.path.join(pybuilddir, name + '.py')
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
From 8e26e7f5b30fe0f820936d2301ba1ba93234d3f2 Mon Sep 17 00:00:00 2001
|
||||
From b2fc3648ddb0e95e0e9124110a320d5735420537 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?=
|
||||
<alexey.pawlow@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 18:51:12 +0530
|
||||
@ -12,10 +12,10 @@ Subject: [PATCH 002/N] restore setup config
|
||||
create mode 100644 Modules/Setup.config.in
|
||||
|
||||
diff --git a/Makefile.pre.in b/Makefile.pre.in
|
||||
index 42b1ec6..c9d3193 100644
|
||||
index ee85f35..f93db84 100644
|
||||
--- a/Makefile.pre.in
|
||||
+++ b/Makefile.pre.in
|
||||
@@ -713,10 +713,12 @@ oldsharedmods: $(SHAREDMODS)
|
||||
@@ -710,10 +710,12 @@ oldsharedmods: $(SHAREDMODS)
|
||||
Makefile Modules/config.c: Makefile.pre \
|
||||
$(srcdir)/Modules/config.c.in \
|
||||
$(MAKESETUP) \
|
||||
@ -28,7 +28,7 @@ index 42b1ec6..c9d3193 100644
|
||||
Modules/Setup.local \
|
||||
$(srcdir)/Modules/Setup
|
||||
@mv config.c Modules
|
||||
@@ -1668,6 +1670,7 @@ libainstall: @DEF_MAKE_RULE@ python-config
|
||||
@@ -1721,6 +1723,7 @@ libainstall: @DEF_MAKE_RULE@ python-config
|
||||
$(INSTALL_DATA) Makefile $(DESTDIR)$(LIBPL)/Makefile
|
||||
$(INSTALL_DATA) $(srcdir)/Modules/Setup $(DESTDIR)$(LIBPL)/Setup
|
||||
$(INSTALL_DATA) Modules/Setup.local $(DESTDIR)$(LIBPL)/Setup.local
|
||||
@ -36,7 +36,7 @@ index 42b1ec6..c9d3193 100644
|
||||
$(INSTALL_DATA) Misc/python.pc $(DESTDIR)$(LIBPC)/python-$(VERSION).pc
|
||||
$(INSTALL_DATA) Misc/python-embed.pc $(DESTDIR)$(LIBPC)/python-$(VERSION)-embed.pc
|
||||
$(INSTALL_SCRIPT) $(srcdir)/Modules/makesetup $(DESTDIR)$(LIBPL)/makesetup
|
||||
@@ -1894,6 +1897,7 @@ distclean: clobber
|
||||
@@ -1947,6 +1950,7 @@ distclean: clobber
|
||||
if test "$$file" != "$(srcdir)/Lib/test/data/README"; then rm "$$file"; fi; \
|
||||
done
|
||||
-rm -f core Makefile Makefile.pre config.status Modules/Setup.local \
|
||||
@ -56,11 +56,11 @@ index 0000000..5c1299d
|
||||
+# based on configure-time options.
|
||||
+
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index aa515da..bd41d06 100644
|
||||
index 763fc69..c613ff9 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -5855,7 +5855,7 @@ AC_DEFINE_UNQUOTED(PY_BUILTIN_HASHLIB_HASHES, "$default_hashlib_hashes")
|
||||
])
|
||||
@@ -6006,7 +6006,7 @@ AC_SUBST(TEST_MODULES)
|
||||
|
||||
|
||||
# generate output files
|
||||
-AC_CONFIG_FILES(Makefile.pre Misc/python.pc Misc/python-embed.pc Misc/python-config.sh)
|
||||
@ -68,7 +68,7 @@ index aa515da..bd41d06 100644
|
||||
AC_CONFIG_FILES([Modules/ld_so_aix], [chmod +x Modules/ld_so_aix])
|
||||
AC_OUTPUT
|
||||
|
||||
@@ -5867,7 +5867,7 @@ fi
|
||||
@@ -6018,7 +6018,7 @@ fi
|
||||
|
||||
echo "creating Makefile" >&AS_MESSAGE_FD
|
||||
$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
From ca8e7f49a6bde8ed51d2dba1d24cbde366b68b71 Mon Sep 17 00:00:00 2001
|
||||
From 78665b6b1358df650539ac6dff43f18bff49191c Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?=
|
||||
<alexey.pawlow@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 18:51:12 +0530
|
||||
@ -64,7 +64,7 @@ index bb9d864..f1e52c6 100644
|
||||
* backwards compatibility, ie failure -> 0, success -> 1. */
|
||||
typedef enum PyLockStatus {
|
||||
diff --git a/Modules/_multiprocessing/multiprocessing.h b/Modules/_multiprocessing/multiprocessing.h
|
||||
index fe78135..344b76e 100644
|
||||
index 277963b..07bb047 100644
|
||||
--- a/Modules/_multiprocessing/multiprocessing.h
|
||||
+++ b/Modules/_multiprocessing/multiprocessing.h
|
||||
@@ -21,6 +21,9 @@
|
||||
@ -78,10 +78,10 @@ index fe78135..344b76e 100644
|
||||
# include <fcntl.h> /* O_CREAT and O_EXCL */
|
||||
# if defined(HAVE_SEM_OPEN) && !defined(POSIX_SEMAPHORES_NOT_ENABLED)
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index bd41d06..fecb3af 100644
|
||||
index c613ff9..d556d59 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -2047,6 +2047,53 @@ then
|
||||
@@ -2044,6 +2044,53 @@ then
|
||||
BASECFLAGS="$BASECFLAGS $ac_arch_flags"
|
||||
fi
|
||||
|
||||
@ -135,7 +135,7 @@ index bd41d06..fecb3af 100644
|
||||
# On some compilers, pthreads are available without further options
|
||||
# (e.g. MacOS X). On some of these systems, the compiler will not
|
||||
# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
|
||||
@@ -2165,6 +2212,8 @@ CC="$ac_save_cc"])
|
||||
@@ -2162,6 +2209,8 @@ CC="$ac_save_cc"])
|
||||
AC_MSG_RESULT($ac_cv_pthread)
|
||||
fi
|
||||
|
||||
@ -144,7 +144,7 @@ index bd41d06..fecb3af 100644
|
||||
# If we have set a CC compiler flag for thread support then
|
||||
# check if it works for CXX, too.
|
||||
ac_cv_cxx_thread=no
|
||||
@@ -2185,6 +2234,10 @@ elif test "$ac_cv_pthread" = "yes"
|
||||
@@ -2182,6 +2231,10 @@ elif test "$ac_cv_pthread" = "yes"
|
||||
then
|
||||
CXX="$CXX -pthread"
|
||||
ac_cv_cxx_thread=yes
|
||||
@ -155,7 +155,7 @@ index bd41d06..fecb3af 100644
|
||||
fi
|
||||
|
||||
if test $ac_cv_cxx_thread = yes
|
||||
@@ -2217,8 +2270,8 @@ dnl AC_MSG_RESULT($cpp_type)
|
||||
@@ -2214,8 +2267,8 @@ dnl AC_MSG_RESULT($cpp_type)
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS(asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
|
||||
fcntl.h grp.h \
|
||||
@ -166,7 +166,7 @@ index bd41d06..fecb3af 100644
|
||||
utime.h \
|
||||
poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
|
||||
sys/audioio.h sys/xattr.h sys/bsdtty.h sys/event.h sys/file.h sys/ioctl.h \
|
||||
@@ -2232,6 +2285,14 @@ sys/endian.h sys/sysmacros.h linux/auxvec.h sys/auxv.h linux/memfd.h linux/wait.
|
||||
@@ -2230,6 +2283,14 @@ sys/mman.h sys/eventfd.h)
|
||||
AC_HEADER_DIRENT
|
||||
AC_HEADER_MAJOR
|
||||
|
||||
@ -200,7 +200,7 @@ index bd41d06..fecb3af 100644
|
||||
CC="$ac_save_cc"
|
||||
|
||||
AC_SUBST(OTHER_LIBTOOL_OPT)
|
||||
@@ -2909,10 +2975,15 @@ void *x = uuid_enc_be
|
||||
@@ -2949,10 +3015,15 @@ void *x = uuid_enc_be
|
||||
[AC_MSG_RESULT(no)]
|
||||
)
|
||||
|
||||
@ -216,7 +216,7 @@ index bd41d06..fecb3af 100644
|
||||
|
||||
# check if we need libintl for locale functions
|
||||
AC_CHECK_LIB(intl, textdomain,
|
||||
@@ -3244,6 +3315,11 @@ then
|
||||
@@ -3252,6 +3323,11 @@ then
|
||||
CXX="$CXX -pthread"
|
||||
fi
|
||||
posix_threads=yes
|
||||
@ -228,7 +228,7 @@ index bd41d06..fecb3af 100644
|
||||
else
|
||||
if test ! -z "$withval" -a -d "$withval"
|
||||
then LDFLAGS="$LDFLAGS -L$withval"
|
||||
@@ -3704,6 +3780,15 @@ else
|
||||
@@ -3706,6 +3782,15 @@ else
|
||||
fi
|
||||
|
||||
# checks for library functions
|
||||
@ -242,9 +242,9 @@ index bd41d06..fecb3af 100644
|
||||
+ ac_cv_func_sched_setscheduler=skip
|
||||
+fi
|
||||
AC_CHECK_FUNCS(alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
|
||||
clock confstr copy_file_range ctermid dup3 execv explicit_bzero explicit_memset \
|
||||
faccessat fchmod fchmodat fchown fchownat \
|
||||
@@ -4624,6 +4709,10 @@ AC_CHECK_DECLS([isinf, isnan, isfinite], [], [], [[#include <math.h>]])
|
||||
clock confstr close_range copy_file_range ctermid dup3 execv explicit_bzero \
|
||||
explicit_memset faccessat fchmod fchmodat fchown fchownat \
|
||||
@@ -4637,6 +4722,10 @@ AC_CHECK_DECLS([isinf, isnan, isfinite], [], [], [[#include <math.h>]])
|
||||
# the kernel module that provides POSIX semaphores
|
||||
# isn't loaded by default, so an attempt to call
|
||||
# sem_open results in a 'Signal 12' error.
|
||||
@ -255,7 +255,7 @@ index bd41d06..fecb3af 100644
|
||||
AC_MSG_CHECKING(whether POSIX semaphores are enabled)
|
||||
AC_CACHE_VAL(ac_cv_posix_semaphores_enabled,
|
||||
AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
||||
@@ -4657,6 +4746,14 @@ fi
|
||||
@@ -4670,6 +4759,14 @@ fi
|
||||
|
||||
# Multiprocessing check for broken sem_getvalue
|
||||
AC_MSG_CHECKING(for broken sem_getvalue)
|
||||
@ -271,10 +271,10 @@ index bd41d06..fecb3af 100644
|
||||
AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
||||
#include <unistd.h>
|
||||
diff --git a/pyconfig.h.in b/pyconfig.h.in
|
||||
index bf695e9..3bb513f 100644
|
||||
index 57c84e5..3bb38bf 100644
|
||||
--- a/pyconfig.h.in
|
||||
+++ b/pyconfig.h.in
|
||||
@@ -1371,6 +1371,9 @@
|
||||
@@ -1389,6 +1389,9 @@
|
||||
/* Define if mvwdelch in curses.h is an expression. */
|
||||
#undef MVWDELCH_IS_EXPRESSION
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
From 87709045ef82a4f198913df6757e75e2c597d788 Mon Sep 17 00:00:00 2001
|
||||
From db8685c749a79528988873883ba064ab4d1f1947 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?=
|
||||
<alexey.pawlow@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 18:51:13 +0530
|
||||
@ -14,7 +14,7 @@ Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com>
|
||||
1 file changed, 15 insertions(+)
|
||||
|
||||
diff --git a/Include/pyport.h b/Include/pyport.h
|
||||
index 4bd4eb4..475c2a8 100644
|
||||
index 6ab0ae4..a27bedf 100644
|
||||
--- a/Include/pyport.h
|
||||
+++ b/Include/pyport.h
|
||||
@@ -26,6 +26,21 @@
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
From faffc672cd7f9aa312d32d752f614f6ab9da9b85 Mon Sep 17 00:00:00 2001
|
||||
From 7626cf038215b03d5e83ed4c9e33f0a9efc86693 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?=
|
||||
<alexey.pawlow@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 18:51:14 +0530
|
||||
@ -13,7 +13,7 @@ Co-authored-by: Алексей <alexey.pawlow@gmail.com>
|
||||
1 file changed, 15 insertions(+)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index fecb3af..69ffb3b 100644
|
||||
index d556d59..21da400 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -400,6 +400,9 @@ then
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
From 79202e60e41e8749ab7117369340fd143d0c3a57 Mon Sep 17 00:00:00 2001
|
||||
From c5820dc0374e4297f407f14a12c209527ad453df Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?=
|
||||
<alexey.pawlow@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 18:51:15 +0530
|
||||
@ -53,10 +53,10 @@ index 0000000..03fde9e
|
||||
+
|
||||
+ac_cv_have_size_t_format=no
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 69ffb3b..179c048 100644
|
||||
index 21da400..fee20ae 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -920,6 +920,28 @@ if test x$MULTIARCH != x; then
|
||||
@@ -910,6 +910,28 @@ if test x$MULTIARCH != x; then
|
||||
fi
|
||||
AC_SUBST(MULTIARCH_CPPFLAGS)
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
From 76ae36e5b16302eede91d47a21a99bbf0e396920 Mon Sep 17 00:00:00 2001
|
||||
From 2f10a8b42519828fcc1b5cf2d30b6bfa6db19348 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?=
|
||||
<alexey.pawlow@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 18:51:16 +0530
|
||||
@ -14,7 +14,7 @@ Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com>
|
||||
1 file changed, 12 insertions(+)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 179c048..04c57b8 100644
|
||||
index fee20ae..cbbf65d 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -2494,8 +2494,20 @@ AC_CHECK_SIZEOF(off_t, [], [
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
From 35f793246f129bc3be9dee9a4dc73b789f75bc00 Mon Sep 17 00:00:00 2001
|
||||
From 6255fc060119cfef7bff770f19c9717042a548a0 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?=
|
||||
<alexey.pawlow@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 18:51:18 +0530
|
||||
@ -13,10 +13,10 @@ Co-authored-by: Алексей <alexey.pawlow@gmail.com>
|
||||
1 file changed, 13 insertions(+)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 04c57b8..a084b3b 100644
|
||||
index cbbf65d..264dd06 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -5653,8 +5653,21 @@ do
|
||||
@@ -5714,8 +5714,21 @@ do
|
||||
THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
|
||||
done
|
||||
|
||||
@ -31,7 +31,7 @@ index 04c57b8..a084b3b 100644
|
||||
+esac
|
||||
+
|
||||
AC_SUBST(SRCDIRS)
|
||||
SRCDIRS="Parser Parser/pegen Objects Python Modules Modules/_io Programs"
|
||||
SRCDIRS="Parser Objects Python Modules Modules/_io Programs"
|
||||
+case $host in
|
||||
+ *-*-mingw*) SRCDIRS="$SRCDIRS PC";;
|
||||
+esac
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
From 4a879a16396e6c5456f6d462c1ca00ead53433fd Mon Sep 17 00:00:00 2001
|
||||
From c0ddc90c687cd154d83a98cde93ec15e41d7f178 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?=
|
||||
<alexey.pawlow@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 18:51:19 +0530
|
||||
@ -16,7 +16,7 @@ Co-authored-by: Алексей <alexey.pawlow@gmail.com>
|
||||
4 files changed, 36 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/Modules/Setup b/Modules/Setup
|
||||
index 02cfb67..6b6926d 100644
|
||||
index 87c6a15..34d98e5 100644
|
||||
--- a/Modules/Setup
|
||||
+++ b/Modules/Setup
|
||||
@@ -101,7 +101,6 @@ PYTHONPATH=$(COREPYTHONPATH)
|
||||
@ -39,10 +39,10 @@ index 5c1299d..9b364fe 100644
|
||||
+@INITSYS@ -DPy_BUILD_CORE_BUILTIN -I$(srcdir)/Include/internal posixmodule.c
|
||||
+
|
||||
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
|
||||
index 1270af7..c8b87a7 100644
|
||||
index 26c8e7b..21bf71f 100644
|
||||
--- a/Modules/posixmodule.c
|
||||
+++ b/Modules/posixmodule.c
|
||||
@@ -310,6 +310,27 @@ corresponding Unix manual entries for more information on calls.");
|
||||
@@ -316,6 +316,27 @@ corresponding Unix manual entries for more information on calls.");
|
||||
# define HAVE_CWAIT 1
|
||||
# define HAVE_FSYNC 1
|
||||
# define fsync _commit
|
||||
@ -70,7 +70,7 @@ index 1270af7..c8b87a7 100644
|
||||
# else
|
||||
/* Unix functions that the configure script doesn't check for */
|
||||
# ifndef __VXWORKS__
|
||||
@@ -410,7 +431,7 @@ extern char *ctermid_r(char *);
|
||||
@@ -416,7 +437,7 @@ extern char *ctermid_r(char *);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
@ -79,7 +79,7 @@ index 1270af7..c8b87a7 100644
|
||||
# ifdef HAVE_DIRECT_H
|
||||
# include <direct.h>
|
||||
# endif
|
||||
@@ -432,7 +453,7 @@ extern char *ctermid_r(char *);
|
||||
@@ -438,7 +459,7 @@ extern char *ctermid_r(char *);
|
||||
# include <shellapi.h> // ShellExecute()
|
||||
# include <lmcons.h> // UNLEN
|
||||
# define HAVE_SYMLINK
|
||||
@ -88,7 +88,7 @@ index 1270af7..c8b87a7 100644
|
||||
|
||||
#ifndef MAXPATHLEN
|
||||
# if defined(PATH_MAX) && PATH_MAX > 1024
|
||||
@@ -1521,9 +1542,9 @@ win32_get_reparse_tag(HANDLE reparse_point_handle, ULONG *reparse_tag)
|
||||
@@ -1587,9 +1608,9 @@ win32_get_reparse_tag(HANDLE reparse_point_handle, ULONG *reparse_tag)
|
||||
** man environ(7).
|
||||
*/
|
||||
#include <crt_externs.h>
|
||||
@ -101,10 +101,10 @@ index 1270af7..c8b87a7 100644
|
||||
static PyObject *
|
||||
convertenviron(void)
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index a084b3b..ebc643c 100644
|
||||
index 264dd06..61cc317 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -594,6 +594,14 @@ then
|
||||
@@ -584,6 +584,14 @@ then
|
||||
AC_DEFINE(_INCLUDE__STDC_A1_SOURCE, 1, Define to include mbstate_t for mbrtowc)
|
||||
fi
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
From ccf7b2bf2d530d194ab028d1773d98639053f5a3 Mon Sep 17 00:00:00 2001
|
||||
From 3aff64e1b6897d1382152dd70d565c463656cbe9 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?=
|
||||
<alexey.pawlow@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 18:51:20 +0530
|
||||
@ -27,10 +27,10 @@ index 9b364fe..612cabd 100644
|
||||
+@USE_WIN32_MODULE@winreg ../PC/winreg.c
|
||||
+
|
||||
diff --git a/PC/winreg.c b/PC/winreg.c
|
||||
index fd1ccb7..b6f1a8f 100644
|
||||
index 004a89a..fbcd2c4 100644
|
||||
--- a/PC/winreg.c
|
||||
+++ b/PC/winreg.c
|
||||
@@ -17,6 +17,25 @@
|
||||
@@ -18,6 +18,25 @@
|
||||
#include "structmember.h" // PyMemberDef
|
||||
#include <windows.h>
|
||||
|
||||
@ -57,10 +57,10 @@ index fd1ccb7..b6f1a8f 100644
|
||||
static BOOL clinic_HKEY_converter(PyObject *ob, void *p);
|
||||
static PyObject *PyHKEY_FromHKEY(HKEY h);
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index ebc643c..2211b34 100644
|
||||
index 61cc317..12fa784 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -3338,6 +3338,13 @@ else
|
||||
@@ -3346,6 +3346,13 @@ else
|
||||
fi])
|
||||
AC_MSG_RESULT($with_dbmliborder)
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
From 712cba838026cf94e107689f7aae2d3656f69b97 Mon Sep 17 00:00:00 2001
|
||||
From 9fd313ac6a7e84d2c41556f2f2b2f0fda82796f6 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?=
|
||||
<alexey.pawlow@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 18:51:21 +0530
|
||||
@ -16,7 +16,7 @@ Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com>
|
||||
3 files changed, 10 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/Modules/Setup b/Modules/Setup
|
||||
index 6b6926d..2bafdd0 100644
|
||||
index 34d98e5..e765e05 100644
|
||||
--- a/Modules/Setup
|
||||
+++ b/Modules/Setup
|
||||
@@ -102,8 +102,6 @@ PYTHONPATH=$(COREPYTHONPATH)
|
||||
@ -25,7 +25,7 @@ index 6b6926d..2bafdd0 100644
|
||||
errno errnomodule.c # posix (UNIX) errno values
|
||||
-pwd pwdmodule.c # this is needed to find out the user's home dir
|
||||
- # if $HOME is not set
|
||||
_sre _sre.c # Fredrik Lundh's new regular expressions
|
||||
_sre -DPy_BUILD_CORE_BUILTIN _sre.c # Fredrik Lundh's new regular expressions
|
||||
_codecs _codecsmodule.c # access to the builtin codecs and codec registry
|
||||
_weakref _weakref.c # weak references
|
||||
diff --git a/Modules/Setup.config.in b/Modules/Setup.config.in
|
||||
@ -43,10 +43,10 @@ index 612cabd..d071a74 100644
|
||||
@USE_WIN32_MODULE@winreg ../PC/winreg.c
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 2211b34..0b8d6c2 100644
|
||||
index 12fa784..7c0b771 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -3345,6 +3345,13 @@ case $host in
|
||||
@@ -3353,6 +3353,13 @@ case $host in
|
||||
*-*-mingw*) USE_WIN32_MODULE=;;
|
||||
esac
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
From 31ad8ecc08178ad2f54e68d4c94a25441f6cf70a Mon Sep 17 00:00:00 2001
|
||||
From 96a389061300758e0d0cef30c3a35a450360acbc Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?=
|
||||
<alexey.pawlow@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 18:51:23 +0530
|
||||
@ -14,10 +14,10 @@ Co-authored-by: Алексей <alexey.pawlow@gmail.com>
|
||||
2 files changed, 14 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/Include/pyport.h b/Include/pyport.h
|
||||
index 475c2a8..a05fa3a 100644
|
||||
index a27bedf..dedc3b8 100644
|
||||
--- a/Include/pyport.h
|
||||
+++ b/Include/pyport.h
|
||||
@@ -664,12 +664,12 @@ extern char * _getpty(int *, int, mode_t, int);
|
||||
@@ -669,12 +669,12 @@ extern char * _getpty(int *, int, mode_t, int);
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -33,7 +33,7 @@ index 475c2a8..a05fa3a 100644
|
||||
# define HAVE_DECLSPEC_DLL
|
||||
#endif
|
||||
|
||||
@@ -682,21 +682,23 @@ extern char * _getpty(int *, int, mode_t, int);
|
||||
@@ -687,21 +687,23 @@ extern char * _getpty(int *, int, mode_t, int);
|
||||
# define PyAPI_FUNC(RTYPE) Py_EXPORTED_SYMBOL RTYPE
|
||||
# define PyAPI_DATA(RTYPE) extern Py_EXPORTED_SYMBOL RTYPE
|
||||
/* module init functions inside the core need no external linkage */
|
||||
@ -64,10 +64,10 @@ index 475c2a8..a05fa3a 100644
|
||||
/* module init functions outside the core must be exported */
|
||||
# if defined(__cplusplus)
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 0bec170..69f8e19 100644
|
||||
index e74a275..0a253b9 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -450,6 +450,9 @@ class PyBuildExt(build_ext):
|
||||
@@ -474,6 +474,9 @@ class PyBuildExt(build_ext):
|
||||
self.configure_compiler()
|
||||
self.init_inc_lib_dirs()
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
From e9b75a99a8daf22ce8b32283e16ad2c2d5431430 Mon Sep 17 00:00:00 2001
|
||||
From dcfcf616fa29dc73da906f8d9b3b32ed6fb3d7f2 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?=
|
||||
<alexey.pawlow@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 18:51:24 +0530
|
||||
@ -13,10 +13,10 @@ Co-authored-by: Алексей <alexey.pawlow@gmail.com>
|
||||
1 file changed, 19 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 0b8d6c2..95d0a54 100644
|
||||
index 7c0b771..746ec95 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -1240,6 +1240,13 @@ if test $enable_shared = "yes"; then
|
||||
@@ -1227,6 +1227,13 @@ if test $enable_shared = "yes"; then
|
||||
;;
|
||||
|
||||
esac
|
||||
@ -30,7 +30,7 @@ index 0b8d6c2..95d0a54 100644
|
||||
else # shared is disabled
|
||||
PY_ENABLE_SHARED=0
|
||||
case $ac_sys_system in
|
||||
@@ -1248,6 +1255,10 @@ else # shared is disabled
|
||||
@@ -1235,6 +1242,10 @@ else # shared is disabled
|
||||
LDLIBRARY='libpython$(LDVERSION).dll.a'
|
||||
;;
|
||||
esac
|
||||
@ -41,7 +41,7 @@ index 0b8d6c2..95d0a54 100644
|
||||
fi
|
||||
|
||||
if test "$cross_compiling" = yes; then
|
||||
@@ -2850,6 +2861,12 @@ then
|
||||
@@ -2881,6 +2892,12 @@ then
|
||||
LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
|
||||
*) LDSHARED="ld";;
|
||||
esac
|
||||
@ -54,7 +54,7 @@ index 0b8d6c2..95d0a54 100644
|
||||
fi
|
||||
AC_MSG_RESULT($LDSHARED)
|
||||
LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
|
||||
@@ -5681,7 +5698,8 @@ case $host in
|
||||
@@ -5742,7 +5759,8 @@ case $host in
|
||||
dnl "errmap.h" from $srcdir/PC.
|
||||
dnl Note we cannot use BASECPPFLAGS as autogenerated pyconfig.h
|
||||
dnl has to be before customized located in ../PC.
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
From 0bb65945f92f47a1edd777be19808ad3c43e8a83 Mon Sep 17 00:00:00 2001
|
||||
From 871f0c8f12bd667dd5e3335647e54856be39bc49 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?=
|
||||
<alexey.pawlow@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 18:51:25 +0530
|
||||
@ -15,10 +15,10 @@ Co-authored-by: Алексей <alexey.pawlow@gmail.com>
|
||||
3 files changed, 29 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/Makefile.pre.in b/Makefile.pre.in
|
||||
index c9d3193..3b96788 100644
|
||||
index f93db84..0eff915 100644
|
||||
--- a/Makefile.pre.in
|
||||
+++ b/Makefile.pre.in
|
||||
@@ -822,6 +822,12 @@ Python/dynload_hpux.o: $(srcdir)/Python/dynload_hpux.c Makefile
|
||||
@@ -825,6 +825,12 @@ Python/dynload_hpux.o: $(srcdir)/Python/dynload_hpux.c Makefile
|
||||
-DSHLIB_EXT='"$(EXT_SUFFIX)"' \
|
||||
-o $@ $(srcdir)/Python/dynload_hpux.c
|
||||
|
||||
@ -32,7 +32,7 @@ index c9d3193..3b96788 100644
|
||||
$(CC) -c $(PY_CORE_CFLAGS) \
|
||||
-DABIFLAGS='"$(ABIFLAGS)"' \
|
||||
diff --git a/Python/dynload_win.c b/Python/dynload_win.c
|
||||
index 81787e5..9d7690e 100644
|
||||
index 5702ab2..6b53780 100644
|
||||
--- a/Python/dynload_win.c
|
||||
+++ b/Python/dynload_win.c
|
||||
@@ -27,6 +27,12 @@
|
||||
@ -48,7 +48,7 @@ index 81787e5..9d7690e 100644
|
||||
PYD_TAGGED_SUFFIX,
|
||||
PYD_UNTAGGED_SUFFIX,
|
||||
NULL
|
||||
@@ -192,8 +198,7 @@ _Py_COMP_DIAG_POP
|
||||
@@ -192,8 +198,7 @@ dl_funcptr _PyImport_FindSharedFuncptrWindows(const char *prefix,
|
||||
ensure DLLs adjacent to the PYD are preferred. */
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
hDLL = LoadLibraryExW(wpathname, NULL,
|
||||
@ -56,13 +56,13 @@ index 81787e5..9d7690e 100644
|
||||
- LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR);
|
||||
+ LOAD_WITH_ALTERED_SEARCH_PATH);
|
||||
Py_END_ALLOW_THREADS
|
||||
|
||||
/* restore old error mode settings */
|
||||
#if !USE_UNICODE_WCHAR_CACHE
|
||||
PyMem_Free(wpathname);
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 95d0a54..d2f1deb 100644
|
||||
index 746ec95..ed97fb7 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -2725,6 +2725,9 @@ if test -z "$SHLIB_SUFFIX"; then
|
||||
@@ -2768,6 +2768,9 @@ if test -z "$SHLIB_SUFFIX"; then
|
||||
CYGWIN*) SHLIB_SUFFIX=.dll;;
|
||||
*) SHLIB_SUFFIX=.so;;
|
||||
esac
|
||||
@ -72,7 +72,7 @@ index 95d0a54..d2f1deb 100644
|
||||
fi
|
||||
AC_MSG_RESULT($SHLIB_SUFFIX)
|
||||
|
||||
@@ -3843,6 +3846,13 @@ then
|
||||
@@ -3845,6 +3848,13 @@ then
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
@ -86,7 +86,7 @@ index 95d0a54..d2f1deb 100644
|
||||
fi
|
||||
AC_MSG_RESULT($DYNLOADFILE)
|
||||
if test "$DYNLOADFILE" != "dynload_stub.o"
|
||||
@@ -5678,6 +5688,12 @@ case "$ac_cv_computed_gotos" in yes*)
|
||||
@@ -5739,6 +5749,12 @@ case "$ac_cv_computed_gotos" in yes*)
|
||||
AC_DEFINE(HAVE_COMPUTED_GOTOS, 1,
|
||||
[Define if the C compiler supports computed gotos.])
|
||||
esac
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
From 64519dac963146338b46211276f6a321f553d982 Mon Sep 17 00:00:00 2001
|
||||
From 4a7e296f81146a053212f3722b135a49f5d293d9 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?=
|
||||
<alexey.pawlow@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 18:51:26 +0530
|
||||
@ -14,10 +14,10 @@ Co-authored-by: Алексей <alexey.pawlow@gmail.com>
|
||||
2 files changed, 11 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile.pre.in b/Makefile.pre.in
|
||||
index 3b96788..1c46d07 100644
|
||||
index 0eff915..8b0b178 100644
|
||||
--- a/Makefile.pre.in
|
||||
+++ b/Makefile.pre.in
|
||||
@@ -351,7 +351,7 @@ PYTHON_OBJS= \
|
||||
@@ -349,7 +349,7 @@ PYTHON_OBJS= \
|
||||
Python/context.o \
|
||||
Python/dynamic_annotations.o \
|
||||
Python/errors.o \
|
||||
@ -27,10 +27,10 @@ index 3b96788..1c46d07 100644
|
||||
Python/getargs.o \
|
||||
Python/getcompiler.o \
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index d2f1deb..746e801 100644
|
||||
index ed97fb7..f54d4dd 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -5719,6 +5719,16 @@ case $host in
|
||||
@@ -5780,6 +5780,16 @@ case $host in
|
||||
;;
|
||||
esac
|
||||
|
||||
@ -45,7 +45,7 @@ index d2f1deb..746e801 100644
|
||||
+esac
|
||||
+
|
||||
AC_SUBST(SRCDIRS)
|
||||
SRCDIRS="Parser Parser/pegen Objects Python Modules Modules/_io Programs"
|
||||
SRCDIRS="Parser Objects Python Modules Modules/_io Programs"
|
||||
case $host in
|
||||
--
|
||||
2.36.1
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
From 19735a11c84defe17e220deca90ed7eaab076987 Mon Sep 17 00:00:00 2001
|
||||
From 1745047594f5eb85ccfa550f681ecca844b6540a Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?=
|
||||
<alexey.pawlow@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 18:51:26 +0530
|
||||
@ -13,13 +13,13 @@ Co-authored-by: Алексей <alexey.pawlow@gmail.com>
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 69f8e19..ce72884 100644
|
||||
index 0a253b9..09f685a 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -1773,7 +1773,12 @@ class PyBuildExt(build_ext):
|
||||
libraries=libs,
|
||||
include_dirs=["Modules/_multiprocessing"]))
|
||||
|
||||
@@ -1850,7 +1850,12 @@ class PyBuildExt(build_ext):
|
||||
if (sysconfig.get_config_var('HAVE_SEM_OPEN') and not
|
||||
sysconfig.get_config_var('POSIX_SEMAPHORES_NOT_ENABLED')):
|
||||
multiprocessing_srcs.append('_multiprocessing/semaphore.c')
|
||||
+ multiprocessing_libs = []
|
||||
+ if MS_WINDOWS:
|
||||
+ multiprocessing_libs += ['ws2_32']
|
||||
@ -28,7 +28,7 @@ index 69f8e19..ce72884 100644
|
||||
+ libraries=multiprocessing_libs,
|
||||
include_dirs=["Modules/_multiprocessing"]))
|
||||
|
||||
def detect_uuid(self):
|
||||
if (not MS_WINDOWS and
|
||||
--
|
||||
2.36.1
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
From bdaeb1c4307cdb79ae5f99c5cec0467e07b7621a Mon Sep 17 00:00:00 2001
|
||||
From baa222e1ce7aebc13943c8363360fd88cd28ab44 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?=
|
||||
<alexey.pawlow@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 18:51:29 +0530
|
||||
@ -14,10 +14,10 @@ Co-authored-by: Алексей <alexey.pawlow@gmail.com>
|
||||
2 files changed, 8 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/Modules/selectmodule.c b/Modules/selectmodule.c
|
||||
index d4af4f7..073c2ff 100644
|
||||
index 3afcb0e..6e2903d 100644
|
||||
--- a/Modules/selectmodule.c
|
||||
+++ b/Modules/selectmodule.c
|
||||
@@ -155,9 +155,9 @@ seq2set(PyObject *seq, fd_set *set, pylist fd2obj[FD_SETSIZE + 1])
|
||||
@@ -136,9 +136,9 @@ seq2set(PyObject *seq, fd_set *set, pylist fd2obj[FD_SETSIZE + 1])
|
||||
v = PyObject_AsFileDescriptor( o );
|
||||
if (v == -1) goto finally;
|
||||
|
||||
@ -29,7 +29,7 @@ index d4af4f7..073c2ff 100644
|
||||
if (!_PyIsSelectable_fd(v)) {
|
||||
PyErr_SetString(PyExc_ValueError,
|
||||
"filedescriptor out of range in select()");
|
||||
@@ -165,7 +165,7 @@ seq2set(PyObject *seq, fd_set *set, pylist fd2obj[FD_SETSIZE + 1])
|
||||
@@ -146,7 +146,7 @@ seq2set(PyObject *seq, fd_set *set, pylist fd2obj[FD_SETSIZE + 1])
|
||||
}
|
||||
if (v > max)
|
||||
max = v;
|
||||
@ -39,10 +39,10 @@ index d4af4f7..073c2ff 100644
|
||||
|
||||
/* add object and its file descriptor to the list */
|
||||
diff --git a/setup.py b/setup.py
|
||||
index ce72884..2142b7e 100644
|
||||
index 09f685a..8e14098 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -911,7 +911,11 @@ class PyBuildExt(build_ext):
|
||||
@@ -1006,7 +1006,11 @@ class PyBuildExt(build_ext):
|
||||
self.missing.append('spwd')
|
||||
|
||||
# select(2); not on ancient System V
|
||||
@ -53,8 +53,8 @@ index ce72884..2142b7e 100644
|
||||
+ self.add(Extension('select', ['selectmodule.c'],
|
||||
+ libraries=select_libs))
|
||||
|
||||
# Fred Drake's interface to the Python parser
|
||||
self.add(Extension('parser', ['parsermodule.c']))
|
||||
# Memory-mapped files (also works on Win32).
|
||||
self.add(Extension('mmap', ['mmapmodule.c']))
|
||||
--
|
||||
2.36.1
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
From 4f4524df86343f8615da844733ff4f8bcfb52aa4 Mon Sep 17 00:00:00 2001
|
||||
From 7c2ed351d2c026f492083165aa73ab398f02a259 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?=
|
||||
<alexey.pawlow@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 18:51:30 +0530
|
||||
@ -14,10 +14,10 @@ Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com>
|
||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 2142b7e..52d25e6 100644
|
||||
index 8e14098..a40f224 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -2158,9 +2158,12 @@ class PyBuildExt(build_ext):
|
||||
@@ -2277,9 +2277,12 @@ class PyBuildExt(build_ext):
|
||||
self.add(ext)
|
||||
if TEST_EXTENSIONS:
|
||||
# function my_sqrt() needs libm for sqrt()
|
||||
@ -31,7 +31,7 @@ index 2142b7e..52d25e6 100644
|
||||
|
||||
ffi_inc = sysconfig.get_config_var("LIBFFI_INCLUDEDIR")
|
||||
ffi_lib = None
|
||||
@@ -2205,6 +2208,8 @@ class PyBuildExt(build_ext):
|
||||
@@ -2324,6 +2327,8 @@ class PyBuildExt(build_ext):
|
||||
|
||||
ext.include_dirs.append(ffi_inc)
|
||||
ext.libraries.append(ffi_lib)
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
From 47044fca9b0a9206e1825a074d302e9e78f50391 Mon Sep 17 00:00:00 2001
|
||||
From 135e74d458b6fa6753d90f4f4eae973baf84a17e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?=
|
||||
<alexey.pawlow@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 18:51:30 +0530
|
||||
@ -12,9 +12,9 @@ Co-authored-by: Алексей <alexey.pawlow@gmail.com>
|
||||
Misc/config_mingw | 3 +++
|
||||
Modules/socketmodule.c | 8 ++++++--
|
||||
configure.ac | 28 +++++++++++++++++++++++-----
|
||||
pyconfig.h.in | 7 +++++--
|
||||
pyconfig.h.in | 4 ++--
|
||||
setup.py | 2 ++
|
||||
5 files changed, 39 insertions(+), 9 deletions(-)
|
||||
5 files changed, 36 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/Misc/config_mingw b/Misc/config_mingw
|
||||
index 513065d..9be43fd 100644
|
||||
@ -28,10 +28,10 @@ index 513065d..9be43fd 100644
|
||||
+# force detection of winsock2 functionality - require wxp or newer
|
||||
+ac_cv_func_getpeername=yes
|
||||
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
|
||||
index 6d6c92e..c6c032a 100644
|
||||
index 392cc32..fd2411c 100644
|
||||
--- a/Modules/socketmodule.c
|
||||
+++ b/Modules/socketmodule.c
|
||||
@@ -302,7 +302,7 @@ http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/net/getaddrinfo.c.diff?r1=1.82&
|
||||
@@ -265,7 +265,7 @@ shutdown(how) -- shut down traffic in one or both directions\n\
|
||||
# endif
|
||||
|
||||
/* Macros based on the IPPROTO enum, see: https://bugs.python.org/issue29515 */
|
||||
@ -40,7 +40,7 @@ index 6d6c92e..c6c032a 100644
|
||||
#define IPPROTO_ICMP IPPROTO_ICMP
|
||||
#define IPPROTO_IGMP IPPROTO_IGMP
|
||||
#define IPPROTO_GGP IPPROTO_GGP
|
||||
@@ -333,7 +333,7 @@ http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/net/getaddrinfo.c.diff?r1=1.82&
|
||||
@@ -296,7 +296,7 @@ shutdown(how) -- shut down traffic in one or both directions\n\
|
||||
#define IPPROTO_PGM IPPROTO_PGM // WinSock2 only
|
||||
#define IPPROTO_L2TP IPPROTO_L2TP // WinSock2 only
|
||||
#define IPPROTO_SCTP IPPROTO_SCTP // WinSock2 only
|
||||
@ -49,7 +49,7 @@ index 6d6c92e..c6c032a 100644
|
||||
|
||||
/* Provides the IsWindows7SP1OrGreater() function */
|
||||
#include <versionhelpers.h>
|
||||
@@ -426,6 +426,10 @@ remove_unusable_flags(PyObject *m)
|
||||
@@ -389,6 +389,10 @@ remove_unusable_flags(PyObject *m)
|
||||
/* Do not include addrinfo.h for MSVC7 or greater. 'addrinfo' and
|
||||
* EAI_* constants are defined in (the already included) ws2tcpip.h.
|
||||
*/
|
||||
@ -61,10 +61,10 @@ index 6d6c92e..c6c032a 100644
|
||||
# include "addrinfo.h"
|
||||
#endif
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 746e801..98a10d2 100644
|
||||
index f54d4dd..40afa50 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -4455,21 +4455,36 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
@@ -4468,21 +4468,36 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
],[])
|
||||
AC_MSG_RESULT($was_it_defined)
|
||||
|
||||
@ -105,7 +105,7 @@ index 746e801..98a10d2 100644
|
||||
[ac_cv_struct_sockaddr_storage=yes],
|
||||
[ac_cv_struct_sockaddr_storage=no]))
|
||||
AC_MSG_RESULT($ac_cv_struct_sockaddr_storage)
|
||||
@@ -5609,7 +5624,10 @@ fi
|
||||
@@ -5670,7 +5685,10 @@ fi
|
||||
|
||||
AC_CHECK_TYPE(socklen_t,,
|
||||
AC_DEFINE(socklen_t,int,
|
||||
@ -118,10 +118,10 @@ index 746e801..98a10d2 100644
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
diff --git a/pyconfig.h.in b/pyconfig.h.in
|
||||
index 3bb513f..e0301fe 100644
|
||||
index 3bb38bf..e36c306 100644
|
||||
--- a/pyconfig.h.in
|
||||
+++ b/pyconfig.h.in
|
||||
@@ -54,7 +54,7 @@
|
||||
@@ -63,7 +63,7 @@
|
||||
/* Define to 1 if you have the `acosh' function. */
|
||||
#undef HAVE_ACOSH
|
||||
|
||||
@ -130,17 +130,7 @@ index 3bb513f..e0301fe 100644
|
||||
#undef HAVE_ADDRINFO
|
||||
|
||||
/* Define to 1 if you have the `alarm' function. */
|
||||
@@ -1354,6 +1354,9 @@
|
||||
/* Define if libssl has X509_VERIFY_PARAM_set1_host and related function */
|
||||
#undef HAVE_X509_VERIFY_PARAM_SET1_HOST
|
||||
|
||||
+/* Define to 1 if you have the <ws2tcpip.h> header file. */
|
||||
+#undef HAVE_WS2TCPIP_H
|
||||
+
|
||||
/* Define if the zlib library has inflateCopy */
|
||||
#undef HAVE_ZLIB_COPY
|
||||
|
||||
@@ -1665,7 +1668,7 @@
|
||||
@@ -1689,7 +1689,7 @@
|
||||
/* Define to `unsigned int' if <sys/types.h> does not define. */
|
||||
#undef size_t
|
||||
|
||||
@ -150,18 +140,18 @@ index 3bb513f..e0301fe 100644
|
||||
|
||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 52d25e6..3b5f4a5 100644
|
||||
index a40f224..fdf5ac5 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -1148,6 +1148,8 @@ class PyBuildExt(build_ext):
|
||||
if MACOS:
|
||||
# Issue #35569: Expose RFC 3542 socket options.
|
||||
kwargs['extra_compile_args'] = ['-D__APPLE_USE_RFC_3542']
|
||||
+ if MS_WINDOWS:
|
||||
+ kwargs['libraries'] = ['ws2_32', 'iphlpapi']
|
||||
@@ -1249,6 +1249,8 @@ class PyBuildExt(build_ext):
|
||||
if MACOS:
|
||||
# Issue #35569: Expose RFC 3542 socket options.
|
||||
kwargs['extra_compile_args'] = ['-D__APPLE_USE_RFC_3542']
|
||||
+ if MS_WINDOWS:
|
||||
+ kwargs['libraries'] = ['ws2_32', 'iphlpapi']
|
||||
|
||||
self.add(Extension('_socket', ['socketmodule.c'], **kwargs))
|
||||
|
||||
self.add(Extension('_socket', ['socketmodule.c'], **kwargs))
|
||||
elif self.compiler.find_library_file(self.lib_dirs, 'net'):
|
||||
--
|
||||
2.36.1
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
From 95b1b73dc8fd865580d90b3444ecceeff5cd2b9c Mon Sep 17 00:00:00 2001
|
||||
From 6261a9e820c4264c7cb3d3b846388549333808e7 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?=
|
||||
<alexey.pawlow@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 18:51:31 +0530
|
||||
@ -9,14 +9,14 @@ Content-Transfer-Encoding: 8bit
|
||||
|
||||
Co-authored-by: Алексей <alexey.pawlow@gmail.com>
|
||||
---
|
||||
setup.py | 41 +++++++++++++++++++++++++++++------------
|
||||
1 file changed, 29 insertions(+), 12 deletions(-)
|
||||
setup.py | 39 ++++++++++++++++++++++++++++-----------
|
||||
1 file changed, 28 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 3b5f4a5..cb2fbbe 100644
|
||||
index fdf5ac5..fff0039 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -894,13 +894,21 @@ class PyBuildExt(build_ext):
|
||||
@@ -989,13 +989,21 @@ class PyBuildExt(build_ext):
|
||||
if (self.config_h_vars.get('FLOCK_NEEDS_LIBBSD', False)):
|
||||
# May be necessary on AIX for flock function
|
||||
libs = ['bsd']
|
||||
@ -42,7 +42,7 @@ index 3b5f4a5..cb2fbbe 100644
|
||||
# spwd, shadow passwords
|
||||
if (self.config_h_vars.get('HAVE_GETSPNAM', False) or
|
||||
self.config_h_vars.get('HAVE_GETSPENT', False)):
|
||||
@@ -925,7 +933,10 @@ class PyBuildExt(build_ext):
|
||||
@@ -1017,7 +1025,10 @@ class PyBuildExt(build_ext):
|
||||
|
||||
# Lance Ellinghaus's syslog module
|
||||
# syslog daemon interface
|
||||
@ -54,20 +54,21 @@ index 3b5f4a5..cb2fbbe 100644
|
||||
|
||||
# Python interface to subinterpreter C-API.
|
||||
self.add(Extension('_xxsubinterpreters', ['_xxsubinterpretersmodule.c']))
|
||||
@@ -951,7 +962,10 @@ class PyBuildExt(build_ext):
|
||||
@@ -1043,8 +1054,11 @@ class PyBuildExt(build_ext):
|
||||
self.add(Extension('_csv', ['_csv.c']))
|
||||
|
||||
# POSIX subprocess module helper.
|
||||
- self.add(Extension('_posixsubprocess', ['_posixsubprocess.c']))
|
||||
- self.add(Extension('_posixsubprocess', ['_posixsubprocess.c'],
|
||||
+ if not MS_WINDOWS:
|
||||
+ self.add(Extension('_posixsubprocess', ['_posixsubprocess.c']))
|
||||
+ self.add(Extension('_posixsubprocess', ['_posixsubprocess.c'],
|
||||
extra_compile_args=['-DPy_BUILD_CORE_MODULE']))
|
||||
+ else:
|
||||
+ self.missing.append('_posixsubprocess')
|
||||
|
||||
def detect_test_extensions(self):
|
||||
# Python C API test module
|
||||
@@ -1133,13 +1147,16 @@ class PyBuildExt(build_ext):
|
||||
# the encryption.
|
||||
@@ -1236,12 +1250,15 @@ class PyBuildExt(build_ext):
|
||||
self.missing.append('_crypt')
|
||||
return
|
||||
|
||||
- if self.compiler.find_library_file(self.lib_dirs, 'crypt'):
|
||||
@ -80,10 +81,8 @@ index 3b5f4a5..cb2fbbe 100644
|
||||
+ else:
|
||||
+ libs = []
|
||||
|
||||
- self.add(Extension('_crypt', ['_cryptmodule.c'],
|
||||
- libraries=libs))
|
||||
+ self.add(Extension('_crypt', ['_cryptmodule.c'],
|
||||
+ libraries=libs))
|
||||
- self.add(Extension('_crypt', ['_cryptmodule.c'], libraries=libs))
|
||||
+ self.add(Extension('_crypt', ['_cryptmodule.c'], libraries=libs))
|
||||
+ else:
|
||||
+ self.missing.append('_crypt')
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
From 5b2e3721c924b8c5751e6ecf82e3d93e8cf5f1d4 Mon Sep 17 00:00:00 2001
|
||||
From 64fc6257258f36bdd65f163d38b7112cba7fc4b4 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?=
|
||||
<alexey.pawlow@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 18:51:33 +0530
|
||||
@ -16,10 +16,10 @@ Co-authored-by: Алексей <alexey.pawlow@gmail.com>
|
||||
4 files changed, 26 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Modules/_winapi.c b/Modules/_winapi.c
|
||||
index 1e0e4ec..1058184 100644
|
||||
index 3e24d51..e7e8c6a 100644
|
||||
--- a/Modules/_winapi.c
|
||||
+++ b/Modules/_winapi.c
|
||||
@@ -39,7 +39,9 @@
|
||||
@@ -41,7 +41,9 @@
|
||||
|
||||
#define WINDOWS_LEAN_AND_MEAN
|
||||
#include "windows.h"
|
||||
@ -30,7 +30,7 @@ index 1e0e4ec..1058184 100644
|
||||
|
||||
#if defined(MS_WIN32) && !defined(MS_WIN64)
|
||||
diff --git a/PC/msvcrtmodule.c b/PC/msvcrtmodule.c
|
||||
index faceb03..28e1957 100644
|
||||
index 0591497..74a4131 100644
|
||||
--- a/PC/msvcrtmodule.c
|
||||
+++ b/PC/msvcrtmodule.c
|
||||
@@ -21,7 +21,9 @@
|
||||
@ -57,10 +57,10 @@ index 7febaa0..70d5b3d 100644
|
||||
#endif
|
||||
|
||||
diff --git a/setup.py b/setup.py
|
||||
index cb2fbbe..7875daf 100644
|
||||
index fff0039..e3110e8 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -1609,6 +1609,27 @@ class PyBuildExt(build_ext):
|
||||
@@ -1699,6 +1699,27 @@ class PyBuildExt(build_ext):
|
||||
'-framework', 'SystemConfiguration',
|
||||
'-framework', 'CoreFoundation']))
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
From 8a33a26323d936a562a34490a2e9b866860be741 Mon Sep 17 00:00:00 2001
|
||||
From 199f619989a36e5e96fd65c2a5038abb1133c042 Mon Sep 17 00:00:00 2001
|
||||
From: Christoph Reiter <reiter.christoph@gmail.com>
|
||||
Date: Tue, 21 Sep 2021 20:52:42 +0200
|
||||
Subject: [PATCH 022/N] sysconfig: MINGW build extensions with GCC
|
||||
@ -8,10 +8,10 @@ Subject: [PATCH 022/N] sysconfig: MINGW build extensions with GCC
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
|
||||
index 45eab2a..42de9b3 100644
|
||||
index eadb99c..6381bcd 100644
|
||||
--- a/Lib/sysconfig.py
|
||||
+++ b/Lib/sysconfig.py
|
||||
@@ -657,6 +657,8 @@ def get_platform():
|
||||
@@ -709,6 +709,8 @@ def get_platform():
|
||||
|
||||
"""
|
||||
if os.name == 'nt':
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
From 04f236b4dca719e106d9d95928e4d05b8e03f9f1 Mon Sep 17 00:00:00 2001
|
||||
From 465cdd5bcdc843c7f74268646b23c61a71d64406 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?=
|
||||
<alexey.pawlow@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 18:51:37 +0530
|
||||
@ -13,13 +13,13 @@ Co-authored-by: Алексей <alexey.pawlow@gmail.com>
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 7875daf..c6ee784 100644
|
||||
index e3110e8..d799a02 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -2390,6 +2390,8 @@ class PyBuildExt(build_ext):
|
||||
openssl_includes = split_var('OPENSSL_INCLUDES', '-I')
|
||||
@@ -2510,6 +2510,8 @@ class PyBuildExt(build_ext):
|
||||
openssl_libdirs = split_var('OPENSSL_LDFLAGS', '-L')
|
||||
openssl_libs = split_var('OPENSSL_LIBS', '-l')
|
||||
openssl_rpath = config_vars.get('OPENSSL_RPATH')
|
||||
+ if MS_WINDOWS:
|
||||
+ openssl_libs += tuple(['ws2_32'])
|
||||
if not openssl_libs:
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
From e594bda07d9a2a36b80d43403336f487b06ccf71 Mon Sep 17 00:00:00 2001
|
||||
From d9d50d3dc8f2b192736ea8aa6578517e7b93d6ff Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?=
|
||||
<alexey.pawlow@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 18:51:38 +0530
|
||||
@ -9,33 +9,26 @@ Content-Transfer-Encoding: 8bit
|
||||
|
||||
Co-authored-by: Алексей <alexey.pawlow@gmail.com>
|
||||
---
|
||||
Lib/sysconfig.py | 15 +++++++++------
|
||||
1 file changed, 9 insertions(+), 6 deletions(-)
|
||||
Lib/sysconfig.py | 18 +++++++++++-------
|
||||
1 file changed, 11 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
|
||||
index 42de9b3..65cb345 100644
|
||||
index 6381bcd..c9ab982 100644
|
||||
--- a/Lib/sysconfig.py
|
||||
+++ b/Lib/sysconfig.py
|
||||
@@ -100,6 +100,9 @@ _BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix)
|
||||
_CONFIG_VARS = None
|
||||
_USER_BASE = None
|
||||
@@ -59,6 +59,11 @@ _INSTALL_SCHEMES = {
|
||||
},
|
||||
}
|
||||
|
||||
+# GCC[mingw*] use posix build system
|
||||
+_POSIX_BUILD = os.name == 'posix' or \
|
||||
+ (os.name == "nt" and 'GCC' in sys.version)
|
||||
+
|
||||
+
|
||||
|
||||
def _safe_realpath(path):
|
||||
try:
|
||||
@@ -183,7 +186,7 @@ def _expand_vars(scheme, vars):
|
||||
|
||||
|
||||
def _get_default_scheme():
|
||||
- if os.name == 'posix':
|
||||
+ if _POSIX_BUILD:
|
||||
# the default scheme for posix is posix_prefix
|
||||
return 'posix_prefix'
|
||||
return os.name
|
||||
@@ -199,7 +202,7 @@ def _getuserbase():
|
||||
# NOTE: site.py has copy of this function.
|
||||
# Sync it when modify this function.
|
||||
@@ -74,7 +79,7 @@ def _getuserbase():
|
||||
def joinuser(*args):
|
||||
return os.path.expanduser(os.path.join(*args))
|
||||
|
||||
@ -44,7 +37,24 @@ index 42de9b3..65cb345 100644
|
||||
base = os.environ.get("APPDATA") or "~"
|
||||
return joinuser(base, "Python")
|
||||
|
||||
@@ -505,7 +508,7 @@ def parse_config_h(fp, vars=None):
|
||||
@@ -137,7 +142,6 @@ _variable_rx = r"([a-zA-Z][a-zA-Z0-9_]+)\s*=\s*(.*)"
|
||||
_findvar1_rx = r"\$\(([A-Za-z][A-Za-z0-9_]*)\)"
|
||||
_findvar2_rx = r"\${([A-Za-z][A-Za-z0-9_]*)}"
|
||||
|
||||
-
|
||||
def _safe_realpath(path):
|
||||
try:
|
||||
return realpath(path)
|
||||
@@ -226,7 +230,7 @@ def _expand_vars(scheme, vars):
|
||||
|
||||
|
||||
def _get_preferred_schemes():
|
||||
- if os.name == 'nt':
|
||||
+ if os.name == 'nt' and not _POSIX_BUILD:
|
||||
return {
|
||||
'prefix': 'nt',
|
||||
'home': 'posix_home',
|
||||
@@ -553,7 +557,7 @@ def parse_config_h(fp, vars=None):
|
||||
def get_config_h_filename():
|
||||
"""Return the path of pyconfig.h."""
|
||||
if _PYTHON_BUILD:
|
||||
@ -53,20 +63,19 @@ index 42de9b3..65cb345 100644
|
||||
inc_dir = os.path.join(_sys_home or _PROJECT_BASE, "PC")
|
||||
else:
|
||||
inc_dir = _sys_home or _PROJECT_BASE
|
||||
@@ -577,10 +580,10 @@ def get_config_vars(*args):
|
||||
# sys.abiflags may not be defined on all platforms.
|
||||
_CONFIG_VARS['abiflags'] = ''
|
||||
@@ -629,9 +633,9 @@ def get_config_vars(*args):
|
||||
except AttributeError:
|
||||
_CONFIG_VARS['py_version_nodot_plat'] = ''
|
||||
|
||||
- if os.name == 'nt':
|
||||
+ if os.name == 'nt' and not _POSIX_BUILD:
|
||||
_init_non_posix(_CONFIG_VARS)
|
||||
_CONFIG_VARS['TZPATH'] = ''
|
||||
- if os.name == 'posix':
|
||||
+ if _POSIX_BUILD:
|
||||
_init_posix(_CONFIG_VARS)
|
||||
# For backward compatibility, see issue19555
|
||||
SO = _CONFIG_VARS.get('EXT_SUFFIX')
|
||||
@@ -593,7 +596,7 @@ def get_config_vars(*args):
|
||||
@@ -645,7 +649,7 @@ def get_config_vars(*args):
|
||||
|
||||
# Always convert srcdir to an absolute path
|
||||
srcdir = _CONFIG_VARS.get('srcdir', _PROJECT_BASE)
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
From 55f33ee5d61417f6fcd8c2e8df4d17ba875612fa Mon Sep 17 00:00:00 2001
|
||||
From caf8afbaa548a8bfe12bb9a8763d76c1cde7805f Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?=
|
||||
<alexey.pawlow@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 18:51:39 +0530
|
||||
@ -13,10 +13,10 @@ Co-authored-by: Алексей <alexey.pawlow@gmail.com>
|
||||
1 file changed, 19 insertions(+)
|
||||
|
||||
diff --git a/Modules/_ctypes/_ctypes.c b/Modules/_ctypes/_ctypes.c
|
||||
index 0ffc885..fbb5fb6 100644
|
||||
index 84378c4..723edd3 100644
|
||||
--- a/Modules/_ctypes/_ctypes.c
|
||||
+++ b/Modules/_ctypes/_ctypes.c
|
||||
@@ -3406,6 +3406,18 @@ static PPROC FindAddress(void *handle, const char *name, PyObject *type)
|
||||
@@ -3403,6 +3403,18 @@ static PPROC FindAddress(void *handle, const char *name, PyObject *type)
|
||||
mangled_name = alloca(strlen(name) + 1 + 1 + 1 + 3); /* \0 _ @ %d */
|
||||
if (!mangled_name)
|
||||
return NULL;
|
||||
@ -35,7 +35,7 @@ index 0ffc885..fbb5fb6 100644
|
||||
for (i = 0; i < 32; ++i) {
|
||||
sprintf(mangled_name, "_%s@%d", name, i*4);
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
@@ -3413,6 +3425,13 @@ static PPROC FindAddress(void *handle, const char *name, PyObject *type)
|
||||
@@ -3410,6 +3422,13 @@ static PPROC FindAddress(void *handle, const char *name, PyObject *type)
|
||||
Py_END_ALLOW_THREADS
|
||||
if (address)
|
||||
return address;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
From 69ec0e917c103159a8f2c7a2001aad2cbd43f5a6 Mon Sep 17 00:00:00 2001
|
||||
From 0d4f58fec360ebf5a926fd67fbeae77d97f3d9e9 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?=
|
||||
<alexey.pawlow@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 18:51:40 +0530
|
||||
@ -14,13 +14,13 @@ Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com>
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/setup.py b/setup.py
|
||||
index c6ee784..05f0bdf 100644
|
||||
index d799a02..022ca28 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -2611,7 +2611,7 @@ class PyBuildScripts(build_scripts):
|
||||
@@ -2754,7 +2754,7 @@ class PyBuildScripts(build_scripts):
|
||||
else:
|
||||
newfilename = filename + minoronly
|
||||
log.info('renaming %s to %s', filename, newfilename)
|
||||
log.info(f'renaming {filename} to {newfilename}')
|
||||
- os.rename(filename, newfilename)
|
||||
+ os.replace(filename, newfilename)
|
||||
newoutfiles.append(newfilename)
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
From 703e6a88ac8495cb18d104a6e933a72141e0e318 Mon Sep 17 00:00:00 2001
|
||||
From 3527bd92cf1fd57c220e8cb5aedd94a231d621f2 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?=
|
||||
<alexey.pawlow@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 18:51:42 +0530
|
||||
@ -10,42 +10,45 @@ Content-Transfer-Encoding: 8bit
|
||||
Co-authored-by: Алексей <alexey.pawlow@gmail.com>
|
||||
Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com>
|
||||
---
|
||||
Lib/site.py | 9 ++++++---
|
||||
1 file changed, 6 insertions(+), 3 deletions(-)
|
||||
Lib/site.py | 12 +++++++++---
|
||||
1 file changed, 9 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/Lib/site.py b/Lib/site.py
|
||||
index 9e617af..b344f03 100644
|
||||
index 939893e..e460a3d 100644
|
||||
--- a/Lib/site.py
|
||||
+++ b/Lib/site.py
|
||||
@@ -251,7 +251,8 @@ def _getuserbase():
|
||||
@@ -88,6 +88,12 @@ USER_SITE = None
|
||||
USER_BASE = None
|
||||
|
||||
|
||||
+# Same as defined in Lib/sysconfig.py
|
||||
+# redeclared since sysconfig is large for site.
|
||||
+# GCC[mingw*] use posix build system
|
||||
+_POSIX_BUILD = os.name == 'posix' or \
|
||||
+ (os.name == "nt" and 'GCC' in sys.version)
|
||||
+
|
||||
def _trace(message):
|
||||
if sys.flags.verbose:
|
||||
print(message, file=sys.stderr)
|
||||
@@ -273,7 +279,7 @@ def _getuserbase():
|
||||
def joinuser(*args):
|
||||
return os.path.expanduser(os.path.join(*args))
|
||||
|
||||
- if os.name == "nt":
|
||||
+ from sysconfig import _POSIX_BUILD
|
||||
+ if os.name == "nt" and not _POSIX_BUILD:
|
||||
base = os.environ.get("APPDATA") or "~"
|
||||
return joinuser(base, "Python")
|
||||
|
||||
@@ -266,7 +267,8 @@ def _getuserbase():
|
||||
@@ -288,7 +294,7 @@ def _getuserbase():
|
||||
def _get_path(userbase):
|
||||
version = sys.version_info
|
||||
|
||||
- if os.name == 'nt':
|
||||
+ from sysconfig import _POSIX_BUILD
|
||||
+ if sys.platform == 'win32' and not _POSIX_BUILD:
|
||||
return f'{userbase}\\Python{version[0]}{version[1]}\\site-packages'
|
||||
+ if os.name == 'nt' and not _POSIX_BUILD:
|
||||
ver_nodot = sys.winver.replace('.', '')
|
||||
return f'{userbase}\\Python{ver_nodot}\\site-packages'
|
||||
|
||||
if sys.platform == 'darwin' and sys._framework:
|
||||
@@ -329,6 +331,7 @@ def getsitepackages(prefixes=None):
|
||||
if prefixes is None:
|
||||
prefixes = PREFIXES
|
||||
|
||||
+ from sysconfig import _POSIX_BUILD
|
||||
for prefix in prefixes:
|
||||
if not prefix or prefix in seen:
|
||||
continue
|
||||
@@ -338,7 +341,7 @@ def getsitepackages(prefixes=None):
|
||||
@@ -365,7 +371,7 @@ def getsitepackages(prefixes=None):
|
||||
if sys.platlibdir != "lib":
|
||||
libdirs.append("lib")
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
From 7a8239aeb52e18e5e0b0a4c5b067ffe8ad209c14 Mon Sep 17 00:00:00 2001
|
||||
From d79feb22be5f7864c46ed6d65917f4104f04d525 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?=
|
||||
<alexey.pawlow@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 18:51:43 +0530
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
From c0e0b65b69b31df3e229fdb6941b6b5326df3859 Mon Sep 17 00:00:00 2001
|
||||
From a5d9fc9f4e198cf33ce1581fcf6cbc7945f31fa1 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?=
|
||||
<alexey.pawlow@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 18:51:44 +0530
|
||||
@ -13,7 +13,7 @@ Co-authored-by: Алексей <alexey.pawlow@gmail.com>
|
||||
1 file changed, 49 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 98a10d2..7a34f8b 100644
|
||||
index 40afa50..6941b57 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -387,6 +387,7 @@ if test -z "$MACHDEP"
|
||||
@ -70,7 +70,7 @@ index 98a10d2..7a34f8b 100644
|
||||
*)
|
||||
# for now, limit cross builds to known configurations
|
||||
MACHDEP="unknown"
|
||||
@@ -1662,6 +1686,26 @@ AC_SUBST(BASECFLAGS)
|
||||
@@ -1659,6 +1683,26 @@ AC_SUBST(BASECFLAGS)
|
||||
AC_SUBST(CFLAGS_NODIST)
|
||||
AC_SUBST(LDFLAGS_NODIST)
|
||||
|
||||
@ -97,7 +97,7 @@ index 98a10d2..7a34f8b 100644
|
||||
# The -arch flags for universal builds on macOS
|
||||
UNIVERSAL_ARCH_FLAGS=
|
||||
AC_SUBST(UNIVERSAL_ARCH_FLAGS)
|
||||
@@ -2040,7 +2084,7 @@ yes)
|
||||
@@ -2037,7 +2081,7 @@ yes)
|
||||
;;
|
||||
esac
|
||||
else
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
From 3044343edac3e0ecd86b4e70696876b700d5079b Mon Sep 17 00:00:00 2001
|
||||
From cb8b68040b1932c4a2778acbbc734c7140c59ef9 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?=
|
||||
<alexey.pawlow@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 18:51:45 +0530
|
||||
@ -13,10 +13,10 @@ Co-authored-by: Алексей <alexey.pawlow@gmail.com>
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 05f0bdf..8453b28 100644
|
||||
index 022ca28..0ce7288 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -2250,6 +2250,8 @@ class PyBuildExt(build_ext):
|
||||
@@ -2369,6 +2369,8 @@ class PyBuildExt(build_ext):
|
||||
ext.libraries.append(ffi_lib)
|
||||
if MS_WINDOWS:
|
||||
ext.libraries.extend(['ole32', 'oleaut32', 'uuid'])
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
From 29f0955c791e24aa2fc4fb2006e5d7b5d22f5c3a Mon Sep 17 00:00:00 2001
|
||||
From 6070d400d8dbcc9fac45292669cf1b6894a27298 Mon Sep 17 00:00:00 2001
|
||||
From: Ray Donnelly <mingw.android@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 18:51:46 +0530
|
||||
Subject: [PATCH 031/N] msys mingw prefer unix sep if MSYSTEM
|
||||
@ -8,17 +8,18 @@ Content-Transfer-Encoding: 8bit
|
||||
|
||||
Co-authored-by: Алексей <alexey.pawlow@gmail.com>
|
||||
Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com>
|
||||
Co-authored-by: cat <cat@wolfgirl.org>
|
||||
---
|
||||
Include/pylifecycle.h | 6 +++
|
||||
Lib/ntpath.py | 79 +++++++++++++++++-------------
|
||||
Include/pylifecycle.h | 6 ++
|
||||
Lib/ntpath.py | 79 +++++++++++++-----------
|
||||
Modules/posixmodule.c | 2 +
|
||||
Python/initconfig.c | 4 +-
|
||||
Python/pathconfig.c | 109 ++++++++++++++++++++++++++++++++++++++++++
|
||||
Python/pathconfig.c | 135 ++++++++++++++++++++++++++++++++++++++++++
|
||||
Python/traceback.c | 2 +-
|
||||
6 files changed, 165 insertions(+), 37 deletions(-)
|
||||
6 files changed, 191 insertions(+), 37 deletions(-)
|
||||
|
||||
diff --git a/Include/pylifecycle.h b/Include/pylifecycle.h
|
||||
index 783fcb4..4eec669 100644
|
||||
index 2df7fe6..17d403c 100644
|
||||
--- a/Include/pylifecycle.h
|
||||
+++ b/Include/pylifecycle.h
|
||||
@@ -21,6 +21,12 @@ PyAPI_FUNC(int) Py_IsInitialized(void);
|
||||
@ -35,7 +36,7 @@ index 783fcb4..4eec669 100644
|
||||
/* Py_PyAtExit is for the atexit module, Py_AtExit is for low-level
|
||||
* exit functions.
|
||||
diff --git a/Lib/ntpath.py b/Lib/ntpath.py
|
||||
index 6f77177..77f5614 100644
|
||||
index 527c7ae..1f1b441 100644
|
||||
--- a/Lib/ntpath.py
|
||||
+++ b/Lib/ntpath.py
|
||||
@@ -11,9 +11,7 @@ module as os.path.
|
||||
@ -154,7 +155,7 @@ index 6f77177..77f5614 100644
|
||||
splitext.__doc__ = genericpath._splitext.__doc__
|
||||
|
||||
|
||||
@@ -450,15 +465,13 @@ def expandvars(path):
|
||||
@@ -463,15 +478,13 @@ def expandvars(path):
|
||||
def normpath(path):
|
||||
"""Normalize path, eliminating double slashes, etc."""
|
||||
path = os.fspath(path)
|
||||
@ -172,7 +173,7 @@ index 6f77177..77f5614 100644
|
||||
curdir = '.'
|
||||
pardir = '..'
|
||||
special_prefixes = ('\\\\.\\', '\\\\?\\')
|
||||
@@ -668,6 +681,7 @@ else:
|
||||
@@ -683,6 +696,7 @@ else:
|
||||
# strip the prefix anyway.
|
||||
if ex.winerror == initial_winerror:
|
||||
path = spath
|
||||
@ -180,7 +181,7 @@ index 6f77177..77f5614 100644
|
||||
return path
|
||||
|
||||
|
||||
@@ -678,12 +692,11 @@ supports_unicode_filenames = (hasattr(sys, "getwindowsversion") and
|
||||
@@ -693,12 +707,11 @@ supports_unicode_filenames = (hasattr(sys, "getwindowsversion") and
|
||||
def relpath(path, start=None):
|
||||
"""Return a relative version of a path"""
|
||||
path = os.fspath(path)
|
||||
@ -194,7 +195,7 @@ index 6f77177..77f5614 100644
|
||||
curdir = '.'
|
||||
pardir = '..'
|
||||
|
||||
@@ -738,13 +751,11 @@ def commonpath(paths):
|
||||
@@ -753,13 +766,11 @@ def commonpath(paths):
|
||||
raise ValueError('commonpath() arg is an empty sequence')
|
||||
|
||||
paths = tuple(map(os.fspath, paths))
|
||||
@ -211,10 +212,10 @@ index 6f77177..77f5614 100644
|
||||
|
||||
try:
|
||||
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
|
||||
index c8b87a7..795ab7a 100644
|
||||
index 21bf71f..b40c0fe 100644
|
||||
--- a/Modules/posixmodule.c
|
||||
+++ b/Modules/posixmodule.c
|
||||
@@ -3769,6 +3769,7 @@ posix_getcwd(int use_bytes)
|
||||
@@ -3817,6 +3817,7 @@ posix_getcwd(int use_bytes)
|
||||
return PyErr_SetFromWindowsErr(0);
|
||||
}
|
||||
|
||||
@ -222,7 +223,7 @@ index c8b87a7..795ab7a 100644
|
||||
PyObject *resobj = PyUnicode_FromWideChar(wbuf2, len);
|
||||
if (wbuf2 != wbuf) {
|
||||
PyMem_RawFree(wbuf2);
|
||||
@@ -4332,6 +4333,7 @@ os__getfinalpathname_impl(PyObject *module, path_t *path)
|
||||
@@ -4380,6 +4381,7 @@ os__getfinalpathname_impl(PyObject *module, path_t *path)
|
||||
target_path = tmp;
|
||||
}
|
||||
|
||||
@ -231,19 +232,19 @@ index c8b87a7..795ab7a 100644
|
||||
if (result && path->narrow) {
|
||||
Py_SETREF(result, PyUnicode_EncodeFSDefault(result));
|
||||
diff --git a/Python/initconfig.c b/Python/initconfig.c
|
||||
index 116ee33..af46d26 100644
|
||||
index 0341e7b..46fce7e 100644
|
||||
--- a/Python/initconfig.c
|
||||
+++ b/Python/initconfig.c
|
||||
@@ -136,7 +136,7 @@ static const char usage_6[] =
|
||||
"PYTHONDEVMODE: enable the development mode.\n"
|
||||
"PYTHONPYCACHEPREFIX: root directory for bytecode cache (pyc) files.\n";
|
||||
@@ -132,7 +132,7 @@ static const char usage_6[] =
|
||||
"PYTHONPYCACHEPREFIX: root directory for bytecode cache (pyc) files.\n"
|
||||
"PYTHONWARNDEFAULTENCODING: enable opt-in EncodingWarning for 'encoding=None'.\n";
|
||||
|
||||
-#if defined(MS_WINDOWS)
|
||||
+#if defined(_MSC_VER)
|
||||
# define PYTHONHOMEHELP "<prefix>\\python{major}{minor}"
|
||||
#else
|
||||
# define PYTHONHOMEHELP "<prefix>/lib/pythonX.X"
|
||||
@@ -1187,7 +1187,7 @@ config_init_program_name(PyConfig *config)
|
||||
@@ -1535,7 +1535,7 @@ config_init_program_name(PyConfig *config)
|
||||
}
|
||||
|
||||
/* Last fall back: hardcoded name */
|
||||
@ -253,10 +254,10 @@ index 116ee33..af46d26 100644
|
||||
#else
|
||||
const wchar_t *default_program_name = L"python3";
|
||||
diff --git a/Python/pathconfig.c b/Python/pathconfig.c
|
||||
index b2ce86e..222850b 100644
|
||||
index 1017a57..e037791 100644
|
||||
--- a/Python/pathconfig.c
|
||||
+++ b/Python/pathconfig.c
|
||||
@@ -15,6 +15,114 @@
|
||||
@@ -15,6 +15,140 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -265,6 +266,30 @@ index b2ce86e..222850b 100644
|
||||
+#include <windows.h>
|
||||
+#endif
|
||||
+
|
||||
+static int
|
||||
+Py_StartsWithA(const char * str, const char * prefix)
|
||||
+{
|
||||
+ while(*prefix)
|
||||
+ {
|
||||
+ if(*prefix++ != *str++)
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+Py_StartsWithW(const wchar_t * str, const wchar_t * prefix)
|
||||
+{
|
||||
+ while(*prefix)
|
||||
+ {
|
||||
+ if(*prefix++ != *str++)
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+char
|
||||
+Py_GetSepA(const char *name)
|
||||
+{
|
||||
@ -275,7 +300,7 @@ index b2ce86e..222850b 100644
|
||||
+ * The "\\?\" prefix .. indicate that the path should be passed to the system with minimal
|
||||
+ * modification, which means that you cannot use forward slashes to represent path separators
|
||||
+ */
|
||||
+ if (name != NULL && memcmp(name, "\\\\?\\", sizeof("\\\\?\\") - sizeof(char)) == 0)
|
||||
+ if (name != NULL && Py_StartsWithA(name, "\\\\?\\") != 0)
|
||||
+ {
|
||||
+ return '\\';
|
||||
+ }
|
||||
@ -304,10 +329,11 @@ index b2ce86e..222850b 100644
|
||||
+void
|
||||
+Py_NormalizeSepsA(char *name)
|
||||
+{
|
||||
+ assert(name != NULL);
|
||||
+ char sep = Py_GetSepA(name);
|
||||
+ char altsep = Py_GetAltSepA(name);
|
||||
+ char* seps;
|
||||
+ if (strlen(name) > 1 && name[1] == ':') {
|
||||
+ if (name[0] != '\0' && name[1] == ':') {
|
||||
+ name[0] = toupper(name[0]);
|
||||
+ }
|
||||
+ seps = strchr(name, altsep);
|
||||
@ -327,7 +353,7 @@ index b2ce86e..222850b 100644
|
||||
+ * The "\\?\" prefix .. indicate that the path should be passed to the system with minimal
|
||||
+ * modification, which means that you cannot use forward slashes to represent path separators
|
||||
+ */
|
||||
+ if (name != NULL && memcmp(name, L"\\\\?\\", sizeof(L"\\\\?\\") - sizeof(wchar_t)) == 0)
|
||||
+ if (name != NULL && Py_StartsWithW(name, L"\\\\?\\") != 0)
|
||||
+ {
|
||||
+ return L'\\';
|
||||
+ }
|
||||
@ -356,10 +382,11 @@ index b2ce86e..222850b 100644
|
||||
+void
|
||||
+Py_NormalizeSepsW(wchar_t *name)
|
||||
+{
|
||||
+ assert(name != NULL);
|
||||
+ wchar_t sep = Py_GetSepW(name);
|
||||
+ wchar_t altsep = Py_GetAltSepW(name);
|
||||
+ wchar_t* seps;
|
||||
+ if (wcslen(name) > 1 && name[1] == L':') {
|
||||
+ if (name[0] != L'\0' && name[1] == L':') {
|
||||
+ name[0] = towupper(name[0]);
|
||||
+ }
|
||||
+ seps = wcschr(name, altsep);
|
||||
@ -371,7 +398,7 @@ index b2ce86e..222850b 100644
|
||||
|
||||
_PyPathConfig _Py_path_config = _PyPathConfig_INIT;
|
||||
|
||||
@@ -541,6 +649,7 @@ _Py_SetProgramFullPath(const wchar_t *program_full_path)
|
||||
@@ -562,6 +696,7 @@ _Py_SetProgramFullPath(const wchar_t *program_full_path)
|
||||
if (_Py_path_config.program_full_path == NULL) {
|
||||
path_out_of_memory(__func__);
|
||||
}
|
||||
@ -380,10 +407,10 @@ index b2ce86e..222850b 100644
|
||||
|
||||
|
||||
diff --git a/Python/traceback.c b/Python/traceback.c
|
||||
index 23d0e38..37a7670 100644
|
||||
index 7d6f7f4..f49a606 100644
|
||||
--- a/Python/traceback.c
|
||||
+++ b/Python/traceback.c
|
||||
@@ -314,7 +314,7 @@ _Py_FindSourceFile(PyObject *filename, char* namebuf, size_t namelen, PyObject *
|
||||
@@ -315,7 +315,7 @@ _Py_FindSourceFile(PyObject *filename, char* namebuf, size_t namelen, PyObject *
|
||||
filepath = PyBytes_AS_STRING(filebytes);
|
||||
|
||||
/* Search tail of filename in sys.path before giving up */
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
From 14ca4c5c92a2a747e6bf8846582df6d4089e7fa5 Mon Sep 17 00:00:00 2001
|
||||
From d395585e2ae03e557dc30ad03bd4e8aa59443952 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?=
|
||||
<alexey.pawlow@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 18:51:47 +0530
|
||||
@ -12,17 +12,17 @@ Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com>
|
||||
---
|
||||
Include/cpython/fileutils.h | 3 +-
|
||||
Include/pylifecycle.h | 2 +-
|
||||
Modules/getpath.c | 131 +++++++++++++++++++++++++++++++++---
|
||||
Modules/getpath.c | 130 +++++++++++++++++++++++++++++++++---
|
||||
Modules/posixmodule.c | 2 +-
|
||||
Python/dynload_win.c | 2 +
|
||||
Python/fileutils.c | 22 +++++-
|
||||
6 files changed, 146 insertions(+), 16 deletions(-)
|
||||
6 files changed, 145 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/Include/cpython/fileutils.h b/Include/cpython/fileutils.h
|
||||
index e79d03e..c222833 100644
|
||||
index ccf37e9..c287ab3 100644
|
||||
--- a/Include/cpython/fileutils.h
|
||||
+++ b/Include/cpython/fileutils.h
|
||||
@@ -136,9 +136,8 @@ PyAPI_FUNC(wchar_t*) _Py_wrealpath(
|
||||
@@ -135,9 +135,8 @@ PyAPI_FUNC(wchar_t*) _Py_wrealpath(
|
||||
size_t resolved_path_len);
|
||||
#endif
|
||||
|
||||
@ -34,10 +34,10 @@ index e79d03e..c222833 100644
|
||||
PyAPI_FUNC(int) _Py_abspath(const wchar_t *path, wchar_t **abspath_p);
|
||||
|
||||
diff --git a/Include/pylifecycle.h b/Include/pylifecycle.h
|
||||
index 4eec669..b34f110 100644
|
||||
index 17d403c..ce3f411 100644
|
||||
--- a/Include/pylifecycle.h
|
||||
+++ b/Include/pylifecycle.h
|
||||
@@ -55,7 +55,7 @@ PyAPI_FUNC(wchar_t *) Py_GetPrefix(void);
|
||||
@@ -52,7 +52,7 @@ PyAPI_FUNC(wchar_t *) Py_GetPrefix(void);
|
||||
PyAPI_FUNC(wchar_t *) Py_GetExecPrefix(void);
|
||||
PyAPI_FUNC(wchar_t *) Py_GetPath(void);
|
||||
PyAPI_FUNC(void) Py_SetPath(const wchar_t *);
|
||||
@ -47,7 +47,7 @@ index 4eec669..b34f110 100644
|
||||
#endif
|
||||
|
||||
diff --git a/Modules/getpath.c b/Modules/getpath.c
|
||||
index 5dbe57c..bede134 100644
|
||||
index ef6dd59..4cb6738 100644
|
||||
--- a/Modules/getpath.c
|
||||
+++ b/Modules/getpath.c
|
||||
@@ -13,6 +13,11 @@
|
||||
@ -335,16 +335,15 @@ index 5dbe57c..bede134 100644
|
||||
|
||||
reduce(calculate->argv0_path);
|
||||
|
||||
@@ -1329,6 +1416,8 @@ calculate_zip_path(PyCalculatePath *calculate)
|
||||
calculate->zip_path[len - 6] = VERSION[0];
|
||||
calculate->zip_path[len - 5] = VERSION[2];
|
||||
@@ -1324,6 +1411,7 @@ calculate_zip_path(PyCalculatePath *calculate)
|
||||
goto done;
|
||||
}
|
||||
|
||||
+ Py_NormalizeSepsW(calculate->zip_path);
|
||||
+
|
||||
res = _PyStatus_OK();
|
||||
|
||||
done:
|
||||
@@ -1368,7 +1457,14 @@ calculate_module_search_path(PyCalculatePath *calculate,
|
||||
@@ -1363,7 +1451,14 @@ calculate_module_search_path(PyCalculatePath *calculate,
|
||||
}
|
||||
|
||||
bufsz += wcslen(calculate->zip_path) + 1;
|
||||
@ -359,7 +358,7 @@ index 5dbe57c..bede134 100644
|
||||
|
||||
/* Allocate the buffer */
|
||||
wchar_t *buf = PyMem_RawMalloc(bufsz * sizeof(wchar_t));
|
||||
@@ -1396,7 +1492,7 @@ calculate_module_search_path(PyCalculatePath *calculate,
|
||||
@@ -1391,7 +1486,7 @@ calculate_module_search_path(PyCalculatePath *calculate,
|
||||
|
||||
if (!_Py_isabs(defpath)) {
|
||||
wcscat(buf, calculate->prefix);
|
||||
@ -368,7 +367,7 @@ index 5dbe57c..bede134 100644
|
||||
defpath[0] != (delim ? DELIM : L'\0'))
|
||||
{
|
||||
/* not empty */
|
||||
@@ -1418,8 +1514,15 @@ calculate_module_search_path(PyCalculatePath *calculate,
|
||||
@@ -1413,8 +1508,15 @@ calculate_module_search_path(PyCalculatePath *calculate,
|
||||
}
|
||||
wcscat(buf, delimiter);
|
||||
|
||||
@ -384,7 +383,7 @@ index 5dbe57c..bede134 100644
|
||||
|
||||
pathconfig->module_search_path = buf;
|
||||
return _PyStatus_OK();
|
||||
@@ -1448,14 +1551,17 @@ calculate_init(PyCalculatePath *calculate, const PyConfig *config)
|
||||
@@ -1443,14 +1545,17 @@ calculate_init(PyCalculatePath *calculate, const PyConfig *config)
|
||||
if (!calculate->pythonpath_macro) {
|
||||
return DECODE_LOCALE_ERR("PYTHONPATH macro", len);
|
||||
}
|
||||
@ -402,7 +401,7 @@ index 5dbe57c..bede134 100644
|
||||
calculate->vpath_macro = Py_DecodeLocale(VPATH, &len);
|
||||
if (!calculate->vpath_macro) {
|
||||
return DECODE_LOCALE_ERR("VPATH macro", len);
|
||||
@@ -1466,6 +1572,7 @@ calculate_init(PyCalculatePath *calculate, const PyConfig *config)
|
||||
@@ -1461,6 +1566,7 @@ calculate_init(PyCalculatePath *calculate, const PyConfig *config)
|
||||
if (!pyversion) {
|
||||
return DECODE_LOCALE_ERR("VERSION macro", len);
|
||||
}
|
||||
@ -410,7 +409,7 @@ index 5dbe57c..bede134 100644
|
||||
calculate->lib_python = joinpath2(config->platlibdir, pyversion);
|
||||
PyMem_RawFree(pyversion);
|
||||
if (calculate->lib_python == NULL) {
|
||||
@@ -1482,6 +1589,7 @@ calculate_free(PyCalculatePath *calculate)
|
||||
@@ -1477,6 +1583,7 @@ calculate_free(PyCalculatePath *calculate)
|
||||
PyMem_RawFree(calculate->pythonpath_macro);
|
||||
PyMem_RawFree(calculate->prefix_macro);
|
||||
PyMem_RawFree(calculate->exec_prefix_macro);
|
||||
@ -418,7 +417,7 @@ index 5dbe57c..bede134 100644
|
||||
PyMem_RawFree(calculate->vpath_macro);
|
||||
PyMem_RawFree(calculate->lib_python);
|
||||
PyMem_RawFree(calculate->path_env);
|
||||
@@ -1497,6 +1605,8 @@ calculate_path(PyCalculatePath *calculate, _PyPathConfig *pathconfig)
|
||||
@@ -1492,6 +1599,8 @@ calculate_path(PyCalculatePath *calculate, _PyPathConfig *pathconfig)
|
||||
{
|
||||
PyStatus status;
|
||||
|
||||
@ -427,7 +426,7 @@ index 5dbe57c..bede134 100644
|
||||
if (pathconfig->program_full_path == NULL) {
|
||||
status = calculate_program(calculate, pathconfig);
|
||||
if (_PyStatus_EXCEPTION(status)) {
|
||||
@@ -1597,6 +1707,7 @@ _PyPathConfig_Calculate(_PyPathConfig *pathconfig, const PyConfig *config)
|
||||
@@ -1592,6 +1701,7 @@ _PyPathConfig_Calculate(_PyPathConfig *pathconfig, const PyConfig *config)
|
||||
{
|
||||
PyStatus status;
|
||||
PyCalculatePath calculate;
|
||||
@ -436,10 +435,10 @@ index 5dbe57c..bede134 100644
|
||||
|
||||
status = calculate_init(&calculate, config);
|
||||
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
|
||||
index 795ab7a..e636aed 100644
|
||||
index b40c0fe..545fd4c 100644
|
||||
--- a/Modules/posixmodule.c
|
||||
+++ b/Modules/posixmodule.c
|
||||
@@ -4059,7 +4059,7 @@ _listdir_windows_no_opendir(path_t *path, PyObject *list)
|
||||
@@ -4107,7 +4107,7 @@ _listdir_windows_no_opendir(path_t *path, PyObject *list)
|
||||
Py_END_ALLOW_THREADS
|
||||
/* FindNextFile sets error to ERROR_NO_MORE_FILES if
|
||||
it got to the end of the directory. */
|
||||
@ -449,24 +448,24 @@ index 795ab7a..e636aed 100644
|
||||
list = path_error(path);
|
||||
goto exit;
|
||||
diff --git a/Python/dynload_win.c b/Python/dynload_win.c
|
||||
index 9d7690e..bd34310 100644
|
||||
index 6b53780..1083fe8 100644
|
||||
--- a/Python/dynload_win.c
|
||||
+++ b/Python/dynload_win.c
|
||||
@@ -174,7 +174,9 @@ dl_funcptr _PyImport_FindSharedFuncptrWindows(const char *prefix,
|
||||
@@ -173,7 +173,9 @@ dl_funcptr _PyImport_FindSharedFuncptrWindows(const char *prefix,
|
||||
dl_funcptr p;
|
||||
char funcname[258], *import_python;
|
||||
const wchar_t *wpathname;
|
||||
|
||||
+#if defined(_MSC_VER)
|
||||
_Py_CheckPython3();
|
||||
+#endif
|
||||
|
||||
_Py_COMP_DIAG_PUSH
|
||||
_Py_COMP_DIAG_IGNORE_DEPR_DECLS
|
||||
#if USE_UNICODE_WCHAR_CACHE
|
||||
const wchar_t *wpathname = _PyUnicode_AsUnicode(pathname);
|
||||
diff --git a/Python/fileutils.c b/Python/fileutils.c
|
||||
index 26e97df..75ee355 100644
|
||||
index 3b53baa..1ee5476 100644
|
||||
--- a/Python/fileutils.c
|
||||
+++ b/Python/fileutils.c
|
||||
@@ -1937,13 +1937,31 @@ _Py_wrealpath(const wchar_t *path,
|
||||
@@ -1976,13 +1976,31 @@ _Py_wrealpath(const wchar_t *path,
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
From cb84ca520926c2f87a5af41b96f2e38fac9002dd Mon Sep 17 00:00:00 2001
|
||||
From b35c7f11a9c0b3c223b2322ec5ccc4e89eb7988b Mon Sep 17 00:00:00 2001
|
||||
From: Ray Donnelly <mingw.android@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 18:51:48 +0530
|
||||
Subject: [PATCH 033/N] mingw add ModuleFileName dir to PATH
|
||||
@ -13,10 +13,10 @@ Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com>
|
||||
1 file changed, 30 insertions(+)
|
||||
|
||||
diff --git a/Modules/getpath.c b/Modules/getpath.c
|
||||
index bede134..c782e0f 100644
|
||||
index 4cb6738..e05787b 100644
|
||||
--- a/Modules/getpath.c
|
||||
+++ b/Modules/getpath.c
|
||||
@@ -1641,6 +1641,36 @@ calculate_path(PyCalculatePath *calculate, _PyPathConfig *pathconfig)
|
||||
@@ -1635,6 +1635,36 @@ calculate_path(PyCalculatePath *calculate, _PyPathConfig *pathconfig)
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
From b25ee30c36845a29d62e6b4f50c6472c6684f32a Mon Sep 17 00:00:00 2001
|
||||
From 9f6079330789af8fa8086282fa2d0bb1a7a373fc Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?=
|
||||
<alexey.pawlow@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 18:51:49 +0530
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
From 1177fe35e702c369da975f6ccb7064e800dc7d4b Mon Sep 17 00:00:00 2001
|
||||
From 8ed66f65ecda3ccdb1e23bc203823e5ad66dd846 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?=
|
||||
<alexey.pawlow@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 18:51:50 +0530
|
||||
@ -15,10 +15,10 @@ Co-authored-by: Алексей <alexey.pawlow@gmail.com>
|
||||
3 files changed, 74 insertions(+)
|
||||
|
||||
diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
|
||||
index 65cb345..f69d0db 100644
|
||||
index c9ab982..5c3b03c 100644
|
||||
--- a/Lib/sysconfig.py
|
||||
+++ b/Lib/sysconfig.py
|
||||
@@ -337,6 +337,14 @@ def _parse_makefile(filename, vars=None):
|
||||
@@ -386,6 +386,14 @@ def _parse_makefile(filename, vars=None, keep_unresolved=True):
|
||||
if isinstance(v, str):
|
||||
done[k] = v.strip()
|
||||
|
||||
@ -34,7 +34,7 @@ index 65cb345..f69d0db 100644
|
||||
vars.update(done)
|
||||
return vars
|
||||
diff --git a/Makefile.pre.in b/Makefile.pre.in
|
||||
index 1c46d07..3d42756 100644
|
||||
index 8b0b178..2d10ccd 100644
|
||||
--- a/Makefile.pre.in
|
||||
+++ b/Makefile.pre.in
|
||||
@@ -136,6 +136,13 @@ exec_prefix= @exec_prefix@
|
||||
@ -52,10 +52,10 @@ index 1c46d07..3d42756 100644
|
||||
BINDIR= @bindir@
|
||||
LIBDIR= @libdir@
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 7a34f8b..8965c63 100644
|
||||
index 6941b57..b6debe0 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -618,6 +618,65 @@ then
|
||||
@@ -608,6 +608,65 @@ then
|
||||
AC_DEFINE(_INCLUDE__STDC_A1_SOURCE, 1, Define to include mbstate_t for mbrtowc)
|
||||
fi
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
From 99e889f533148e3088b717cf7a31ec0326d76c5a Mon Sep 17 00:00:00 2001
|
||||
From 45e8c2898b56a47f7452d87d90cb6b59440b4c52 Mon Sep 17 00:00:00 2001
|
||||
From: Christoph Reiter <reiter.christoph@gmail.com>
|
||||
Date: Tue, 21 Sep 2021 20:53:59 +0200
|
||||
Subject: [PATCH 036/N] sysconfig: mingw sysconfig like posix
|
||||
@ -8,10 +8,10 @@ Subject: [PATCH 036/N] sysconfig: mingw sysconfig like posix
|
||||
1 file changed, 14 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
|
||||
index f69d0db..64f7719 100644
|
||||
index 5c3b03c..d435b40 100644
|
||||
--- a/Lib/sysconfig.py
|
||||
+++ b/Lib/sysconfig.py
|
||||
@@ -48,23 +48,23 @@ _INSTALL_SCHEMES = {
|
||||
@@ -48,13 +48,13 @@ _INSTALL_SCHEMES = {
|
||||
'data': '{base}',
|
||||
},
|
||||
'nt': {
|
||||
@ -31,32 +31,35 @@ index f69d0db..64f7719 100644
|
||||
+ 'scripts': '{base}/bin',
|
||||
'data': '{base}',
|
||||
},
|
||||
# NOTE: When modifying "purelib" scheme, update site._get_path() too.
|
||||
'nt_user': {
|
||||
- 'stdlib': '{userbase}/Python{py_version_nodot}',
|
||||
- 'platstdlib': '{userbase}/Python{py_version_nodot}',
|
||||
- 'purelib': '{userbase}/Python{py_version_nodot}/site-packages',
|
||||
- 'platlib': '{userbase}/Python{py_version_nodot}/site-packages',
|
||||
- 'include': '{userbase}/Python{py_version_nodot}/Include',
|
||||
- 'scripts': '{userbase}/Python{py_version_nodot}/Scripts',
|
||||
+ 'stdlib': '{userbase}/lib/python{py_version_short}',
|
||||
+ 'platstdlib': '{userbase}/lib/python{py_version_short}',
|
||||
+ 'purelib': '{userbase}/lib/python{py_version_short}/site-packages',
|
||||
+ 'platlib': '{userbase}/lib/python{py_version_short}/site-packages',
|
||||
+ 'include': '{userbase}/include/python{py_version_short}',
|
||||
+ 'scripts': '{userbase}/bin',
|
||||
'data': '{userbase}',
|
||||
},
|
||||
'posix_user': {
|
||||
@@ -471,7 +471,7 @@ def _init_non_posix(vars):
|
||||
}
|
||||
@@ -95,12 +95,12 @@ if _HAS_USER_BASE:
|
||||
_INSTALL_SCHEMES |= {
|
||||
# NOTE: When modifying "purelib" scheme, update site._get_path() too.
|
||||
'nt_user': {
|
||||
- 'stdlib': '{userbase}/Python{py_version_nodot_plat}',
|
||||
- 'platstdlib': '{userbase}/Python{py_version_nodot_plat}',
|
||||
- 'purelib': '{userbase}/Python{py_version_nodot_plat}/site-packages',
|
||||
- 'platlib': '{userbase}/Python{py_version_nodot_plat}/site-packages',
|
||||
- 'include': '{userbase}/Python{py_version_nodot_plat}/Include',
|
||||
- 'scripts': '{userbase}/Python{py_version_nodot_plat}/Scripts',
|
||||
+ 'stdlib': '{userbase}/lib/python{py_version_short}',
|
||||
+ 'platstdlib': '{userbase}/lib/python{py_version_short}',
|
||||
+ 'purelib': '{userbase}/lib/python{py_version_short}/site-packages',
|
||||
+ 'platlib': '{userbase}/lib/python{py_version_short}/site-packages',
|
||||
+ 'include': '{userbase}/include/python{py_version_short}',
|
||||
+ 'scripts': '{userbase}/bin',
|
||||
'data': '{userbase}',
|
||||
},
|
||||
'posix_user': {
|
||||
@@ -519,7 +519,7 @@ def _init_non_posix(vars):
|
||||
vars['INCLUDEPY'] = get_path('include')
|
||||
vars['EXT_SUFFIX'] = _imp.extension_suffixes()[0]
|
||||
vars['EXE'] = '.exe'
|
||||
- vars['VERSION'] = _PY_VERSION_SHORT_NO_DOT
|
||||
+ vars['VERSION'] = _PY_VERSION_SHORT
|
||||
vars['BINDIR'] = os.path.dirname(_safe_realpath(sys.executable))
|
||||
vars['TZPATH'] = ''
|
||||
|
||||
#
|
||||
--
|
||||
2.36.1
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
From 785321b701049a8f8ef54bde52ff827963d291b1 Mon Sep 17 00:00:00 2001
|
||||
From 41cce9e486343283d7e9e8a7939b19ecf3f29276 Mon Sep 17 00:00:00 2001
|
||||
From: Christoph Reiter <reiter.christoph@gmail.com>
|
||||
Date: Tue, 21 Sep 2021 21:13:57 +0200
|
||||
Subject: [PATCH 037/N] build _winapi earlier so we can use it in distutils
|
||||
@ -20,10 +20,10 @@ index 825ce5d..b4e7ff7 100644
|
||||
+@USE_WIN32_MODULE@_winapi _winapi.c
|
||||
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 8453b28..eb90e21 100644
|
||||
index 0ce7288..e36dd4f 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -1617,7 +1617,9 @@ class PyBuildExt(build_ext):
|
||||
@@ -1707,7 +1707,9 @@ class PyBuildExt(build_ext):
|
||||
self.add(Extension('msvcrt', [os.path.join(pc_srcdir, p)
|
||||
for p in ['msvcrtmodule.c']]))
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
From 4d09a127f4be052ebe6e1e0e9220da200a8d9549 Mon Sep 17 00:00:00 2001
|
||||
From 7e52afabdbaf3354f995664947535b9e43fbacf2 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?=
|
||||
<alexey.pawlow@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 18:51:52 +0530
|
||||
@ -13,10 +13,10 @@ Co-authored-by: Алексей <alexey.pawlow@gmail.com>
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/setup.py b/setup.py
|
||||
index eb90e21..7d6ad97 100644
|
||||
index e36dd4f..1eb8b40 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -742,10 +742,10 @@ class PyBuildExt(build_ext):
|
||||
@@ -832,10 +832,10 @@ class PyBuildExt(build_ext):
|
||||
if not CROSS_COMPILING:
|
||||
add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
|
||||
add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
From 5e87c3c70e3b4297c8763ab3ac6cbe029b25e332 Mon Sep 17 00:00:00 2001
|
||||
From fcbb7bd0a509c8b96b6f8ceaa969d92379a833dd Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?=
|
||||
<alexey.pawlow@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 18:51:53 +0530
|
||||
@ -13,7 +13,7 @@ Co-authored-by: Алексей <alexey.pawlow@gmail.com>
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/Lib/compileall.py b/Lib/compileall.py
|
||||
index 25ad83c..f57879e 100644
|
||||
index 3755e76..046efbf 100644
|
||||
--- a/Lib/compileall.py
|
||||
+++ b/Lib/compileall.py
|
||||
@@ -38,6 +38,8 @@ def _walk_dir(dir, maxlevels, quiet=0):
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
From 296466bbca4585fe73f74ad4a97b90f6f9b653bb Mon Sep 17 00:00:00 2001
|
||||
From 21ef73c204327ccd8782323bd98e8a6dd7925c46 Mon Sep 17 00:00:00 2001
|
||||
From: Christoph Reiter <reiter.christoph@gmail.com>
|
||||
Date: Tue, 21 Sep 2021 21:18:36 +0200
|
||||
Subject: [PATCH 040/N] msys convert_path fix and root hack
|
||||
@ -8,10 +8,10 @@ Subject: [PATCH 040/N] msys convert_path fix and root hack
|
||||
1 file changed, 9 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/Makefile.pre.in b/Makefile.pre.in
|
||||
index 3d42756..d00acbd 100644
|
||||
index 2d10ccd..1610c7e 100644
|
||||
--- a/Makefile.pre.in
|
||||
+++ b/Makefile.pre.in
|
||||
@@ -1706,6 +1706,12 @@ libainstall: @DEF_MAKE_RULE@ python-config
|
||||
@@ -1759,6 +1759,12 @@ libainstall: @DEF_MAKE_RULE@ python-config
|
||||
else true; \
|
||||
fi
|
||||
|
||||
@ -24,7 +24,7 @@ index 3d42756..d00acbd 100644
|
||||
# Install the dynamically loadable modules
|
||||
# This goes into $(exec_prefix)
|
||||
sharedinstall: sharedmods
|
||||
@@ -1713,9 +1719,9 @@ sharedinstall: sharedmods
|
||||
@@ -1766,9 +1772,9 @@ sharedinstall: sharedmods
|
||||
--prefix=$(prefix) \
|
||||
--install-scripts=$(BINDIR) \
|
||||
--install-platlib=$(DESTSHARED) \
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
From 02c961194aa314e853997f4c0557e899159c9a0a Mon Sep 17 00:00:00 2001
|
||||
From 41ffea6f968c0ad38b5c53ad4a1d035d4ee2e648 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?=
|
||||
<alexey.pawlow@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 18:51:54 +0530
|
||||
@ -13,10 +13,10 @@ Co-authored-by: Алексей <alexey.pawlow@gmail.com>
|
||||
1 file changed, 25 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 7d6ad97..dfa9e45 100644
|
||||
index 1eb8b40..08d6c17 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -791,7 +791,7 @@ class PyBuildExt(build_ext):
|
||||
@@ -881,7 +881,7 @@ class PyBuildExt(build_ext):
|
||||
if HOST_PLATFORM == 'hp-ux11':
|
||||
self.lib_dirs += ['/usr/lib/hpux64', '/usr/lib/hpux32']
|
||||
|
||||
@ -25,7 +25,7 @@ index 7d6ad97..dfa9e45 100644
|
||||
# This should work on any unixy platform ;-)
|
||||
# If the user has bothered specifying additional -I and -L flags
|
||||
# in OPT and LDFLAGS we might as well use them here.
|
||||
@@ -801,6 +801,8 @@ class PyBuildExt(build_ext):
|
||||
@@ -891,6 +891,8 @@ class PyBuildExt(build_ext):
|
||||
# directories with whitespace in the name to store libraries.
|
||||
cflags, ldflags = sysconfig.get_config_vars(
|
||||
'CFLAGS', 'LDFLAGS')
|
||||
@ -34,7 +34,7 @@ index 7d6ad97..dfa9e45 100644
|
||||
for item in cflags.split():
|
||||
if item.startswith('-I'):
|
||||
self.inc_dirs.append(item[2:])
|
||||
@@ -2051,14 +2053,19 @@ class PyBuildExt(build_ext):
|
||||
@@ -2170,14 +2172,19 @@ class PyBuildExt(build_ext):
|
||||
# The versions with dots are used on Unix, and the versions without
|
||||
# dots on Windows, for detection by cygwin.
|
||||
tcllib = tklib = tcl_includes = tk_includes = None
|
||||
@ -62,7 +62,7 @@ index 7d6ad97..dfa9e45 100644
|
||||
break
|
||||
|
||||
# Now check for the header files
|
||||
@@ -2129,10 +2136,18 @@ class PyBuildExt(build_ext):
|
||||
@@ -2248,10 +2255,18 @@ class PyBuildExt(build_ext):
|
||||
# Add the Tcl/Tk libraries
|
||||
libs.append('tk'+ version)
|
||||
libs.append('tcl'+ version)
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
From bc1c77f8709f8cd85f8fb877db36d543d6e811d5 Mon Sep 17 00:00:00 2001
|
||||
From ca96f71268cf0a68abc6a420b78230b78c9e24b3 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?=
|
||||
<alexey.pawlow@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 18:51:55 +0530
|
||||
|
||||
@ -1,45 +0,0 @@
|
||||
From 0b847e9a097c47ccb1ff327df912ef0c4670131d Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?=
|
||||
<alexey.pawlow@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 18:51:56 +0530
|
||||
Subject: [PATCH 043/N] grammar fixes
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Co-authored-by: Алексей <alexey.pawlow@gmail.com>
|
||||
---
|
||||
Modules/parsermodule.c | 2 +-
|
||||
Python/graminit.c | 3 ++-
|
||||
2 files changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/Modules/parsermodule.c b/Modules/parsermodule.c
|
||||
index 24b0ffb..98a3759 100644
|
||||
--- a/Modules/parsermodule.c
|
||||
+++ b/Modules/parsermodule.c
|
||||
@@ -38,7 +38,7 @@
|
||||
#include "grammar.h"
|
||||
#include "parsetok.h"
|
||||
|
||||
-extern grammar _PyParser_Grammar; /* From graminit.c */
|
||||
+PyAPI_DATA(grammar) _PyParser_Grammar; /* From graminit.c */
|
||||
|
||||
#ifdef lint
|
||||
#include <note.h>
|
||||
diff --git a/Python/graminit.c b/Python/graminit.c
|
||||
index b7aa528..4a1ee9a 100644
|
||||
--- a/Python/graminit.c
|
||||
+++ b/Python/graminit.c
|
||||
@@ -2,7 +2,8 @@
|
||||
|
||||
#include "exports.h"
|
||||
#include "grammar.h"
|
||||
-Py_EXPORTED_SYMBOL grammar _PyParser_Grammar;
|
||||
+#include "pyport.h"
|
||||
+PyAPI_DATA(grammar) _PyParser_Grammar;
|
||||
static const arc arcs_0_0[3] = {
|
||||
{2, 1},
|
||||
{3, 2},
|
||||
--
|
||||
2.36.1
|
||||
|
||||
@ -1,70 +0,0 @@
|
||||
From 13850d61f90694fe67f43dfb38d0ec37d40cf2cf Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?=
|
||||
<alexey.pawlow@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 18:51:57 +0530
|
||||
Subject: [PATCH 044/N] builddir fixes
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Co-authored-by: Алексей <alexey.pawlow@gmail.com>
|
||||
Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com>
|
||||
---
|
||||
Makefile.pre.in | 10 +++++-----
|
||||
Programs/_freeze_importlib.c | 2 +-
|
||||
2 files changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/Makefile.pre.in b/Makefile.pre.in
|
||||
index d00acbd..1895e74 100644
|
||||
--- a/Makefile.pre.in
|
||||
+++ b/Makefile.pre.in
|
||||
@@ -740,20 +740,20 @@ Programs/_testembed: Programs/_testembed.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY)
|
||||
|
||||
Programs/_freeze_importlib.o: Programs/_freeze_importlib.c Makefile
|
||||
|
||||
-Programs/_freeze_importlib: Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN)
|
||||
+Programs/_freeze_importlib$(EXE): Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN)
|
||||
$(LINKCC) $(PY_CORE_LDFLAGS) -o $@ Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN) $(LIBS) $(MODLIBS) $(SYSLIBS)
|
||||
|
||||
.PHONY: regen-importlib
|
||||
-regen-importlib: Programs/_freeze_importlib
|
||||
+regen-importlib: Programs/_freeze_importlib$(EXE)
|
||||
# Regenerate Python/importlib_external.h
|
||||
# from Lib/importlib/_bootstrap_external.py using _freeze_importlib
|
||||
- ./Programs/_freeze_importlib importlib._bootstrap_external \
|
||||
+ ./Programs/_freeze_importlib$(EXE) importlib._bootstrap_external \
|
||||
$(srcdir)/Lib/importlib/_bootstrap_external.py \
|
||||
$(srcdir)/Python/importlib_external.h.new
|
||||
$(UPDATE_FILE) $(srcdir)/Python/importlib_external.h $(srcdir)/Python/importlib_external.h.new
|
||||
# Regenerate Python/importlib.h from Lib/importlib/_bootstrap.py
|
||||
# using _freeze_importlib
|
||||
- ./Programs/_freeze_importlib importlib._bootstrap \
|
||||
+ ./Programs/_freeze_importlib$(EXE) importlib._bootstrap \
|
||||
$(srcdir)/Lib/importlib/_bootstrap.py \
|
||||
$(srcdir)/Python/importlib.h.new
|
||||
$(UPDATE_FILE) $(srcdir)/Python/importlib.h $(srcdir)/Python/importlib.h.new
|
||||
@@ -1881,7 +1881,7 @@ clean-retain-profile: pycremoval
|
||||
find build -name '*.py[co]' -exec rm -f {} ';' || true
|
||||
-rm -f pybuilddir.txt
|
||||
-rm -f Lib/lib2to3/*Grammar*.pickle
|
||||
- -rm -f Programs/_testembed Programs/_freeze_importlib
|
||||
+ -rm -f Programs/_testembed Programs/_freeze_importlib$(EXE)
|
||||
-find build -type f -a ! -name '*.gc??' -exec rm -f {} ';'
|
||||
-rm -f Include/pydtrace_probes.h
|
||||
-rm -f profile-gen-stamp
|
||||
diff --git a/Programs/_freeze_importlib.c b/Programs/_freeze_importlib.c
|
||||
index 2e4ccbb..a8d5c31 100644
|
||||
--- a/Programs/_freeze_importlib.c
|
||||
+++ b/Programs/_freeze_importlib.c
|
||||
@@ -20,7 +20,7 @@ static const struct _frozen _PyImport_FrozenModules[] = {
|
||||
{0, 0, 0} /* sentinel */
|
||||
};
|
||||
|
||||
-#ifndef MS_WINDOWS
|
||||
+#ifndef _MSC_VER
|
||||
/* On Windows, this links with the regular pythonXY.dll, so this variable comes
|
||||
from frozen.obj. In the Makefile, frozen.o is not linked into this executable,
|
||||
so we define the variable here. */
|
||||
--
|
||||
2.36.1
|
||||
|
||||
@ -1,39 +0,0 @@
|
||||
From a5845df721bbe02f0606f217b46bbccc2f851cd2 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?=
|
||||
<alexey.pawlow@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 18:51:57 +0530
|
||||
Subject: [PATCH 045/N] msys monkeypatch os system via sh exe
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Co-authored-by: Алексей <alexey.pawlow@gmail.com>
|
||||
---
|
||||
setup.py | 11 +++++++++++
|
||||
1 file changed, 11 insertions(+)
|
||||
|
||||
diff --git a/setup.py b/setup.py
|
||||
index dfa9e45..6d282c8 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -58,6 +58,17 @@ def get_platform():
|
||||
return sys.platform
|
||||
|
||||
|
||||
+# On MSYS, os.system needs to be wrapped with sh.exe
|
||||
+# as otherwise all the io redirection will fail.
|
||||
+# Arguably, this could happen inside the real os.system
|
||||
+# rather than this monkey patch.
|
||||
+if sys.platform == "win32" and "MSYSTEM" in os.environ:
|
||||
+ os_system = os.system
|
||||
+ def msys_system(command):
|
||||
+ command_in_sh = 'sh.exe -c "%s"' % command.replace("\\", "\\\\")
|
||||
+ return os_system(command_in_sh)
|
||||
+ os.system = msys_system
|
||||
+
|
||||
CROSS_COMPILING = ("_PYTHON_HOST_PLATFORM" in os.environ)
|
||||
HOST_PLATFORM = get_platform()
|
||||
MS_WINDOWS = (HOST_PLATFORM == 'win32')
|
||||
--
|
||||
2.36.1
|
||||
|
||||
@ -1,73 +0,0 @@
|
||||
From 5b825a7a63d9fc28c3498c0fc9540fa935d2255a Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?=
|
||||
<alexey.pawlow@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 18:51:58 +0530
|
||||
Subject: [PATCH 046/N] msys replace slashes used in io redirection
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Co-authored-by: Алексей <alexey.pawlow@gmail.com>
|
||||
Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com>
|
||||
---
|
||||
setup.py | 12 ++++++------
|
||||
1 file changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 6d282c8..1610011 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -650,7 +650,7 @@ class PyBuildExt(build_ext):
|
||||
def add_multiarch_paths(self):
|
||||
# Debian/Ubuntu multiarch support.
|
||||
# https://wiki.ubuntu.com/MultiarchSpec
|
||||
- tmpfile = os.path.join(self.build_temp, 'multiarch')
|
||||
+ tmpfile = os.path.join(self.build_temp, 'multiarch').replace('\\','/')
|
||||
if not os.path.exists(self.build_temp):
|
||||
os.makedirs(self.build_temp)
|
||||
ret = run_command(
|
||||
@@ -675,7 +675,7 @@ class PyBuildExt(build_ext):
|
||||
opt = ''
|
||||
if CROSS_COMPILING:
|
||||
opt = '-t' + sysconfig.get_config_var('HOST_GNU_TYPE')
|
||||
- tmpfile = os.path.join(self.build_temp, 'multiarch')
|
||||
+ tmpfile = os.path.join(self.build_temp, 'multiarch').replace('\\','/')
|
||||
if not os.path.exists(self.build_temp):
|
||||
os.makedirs(self.build_temp)
|
||||
ret = run_command(
|
||||
@@ -693,7 +693,7 @@ class PyBuildExt(build_ext):
|
||||
os.unlink(tmpfile)
|
||||
|
||||
def add_cross_compiling_paths(self):
|
||||
- tmpfile = os.path.join(self.build_temp, 'ccpaths')
|
||||
+ tmpfile = os.path.join(self.build_temp, 'ccpaths').replace('\\','/')
|
||||
if not os.path.exists(self.build_temp):
|
||||
os.makedirs(self.build_temp)
|
||||
# bpo-38472: With a German locale, GCC returns "gcc-Version 9.1.0
|
||||
@@ -1009,7 +1009,7 @@ class PyBuildExt(build_ext):
|
||||
readline_termcap_library = ""
|
||||
curses_library = ""
|
||||
# Cannot use os.popen here in py3k.
|
||||
- tmpfile = os.path.join(self.build_temp, 'readline_termcap_lib')
|
||||
+ tmpfile = os.path.join(self.build_temp, 'readline_termcap_lib').replace('\\','/')
|
||||
if not os.path.exists(self.build_temp):
|
||||
os.makedirs(self.build_temp)
|
||||
# Determine if readline is already linked against curses or tinfo.
|
||||
@@ -2007,12 +2007,12 @@ class PyBuildExt(build_ext):
|
||||
cflags = sysconfig.get_config_vars('CFLAGS')[0]
|
||||
archs = re.findall(r'-arch\s+(\w+)', cflags)
|
||||
|
||||
- tmpfile = os.path.join(self.build_temp, 'tk.arch')
|
||||
+ tmpfile = os.path.join(self.build_temp, 'tk.arch').replace('\\','/')
|
||||
if not os.path.exists(self.build_temp):
|
||||
os.makedirs(self.build_temp)
|
||||
|
||||
run_command(
|
||||
- "file {}/Tk.framework/Tk | grep 'for architecture' > {}".format(F, tmpfile)
|
||||
+ "file {}/Tk.framework/Tk | grep 'for architecture' > {}".format(F, tmpfile).replace('\\','/')
|
||||
)
|
||||
with open(tmpfile) as fp:
|
||||
detected_archs = []
|
||||
--
|
||||
2.36.1
|
||||
|
||||
@ -1,29 +0,0 @@
|
||||
From 13103b26078cec60597a521bdc00da9a59e7dbc2 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?=
|
||||
<alexey.pawlow@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 18:51:59 +0530
|
||||
Subject: [PATCH 047/N] remove_path_max.default
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Co-authored-by: Алексей <alexey.pawlow@gmail.com>
|
||||
---
|
||||
Include/osdefs.h | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/Include/osdefs.h b/Include/osdefs.h
|
||||
index 3243944..99d4977 100644
|
||||
--- a/Include/osdefs.h
|
||||
+++ b/Include/osdefs.h
|
||||
@@ -10,7 +10,6 @@ extern "C" {
|
||||
#ifdef MS_WINDOWS
|
||||
#define SEP L'\\'
|
||||
#define ALTSEP L'/'
|
||||
-#define MAXPATHLEN 256
|
||||
#define DELIM L';'
|
||||
#endif
|
||||
|
||||
--
|
||||
2.36.1
|
||||
|
||||
@ -1,60 +0,0 @@
|
||||
From af54efca216765c9d7e8d270cc5d4bec3d937100 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?=
|
||||
<alexey.pawlow@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 18:52:00 +0530
|
||||
Subject: [PATCH 048/N] dont link with gettext
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Co-authored-by: Алексей <alexey.pawlow@gmail.com>
|
||||
---
|
||||
Modules/_localemodule.c | 7 +++++++
|
||||
configure.ac | 9 +++++++++
|
||||
2 files changed, 16 insertions(+)
|
||||
|
||||
diff --git a/Modules/_localemodule.c b/Modules/_localemodule.c
|
||||
index 2e353bb..ea222af 100644
|
||||
--- a/Modules/_localemodule.c
|
||||
+++ b/Modules/_localemodule.c
|
||||
@@ -12,6 +12,13 @@ This software comes with no warranty. Use at your own risk.
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include "Python.h"
|
||||
#include "pycore_fileutils.h"
|
||||
+#ifdef __MINGW32__
|
||||
+/* The header libintl.h and library libintl may exist on mingw host.
|
||||
+ * To be compatible with MSVC build we has to undef some defines.
|
||||
+ */
|
||||
+#undef HAVE_LIBINTL_H
|
||||
+#undef HAVE_BIND_TEXTDOMAIN_CODESET
|
||||
+#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <locale.h>
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 8965c63..773bc8a 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -3166,10 +3166,19 @@ AC_SEARCH_LIBS(sem_init, pthread rt posix4)
|
||||
fi
|
||||
|
||||
# check if we need libintl for locale functions
|
||||
+case $host in
|
||||
+ *-*-mingw*)
|
||||
+ dnl Native windows build don't use libintl (see _localemodule.c).
|
||||
+ dnl Also we don't like setup.py to add "intl" library to the list
|
||||
+ dnl when build _locale module.
|
||||
+ ;;
|
||||
+ *)
|
||||
AC_CHECK_LIB(intl, textdomain,
|
||||
[AC_DEFINE(WITH_LIBINTL, 1,
|
||||
[Define to 1 if libintl is needed for locale functions.])
|
||||
LIBS="-lintl $LIBS"])
|
||||
+ ;;
|
||||
+esac
|
||||
|
||||
# checks for system dependent C++ extensions support
|
||||
case "$ac_sys_system" in
|
||||
--
|
||||
2.36.1
|
||||
|
||||
@ -1,33 +0,0 @@
|
||||
From c63fc44a7946da053fd37754b9d7b04158701e1c Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?=
|
||||
<alexey.pawlow@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 18:52:01 +0530
|
||||
Subject: [PATCH 049/N] ctypes python dll
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Co-authored-by: Алексей <alexey.pawlow@gmail.com>
|
||||
Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com>
|
||||
---
|
||||
Lib/ctypes/__init__.py | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Lib/ctypes/__init__.py b/Lib/ctypes/__init__.py
|
||||
index 4afa4eb..2fe2eec 100644
|
||||
--- a/Lib/ctypes/__init__.py
|
||||
+++ b/Lib/ctypes/__init__.py
|
||||
@@ -456,7 +456,9 @@ class LibraryLoader(object):
|
||||
cdll = LibraryLoader(CDLL)
|
||||
pydll = LibraryLoader(PyDLL)
|
||||
|
||||
-if _os.name == "nt":
|
||||
+if _os.name == "nt" and _sys.version.find('GCC') >= 0:
|
||||
+ pythonapi = PyDLL("libpython%d.%d%s.dll" % (_sys.version_info[:2] + (_sys.abiflags,)), None)
|
||||
+elif _os.name == "nt":
|
||||
pythonapi = PyDLL("python dll", None, _sys.dllhandle)
|
||||
elif _sys.platform == "cygwin":
|
||||
pythonapi = PyDLL("libpython%d.%d.dll" % _sys.version_info[:2])
|
||||
--
|
||||
2.36.1
|
||||
|
||||
@ -1,30 +0,0 @@
|
||||
From d6f6f1a39a8e4ebe0dfb685426d67ab59da1029c Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?=
|
||||
<alexey.pawlow@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 18:52:02 +0530
|
||||
Subject: [PATCH 050/N] gdbm module includes
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Co-authored-by: Алексей <alexey.pawlow@gmail.com>
|
||||
---
|
||||
Modules/_gdbmmodule.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Modules/_gdbmmodule.c b/Modules/_gdbmmodule.c
|
||||
index 16b0f79..46b28b2 100644
|
||||
--- a/Modules/_gdbmmodule.c
|
||||
+++ b/Modules/_gdbmmodule.c
|
||||
@@ -11,7 +11,7 @@
|
||||
#include <fcntl.h>
|
||||
#include "gdbm.h"
|
||||
|
||||
-#if defined(WIN32) && !defined(__CYGWIN__)
|
||||
+#if defined(WIN32) && !defined(__CYGWIN__) && !defined(__MINGW32__)
|
||||
#include "gdbmerrno.h"
|
||||
extern const char * gdbm_strerror(gdbm_error);
|
||||
#endif
|
||||
--
|
||||
2.36.1
|
||||
|
||||
@ -1,85 +0,0 @@
|
||||
From 8174f02fb638fadb7c87540360124a9d18bdecf6 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?=
|
||||
<alexey.pawlow@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 18:52:03 +0530
|
||||
Subject: [PATCH 051/N] use gnu_printf in format
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Co-authored-by: Алексей <alexey.pawlow@gmail.com>
|
||||
---
|
||||
Include/bytesobject.h | 4 ++--
|
||||
Include/pyerrors.h | 4 ++--
|
||||
Include/pyport.h | 6 ++++++
|
||||
Include/sysmodule.h | 4 ++--
|
||||
4 files changed, 12 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/Include/bytesobject.h b/Include/bytesobject.h
|
||||
index 5062d8d..627e8b2 100644
|
||||
--- a/Include/bytesobject.h
|
||||
+++ b/Include/bytesobject.h
|
||||
@@ -38,9 +38,9 @@ PyAPI_FUNC(PyObject *) PyBytes_FromStringAndSize(const char *, Py_ssize_t);
|
||||
PyAPI_FUNC(PyObject *) PyBytes_FromString(const char *);
|
||||
PyAPI_FUNC(PyObject *) PyBytes_FromObject(PyObject *);
|
||||
PyAPI_FUNC(PyObject *) PyBytes_FromFormatV(const char*, va_list)
|
||||
- Py_GCC_ATTRIBUTE((format(printf, 1, 0)));
|
||||
+ Py_PRINTF(1, 0);
|
||||
PyAPI_FUNC(PyObject *) PyBytes_FromFormat(const char*, ...)
|
||||
- Py_GCC_ATTRIBUTE((format(printf, 1, 2)));
|
||||
+ Py_PRINTF(1, 2);
|
||||
PyAPI_FUNC(Py_ssize_t) PyBytes_Size(PyObject *);
|
||||
PyAPI_FUNC(char *) PyBytes_AsString(PyObject *);
|
||||
PyAPI_FUNC(PyObject *) PyBytes_Repr(PyObject *, int);
|
||||
diff --git a/Include/pyerrors.h b/Include/pyerrors.h
|
||||
index 979a26b..28cfb0f 100644
|
||||
--- a/Include/pyerrors.h
|
||||
+++ b/Include/pyerrors.h
|
||||
@@ -310,9 +310,9 @@ PyAPI_FUNC(int) PyUnicodeTranslateError_SetReason(
|
||||
);
|
||||
|
||||
PyAPI_FUNC(int) PyOS_snprintf(char *str, size_t size, const char *format, ...)
|
||||
- Py_GCC_ATTRIBUTE((format(printf, 3, 4)));
|
||||
+ Py_PRINTF(3, 4);
|
||||
PyAPI_FUNC(int) PyOS_vsnprintf(char *str, size_t size, const char *format, va_list va)
|
||||
- Py_GCC_ATTRIBUTE((format(printf, 3, 0)));
|
||||
+ Py_PRINTF(3, 0);
|
||||
|
||||
#ifndef Py_LIMITED_API
|
||||
# define Py_CPYTHON_ERRORS_H
|
||||
diff --git a/Include/pyport.h b/Include/pyport.h
|
||||
index a05fa3a..0972630 100644
|
||||
--- a/Include/pyport.h
|
||||
+++ b/Include/pyport.h
|
||||
@@ -798,6 +798,12 @@ extern char * _getpty(int *, int, mode_t, int);
|
||||
|
||||
#define Py_VA_COPY va_copy
|
||||
|
||||
+#if defined(__GNUC__) && ((__GNUC__ == 4 && __GNUC_MINOR__>= 4) || __GNUC__ > 4)
|
||||
+# define Py_PRINTF(X,Y) Py_GCC_ATTRIBUTE((format(gnu_printf,X,Y)))
|
||||
+#else
|
||||
+# define Py_PRINTF(X,Y) Py_GCC_ATTRIBUTE((format(printf,X,Y)))
|
||||
+#endif
|
||||
+
|
||||
/*
|
||||
* Convenient macros to deal with endianness of the platform. WORDS_BIGENDIAN is
|
||||
* detected by configure and defined in pyconfig.h. The code in pyconfig.h
|
||||
diff --git a/Include/sysmodule.h b/Include/sysmodule.h
|
||||
index 670e5d2..d582963 100644
|
||||
--- a/Include/sysmodule.h
|
||||
+++ b/Include/sysmodule.h
|
||||
@@ -15,9 +15,9 @@ PyAPI_FUNC(void) PySys_SetArgvEx(int, wchar_t **, int);
|
||||
PyAPI_FUNC(void) PySys_SetPath(const wchar_t *);
|
||||
|
||||
PyAPI_FUNC(void) PySys_WriteStdout(const char *format, ...)
|
||||
- Py_GCC_ATTRIBUTE((format(printf, 1, 2)));
|
||||
+ Py_PRINTF(1, 2);
|
||||
PyAPI_FUNC(void) PySys_WriteStderr(const char *format, ...)
|
||||
- Py_GCC_ATTRIBUTE((format(printf, 1, 2)));
|
||||
+ Py_PRINTF(1, 2);
|
||||
PyAPI_FUNC(void) PySys_FormatStdout(const char *format, ...);
|
||||
PyAPI_FUNC(void) PySys_FormatStderr(const char *format, ...);
|
||||
|
||||
--
|
||||
2.36.1
|
||||
|
||||
@ -1,39 +0,0 @@
|
||||
From 0454f5e643096a3390ca233a194fbe5ee008fd26 Mon Sep 17 00:00:00 2001
|
||||
From: Ray Donnelly <mingw.android@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 18:52:03 +0530
|
||||
Subject: [PATCH 052/N] mingw fix ssl dont use enum_certificates
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Co-authored-by: Алексей <alexey.pawlow@gmail.com>
|
||||
Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com>
|
||||
---
|
||||
Lib/ssl.py | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/Lib/ssl.py b/Lib/ssl.py
|
||||
index 0e3606b..401f375 100644
|
||||
--- a/Lib/ssl.py
|
||||
+++ b/Lib/ssl.py
|
||||
@@ -250,7 +250,7 @@ class _TLSMessageType(_IntEnum):
|
||||
CHANGE_CIPHER_SPEC = 0x0101
|
||||
|
||||
|
||||
-if sys.platform == "win32":
|
||||
+if sys.platform == "win32" and sys.version.find("GCC") == -1:
|
||||
from _ssl import enum_certificates, enum_crls
|
||||
|
||||
from socket import socket, SOCK_STREAM, create_connection
|
||||
@@ -570,7 +570,7 @@ class SSLContext(_SSLContext):
|
||||
def load_default_certs(self, purpose=Purpose.SERVER_AUTH):
|
||||
if not isinstance(purpose, _ASN1Object):
|
||||
raise TypeError(purpose)
|
||||
- if sys.platform == "win32":
|
||||
+ if sys.platform == "win32" and sys.version.find("GCC") == -1:
|
||||
for storename in self._windows_cert_stores:
|
||||
self._load_windows_store_certs(storename, purpose)
|
||||
self.set_default_verify_paths()
|
||||
--
|
||||
2.36.1
|
||||
|
||||
@ -1,39 +0,0 @@
|
||||
From bbb1fe1817cff70a426979feb8d8d3089b5706fe Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?=
|
||||
<alexey.pawlow@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 18:52:06 +0530
|
||||
Subject: [PATCH 053/N] fix using dllhandle and winver mingw
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Co-authored-by: Алексей <alexey.pawlow@gmail.com>
|
||||
---
|
||||
Python/sysmodule.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/Python/sysmodule.c b/Python/sysmodule.c
|
||||
index a52b299..e890979 100644
|
||||
--- a/Python/sysmodule.c
|
||||
+++ b/Python/sysmodule.c
|
||||
@@ -36,7 +36,7 @@ Data members:
|
||||
#include <windows.h>
|
||||
#endif /* MS_WINDOWS */
|
||||
|
||||
-#ifdef MS_COREDLL
|
||||
+#if defined(MS_WINDOWS) && defined(Py_ENABLE_SHARED)
|
||||
extern void *PyWin_DLLhModule;
|
||||
/* A string loaded from the DLL at startup: */
|
||||
extern const char *PyWin_DLLVersionString;
|
||||
@@ -2729,7 +2729,7 @@ _PySys_InitCore(PyThreadState *tstate, PyObject *sysdict)
|
||||
PyUnicode_FromString("little"));
|
||||
#endif
|
||||
|
||||
-#ifdef MS_COREDLL
|
||||
+#if defined(MS_WINDOWS) && defined(Py_ENABLE_SHARED)
|
||||
SET_SYS_FROM_STRING("dllhandle",
|
||||
PyLong_FromVoidPtr(PyWin_DLLhModule));
|
||||
SET_SYS_FROM_STRING("winver",
|
||||
--
|
||||
2.36.1
|
||||
|
||||
@ -1,42 +0,0 @@
|
||||
From a193e5ffd596445d5af09cd59d8e9f5a3b7bce45 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?=
|
||||
<alexey.pawlow@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 18:52:07 +0530
|
||||
Subject: [PATCH 054/N] Add AMD64 to sys config so msvccompiler
|
||||
get_build_version works
|
||||
|
||||
---
|
||||
Python/getcompiler.c | 17 ++++++++++++++++-
|
||||
1 file changed, 16 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Python/getcompiler.c b/Python/getcompiler.c
|
||||
index 59c0dbf..adccaa7 100644
|
||||
--- a/Python/getcompiler.c
|
||||
+++ b/Python/getcompiler.c
|
||||
@@ -10,7 +10,22 @@
|
||||
#if defined(__clang__)
|
||||
#define COMPILER "\n[Clang " __clang_version__ "]"
|
||||
#elif defined(__GNUC__)
|
||||
-#define COMPILER "\n[GCC " __VERSION__ "]"
|
||||
+/* To not break compatibility with things that determine
|
||||
+ CPU arch by calling get_build_version in msvccompiler.py
|
||||
+ (such as NumPy) add "32 bit" or "64 bit (AMD64)" on Windows
|
||||
+ and also use a space as a separator rather than a newline. */
|
||||
+#if defined(_WIN32)
|
||||
+#define COMP_SEP " "
|
||||
+#if defined(__x86_64__)
|
||||
+#define ARCH_SUFFIX " 64 bit (AMD64)"
|
||||
+#else
|
||||
+#define ARCH_SUFFIX " 32 bit"
|
||||
+#endif
|
||||
+#else
|
||||
+#define COMP_SEP "\n"
|
||||
+#define ARCH_SUFFIX ""
|
||||
+#endif
|
||||
+#define COMPILER COMP_SEP "[GCC " __VERSION__ ARCH_SUFFIX "]"
|
||||
// Generic fallbacks.
|
||||
#elif defined(__cplusplus)
|
||||
#define COMPILER "[C++]"
|
||||
--
|
||||
2.36.1
|
||||
|
||||
@ -1,33 +0,0 @@
|
||||
From 88b037e4b2a583947056e7dc221f938a5a382e16 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?=
|
||||
<alexey.pawlow@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 18:52:08 +0530
|
||||
Subject: [PATCH 055/N] MINGW link with additional library
|
||||
|
||||
---
|
||||
configure.ac | 9 +++++++++
|
||||
1 file changed, 9 insertions(+)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 773bc8a..ac58dc1 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -5872,6 +5872,15 @@ for dir in $SRCDIRS; do
|
||||
done
|
||||
AC_MSG_RESULT(done)
|
||||
|
||||
+# For mingw build need additional library for linking
|
||||
+case $host in
|
||||
+ *-*-mingw*)
|
||||
+ LIBS="$LIBS -lversion -lshlwapi -lpathcch"
|
||||
+ ;;
|
||||
+ *)
|
||||
+ ;;
|
||||
+esac
|
||||
+
|
||||
# Availability of -O2:
|
||||
AC_MSG_CHECKING(for -O2)
|
||||
saved_cflags="$CFLAGS"
|
||||
--
|
||||
2.36.1
|
||||
|
||||
@ -1,30 +0,0 @@
|
||||
From b2aee03e06ea2bb277c426fcca83d5128d3b6b36 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= <s@saghul.net>
|
||||
Date: Thu, 17 Jun 2021 18:52:09 +0530
|
||||
Subject: [PATCH 056/N] install msilib
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Co-authored-by: Алексей <alexey.pawlow@gmail.com>
|
||||
Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com>
|
||||
Co-authored-by: Ray Donnelly <mingw.android@gmail.com>
|
||||
---
|
||||
Makefile.pre.in | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/Makefile.pre.in b/Makefile.pre.in
|
||||
index 1895e74..1d2e16e 100644
|
||||
--- a/Makefile.pre.in
|
||||
+++ b/Makefile.pre.in
|
||||
@@ -1496,6 +1496,7 @@ LIBSUBDIRS= tkinter tkinter/test tkinter/test/test_tkinter \
|
||||
test/test_peg_generator \
|
||||
test/test_tools test/test_warnings test/test_warnings/data \
|
||||
turtledemo \
|
||||
+ msilib \
|
||||
multiprocessing multiprocessing/dummy \
|
||||
unittest unittest/test unittest/test/testmock \
|
||||
venv venv/scripts venv/scripts/common venv/scripts/posix \
|
||||
--
|
||||
2.36.1
|
||||
|
||||
@ -1,29 +0,0 @@
|
||||
From 8d480d34440037c0ca33068a133185fb408a6ef2 Mon Sep 17 00:00:00 2001
|
||||
From: Christoph Reiter <reiter.christoph@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 18:52:10 +0530
|
||||
Subject: [PATCH 057/N] fix signal module build
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Co-authored-by: Алексей <alexey.pawlow@gmail.com>
|
||||
---
|
||||
Modules/Setup | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Modules/Setup b/Modules/Setup
|
||||
index 2bafdd0..7ce4355 100644
|
||||
--- a/Modules/Setup
|
||||
+++ b/Modules/Setup
|
||||
@@ -111,7 +111,7 @@ _collections _collectionsmodule.c # Container types
|
||||
_abc _abc.c # Abstract base classes
|
||||
itertools itertoolsmodule.c # Functions creating iterators for efficient looping
|
||||
atexit atexitmodule.c # Register functions to be run at interpreter-shutdown
|
||||
-_signal -DPy_BUILD_CORE_BUILTIN -I$(srcdir)/Include/internal signalmodule.c
|
||||
+_signal -DPy_BUILD_CORE_BUILTIN -I$(srcdir)/Include/internal signalmodule.c -lws2_32
|
||||
_stat _stat.c # stat.h interface
|
||||
time -DPy_BUILD_CORE_BUILTIN -I$(srcdir)/Include/internal timemodule.c # -lm # time operations and variables
|
||||
_thread -DPy_BUILD_CORE_BUILTIN -I$(srcdir)/Include/internal _threadmodule.c # low-level threading interface
|
||||
--
|
||||
2.36.1
|
||||
|
||||
@ -1,44 +0,0 @@
|
||||
From 4c500bed8d814aa668fabd9a050a1097fde6ecc5 Mon Sep 17 00:00:00 2001
|
||||
From: Christoph Reiter <reiter.christoph@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 18:52:11 +0530
|
||||
Subject: [PATCH 058/N] build: build winconsoleio and _testconsole
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Co-authored-by: Алексей <alexey.pawlow@gmail.com>
|
||||
---
|
||||
Modules/Setup | 2 +-
|
||||
setup.py | 3 +++
|
||||
2 files changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Modules/Setup b/Modules/Setup
|
||||
index 7ce4355..6bb5e51 100644
|
||||
--- a/Modules/Setup
|
||||
+++ b/Modules/Setup
|
||||
@@ -120,7 +120,7 @@ _thread -DPy_BUILD_CORE_BUILTIN -I$(srcdir)/Include/internal _threadmodule.c # l
|
||||
_locale -DPy_BUILD_CORE_BUILTIN _localemodule.c # -lintl
|
||||
|
||||
# Standard I/O baseline
|
||||
-_io -DPy_BUILD_CORE_BUILTIN -I$(srcdir)/Include/internal -I$(srcdir)/Modules/_io _io/_iomodule.c _io/iobase.c _io/fileio.c _io/bytesio.c _io/bufferedio.c _io/textio.c _io/stringio.c
|
||||
+_io -DPy_BUILD_CORE_BUILTIN -I$(srcdir)/Include/internal -I$(srcdir)/Modules/_io _io/_iomodule.c _io/iobase.c _io/fileio.c _io/bytesio.c _io/bufferedio.c _io/textio.c _io/stringio.c _io/winconsoleio.c
|
||||
|
||||
# faulthandler module
|
||||
faulthandler faulthandler.c
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 1610011..8e1a822 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -1003,6 +1003,9 @@ class PyBuildExt(build_ext):
|
||||
['_xxtestfuzz/_xxtestfuzz.c',
|
||||
'_xxtestfuzz/fuzzer.c']))
|
||||
|
||||
+ if MS_WINDOWS:
|
||||
+ self.add(Extension('_testconsole', ['../PC/_testconsole.c']))
|
||||
+
|
||||
def detect_readline_curses(self):
|
||||
# readline
|
||||
do_readline = self.compiler.find_library_file(self.lib_dirs, 'readline')
|
||||
--
|
||||
2.36.1
|
||||
|
||||
@ -1,29 +0,0 @@
|
||||
From 7a64e4e2736a71607cf3d223a059cd7e7077febe Mon Sep 17 00:00:00 2001
|
||||
From: Christoph Reiter <reiter.christoph@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 18:52:12 +0530
|
||||
Subject: [PATCH 059/N] expose sem_unlink
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Co-authored-by: Алексей <alexey.pawlow@gmail.com>
|
||||
---
|
||||
Modules/_multiprocessing/multiprocessing.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Modules/_multiprocessing/multiprocessing.c b/Modules/_multiprocessing/multiprocessing.c
|
||||
index 806e638..d7954d1 100644
|
||||
--- a/Modules/_multiprocessing/multiprocessing.c
|
||||
+++ b/Modules/_multiprocessing/multiprocessing.c
|
||||
@@ -128,7 +128,7 @@ static PyMethodDef module_methods[] = {
|
||||
{"recv", multiprocessing_recv, METH_VARARGS, ""},
|
||||
{"send", multiprocessing_send, METH_VARARGS, ""},
|
||||
#endif
|
||||
-#if !defined(POSIX_SEMAPHORES_NOT_ENABLED) && !defined(__ANDROID__)
|
||||
+#if defined(MS_WINDOWS) || (!defined(POSIX_SEMAPHORES_NOT_ENABLED) && !defined(__ANDROID__))
|
||||
{"sem_unlink", _PyMp_sem_unlink, METH_VARARGS, ""},
|
||||
#endif
|
||||
{NULL}
|
||||
--
|
||||
2.36.1
|
||||
|
||||
@ -1,461 +0,0 @@
|
||||
From dbf03bae1e7fa98e84950438d8e1ae3ca69a27b1 Mon Sep 17 00:00:00 2001
|
||||
From: Christoph Reiter <reiter.christoph@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 18:52:14 +0530
|
||||
Subject: [PATCH 060/N] cygpty isatty
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Co-authored-by: Алексей <alexey.pawlow@gmail.com>
|
||||
---
|
||||
Include/iscygpty.h | 41 ++++++++++
|
||||
Makefile.pre.in | 2 +
|
||||
Modules/_io/fileio.c | 3 +-
|
||||
Modules/main.c | 3 +-
|
||||
Modules/posixmodule.c | 3 +-
|
||||
Objects/fileobject.c | 3 +-
|
||||
Python/bltinmodule.c | 5 +-
|
||||
Python/fileutils.c | 3 +-
|
||||
Python/frozenmain.c | 3 +-
|
||||
Python/iscygpty.c | 185 ++++++++++++++++++++++++++++++++++++++++++
|
||||
Python/pylifecycle.c | 3 +-
|
||||
11 files changed, 245 insertions(+), 9 deletions(-)
|
||||
create mode 100644 Include/iscygpty.h
|
||||
create mode 100644 Python/iscygpty.c
|
||||
|
||||
diff --git a/Include/iscygpty.h b/Include/iscygpty.h
|
||||
new file mode 100644
|
||||
index 0000000..82fd0af
|
||||
--- /dev/null
|
||||
+++ b/Include/iscygpty.h
|
||||
@@ -0,0 +1,41 @@
|
||||
+/*
|
||||
+ * iscygpty.h -- part of ptycheck
|
||||
+ * https://github.com/k-takata/ptycheck
|
||||
+ *
|
||||
+ * Copyright (c) 2015-2017 K.Takata
|
||||
+ *
|
||||
+ * You can redistribute it and/or modify it under the terms of either
|
||||
+ * the MIT license (as described below) or the Vim license.
|
||||
+ *
|
||||
+ * Permission is hereby granted, free of charge, to any person obtaining
|
||||
+ * a copy of this software and associated documentation files (the
|
||||
+ * "Software"), to deal in the Software without restriction, including
|
||||
+ * without limitation the rights to use, copy, modify, merge, publish,
|
||||
+ * distribute, sublicense, and/or sell copies of the Software, and to
|
||||
+ * permit persons to whom the Software is furnished to do so, subject to
|
||||
+ * the following conditions:
|
||||
+ *
|
||||
+ * The above copyright notice and this permission notice shall be
|
||||
+ * included in all copies or substantial portions of the Software.
|
||||
+ *
|
||||
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
+ */
|
||||
+
|
||||
+#ifndef _ISCYGPTY_H
|
||||
+#define _ISCYGPTY_H
|
||||
+
|
||||
+#ifdef _WIN32
|
||||
+int is_cygpty(int fd);
|
||||
+int is_cygpty_used(void);
|
||||
+#else
|
||||
+#define is_cygpty(fd) 0
|
||||
+#define is_cygpty_used() 0
|
||||
+#endif
|
||||
+
|
||||
+#endif /* _ISCYGPTY_H */
|
||||
diff --git a/Makefile.pre.in b/Makefile.pre.in
|
||||
index 1d2e16e..6d49228 100644
|
||||
--- a/Makefile.pre.in
|
||||
+++ b/Makefile.pre.in
|
||||
@@ -371,6 +371,7 @@ PYTHON_OBJS= \
|
||||
Python/import.o \
|
||||
Python/importdl.o \
|
||||
Python/initconfig.o \
|
||||
+ Python/iscygpty.o \
|
||||
Python/marshal.o \
|
||||
Python/modsupport.o \
|
||||
Python/mysnprintf.o \
|
||||
@@ -1069,6 +1070,7 @@ PYTHON_HEADERS= \
|
||||
$(srcdir)/Include/import.h \
|
||||
$(srcdir)/Include/interpreteridobject.h \
|
||||
$(srcdir)/Include/intrcheck.h \
|
||||
+ $(srcdir)/Include/iscygpty.h \
|
||||
$(srcdir)/Include/iterobject.h \
|
||||
$(srcdir)/Include/listobject.h \
|
||||
$(srcdir)/Include/longintrepr.h \
|
||||
diff --git a/Modules/_io/fileio.c b/Modules/_io/fileio.c
|
||||
index 048484b..0b56118 100644
|
||||
--- a/Modules/_io/fileio.c
|
||||
+++ b/Modules/_io/fileio.c
|
||||
@@ -19,6 +19,7 @@
|
||||
#endif
|
||||
#include <stddef.h> /* For offsetof */
|
||||
#include "_iomodule.h"
|
||||
+#include "iscygpty.h"
|
||||
|
||||
/*
|
||||
* Known likely problems:
|
||||
@@ -1128,7 +1129,7 @@ _io_FileIO_isatty_impl(fileio *self)
|
||||
return err_closed();
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
_Py_BEGIN_SUPPRESS_IPH
|
||||
- res = isatty(self->fd);
|
||||
+ res = isatty(self->fd) || is_cygpty(self->fd);
|
||||
_Py_END_SUPPRESS_IPH
|
||||
Py_END_ALLOW_THREADS
|
||||
return PyBool_FromLong(res);
|
||||
diff --git a/Modules/main.c b/Modules/main.c
|
||||
index 2cc891f..17469e3 100644
|
||||
--- a/Modules/main.c
|
||||
+++ b/Modules/main.c
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "pycore_pathconfig.h" // _PyPathConfig_ComputeSysPath0()
|
||||
#include "pycore_pylifecycle.h" // _Py_PreInitializeFromPyArgv()
|
||||
#include "pycore_pystate.h" // _PyInterpreterState_GET()
|
||||
+#include "iscygpty.h"
|
||||
|
||||
/* Includes for exit_sigint() */
|
||||
#include <stdio.h> // perror()
|
||||
@@ -91,7 +92,7 @@ static inline int config_run_code(const PyConfig *config)
|
||||
static int
|
||||
stdin_is_interactive(const PyConfig *config)
|
||||
{
|
||||
- return (isatty(fileno(stdin)) || config->interactive);
|
||||
+ return (isatty(fileno(stdin)) || config->interactive || is_cygpty(fileno(stdin)));
|
||||
}
|
||||
|
||||
|
||||
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
|
||||
index e636aed..bd432c7 100644
|
||||
--- a/Modules/posixmodule.c
|
||||
+++ b/Modules/posixmodule.c
|
||||
@@ -36,6 +36,7 @@
|
||||
#ifdef __ANDROID__
|
||||
# undef HAVE_FACCESSAT
|
||||
#endif
|
||||
+#include "iscygpty.h"
|
||||
|
||||
#include <stdio.h> /* needed for ctermid() */
|
||||
|
||||
@@ -10101,7 +10102,7 @@ os_isatty_impl(PyObject *module, int fd)
|
||||
int return_value;
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
_Py_BEGIN_SUPPRESS_IPH
|
||||
- return_value = isatty(fd);
|
||||
+ return_value = isatty(fd) || is_cygpty(fd);
|
||||
_Py_END_SUPPRESS_IPH
|
||||
Py_END_ALLOW_THREADS
|
||||
return return_value;
|
||||
diff --git a/Objects/fileobject.c b/Objects/fileobject.c
|
||||
index 1c6ecaf..afddc4f 100644
|
||||
--- a/Objects/fileobject.c
|
||||
+++ b/Objects/fileobject.c
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include "Python.h"
|
||||
+#include "iscygpty.h"
|
||||
#include "pycore_runtime.h" // _PyRuntime
|
||||
|
||||
#if defined(HAVE_GETC_UNLOCKED) && !defined(_Py_MEMORY_SANITIZER)
|
||||
@@ -435,7 +436,7 @@ stdprinter_isatty(PyStdPrinter_Object *self, PyObject *Py_UNUSED(ignored))
|
||||
}
|
||||
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
- res = isatty(self->fd);
|
||||
+ res = isatty(self->fd) || is_cygpty(self->fd);
|
||||
Py_END_ALLOW_THREADS
|
||||
|
||||
return PyBool_FromLong(res);
|
||||
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
|
||||
index 21c70f9..58d7512 100644
|
||||
--- a/Python/bltinmodule.c
|
||||
+++ b/Python/bltinmodule.c
|
||||
@@ -1,6 +1,7 @@
|
||||
/* Built-in functions */
|
||||
|
||||
#include "Python.h"
|
||||
+#include "iscygpty.h"
|
||||
#include <ctype.h>
|
||||
#include "ast.h"
|
||||
#undef Yield /* undefine macro conflicting with <winbase.h> */
|
||||
@@ -1971,7 +1972,7 @@ builtin_input_impl(PyObject *module, PyObject *prompt)
|
||||
Py_DECREF(tmp);
|
||||
if (fd < 0 && PyErr_Occurred())
|
||||
return NULL;
|
||||
- tty = fd == fileno(stdin) && isatty(fd);
|
||||
+ tty = fd == fileno(stdin) && (isatty(fd) || is_cygpty(fd));
|
||||
}
|
||||
if (tty) {
|
||||
tmp = _PyObject_CallMethodIdNoArgs(fout, &PyId_fileno);
|
||||
@@ -1984,7 +1985,7 @@ builtin_input_impl(PyObject *module, PyObject *prompt)
|
||||
Py_DECREF(tmp);
|
||||
if (fd < 0 && PyErr_Occurred())
|
||||
return NULL;
|
||||
- tty = fd == fileno(stdout) && isatty(fd);
|
||||
+ tty = fd == fileno(stdout) && (isatty(fd) || is_cygpty(fd));
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/Python/fileutils.c b/Python/fileutils.c
|
||||
index 75ee355..e9d15d1 100644
|
||||
--- a/Python/fileutils.c
|
||||
+++ b/Python/fileutils.c
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "Python.h"
|
||||
+#include "iscygpty.h"
|
||||
#include "pycore_fileutils.h"
|
||||
#include "osdefs.h" // SEP
|
||||
#include <locale.h>
|
||||
@@ -71,7 +72,7 @@ _Py_device_encoding(int fd)
|
||||
int valid;
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
_Py_BEGIN_SUPPRESS_IPH
|
||||
- valid = isatty(fd);
|
||||
+ valid = isatty(fd) || is_cygpty(fd);
|
||||
_Py_END_SUPPRESS_IPH
|
||||
Py_END_ALLOW_THREADS
|
||||
if (!valid)
|
||||
diff --git a/Python/frozenmain.c b/Python/frozenmain.c
|
||||
index dd04d60..6607762 100644
|
||||
--- a/Python/frozenmain.c
|
||||
+++ b/Python/frozenmain.c
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "Python.h"
|
||||
#include "pycore_runtime.h" // _PyRuntime_Initialize()
|
||||
#include <locale.h>
|
||||
+#include "iscygpty.h"
|
||||
|
||||
#ifdef MS_WINDOWS
|
||||
extern void PyWinFreeze_ExeInit(void);
|
||||
@@ -107,7 +108,7 @@ Py_FrozenMain(int argc, char **argv)
|
||||
else
|
||||
sts = 0;
|
||||
|
||||
- if (inspect && isatty((int)fileno(stdin)))
|
||||
+ if (inspect && (isatty((int)fileno(stdin)) || is_cygpty((int)fileno(stdin))))
|
||||
sts = PyRun_AnyFile(stdin, "<stdin>") != 0;
|
||||
|
||||
#ifdef MS_WINDOWS
|
||||
diff --git a/Python/iscygpty.c b/Python/iscygpty.c
|
||||
new file mode 100644
|
||||
index 0000000..722f88f
|
||||
--- /dev/null
|
||||
+++ b/Python/iscygpty.c
|
||||
@@ -0,0 +1,185 @@
|
||||
+/*
|
||||
+ * iscygpty.c -- part of ptycheck
|
||||
+ * https://github.com/k-takata/ptycheck
|
||||
+ *
|
||||
+ * Copyright (c) 2015-2017 K.Takata
|
||||
+ *
|
||||
+ * You can redistribute it and/or modify it under the terms of either
|
||||
+ * the MIT license (as described below) or the Vim license.
|
||||
+ *
|
||||
+ * Permission is hereby granted, free of charge, to any person obtaining
|
||||
+ * a copy of this software and associated documentation files (the
|
||||
+ * "Software"), to deal in the Software without restriction, including
|
||||
+ * without limitation the rights to use, copy, modify, merge, publish,
|
||||
+ * distribute, sublicense, and/or sell copies of the Software, and to
|
||||
+ * permit persons to whom the Software is furnished to do so, subject to
|
||||
+ * the following conditions:
|
||||
+ *
|
||||
+ * The above copyright notice and this permission notice shall be
|
||||
+ * included in all copies or substantial portions of the Software.
|
||||
+ *
|
||||
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
+ */
|
||||
+
|
||||
+#ifdef _WIN32
|
||||
+
|
||||
+#include <ctype.h>
|
||||
+#include <io.h>
|
||||
+#include <wchar.h>
|
||||
+#include <windows.h>
|
||||
+
|
||||
+#ifdef USE_FILEEXTD
|
||||
+/* VC 7.1 or earlier doesn't support SAL. */
|
||||
+# if !defined(_MSC_VER) || (_MSC_VER < 1400)
|
||||
+# define __out
|
||||
+# define __in
|
||||
+# define __in_opt
|
||||
+# endif
|
||||
+/* Win32 FileID API Library:
|
||||
+ * http://www.microsoft.com/en-us/download/details.aspx?id=22599
|
||||
+ * Needed for WinXP. */
|
||||
+# include <fileextd.h>
|
||||
+#else /* USE_FILEEXTD */
|
||||
+/* VC 8 or earlier. */
|
||||
+# if defined(_MSC_VER) && (_MSC_VER < 1500)
|
||||
+# ifdef ENABLE_STUB_IMPL
|
||||
+# define STUB_IMPL
|
||||
+# else
|
||||
+# error "Win32 FileID API Library is required for VC2005 or earlier."
|
||||
+# endif
|
||||
+# endif
|
||||
+#endif /* USE_FILEEXTD */
|
||||
+
|
||||
+
|
||||
+#include "iscygpty.h"
|
||||
+
|
||||
+//#define USE_DYNFILEID
|
||||
+#ifdef USE_DYNFILEID
|
||||
+typedef BOOL (WINAPI *pfnGetFileInformationByHandleEx)(
|
||||
+ HANDLE hFile,
|
||||
+ FILE_INFO_BY_HANDLE_CLASS FileInformationClass,
|
||||
+ LPVOID lpFileInformation,
|
||||
+ DWORD dwBufferSize
|
||||
+);
|
||||
+static pfnGetFileInformationByHandleEx pGetFileInformationByHandleEx = NULL;
|
||||
+
|
||||
+# ifndef USE_FILEEXTD
|
||||
+static BOOL WINAPI stub_GetFileInformationByHandleEx(
|
||||
+ HANDLE hFile,
|
||||
+ FILE_INFO_BY_HANDLE_CLASS FileInformationClass,
|
||||
+ LPVOID lpFileInformation,
|
||||
+ DWORD dwBufferSize
|
||||
+ )
|
||||
+{
|
||||
+ return FALSE;
|
||||
+}
|
||||
+# endif
|
||||
+
|
||||
+static void setup_fileid_api(void)
|
||||
+{
|
||||
+ if (pGetFileInformationByHandleEx != NULL) {
|
||||
+ return;
|
||||
+ }
|
||||
+ pGetFileInformationByHandleEx = (pfnGetFileInformationByHandleEx)
|
||||
+ GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")),
|
||||
+ "GetFileInformationByHandleEx");
|
||||
+ if (pGetFileInformationByHandleEx == NULL) {
|
||||
+# ifdef USE_FILEEXTD
|
||||
+ pGetFileInformationByHandleEx = GetFileInformationByHandleEx;
|
||||
+# else
|
||||
+ pGetFileInformationByHandleEx = stub_GetFileInformationByHandleEx;
|
||||
+# endif
|
||||
+ }
|
||||
+}
|
||||
+#else
|
||||
+# define pGetFileInformationByHandleEx GetFileInformationByHandleEx
|
||||
+# define setup_fileid_api()
|
||||
+#endif
|
||||
+
|
||||
+
|
||||
+#define is_wprefix(s, prefix) \
|
||||
+ (wcsncmp((s), (prefix), sizeof(prefix) / sizeof(WCHAR) - 1) == 0)
|
||||
+
|
||||
+/* Check if the fd is a cygwin/msys's pty. */
|
||||
+int is_cygpty(int fd)
|
||||
+{
|
||||
+#ifdef STUB_IMPL
|
||||
+ return 0;
|
||||
+#else
|
||||
+ HANDLE h;
|
||||
+ int size = sizeof(FILE_NAME_INFO) + sizeof(WCHAR) * (MAX_PATH - 1);
|
||||
+ FILE_NAME_INFO *nameinfo;
|
||||
+ WCHAR *p = NULL;
|
||||
+
|
||||
+ setup_fileid_api();
|
||||
+
|
||||
+ h = (HANDLE) _get_osfhandle(fd);
|
||||
+ if (h == INVALID_HANDLE_VALUE) {
|
||||
+ return 0;
|
||||
+ }
|
||||
+ /* Cygwin/msys's pty is a pipe. */
|
||||
+ if (GetFileType(h) != FILE_TYPE_PIPE) {
|
||||
+ return 0;
|
||||
+ }
|
||||
+ nameinfo = malloc(size + sizeof(WCHAR));
|
||||
+ if (nameinfo == NULL) {
|
||||
+ return 0;
|
||||
+ }
|
||||
+ /* Check the name of the pipe:
|
||||
+ * '\{cygwin,msys}-XXXXXXXXXXXXXXXX-ptyN-{from,to}-master' */
|
||||
+ if (pGetFileInformationByHandleEx(h, FileNameInfo, nameinfo, size)) {
|
||||
+ nameinfo->FileName[nameinfo->FileNameLength / sizeof(WCHAR)] = L'\0';
|
||||
+ p = nameinfo->FileName;
|
||||
+ if (is_wprefix(p, L"\\cygwin-")) { /* Cygwin */
|
||||
+ p += 8;
|
||||
+ } else if (is_wprefix(p, L"\\msys-")) { /* MSYS and MSYS2 */
|
||||
+ p += 6;
|
||||
+ } else {
|
||||
+ p = NULL;
|
||||
+ }
|
||||
+ if (p != NULL) {
|
||||
+ while (*p && isxdigit(*p)) /* Skip 16-digit hexadecimal. */
|
||||
+ ++p;
|
||||
+ if (is_wprefix(p, L"-pty")) {
|
||||
+ p += 4;
|
||||
+ } else {
|
||||
+ p = NULL;
|
||||
+ }
|
||||
+ }
|
||||
+ if (p != NULL) {
|
||||
+ while (*p && isdigit(*p)) /* Skip pty number. */
|
||||
+ ++p;
|
||||
+ if (is_wprefix(p, L"-from-master")) {
|
||||
+ //p += 12;
|
||||
+ } else if (is_wprefix(p, L"-to-master")) {
|
||||
+ //p += 10;
|
||||
+ } else {
|
||||
+ p = NULL;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ free(nameinfo);
|
||||
+ return (p != NULL);
|
||||
+#endif /* STUB_IMPL */
|
||||
+}
|
||||
+
|
||||
+/* Check if at least one cygwin/msys pty is used. */
|
||||
+int is_cygpty_used(void)
|
||||
+{
|
||||
+ int fd, ret = 0;
|
||||
+
|
||||
+ for (fd = 0; fd < 3; fd++) {
|
||||
+ ret |= is_cygpty(fd);
|
||||
+ }
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+#endif /* _WIN32 */
|
||||
+
|
||||
+/* vim: set ts=4 sw=4: */
|
||||
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c
|
||||
index 60f091c..734084c 100644
|
||||
--- a/Python/pylifecycle.c
|
||||
+++ b/Python/pylifecycle.c
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "pycore_traceback.h" // _Py_DumpTracebackThreads()
|
||||
|
||||
#include "grammar.h" // PyGrammar_RemoveAccelerators()
|
||||
+#include "iscygpty.h"
|
||||
#include <locale.h> // setlocale()
|
||||
|
||||
#ifdef HAVE_SIGNAL_H
|
||||
@@ -2470,7 +2471,7 @@ _Py_RestoreSignals(void)
|
||||
int
|
||||
Py_FdIsInteractive(FILE *fp, const char *filename)
|
||||
{
|
||||
- if (isatty((int)fileno(fp)))
|
||||
+ if (isatty((int)fileno(fp)) || is_cygpty((int)fileno(fp)))
|
||||
return 1;
|
||||
if (!Py_InteractiveFlag)
|
||||
return 0;
|
||||
--
|
||||
2.36.1
|
||||
|
||||
@ -1,29 +0,0 @@
|
||||
From 05eeb6798b58ac38d71fae0929d43539254778d1 Mon Sep 17 00:00:00 2001
|
||||
From: Christoph Reiter <reiter.christoph@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 18:52:15 +0530
|
||||
Subject: [PATCH 061/N] disable broken gdbm module
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Co-authored-by: Алексей <alexey.pawlow@gmail.com>
|
||||
---
|
||||
setup.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 8e1a822..b163d4c 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -1410,7 +1410,7 @@ class PyBuildExt(build_ext):
|
||||
if dbm_args:
|
||||
dbm_order = [arg.split('=')[-1] for arg in dbm_args][-1].split(":")
|
||||
else:
|
||||
- dbm_order = "ndbm:gdbm:bdb".split(":")
|
||||
+ dbm_order = []
|
||||
dbmext = None
|
||||
for cand in dbm_order:
|
||||
if cand == "ndbm":
|
||||
--
|
||||
2.36.1
|
||||
|
||||
@ -1,147 +0,0 @@
|
||||
From 35c0d1c6857011e720db5e4c606bd0912f69b715 Mon Sep 17 00:00:00 2001
|
||||
From: Christoph Reiter <reiter.christoph@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 18:52:16 +0530
|
||||
Subject: [PATCH 062/N] build: link win resource files and build pythonw
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Co-authored-by: Алексей <alexey.pawlow@gmail.com>
|
||||
---
|
||||
Makefile.pre.in | 26 +++++++++++++++++++++-----
|
||||
configure.ac | 26 ++++++++++++++++++++++++++
|
||||
2 files changed, 47 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/Makefile.pre.in b/Makefile.pre.in
|
||||
index 6d49228..fd3d142 100644
|
||||
--- a/Makefile.pre.in
|
||||
+++ b/Makefile.pre.in
|
||||
@@ -38,6 +38,7 @@ CXX= @CXX@
|
||||
MAINCC= @MAINCC@
|
||||
LINKCC= @LINKCC@
|
||||
AR= @AR@
|
||||
+WINDRES= @WINDRES@
|
||||
READELF= @READELF@
|
||||
SOABI= @SOABI@
|
||||
LDVERSION= @LDVERSION@
|
||||
@@ -118,6 +119,7 @@ PY_CORE_CFLAGS= $(PY_STDMODULE_CFLAGS) -DPy_BUILD_CORE
|
||||
PY_CORE_LDFLAGS=$(PY_LDFLAGS) $(PY_LDFLAGS_NODIST)
|
||||
# Strict or non-strict aliasing flags used to compile dtoa.c, see above
|
||||
CFLAGS_ALIASING=@CFLAGS_ALIASING@
|
||||
+RCFLAGS=@RCFLAGS@
|
||||
|
||||
|
||||
# Machine-dependent subdirectories
|
||||
@@ -259,6 +261,7 @@ LIBOBJS= @LIBOBJS@
|
||||
|
||||
PYTHON= python$(EXE)
|
||||
BUILDPYTHON= python$(BUILDEXE)
|
||||
+BUILDPYTHONW= pythonw$(BUILDEXE)
|
||||
|
||||
PYTHON_FOR_REGEN?=@PYTHON_FOR_REGEN@
|
||||
UPDATE_FILE=@PYTHON_FOR_REGEN@ $(srcdir)/Tools/scripts/update_file.py
|
||||
@@ -481,7 +484,7 @@ DTRACE_DEPS = \
|
||||
|
||||
# Default target
|
||||
all: @DEF_MAKE_ALL_RULE@
|
||||
-build_all: check-clean-src $(BUILDPYTHON) oldsharedmods sharedmods gdbhooks \
|
||||
+build_all: check-clean-src $(BUILDPYTHON) $(BUILDPYTHONW) oldsharedmods sharedmods gdbhooks \
|
||||
Programs/_testembed python-config
|
||||
|
||||
# Check that the source is clean when building out of source.
|
||||
@@ -595,9 +598,21 @@ coverage-report: regen-grammar regen-token regen-importlib
|
||||
clinic: check-clean-src $(srcdir)/Modules/_blake2/blake2s_impl.c
|
||||
$(PYTHON_FOR_REGEN) $(srcdir)/Tools/clinic/clinic.py --make --srcdir $(srcdir)
|
||||
|
||||
+python_exe.o: $(srcdir)/PC/python_exe.rc
|
||||
+ $(WINDRES) $(RCFLAGS) -I$(srcdir)/Include -I$(srcdir)/PC -I. $(srcdir)/PC/python_exe.rc $@
|
||||
+
|
||||
+pythonw_exe.o: $(srcdir)/PC/pythonw_exe.rc
|
||||
+ $(WINDRES) $(RCFLAGS) -I$(srcdir)/Include -I$(srcdir)/PC -I. $(srcdir)/PC/pythonw_exe.rc $@
|
||||
+
|
||||
+python_nt.o: $(srcdir)/PC/python_nt.rc
|
||||
+ $(WINDRES) $(RCFLAGS) -DORIGINAL_FILENAME=\\\"$(DLLLIBRARY)\\\" -I$(srcdir)/Include -I$(srcdir)/PC -I. $(srcdir)/PC/python_nt.rc $@
|
||||
+
|
||||
+$(BUILDPYTHONW): Programs/python.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY) pythonw_exe.o
|
||||
+ $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -municode -mwindows -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) pythonw_exe.o
|
||||
+
|
||||
# Build the interpreter
|
||||
-$(BUILDPYTHON): Programs/python.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY) $(EXPORTSYMS)
|
||||
- $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS)
|
||||
+$(BUILDPYTHON): Programs/python.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY) python_exe.o
|
||||
+ $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -municode -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) python_exe.o
|
||||
|
||||
platform: $(BUILDPYTHON) pybuilddir.txt
|
||||
$(RUNSHARED) $(PYTHON_FOR_BUILD) -c 'import sys ; from sysconfig import get_platform ; print("%s-%d.%d" % (get_platform(), *sys.version_info[:2]))' >platform
|
||||
@@ -707,10 +722,10 @@ $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK): \
|
||||
|
||||
# This rule builds the Cygwin Python DLL and import library if configured
|
||||
# for a shared core library; otherwise, this rule is a noop.
|
||||
-$(DLLLIBRARY) libpython$(LDVERSION).dll.a: $(LIBRARY_OBJS)
|
||||
+$(DLLLIBRARY) libpython$(LDVERSION).dll.a: $(LIBRARY_OBJS) python_nt.o
|
||||
if test -n "$(DLLLIBRARY)"; then \
|
||||
$(LDSHARED) -Wl,--out-implib=$@ -o $(DLLLIBRARY) $^ \
|
||||
- $(LIBS) $(MODLIBS) $(SYSLIBS); \
|
||||
+ $(LIBS) $(MODLIBS) $(SYSLIBS) python_nt.o; \
|
||||
else true; \
|
||||
fi
|
||||
|
||||
@@ -1324,6 +1339,7 @@ altbininstall: $(BUILDPYTHON) @FRAMEWORKPYTHONW@
|
||||
done
|
||||
if test "$(PYTHONFRAMEWORKDIR)" = "no-framework" ; then \
|
||||
$(INSTALL_PROGRAM) $(BUILDPYTHON) $(DESTDIR)$(BINDIR)/python$(LDVERSION)$(EXE); \
|
||||
+ $(INSTALL_PROGRAM) $(BUILDPYTHONW) $(DESTDIR)$(BINDIR)/python3w$(EXE); \
|
||||
else \
|
||||
$(INSTALL_PROGRAM) $(STRIPFLAG) Mac/pythonw $(DESTDIR)$(BINDIR)/python$(LDVERSION)$(EXE); \
|
||||
fi
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index ac58dc1..94f8e57 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -1350,6 +1350,9 @@ fi
|
||||
|
||||
AC_MSG_RESULT($LDLIBRARY)
|
||||
|
||||
+AC_SUBST(WINDRES)
|
||||
+AC_CHECK_TOOL(WINDRES, windres)
|
||||
+
|
||||
AC_SUBST(AR)
|
||||
AC_CHECK_TOOLS(AR, ar aal, ar)
|
||||
|
||||
@@ -5876,10 +5879,33 @@ AC_MSG_RESULT(done)
|
||||
case $host in
|
||||
*-*-mingw*)
|
||||
LIBS="$LIBS -lversion -lshlwapi -lpathcch"
|
||||
+ AC_PROG_AWK
|
||||
+ if test "$AWK" = "gawk"; then
|
||||
+ awk_extra_flag="--non-decimal-data"
|
||||
+ fi
|
||||
+ AC_MSG_CHECKING([FIELD3])
|
||||
+ FIELD3=$($AWK $awk_extra_flag '\
|
||||
+ /^#define PY_RELEASE_LEVEL_/ {levels[$2]=$3} \
|
||||
+ /^#define PY_MICRO_VERSION[[:space:]]+/ {micro=$3} \
|
||||
+ /^#define PY_RELEASE_LEVEL[[:space:]]+/ {level=levels[$3]} \
|
||||
+ /^#define PY_RELEASE_SERIAL[[:space:]]+/ {serial=$3} \
|
||||
+ END {print micro * 1000 + level * 10 + serial}' \
|
||||
+ $srcdir/Include/patchlevel.h
|
||||
+ )
|
||||
+
|
||||
+ AC_MSG_RESULT([${FIELD3}])
|
||||
+ RCFLAGS="$RCFLAGS -DFIELD3=$FIELD3 -O COFF"
|
||||
+
|
||||
+ case $host in
|
||||
+ i686*) RCFLAGS="$RCFLAGS --target=pe-i386" ;;
|
||||
+ x86_64*) RCFLAGS="$RCFLAGS --target=pe-x86-64" ;;
|
||||
+ *) ;;
|
||||
+ esac
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
+AC_SUBST(RCFLAGS)
|
||||
|
||||
# Availability of -O2:
|
||||
AC_MSG_CHECKING(for -O2)
|
||||
--
|
||||
2.36.1
|
||||
|
||||
@ -1,26 +0,0 @@
|
||||
From cab5d0f11a2919add6fec6f5e7edb5f9cd4bf875 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?=
|
||||
<alexey.pawlow@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 18:52:17 +0530
|
||||
Subject: [PATCH 063/N] 3.7 mpdec mingw
|
||||
|
||||
---
|
||||
setup.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/setup.py b/setup.py
|
||||
index b163d4c..c2fa950 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -2295,7 +2295,7 @@ class PyBuildExt(build_ext):
|
||||
undef_macros = []
|
||||
if '--with-system-libmpdec' in sysconfig.get_config_var("CONFIG_ARGS"):
|
||||
include_dirs = []
|
||||
- libraries = [':libmpdec.so.2']
|
||||
+ libraries = [':libmpdec.dll.a']
|
||||
sources = ['_decimal/_decimal.c']
|
||||
depends = ['_decimal/docstrings.h']
|
||||
else:
|
||||
--
|
||||
2.36.1
|
||||
|
||||
@ -1,32 +0,0 @@
|
||||
From 442ff6d3e9940d641751effe0c4a3a5c9553470d Mon Sep 17 00:00:00 2001
|
||||
From: Christoph Reiter <reiter.christoph@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 18:52:17 +0530
|
||||
Subject: [PATCH 064/N] disable readline
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Co-authored-by: Алексей <alexey.pawlow@gmail.com>
|
||||
---
|
||||
setup.py | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/setup.py b/setup.py
|
||||
index c2fa950..5cb6340 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -1008,7 +1008,10 @@ class PyBuildExt(build_ext):
|
||||
|
||||
def detect_readline_curses(self):
|
||||
# readline
|
||||
- do_readline = self.compiler.find_library_file(self.lib_dirs, 'readline')
|
||||
+ if not MS_WINDOWS:
|
||||
+ do_readline = self.compiler.find_library_file(self.lib_dirs, 'readline')
|
||||
+ else:
|
||||
+ do_readline = False
|
||||
readline_termcap_library = ""
|
||||
curses_library = ""
|
||||
# Cannot use os.popen here in py3k.
|
||||
--
|
||||
2.36.1
|
||||
|
||||
@ -1,29 +0,0 @@
|
||||
From 06ccdb890b53b953234dcd5b5eb080a8fdefcd2c Mon Sep 17 00:00:00 2001
|
||||
From: Christoph Reiter <reiter.christoph@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 18:52:18 +0530
|
||||
Subject: [PATCH 065/N] fix isselectable
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Co-authored-by: Алексей <alexey.pawlow@gmail.com>
|
||||
---
|
||||
Include/fileobject.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Include/fileobject.h b/Include/fileobject.h
|
||||
index 6ec2994..a80f195 100644
|
||||
--- a/Include/fileobject.h
|
||||
+++ b/Include/fileobject.h
|
||||
@@ -30,7 +30,7 @@ PyAPI_DATA(int) Py_UTF8Mode;
|
||||
#endif
|
||||
|
||||
/* A routine to check if a file descriptor can be select()-ed. */
|
||||
-#ifdef _MSC_VER
|
||||
+#ifdef MS_WINDOWS
|
||||
/* On Windows, any socket fd can be select()-ed, no matter how high */
|
||||
#define _PyIsSelectable_fd(FD) (1)
|
||||
#else
|
||||
--
|
||||
2.36.1
|
||||
|
||||
@ -1,26 +0,0 @@
|
||||
From 79c5e7dbcc6542b68a316927ec235ecf546bb9c2 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?=
|
||||
<alexey.pawlow@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 18:52:19 +0530
|
||||
Subject: [PATCH 066/N] use _wcsnicmp instead wcsncasecmp
|
||||
|
||||
---
|
||||
Modules/getpath.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Modules/getpath.c b/Modules/getpath.c
|
||||
index c782e0f..83422d3 100644
|
||||
--- a/Modules/getpath.c
|
||||
+++ b/Modules/getpath.c
|
||||
@@ -427,7 +427,7 @@ add_exe_suffix(wchar_t **progpath_p)
|
||||
/* Check for already have an executable suffix */
|
||||
size_t n = wcslen(progpath);
|
||||
size_t s = wcslen(EXE_SUFFIX);
|
||||
- if (wcsncasecmp(EXE_SUFFIX, progpath + n - s, s) == 0) {
|
||||
+ if (_wcsnicmp(EXE_SUFFIX, progpath + n - s, s) == 0) {
|
||||
return _PyStatus_OK();
|
||||
}
|
||||
|
||||
--
|
||||
2.36.1
|
||||
|
||||
@ -1,26 +0,0 @@
|
||||
From ebed5ccf00945ecc07649d2194d16d714a4f7bf0 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?=
|
||||
<alexey.pawlow@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 18:52:20 +0530
|
||||
Subject: [PATCH 067/N] _xxsubinterpretersmodule
|
||||
|
||||
---
|
||||
Modules/_xxsubinterpretersmodule.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Modules/_xxsubinterpretersmodule.c b/Modules/_xxsubinterpretersmodule.c
|
||||
index 314059d..f26e662 100644
|
||||
--- a/Modules/_xxsubinterpretersmodule.c
|
||||
+++ b/Modules/_xxsubinterpretersmodule.c
|
||||
@@ -1761,7 +1761,7 @@ PyDoc_STRVAR(channelid_doc,
|
||||
"A channel ID identifies a channel and may be used as an int.");
|
||||
|
||||
static PyTypeObject ChannelIDtype = {
|
||||
- PyVarObject_HEAD_INIT(&PyType_Type, 0)
|
||||
+ PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"_xxsubinterpreters.ChannelID", /* tp_name */
|
||||
sizeof(channelid), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
--
|
||||
2.36.1
|
||||
|
||||
@ -1,28 +0,0 @@
|
||||
From 46e4f4c97c8eec76988a9ba31dc5432d8fbdf512 Mon Sep 17 00:00:00 2001
|
||||
From: Christoph Reiter <reiter.christoph@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 18:52:21 +0530
|
||||
Subject: [PATCH 068/N] sqlite3 module defines
|
||||
|
||||
---
|
||||
setup.py | 5 +----
|
||||
1 file changed, 1 insertion(+), 4 deletions(-)
|
||||
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 5cb6340..0145e58 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -1565,10 +1565,7 @@ class PyBuildExt(build_ext):
|
||||
'_sqlite/util.c', ]
|
||||
|
||||
sqlite_defines = []
|
||||
- if not MS_WINDOWS:
|
||||
- sqlite_defines.append(('MODULE_NAME', '"sqlite3"'))
|
||||
- else:
|
||||
- sqlite_defines.append(('MODULE_NAME', '\\"sqlite3\\"'))
|
||||
+ sqlite_defines.append(('MODULE_NAME', '"sqlite3"'))
|
||||
|
||||
# Enable support for loadable extensions in the sqlite3 module
|
||||
# if --enable-loadable-sqlite-extensions configure option is used.
|
||||
--
|
||||
2.36.1
|
||||
|
||||
@ -1,35 +0,0 @@
|
||||
From 039162df839a763139114269d550a62542f75574 Mon Sep 17 00:00:00 2001
|
||||
From: Christoph Reiter <reiter.christoph@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 18:52:23 +0530
|
||||
Subject: [PATCH 069/N] configure.ac: fix inet_pton check
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Co-authored-by: Алексей <alexey.pawlow@gmail.com>
|
||||
---
|
||||
configure.ac | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 94f8e57..bffc8c9 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -4286,10 +4286,14 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
||||
|
||||
AC_MSG_CHECKING(for inet_pton)
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
+#ifdef _WIN32
|
||||
+#include <ws2tcpip.h>
|
||||
+#else
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
+#endif
|
||||
]], [[void* p = inet_pton]])],
|
||||
[AC_DEFINE(HAVE_INET_PTON, 1, Define if you have the 'inet_pton' function.)
|
||||
AC_MSG_RESULT(yes)],
|
||||
--
|
||||
2.36.1
|
||||
|
||||
@ -1,29 +0,0 @@
|
||||
From 80b4548013c8f6d04f5b3f7b12a156f2848ee32e Mon Sep 17 00:00:00 2001
|
||||
From: Dan Yeaw <dan@yeaw.me>
|
||||
Date: Thu, 17 Jun 2021 18:52:25 +0530
|
||||
Subject: [PATCH 070/N] set venv activate path unix
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Co-authored-by: Алексей <alexey.pawlow@gmail.com>
|
||||
---
|
||||
Lib/venv/scripts/common/activate | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Lib/venv/scripts/common/activate b/Lib/venv/scripts/common/activate
|
||||
index 45af353..877b5d3 100644
|
||||
--- a/Lib/venv/scripts/common/activate
|
||||
+++ b/Lib/venv/scripts/common/activate
|
||||
@@ -37,7 +37,7 @@ deactivate () {
|
||||
# unset irrelevant variables
|
||||
deactivate nondestructive
|
||||
|
||||
-VIRTUAL_ENV="__VENV_DIR__"
|
||||
+VIRTUAL_ENV=$(cygpath "__VENV_DIR__")
|
||||
export VIRTUAL_ENV
|
||||
|
||||
_OLD_VIRTUAL_PATH="$PATH"
|
||||
--
|
||||
2.36.1
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user