diff --git a/mingw-w64-python3/0000-make-_sysconfigdata.py-relocatable.patch b/mingw-w64-python3/0000-make-_sysconfigdata.py-relocatable.patch index 21cd4887ff..5b50e9dd19 100644 --- a/mingw-w64-python3/0000-make-_sysconfigdata.py-relocatable.patch +++ b/mingw-w64-python3/0000-make-_sysconfigdata.py-relocatable.patch @@ -1,7 +1,7 @@ -diff -Naur Python-3.6.5-orig/Lib/sysconfig.py Python-3.6.5/Lib/sysconfig.py ---- Python-3.6.5-orig/Lib/sysconfig.py 2018-03-28 12:19:31.000000000 +0300 -+++ Python-3.6.5/Lib/sysconfig.py 2018-04-16 09:52:56.756702300 +0300 -@@ -257,6 +257,7 @@ +diff -Naur Python-3.7.0-orig/Lib/sysconfig.py Python-3.7.0/Lib/sysconfig.py +--- Python-3.7.0-orig/Lib/sysconfig.py 2018-06-27 06:07:35.000000000 +0300 ++++ Python-3.7.0/Lib/sysconfig.py 2018-06-30 11:15:26.083733900 +0300 +@@ -251,6 +251,7 @@ # if the expansion uses the name without a prefix. renamed_variables = ('CFLAGS', 'LDFLAGS', 'CPPFLAGS') @@ -9,7 +9,7 @@ diff -Naur Python-3.6.5-orig/Lib/sysconfig.py Python-3.6.5/Lib/sysconfig.py while len(variables) > 0: for name in tuple(variables): value = notdone[name] -@@ -410,6 +411,19 @@ +@@ -404,6 +405,19 @@ f.write('build_time_vars = ') pprint.pprint(vars, stream=f) diff --git a/mingw-w64-python3/0001-fix-_nt_quote_args-using-subprocess-list2cmdline.patch b/mingw-w64-python3/0001-fix-_nt_quote_args-using-subprocess-list2cmdline.patch index 02d017c833..c2b2b54d69 100644 --- a/mingw-w64-python3/0001-fix-_nt_quote_args-using-subprocess-list2cmdline.patch +++ b/mingw-w64-python3/0001-fix-_nt_quote_args-using-subprocess-list2cmdline.patch @@ -1,6 +1,6 @@ -diff -Naur Python-3.6.5-orig/Lib/distutils/spawn.py Python-3.6.5/Lib/distutils/spawn.py ---- Python-3.6.5-orig/Lib/distutils/spawn.py 2018-03-28 12:19:31.000000000 +0300 -+++ Python-3.6.5/Lib/distutils/spawn.py 2018-04-16 09:52:59.377321600 +0300 +diff -Naur Python-3.7.0-orig/Lib/distutils/spawn.py Python-3.7.0/Lib/distutils/spawn.py +--- Python-3.7.0-orig/Lib/distutils/spawn.py 2018-06-27 06:07:35.000000000 +0300 ++++ Python-3.7.0/Lib/distutils/spawn.py 2018-06-30 11:15:30.264541200 +0300 @@ -12,6 +12,7 @@ from distutils.errors import DistutilsPlatformError, DistutilsExecError from distutils.debug import DEBUG @@ -32,10 +32,10 @@ diff -Naur Python-3.6.5-orig/Lib/distutils/spawn.py Python-3.6.5/Lib/distutils/s return args def _spawn_nt(cmd, search_path=1, verbose=0, dry_run=0): -diff -Naur Python-3.6.5-orig/setup.py Python-3.6.5/setup.py ---- Python-3.6.5-orig/setup.py 2018-03-28 12:19:31.000000000 +0300 -+++ Python-3.6.5/setup.py 2018-04-16 09:52:59.377321600 +0300 -@@ -1232,11 +1232,7 @@ +diff -Naur Python-3.7.0-orig/setup.py Python-3.7.0/setup.py +--- Python-3.7.0-orig/setup.py 2018-06-27 06:07:35.000000000 +0300 ++++ Python-3.7.0/setup.py 2018-06-30 11:15:30.280141200 +0300 +@@ -1198,11 +1198,7 @@ '_sqlite/statement.c', '_sqlite/util.c', ] diff --git a/mingw-w64-python3/0002-restore-setup-config.patch b/mingw-w64-python3/0002-restore-setup-config.patch new file mode 100644 index 0000000000..9bbaf63fbf --- /dev/null +++ b/mingw-w64-python3/0002-restore-setup-config.patch @@ -0,0 +1,63 @@ +diff -Naur Python-3.7.0-orig/configure.ac Python-3.7.0/configure.ac +--- Python-3.7.0-orig/configure.ac 2018-06-27 06:07:35.000000000 +0300 ++++ Python-3.7.0/configure.ac 2018-06-30 11:15:32.479745100 +0300 +@@ -5619,7 +5619,7 @@ + + + # generate output files +-AC_CONFIG_FILES(Makefile.pre Misc/python.pc Misc/python-config.sh) ++AC_CONFIG_FILES(Makefile.pre Modules/Setup.config Misc/python.pc Misc/python-config.sh) + AC_CONFIG_FILES([Modules/ld_so_aix], [chmod +x Modules/ld_so_aix]) + AC_OUTPUT + +@@ -5637,7 +5637,7 @@ + + echo "creating Makefile" >&AS_MESSAGE_FD + $SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \ +- -s Modules \ ++ -s Modules Modules/Setup.config \ + Modules/Setup.local Modules/Setup + mv config.c Modules + +diff -Naur Python-3.7.0-orig/Makefile.pre.in Python-3.7.0/Makefile.pre.in +--- Python-3.7.0-orig/Makefile.pre.in 2018-06-27 06:07:35.000000000 +0300 ++++ Python-3.7.0/Makefile.pre.in 2018-06-30 11:15:32.479745100 +0300 +@@ -687,10 +687,12 @@ + Makefile Modules/config.c: Makefile.pre \ + $(srcdir)/Modules/config.c.in \ + $(MAKESETUP) \ ++ Modules/Setup.config \ + Modules/Setup \ + Modules/Setup.local + $(SHELL) $(MAKESETUP) -c $(srcdir)/Modules/config.c.in \ + -s Modules \ ++ Modules/Setup.config \ + Modules/Setup.local \ + Modules/Setup + @mv config.c Modules +@@ -1482,6 +1484,7 @@ + $(INSTALL_DATA) Makefile $(DESTDIR)$(LIBPL)/Makefile + $(INSTALL_DATA) Modules/Setup $(DESTDIR)$(LIBPL)/Setup + $(INSTALL_DATA) Modules/Setup.local $(DESTDIR)$(LIBPL)/Setup.local ++ $(INSTALL_DATA) Modules/Setup.config $(DESTDIR)$(LIBPL)/Setup.config + $(INSTALL_DATA) Misc/python.pc $(DESTDIR)$(LIBPC)/python-$(VERSION).pc + $(INSTALL_SCRIPT) $(srcdir)/Modules/makesetup $(DESTDIR)$(LIBPL)/makesetup + $(INSTALL_SCRIPT) $(srcdir)/install-sh $(DESTDIR)$(LIBPL)/install-sh +@@ -1704,7 +1707,7 @@ + if test "$$file" != "$(srcdir)/Lib/test/data/README"; then rm "$$file"; fi; \ + done + -rm -f core Makefile Makefile.pre config.status \ +- Modules/Setup Modules/Setup.local \ ++ Modules/Setup Modules/Setup.local Modules/Setup.config \ + Modules/ld_so_aix Modules/python.exp Misc/python.pc \ + Misc/python-config.sh + -rm -f python*-gdb.py +diff -Naur Python-3.7.0-orig/Modules/Setup.config.in Python-3.7.0/Modules/Setup.config.in +--- Python-3.7.0-orig/Modules/Setup.config.in 1970-01-01 03:00:00.000000000 +0300 ++++ Python-3.7.0/Modules/Setup.config.in 2018-06-30 11:15:32.479745100 +0300 +@@ -0,0 +1,5 @@ ++# This file is transmogrified into Setup.config by config.status. ++ ++# The purpose of this file is to conditionally enable certain modules ++# based on configure-time options. ++ diff --git a/mingw-w64-python3/0100-MINGW-BASE-use-NT-thread-model.patch b/mingw-w64-python3/0100-MINGW-BASE-use-NT-thread-model.patch index 5365af9af2..fba7cc5842 100644 --- a/mingw-w64-python3/0100-MINGW-BASE-use-NT-thread-model.patch +++ b/mingw-w64-python3/0100-MINGW-BASE-use-NT-thread-model.patch @@ -1,7 +1,7 @@ -diff -Naur Python-3.6.5-orig/configure.ac Python-3.6.5/configure.ac ---- Python-3.6.5-orig/configure.ac 2018-03-28 12:19:31.000000000 +0300 -+++ Python-3.6.5/configure.ac 2018-04-16 09:53:01.040136200 +0300 -@@ -1895,6 +1895,37 @@ +diff -Naur Python-3.7.0-orig/configure.ac Python-3.7.0/configure.ac +--- Python-3.7.0-orig/configure.ac 2018-06-30 11:15:34.367348400 +0300 ++++ Python-3.7.0/configure.ac 2018-06-30 11:15:34.632548900 +0300 +@@ -1944,6 +1944,46 @@ BASECFLAGS="$BASECFLAGS $ac_arch_flags" fi @@ -11,7 +11,7 @@ diff -Naur Python-3.6.5-orig/configure.ac Python-3.6.5/configure.ac +dnl - On windows platform only NT-thread model is supported. +dnl To avoid miss detection scipt first will check for NT-thread model +dnl and if is not found will try to detect build options for pthread -+dnl model. Autodetection could be overiden if variable ac_cv_ntthread ++dnl model. Autodetection could be overiden if variable with_nt_threads +dnl is set in "Site Configuration" (see autoconf manual). +dnl If NT-thread model is enabled script skips some checks that +dnl impact build process. When a new functionality is added, developers @@ -19,19 +19,28 @@ diff -Naur Python-3.6.5-orig/configure.ac Python-3.6.5/configure.ac +dnl to be mixed. + +AC_MSG_CHECKING([for NT threads]) -+AC_CACHE_VAL([ac_cv_ntthread],[ -+ AC_LINK_IFELSE([ ++AC_ARG_WITH(nt-threads, ++ AS_HELP_STRING([--with-nt-threads], [build with windows threads]), ++[ ++ case $withval in ++ no) with_nt_threads=no;; ++ yes) with_nt_threads=yes;; ++ *) with_nt_threads=yes;; ++ esac], [ ++ with_nt_threads=no]) ++if test $with_nt_threads = yes ; then ++AC_LINK_IFELSE([ + AC_LANG_PROGRAM([[]],[[_beginthread(0, 0, 0);]]) + ], -+ [ac_cv_ntthread=yes], -+ [ac_cv_ntthread=no]) -+]) -+AC_MSG_RESULT([$ac_cv_ntthread]) ++ [with_nt_threads=yes], ++ [with_nt_threads=no]) ++fi ++AC_MSG_RESULT([$with_nt_threads]) + -+if test $ac_cv_ntthread = yes ; then ++if test $with_nt_threads = yes ; then + dnl temporary default flag to avoid additional pthread checks + dnl and initilize other ac..thread flags to no -+ ac_cv_pthread_is_default=yes ++ ac_cv_pthread_is_default=no + ac_cv_kthread=no + ac_cv_pthread=no + dnl ac_cv_kpthread is set to no if default is yes (see below) @@ -39,98 +48,104 @@ diff -Naur Python-3.6.5-orig/configure.ac Python-3.6.5/configure.ac # 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). -@@ -1922,6 +1953,7 @@ - ],[ac_cv_pthread_is_default=no],[ac_cv_pthread_is_default=no]) - ]) - AC_MSG_RESULT($ac_cv_pthread_is_default) -+fi - - - if test $ac_cv_pthread_is_default = yes -@@ -2013,6 +2045,9 @@ +@@ -2062,6 +2094,8 @@ AC_MSG_RESULT($ac_cv_pthread) fi -+dnl unset temporary pthread default if NT-thread model is enabled -+test $ac_cv_ntthread = yes && ac_cv_pthread_is_default=no ++fi + # If we have set a CC compiler flag for thread support then # check if it works for CXX, too. ac_cv_cxx_thread=no -@@ -2033,6 +2068,10 @@ +@@ -2082,6 +2117,10 @@ then CXX="$CXX -pthread" ac_cv_cxx_thread=yes -+elif test $ac_cv_ntthread = yes ++elif test $with_nt_threads = yes +then + dnl set to always to skip extra pthread check below + ac_cv_cxx_thread=always fi if test $ac_cv_cxx_thread = yes -@@ -2062,6 +2101,11 @@ - dnl AC_MSG_RESULT($cpp_type) - - # checks for header files -+if test $ac_cv_ntthread = yes ; then -+ dnl skip checks for some pthread headers if NT-thread model is enabled -+ ac_cv_header_sched_h=skip -+ ac_cv_header_pthread_h=skip -+fi +@@ -2161,8 +2161,8 @@ AC_HEADER_STDC AC_CHECK_HEADERS(asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \ fcntl.h grp.h \ -@@ -2287,9 +2331,14 @@ +-ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \ +-sched.h shadow.h signal.h stropts.h termios.h \ ++ieeefp.h io.h langinfo.h libintl.h process.h \ ++shadow.h signal.h stropts.h termios.h \ + unistd.h 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 \ +@@ -2175,6 +2175,14 @@ + AC_HEADER_DIRENT + AC_HEADER_MAJOR + ++# If using nt threads, don't look for pthread.h or thread.h ++if test "x$with_nt_threads" = xno ; then ++AC_HEADER_STDC ++AC_CHECK_HEADERS(pthread.h sched.h thread.h) ++AC_HEADER_DIRENT ++AC_HEADER_MAJOR ++fi ++ + # bluetooth/bluetooth.h has been known to not compile with -std=c99. + # http://permalink.gmane.org/gmane.linux.bluez.kernel/22294 + SAVE_CFLAGS=$CFLAGS +@@ -2324,6 +2368,10 @@ AC_MSG_CHECKING(for pthread_t) have_pthread_t=no -+if test $ac_cv_ntthread = yes ; then ++if test $with_nt_threads = yes ; then + dnl skip check for pthread_t if NT-thread model is enabled + have_pthread_t=skip +else AC_COMPILE_IFELSE([ AC_LANG_PROGRAM([[#include ]], [[pthread_t x; x = *(pthread_t*)0;]]) ],[have_pthread_t=yes],[]) +@@ -2480,6 +2480,7 @@ + else + AC_MSG_RESULT(no) + fi +fi - AC_MSG_RESULT($have_pthread_t) - if test "$have_pthread_t" = yes ; then - AC_CHECK_SIZEOF(pthread_t, [], [ -@@ -2705,11 +2754,16 @@ - AC_CHECK_LIB(dld, shl_load) # Dynamic linking for HP-UX + CC="$ac_save_cc" - # only check for sem_init if thread support is requested -+if test $ac_cv_ntthread = yes ; then + AC_SUBST(OTHER_LIBTOOL_OPT) +@@ -2790,10 +2839,15 @@ + [AC_MSG_RESULT(no)] + ) + ++if test $with_nt_threads = yes ; then + dnl do not search for sem_init if NT-thread model is enabled + : +else - if test "$with_threads" = "yes" -o -z "$with_threads"; then - AC_SEARCH_LIBS(sem_init, pthread rt posix4) # 'Real Time' functions on Solaris - # posix4 on Solaris 2.6 - # pthread (first!) on Linux - fi + # 'Real Time' functions on Solaris + # posix4 on Solaris 2.6 + # pthread (first!) on Linux + AC_SEARCH_LIBS(sem_init, pthread rt posix4) +fi # check if we need libintl for locale functions AC_CHECK_LIB(intl, textdomain, -@@ -2984,6 +3038,13 @@ - AC_DEFINE(WITH_THREAD) +@@ -3036,6 +3090,11 @@ + CXX="$CXX -pthread" + fi posix_threads=yes - THREADOBJ="Python/thread.o" -+elif test $ac_cv_ntthread = yes ++elif test $with_nt_threads = yes +then -+ AC_DEFINE(WITH_THREAD) + posix_threads=no -+ THREADOBJ="Python/thread.o" + AC_DEFINE(NT_THREADS, 1, -+ [Define to 1 if you want to use native NT threads]) ++ [Define to 1 if you want to use native NT threads]) else - if test ! -z "$with_threads" -a -d "$with_threads" - then LDFLAGS="$LDFLAGS -L$with_threads" -@@ -3431,6 +3492,15 @@ + if test ! -z "$withval" -a -d "$withval" + then LDFLAGS="$LDFLAGS -L$withval" +@@ -3505,6 +3564,15 @@ fi # checks for library functions -+if test $ac_cv_ntthread = yes ; then ++if test $with_nt_threads = yes ; then + dnl GCC(mingw) 4.4+ require and use posix threads(pthreads-w32) + dnl and host may contain installed pthreads-w32. + dnl Skip checks for some functions declared in pthreads-w32 if @@ -142,22 +157,22 @@ diff -Naur Python-3.6.5-orig/configure.ac Python-3.6.5/configure.ac AC_CHECK_FUNCS(alarm accept4 setitimer getitimer bind_textdomain_codeset chown \ clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \ fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \ -@@ -4477,6 +4547,10 @@ +@@ -4495,6 +4563,10 @@ # 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. -+if test $ac_cv_ntthread = yes ; then ++if test $with_nt_threads = yes ; then + dnl skip posix semaphores test if NT-thread model is enabled + ac_cv_posix_semaphores_enabled=no +fi AC_MSG_CHECKING(whether POSIX semaphores are enabled) AC_CACHE_VAL(ac_cv_posix_semaphores_enabled, AC_RUN_IFELSE([AC_LANG_SOURCE([[ -@@ -4510,6 +4584,14 @@ +@@ -4528,6 +4600,14 @@ # Multiprocessing check for broken sem_getvalue AC_MSG_CHECKING(for broken sem_getvalue) -+if test $ac_cv_ntthread = yes ; then ++if test $with_nt_threads = yes ; then + dnl Skip test if NT-thread model is enabled. + dnl NOTE the test case below fail for pthreads-w32 as: + dnl - SEM_FAILED is not defined; @@ -168,10 +183,21 @@ diff -Naur Python-3.6.5-orig/configure.ac Python-3.6.5/configure.ac AC_CACHE_VAL(ac_cv_broken_sem_getvalue, AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include -diff -Naur Python-3.6.5-orig/pyconfig.h.in Python-3.6.5/pyconfig.h.in ---- Python-3.6.5-orig/pyconfig.h.in 2018-03-28 12:19:31.000000000 +0300 -+++ Python-3.6.5/pyconfig.h.in 2018-04-16 09:53:01.055736300 +0300 -@@ -1247,6 +1247,9 @@ +diff -Naur Python-3.7.0-orig/Python/condvar.h Python-3.7.0/Python/condvar.h +--- Python-3.7.0-orig/Python/condvar.h 2018-06-27 06:07:35.000000000 +0300 ++++ Python-3.7.0/Python/condvar.h 2018-06-30 11:16:52.253485700 +0300 +@@ -103,6 +103,7 @@ + } + + #elif defined(NT_THREADS) ++#include + /* + * Windows (XP, 2003 server and later, as well as (hopefully) CE) support + * +diff -Naur Python-3.7.0-orig/pyconfig.h.in Python-3.7.0/pyconfig.h.in +--- Python-3.7.0-orig/pyconfig.h.in 2018-06-27 06:07:35.000000000 +0300 ++++ Python-3.7.0/pyconfig.h.in 2018-06-30 11:15:34.632548900 +0300 +@@ -1281,6 +1281,9 @@ /* Define if mvwdelch in curses.h is an expression. */ #undef MVWDELCH_IS_EXPRESSION @@ -181,3 +207,16 @@ diff -Naur Python-3.6.5-orig/pyconfig.h.in Python-3.6.5/pyconfig.h.in /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT +diff -Naur Python-3.7.0-orig/Python/condvar.h Python-3.7.0/Python/condvar.h +--- Python-3.7.0-orig/Modules/_multiprocessing/multiprocessing.h 2018-06-27 06:07:35.000000000 +0300 ++++ Python-3.7.0/Modules/_multiprocessing/multiprocessing.h 2018-06-30 11:16:52.253485700 +0300 +@@ -21,6 +21,9 @@ + # endif + # define SEM_HANDLE HANDLE + # define SEM_VALUE_MAX LONG_MAX ++# if defined(HAVE_SEM_OPEN) && defined(_POSIX_THREADS) ++# include ++# endif + #else + # include /* O_CREAT and O_EXCL */ + # if defined(HAVE_SEM_OPEN) && !defined(POSIX_SEMAPHORES_NOT_ENABLED) diff --git a/mingw-w64-python3/0110-MINGW-translate-gcc-internal-defines-to-python-platf.patch b/mingw-w64-python3/0110-MINGW-translate-gcc-internal-defines-to-python-platf.patch index 67fb45e355..13de96cabb 100644 --- a/mingw-w64-python3/0110-MINGW-translate-gcc-internal-defines-to-python-platf.patch +++ b/mingw-w64-python3/0110-MINGW-translate-gcc-internal-defines-to-python-platf.patch @@ -1,6 +1,6 @@ -diff -Naur Python-3.6.5-orig/Include/pyport.h Python-3.6.5/Include/pyport.h ---- Python-3.6.5-orig/Include/pyport.h 2018-03-28 12:19:31.000000000 +0300 -+++ Python-3.6.5/Include/pyport.h 2018-04-16 09:53:02.689351000 +0300 +diff -Naur Python-3.7.0-orig/Include/pyport.h Python-3.7.0/Include/pyport.h +--- Python-3.7.0-orig/Include/pyport.h 2018-06-27 06:07:35.000000000 +0300 ++++ Python-3.7.0/Include/pyport.h 2018-06-30 11:15:36.769752600 +0300 @@ -5,6 +5,21 @@ #include @@ -18,7 +18,7 @@ diff -Naur Python-3.6.5-orig/Include/pyport.h Python-3.6.5/Include/pyport.h +#if !defined(MS_WINDOWS) && defined(MS_WIN32) +# define MS_WINDOWS +#endif -+#endif /*def __MINGW32__*/ ++#endif /* __MINGW32__*/ + /************************************************************************** Symbols and macros to supply platform-independent interfaces to basic diff --git a/mingw-w64-python3/0130-MINGW-configure-MACHDEP-and-platform-for-build.patch b/mingw-w64-python3/0130-MINGW-configure-MACHDEP-and-platform-for-build.patch index c6f841d131..2e51ac96f2 100644 --- a/mingw-w64-python3/0130-MINGW-configure-MACHDEP-and-platform-for-build.patch +++ b/mingw-w64-python3/0130-MINGW-configure-MACHDEP-and-platform-for-build.patch @@ -1,6 +1,6 @@ -diff -Naur Python-3.6.5-orig/configure.ac Python-3.6.5/configure.ac ---- Python-3.6.5-orig/configure.ac 2018-04-16 09:53:02.455548900 +0300 -+++ Python-3.6.5/configure.ac 2018-04-16 09:53:04.229762100 +0300 +diff -Naur Python-3.7.0-orig/configure.ac Python-3.7.0/configure.ac +--- Python-3.7.0-orig/configure.ac 2018-06-30 11:15:36.551352300 +0300 ++++ Python-3.7.0/configure.ac 2018-06-30 11:15:38.875756300 +0300 @@ -362,6 +362,17 @@ # Set name for machine-dependent library files AC_ARG_VAR([MACHDEP], [name for machine-dependent library files]) @@ -19,7 +19,7 @@ diff -Naur Python-3.6.5-orig/configure.ac Python-3.6.5/configure.ac if test -z "$MACHDEP" then # avoid using uname for cross builds -@@ -424,12 +435,23 @@ +@@ -423,12 +434,23 @@ *-*-cygwin*) _host_cpu= ;; @@ -43,9 +43,9 @@ diff -Naur Python-3.6.5-orig/configure.ac Python-3.6.5/configure.ac fi # Some systems cannot stand _XOPEN_SOURCE being defined at all; they -diff -Naur Python-3.6.5-orig/Python/getplatform.c Python-3.6.5/Python/getplatform.c ---- Python-3.6.5-orig/Python/getplatform.c 2018-03-28 12:19:31.000000000 +0300 -+++ Python-3.6.5/Python/getplatform.c 2018-04-16 09:53:04.245362200 +0300 +diff -Naur Python-3.7.0-orig/Python/getplatform.c Python-3.7.0/Python/getplatform.c +--- Python-3.7.0-orig/Python/getplatform.c 2018-06-27 06:07:35.000000000 +0300 ++++ Python-3.7.0/Python/getplatform.c 2018-06-30 11:15:38.891356400 +0300 @@ -1,6 +1,12 @@ #include "Python.h" diff --git a/mingw-w64-python3/0140-MINGW-preset-configure-defaults.patch b/mingw-w64-python3/0140-MINGW-preset-configure-defaults.patch index 09bc632c7f..4c127614f3 100644 --- a/mingw-w64-python3/0140-MINGW-preset-configure-defaults.patch +++ b/mingw-w64-python3/0140-MINGW-preset-configure-defaults.patch @@ -1,7 +1,7 @@ -diff -Naur Python-3.6.5-orig/configure.ac Python-3.6.5/configure.ac ---- Python-3.6.5-orig/configure.ac 2018-04-16 09:53:05.594378800 +0300 -+++ Python-3.6.5/configure.ac 2018-04-16 09:53:05.875183600 +0300 -@@ -910,6 +910,28 @@ +diff -Naur Python-3.7.0-orig/configure.ac Python-3.7.0/configure.ac +--- Python-3.7.0-orig/configure.ac 2018-06-30 11:15:40.747759600 +0300 ++++ Python-3.7.0/configure.ac 2018-06-30 11:15:41.012960100 +0300 +@@ -915,6 +915,28 @@ fi AC_SUBST(MULTIARCH_CPPFLAGS) @@ -30,9 +30,9 @@ diff -Naur Python-3.6.5-orig/configure.ac Python-3.6.5/configure.ac AC_MSG_CHECKING([for -Wl,--no-as-needed]) save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -Wl,--no-as-needed" -diff -Naur Python-3.6.5-orig/Misc/config_mingw Python-3.6.5/Misc/config_mingw ---- Python-3.6.5-orig/Misc/config_mingw 1970-01-01 03:00:00.000000000 +0300 -+++ Python-3.6.5/Misc/config_mingw 2018-04-16 09:53:05.875183600 +0300 +diff -Naur Python-3.7.0-orig/Misc/config_mingw Python-3.7.0/Misc/config_mingw +--- Python-3.7.0-orig/Misc/config_mingw 1970-01-01 03:00:00.000000000 +0300 ++++ Python-3.7.0/Misc/config_mingw 2018-06-30 11:15:41.012960100 +0300 @@ -0,0 +1,12 @@ +# configure defaults for mingw* hosts + @@ -46,9 +46,9 @@ diff -Naur Python-3.6.5-orig/Misc/config_mingw Python-3.6.5/Misc/config_mingw +# files to ignore +ac_cv_file__dev_ptmx=ignore #NOTE: under MSYS environment device exist +ac_cv_file__dev_ptc=no -diff -Naur Python-3.6.5-orig/Misc/cross_mingw32 Python-3.6.5/Misc/cross_mingw32 ---- Python-3.6.5-orig/Misc/cross_mingw32 1970-01-01 03:00:00.000000000 +0300 -+++ Python-3.6.5/Misc/cross_mingw32 2018-04-16 09:53:05.890783600 +0300 +diff -Naur Python-3.7.0-orig/Misc/cross_mingw32 Python-3.7.0/Misc/cross_mingw32 +--- Python-3.7.0-orig/Misc/cross_mingw32 1970-01-01 03:00:00.000000000 +0300 ++++ Python-3.7.0/Misc/cross_mingw32 2018-06-30 11:15:41.028560100 +0300 @@ -0,0 +1,11 @@ +# configure defaults for mingw32 host if cross-build + diff --git a/mingw-w64-python3/0150-MINGW-configure-largefile-support-for-windows-builds.patch b/mingw-w64-python3/0150-MINGW-configure-largefile-support-for-windows-builds.patch index 00a6929af1..2d6e18ec05 100644 --- a/mingw-w64-python3/0150-MINGW-configure-largefile-support-for-windows-builds.patch +++ b/mingw-w64-python3/0150-MINGW-configure-largefile-support-for-windows-builds.patch @@ -1,7 +1,7 @@ -diff -Naur Python-3.6.5-orig/configure.ac Python-3.6.5/configure.ac ---- Python-3.6.5-orig/configure.ac 2018-04-16 09:53:07.239593300 +0300 -+++ Python-3.6.5/configure.ac 2018-04-16 09:53:07.489193700 +0300 -@@ -2342,8 +2342,20 @@ +diff -Naur Python-3.7.0-orig/configure.ac Python-3.7.0/configure.ac +--- Python-3.7.0-orig/configure.ac 2018-06-30 11:15:42.916163400 +0300 ++++ Python-3.7.0/configure.ac 2018-06-30 11:15:43.150163900 +0300 +@@ -2379,8 +2379,20 @@ ]) AC_MSG_CHECKING(whether to enable large file support) diff --git a/mingw-w64-python3/0170-MINGW-add-srcdir-PC-to-CPPFLAGS.patch b/mingw-w64-python3/0170-MINGW-add-srcdir-PC-to-CPPFLAGS.patch index b25621db33..9da9733f5c 100644 --- a/mingw-w64-python3/0170-MINGW-add-srcdir-PC-to-CPPFLAGS.patch +++ b/mingw-w64-python3/0170-MINGW-add-srcdir-PC-to-CPPFLAGS.patch @@ -1,7 +1,7 @@ -diff -Naur Python-3.6.5-orig/configure.ac Python-3.6.5/configure.ac ---- Python-3.6.5-orig/configure.ac 2018-04-16 09:53:08.790604200 +0300 -+++ Python-3.6.5/configure.ac 2018-04-16 09:53:09.021005200 +0300 -@@ -5447,6 +5447,16 @@ +diff -Naur Python-3.7.0-orig/configure.ac Python-3.7.0/configure.ac +--- Python-3.7.0-orig/configure.ac 2018-06-30 11:15:45.022167100 +0300 ++++ Python-3.7.0/configure.ac 2018-06-30 11:15:45.240567500 +0300 +@@ -5458,6 +5458,16 @@ THREADHEADERS="$THREADHEADERS \$(srcdir)/$h" done @@ -18,3 +18,16 @@ diff -Naur Python-3.6.5-orig/configure.ac Python-3.6.5/configure.ac AC_SUBST(SRCDIRS) SRCDIRS="Parser Objects Python Modules Programs" AC_MSG_CHECKING(for build directories) +diff -Naur Python-3.7.0-orig/configure.ac Python-3.7.0/configure.ac +--- Python-3.7.0-orig/configure.ac 2018-06-30 11:16:58.540296800 +0300 ++++ Python-3.7.0/configure.ac 2018-06-30 11:17:01.363901700 +0300 +@@ -5617,6 +5617,9 @@ + + AC_SUBST(SRCDIRS) + SRCDIRS="Parser Objects Python Modules Programs" ++case $host in ++ *-*-mingw*) SRCDIRS="$SRCDIRS PC";; ++esac + AC_MSG_CHECKING(for build directories) + for dir in $SRCDIRS; do + if test ! -d $dir; then diff --git a/mingw-w64-python3/0180-MINGW-init-system-calls.patch b/mingw-w64-python3/0180-MINGW-init-system-calls.patch index 562c448808..daf1b5beee 100644 --- a/mingw-w64-python3/0180-MINGW-init-system-calls.patch +++ b/mingw-w64-python3/0180-MINGW-init-system-calls.patch @@ -1,9 +1,9 @@ -diff -Naur Python-3.6.5-orig/configure.ac Python-3.6.5/configure.ac ---- Python-3.6.5-orig/configure.ac 2018-04-16 09:53:10.258614600 +0300 -+++ Python-3.6.5/configure.ac 2018-04-16 09:53:10.596616700 +0300 -@@ -584,6 +584,14 @@ +diff -Naur Python-3.7.0-orig/configure.ac Python-3.7.0/configure.ac +--- Python-3.7.0-orig/configure.ac 2018-06-30 11:15:47.112570800 +0300 ++++ Python-3.7.0/configure.ac 2018-06-30 11:15:47.440171400 +0300 +@@ -561,6 +561,14 @@ + AC_DEFINE(_INCLUDE__STDC_A1_SOURCE, 1, Define to include mbstate_t for mbrtowc) fi - AC_MSG_RESULT($MACHDEP) +AC_MSG_CHECKING([for init system calls]) +AC_SUBST(INITSYS) @@ -16,10 +16,10 @@ diff -Naur Python-3.6.5-orig/configure.ac Python-3.6.5/configure.ac # Record the configure-time value of MACOSX_DEPLOYMENT_TARGET, # it may influence the way we can build extensions, so distutils # needs to check it -diff -Naur Python-3.6.5-orig/Modules/posixmodule.c Python-3.6.5/Modules/posixmodule.c ---- Python-3.6.5-orig/Modules/posixmodule.c 2018-03-28 12:19:31.000000000 +0300 -+++ Python-3.6.5/Modules/posixmodule.c 2018-04-16 09:53:10.609617400 +0300 -@@ -176,6 +176,25 @@ +diff -Naur Python-3.7.0-orig/Modules/posixmodule.c Python-3.7.0/Modules/posixmodule.c +--- Python-3.7.0-orig/Modules/posixmodule.c 2018-06-27 06:07:35.000000000 +0300 ++++ Python-3.7.0/Modules/posixmodule.c 2018-06-30 11:15:47.440171400 +0300 +@@ -173,6 +173,25 @@ #define HAVE_CWAIT 1 #define HAVE_FSYNC 1 #define fsync _commit @@ -45,7 +45,7 @@ diff -Naur Python-3.6.5-orig/Modules/posixmodule.c Python-3.6.5/Modules/posixmod #else /* Unix functions that the configure script doesn't check for */ #define HAVE_EXECV 1 -@@ -296,7 +315,7 @@ +@@ -289,7 +308,7 @@ #endif #endif @@ -54,7 +54,7 @@ diff -Naur Python-3.6.5-orig/Modules/posixmodule.c Python-3.6.5/Modules/posixmod #ifdef HAVE_DIRECT_H #include #endif -@@ -1216,7 +1235,7 @@ +@@ -1297,7 +1316,7 @@ */ #include static char **environ; @@ -63,27 +63,24 @@ diff -Naur Python-3.6.5-orig/Modules/posixmodule.c Python-3.6.5/Modules/posixmod extern char **environ; #endif /* !_MSC_VER */ -diff -Naur Python-3.6.5-orig/Modules/Setup.config.in Python-3.6.5/Modules/Setup.config.in ---- Python-3.6.5-orig/Modules/Setup.config.in 2018-03-28 12:19:31.000000000 +0300 -+++ Python-3.6.5/Modules/Setup.config.in 2018-04-16 09:53:10.609617400 +0300 -@@ -3,6 +3,9 @@ +diff -Naur Python-3.7.0-orig/Modules/Setup.config.in Python-3.7.0/Modules/Setup.config.in +--- Python-3.7.0-orig/Modules/Setup.config.in 2018-06-30 11:15:34.367348400 +0300 ++++ Python-3.7.0/Modules/Setup.config.in 2018-06-30 11:15:47.455771400 +0300 +@@ -3,3 +3,6 @@ # The purpose of this file is to conditionally enable certain modules # based on configure-time options. +# init system calls(posix/nt/...) for INITFUNC (used by makesetup) -+@INITSYS@ posixmodule.c ++@INITSYS@ -DPy_BUILD_CORE posixmodule.c # system calls + - # Threading - @USE_THREAD_MODULE@_thread _threadmodule.c - -diff -Naur Python-3.6.5-orig/Modules/Setup.dist Python-3.6.5/Modules/Setup.dist ---- Python-3.6.5-orig/Modules/Setup.dist 2018-03-28 12:19:31.000000000 +0300 -+++ Python-3.6.5/Modules/Setup.dist 2018-04-16 09:53:10.609617400 +0300 -@@ -105,7 +105,6 @@ +diff -Naur Python-3.7.0-orig/Modules/Setup.dist Python-3.7.0/Modules/Setup.dist +--- Python-3.7.0-orig/Modules/Setup.dist 2018-06-27 06:07:35.000000000 +0300 ++++ Python-3.7.0/Modules/Setup.dist 2018-06-30 11:15:47.455771400 +0300 +@@ -104,7 +104,6 @@ # This only contains the minimal set of modules required to run the # setup.py script in the root of the Python source tree. --posix posixmodule.c # posix (UNIX) system calls - 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 +-posix -DPy_BUILD_CORE posixmodule.c # posix (UNIX) system calls + 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 diff --git a/mingw-w64-python3/0200-MINGW-build-in-windows-modules-winreg.patch b/mingw-w64-python3/0200-MINGW-build-in-windows-modules-winreg.patch index 5aed7afa5c..a515e7d055 100644 --- a/mingw-w64-python3/0200-MINGW-build-in-windows-modules-winreg.patch +++ b/mingw-w64-python3/0200-MINGW-build-in-windows-modules-winreg.patch @@ -1,11 +1,10 @@ -diff -Naur Python-3.6.5-orig/configure.ac Python-3.6.5/configure.ac ---- Python-3.6.5-orig/configure.ac 2018-04-16 09:53:11.975829000 +0300 -+++ Python-3.6.5/configure.ac 2018-04-16 09:53:12.248430700 +0300 -@@ -3035,6 +3035,14 @@ +diff -Naur Python-3.7.0-orig/configure.ac Python-3.7.0/configure.ac +--- Python-3.7.0-orig/configure.ac 2018-06-30 11:15:49.405774800 +0300 ++++ Python-3.7.0/configure.ac 2018-06-30 11:15:49.702175400 +0300 +@@ -3121,6 +3121,13 @@ fi]) AC_MSG_RESULT($with_dbmliborder) -+ +# Determine if windows modules should be used. +AC_SUBST(USE_WIN32_MODULE) +USE_WIN32_MODULE='#' @@ -13,24 +12,22 @@ diff -Naur Python-3.6.5-orig/configure.ac Python-3.6.5/configure.ac + *-*-mingw*) USE_WIN32_MODULE=;; +esac + - # This is used to generate Setup.config - AC_SUBST(USE_THREAD_MODULE) - USE_THREAD_MODULE="" -diff -Naur Python-3.6.5-orig/Modules/Setup.config.in Python-3.6.5/Modules/Setup.config.in ---- Python-3.6.5-orig/Modules/Setup.config.in 2018-04-16 09:53:11.991429000 +0300 -+++ Python-3.6.5/Modules/Setup.config.in 2018-04-16 09:53:12.264030700 +0300 -@@ -9,5 +9,8 @@ - # Threading - @USE_THREAD_MODULE@_thread _threadmodule.c + AC_SUBST(LDLAST) + + # Templates for things AC_DEFINEd more than once. +diff -Naur Python-3.7.0-orig/Modules/Setup.config.in Python-3.7.0/Modules/Setup.config.in +--- Python-3.7.0-orig/Modules/Setup.config.in 2018-06-30 11:15:49.405774800 +0300 ++++ Python-3.7.0/Modules/Setup.config.in 2018-06-30 11:15:49.717775400 +0300 +@@ -6,3 +6,6 @@ + # init system calls(posix/nt/...) for INITFUNC (used by makesetup) + @INITSYS@ -DPy_BUILD_CORE posixmodule.c # system calls +# build-in modules for windows platform: +@USE_WIN32_MODULE@winreg ../PC/winreg.c + - # The rest of the modules previously listed in this file are built - # by the setup.py script in Python 2.1 and later. -diff -Naur Python-3.6.5-orig/PC/winreg.c Python-3.6.5/PC/winreg.c ---- Python-3.6.5-orig/PC/winreg.c 2018-03-28 12:19:31.000000000 +0300 -+++ Python-3.6.5/PC/winreg.c 2018-04-16 09:53:12.279630800 +0300 +diff -Naur Python-3.7.0-orig/PC/winreg.c Python-3.7.0/PC/winreg.c +--- Python-3.7.0-orig/PC/winreg.c 2018-06-27 06:07:35.000000000 +0300 ++++ Python-3.7.0/PC/winreg.c 2018-06-30 11:15:49.717775400 +0300 @@ -16,6 +16,25 @@ #include "structmember.h" #include "windows.h" diff --git a/mingw-w64-python3/0210-MINGW-determine-if-pwdmodule-should-be-used.patch b/mingw-w64-python3/0210-MINGW-determine-if-pwdmodule-should-be-used.patch index d42eb65773..34f19b9484 100644 --- a/mingw-w64-python3/0210-MINGW-determine-if-pwdmodule-should-be-used.patch +++ b/mingw-w64-python3/0210-MINGW-determine-if-pwdmodule-should-be-used.patch @@ -1,7 +1,7 @@ -diff -Naur Python-3.6.5-orig/configure.ac Python-3.6.5/configure.ac ---- Python-3.6.5-orig/configure.ac 2018-04-16 09:53:13.528641700 +0300 -+++ Python-3.6.5/configure.ac 2018-04-16 09:53:13.872044900 +0300 -@@ -3043,6 +3043,13 @@ +diff -Naur Python-3.7.0-orig/configure.ac Python-3.7.0/configure.ac +--- Python-3.7.0-orig/configure.ac 2018-06-30 11:15:51.620978700 +0300 ++++ Python-3.7.0/configure.ac 2018-06-30 11:15:51.917379300 +0300 +@@ -3128,6 +3128,13 @@ *-*-mingw*) USE_WIN32_MODULE=;; esac @@ -12,31 +12,31 @@ diff -Naur Python-3.6.5-orig/configure.ac Python-3.6.5/configure.ac + *-*-mingw*) USE_PWD_MODULE='#';; +esac + - # This is used to generate Setup.config - AC_SUBST(USE_THREAD_MODULE) - USE_THREAD_MODULE="" -diff -Naur Python-3.6.5-orig/Modules/Setup.config.in Python-3.6.5/Modules/Setup.config.in ---- Python-3.6.5-orig/Modules/Setup.config.in 2018-04-16 09:53:13.528641700 +0300 -+++ Python-3.6.5/Modules/Setup.config.in 2018-04-16 09:53:13.876045100 +0300 + AC_SUBST(LDLAST) + + # Templates for things AC_DEFINEd more than once. +diff -Naur Python-3.7.0-orig/Modules/Setup.config.in Python-3.7.0/Modules/Setup.config.in +--- Python-3.7.0-orig/Modules/Setup.config.in 2018-06-30 11:15:51.620978700 +0300 ++++ Python-3.7.0/Modules/Setup.config.in 2018-06-30 11:15:51.917379300 +0300 @@ -6,6 +6,9 @@ # init system calls(posix/nt/...) for INITFUNC (used by makesetup) - @INITSYS@ posixmodule.c + @INITSYS@ -DPy_BUILD_CORE posixmodule.c # system calls +# This is needed to find out the user's home dir if $HOME is not set +@USE_PWD_MODULE@pwd pwdmodule.c + - # Threading - @USE_THREAD_MODULE@_thread _threadmodule.c + # build-in modules for windows platform: + @USE_WIN32_MODULE@winreg ../PC/winreg.c -diff -Naur Python-3.6.5-orig/Modules/Setup.dist Python-3.6.5/Modules/Setup.dist ---- Python-3.6.5-orig/Modules/Setup.dist 2018-04-16 09:53:11.991429000 +0300 -+++ Python-3.6.5/Modules/Setup.dist 2018-04-16 09:53:13.876045100 +0300 -@@ -106,8 +106,6 @@ +diff -Naur Python-3.7.0-orig/Modules/Setup.dist Python-3.7.0/Modules/Setup.dist +--- Python-3.7.0-orig/Modules/Setup.dist 2018-06-30 11:15:49.405774800 +0300 ++++ Python-3.7.0/Modules/Setup.dist 2018-06-30 11:15:51.932979300 +0300 +@@ -105,8 +105,6 @@ # setup.py script in the root of the Python source tree. - 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 - _codecs _codecsmodule.c # access to the builtin codecs and codec registry - _weakref _weakref.c # weak references + 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 + _codecs _codecsmodule.c # access to the builtin codecs and codec registry + _weakref _weakref.c # weak references diff --git a/mingw-w64-python3/0220-MINGW-default-sys.path-calculations-for-windows-plat.patch b/mingw-w64-python3/0220-MINGW-default-sys.path-calculations-for-windows-plat.patch deleted file mode 100644 index 6fd96496fb..0000000000 --- a/mingw-w64-python3/0220-MINGW-default-sys.path-calculations-for-windows-plat.patch +++ /dev/null @@ -1,229 +0,0 @@ -diff -Naur Python-3.6.5-orig/configure.ac Python-3.6.5/configure.ac ---- Python-3.6.5-orig/configure.ac 2018-04-16 09:53:15.158661400 +0300 -+++ Python-3.6.5/configure.ac 2018-04-16 09:53:15.424861900 +0300 -@@ -5480,8 +5480,21 @@ - ;; - esac - -+dnl getpath module - default sys.path calculations -+AC_SUBST(MODULE_GETPATH) -+MODULE_GETPATH=Modules/getpath.o -+case $host in -+ *-*-mingw*) -+ dnl default sys.path calculations for windows platforms -+ MODULE_GETPATH=PC/getpathp.o -+ ;; -+esac -+ - AC_SUBST(SRCDIRS) - SRCDIRS="Parser Objects Python Modules Programs" -+case $host in -+ *-*-mingw*) SRCDIRS="$SRCDIRS PC";; -+esac - AC_MSG_CHECKING(for build directories) - for dir in $SRCDIRS; do - if test ! -d $dir; then -diff -Naur Python-3.6.5-orig/Makefile.pre.in Python-3.6.5/Makefile.pre.in ---- Python-3.6.5-orig/Makefile.pre.in 2018-03-28 12:19:31.000000000 +0300 -+++ Python-3.6.5/Makefile.pre.in 2018-04-16 09:53:15.440461900 +0300 -@@ -258,7 +258,7 @@ - # Modules - MODULE_OBJS= \ - Modules/config.o \ -- Modules/getpath.o \ -+ @MODULE_GETPATH@ \ - Modules/main.o \ - Modules/gcmodule.o - -@@ -737,6 +737,7 @@ - -DGITBRANCH="\"`LC_ALL=C $(GITBRANCH)`\"" \ - -o $@ $(srcdir)/Modules/getbuildinfo.c - -+# default sys.path calculations for posix platforms - Modules/getpath.o: $(srcdir)/Modules/getpath.c Makefile - $(CC) -c $(PY_CORE_CFLAGS) -DPYTHONPATH='"$(PYTHONPATH)"' \ - -DPREFIX='"$(prefix)"' \ -@@ -745,6 +746,13 @@ - -DVPATH='"$(VPATH)"' \ - -o $@ $(srcdir)/Modules/getpath.c - -+# default sys.path calculations for windows platforms -+PC/getpathp.o: $(srcdir)/PC/getpathp.c Makefile -+ $(CC) -c $(PY_CORE_CFLAGS) \ -+ -DVERSION='"$(VERSION)"' \ -+ -DSRCDIR='"$(srcdir)"' \ -+ -o $@ $(srcdir)/PC/getpathp.c -+ - Programs/python.o: $(srcdir)/Programs/python.c - $(MAINCC) -c $(PY_CORE_CFLAGS) -o $@ $(srcdir)/Programs/python.c - -diff -Naur Python-3.6.5-orig/PC/getpathp.c Python-3.6.5/PC/getpathp.c ---- Python-3.6.5-orig/PC/getpathp.c 2018-03-28 12:19:31.000000000 +0300 -+++ Python-3.6.5/PC/getpathp.c 2018-04-16 09:53:15.440461900 +0300 -@@ -112,10 +112,26 @@ - * with a semicolon separated path prior to calling Py_Initialize. - */ - -+#ifndef PYTHONPATH -+# define PYTHONPATH L".\\DLLs;.\\lib" -+#endif -+ - #ifndef LANDMARK - #define LANDMARK L"lib\\os.py" - #endif - -+#ifdef __MINGW32__ -+ -+static wchar_t *lib_python = L"lib\\python" VERSION; -+ -+# undef LANDMARK -+# define LANDMARK L"os.py" -+ -+# define USE_POSIX_PREFIX -+ -+#endif -+ -+ - static wchar_t prefix[MAXPATHLEN+1]; - static wchar_t progpath[MAXPATHLEN+1]; - static wchar_t dllpath[MAXPATHLEN+1]; -@@ -271,6 +287,69 @@ - } - } - -+#ifdef USE_POSIX_PREFIX -+ -+/* based on getpath.c but with paths relative to executable */ -+/* search_for_prefix requires that path be no more than MAXPATHLEN -+ bytes long. -+ return: 1 if found; -1 if found build directory -+*/ -+static int -+search_for_posix_prefix(wchar_t *argv0_path, wchar_t *home, wchar_t *_prefix) -+{ -+ size_t n; -+ -+ /* If PYTHONHOME is set, we believe it unconditionally */ -+ if (home) { -+ wchar_t *delim; -+ wcsncpy(prefix, home, MAXPATHLEN); -+ delim = wcschr(prefix, DELIM); -+ if (delim) -+ *delim = L'\0'; -+ join(prefix, lib_python); -+ join(prefix, LANDMARK); -+ return 1; -+ } -+ -+ /* Check to see if argv[0] is in the build directory */ -+ wcscpy(prefix, argv0_path); -+ join(prefix, L"Modules\\Setup"); -+ if (exists(prefix)) { -+ wchar_t *vpath; -+ /* Check source directory if argv0_path is in the build directory. */ -+ vpath = Py_DecodeLocale(SRCDIR, NULL); -+ if (vpath != NULL) { -+ wcscpy(prefix, argv0_path); -+ join(prefix, vpath); -+ PyMem_Free(vpath); -+ join(prefix, L"Lib"); -+ join(prefix, LANDMARK); -+ if (ismodule(prefix)) -+ return -1; -+ } -+ } -+ -+ /* Search from argv0_path, until root is found */ -+ wcscpy(prefix, argv0_path); -+ do { -+ n = wcslen(prefix); -+ join(prefix, lib_python); -+ join(prefix, LANDMARK); -+ if (ismodule(prefix)) -+ return 1; -+ prefix[n] = L'\0'; -+ reduce(prefix); -+ } while (prefix[0]); -+ -+ /* Configure prefix is unused */ -+ (void)_prefix; -+ -+ /* Fail */ -+ return 0; -+} -+ -+#endif /*def USE_POSIX_PREFIX */ -+ - /* gotlandmark only called by search_for_prefix, which ensures - 'prefix' is null terminated in bounds. join() ensures - 'landmark' can not overflow prefix if too long. -@@ -664,6 +743,9 @@ - size_t bufsz; - wchar_t *pythonhome = Py_GetPythonHome(); - wchar_t *envpath = NULL; -+#ifdef USE_POSIX_PREFIX -+ int pfound; -+#endif - - int skiphome, skipdefault; - wchar_t *machinepath = NULL; -@@ -729,6 +811,16 @@ - /* Calculate zip archive path from DLL or exe path */ - change_ext(zip_path, dllpath[0] ? dllpath : progpath, L".zip"); - -+#ifdef USE_POSIX_PREFIX -+ pfound = search_for_posix_prefix(argv0_path, pythonhome, NULL); -+ if (!pfound) { -+ wcsncpy(prefix, argv0_path, MAXPATHLEN); -+ reduce(prefix); -+ join(prefix, lib_python); -+ } -+ else -+ reduce(prefix); -+#else - if (pythonhome == NULL || *pythonhome == '\0') { - if (zip_path[0] && exists(zip_path)) { - wcscpy_s(prefix, MAXPATHLEN+1, zip_path); -@@ -741,6 +833,7 @@ - } - else - wcscpy_s(prefix, MAXPATHLEN+1, pythonhome); -+#endif - - if (envpath && *envpath == '\0') - envpath = NULL; -@@ -781,6 +874,9 @@ - } - else - bufsz = 0; -+#ifdef USE_POSIX_PREFIX -+ bufsz += wcslen(prefix) + 1; -+#endif - bufsz += wcslen(PYTHONPATH) + 1; - bufsz += wcslen(argv0_path) + 1; - if (userpath) -@@ -820,6 +916,11 @@ - buf = wcschr(buf, L'\0'); - *buf++ = DELIM; - } -+#ifdef USE_POSIX_PREFIX -+ wcscpy(buf, prefix); -+ buf = wcschr(buf, L'\0'); -+ *buf++ = DELIM; -+#endif - if (userpath) { - if (wcscpy_s(buf, bufsz - (buf - module_search_path), userpath)) - Py_FatalError("buffer overflow in getpathp.c's calculate_path()"); -@@ -880,6 +981,12 @@ - on the path, and that our 'prefix' directory is - the parent of that. - */ -+#ifdef USE_POSIX_PREFIX -+ if (pfound > 0) { -+ reduce(prefix); -+ reduce(prefix); -+ } -+#endif - if (*prefix==L'\0') { - wchar_t lookBuf[MAXPATHLEN+1]; - wchar_t *look = buf - 1; /* 'buf' is at the end of the buffer */ diff --git a/mingw-w64-python3/0230-MINGW-AC_LIBOBJ-replacement-of-fileblocks.patch b/mingw-w64-python3/0230-MINGW-AC_LIBOBJ-replacement-of-fileblocks.patch index 2e2faf1fcc..383cad034c 100644 --- a/mingw-w64-python3/0230-MINGW-AC_LIBOBJ-replacement-of-fileblocks.patch +++ b/mingw-w64-python3/0230-MINGW-AC_LIBOBJ-replacement-of-fileblocks.patch @@ -1,6 +1,6 @@ -diff -Naur Python-3.6.5-orig/Python-3.5.2/Python/fileblocks.c Python-3.6.5/Python-3.5.2/Python/fileblocks.c ---- Python-3.6.5-orig/Python-3.5.2/Python/fileblocks.c 1970-01-01 03:00:00.000000000 +0300 -+++ Python-3.6.5/Python-3.5.2/Python/fileblocks.c 2018-04-16 09:53:16.969079300 +0300 +diff -Naur Python-3.7.0-orig/Python/fileblocks.c Python-3.7.0/Python/fileblocks.c +--- Python-3.7.0-orig/Python/fileblocks.c 1970-01-01 03:00:00.000000000 +0300 ++++ Python-3.7.0/Python/fileblocks.c 2018-06-30 11:15:54.038983000 +0300 @@ -0,0 +1,17 @@ +/* +-- Macro: AC_STRUCT_ST_BLOCKS diff --git a/mingw-w64-python3/0240-MINGW-use-main-to-start-execution.patch b/mingw-w64-python3/0240-MINGW-use-main-to-start-execution.patch deleted file mode 100644 index 9abea54583..0000000000 --- a/mingw-w64-python3/0240-MINGW-use-main-to-start-execution.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur Python-3.6.5-orig/Programs/python.c Python-3.6.5/Programs/python.c ---- Python-3.6.5-orig/Programs/python.c 2018-03-28 12:19:31.000000000 +0300 -+++ Python-3.6.5/Programs/python.c 2018-04-16 09:53:18.394096000 +0300 -@@ -7,7 +7,7 @@ - #include - #endif - --#ifdef MS_WINDOWS -+#if defined(_MSC_VER) - int - wmain(int argc, wchar_t **argv) - { diff --git a/mingw-w64-python3/0250-MINGW-compiler-customize-mingw-cygwin-compilers.patch b/mingw-w64-python3/0250-MINGW-compiler-customize-mingw-cygwin-compilers.patch index 505ec86698..d0bdeb8783 100644 --- a/mingw-w64-python3/0250-MINGW-compiler-customize-mingw-cygwin-compilers.patch +++ b/mingw-w64-python3/0250-MINGW-compiler-customize-mingw-cygwin-compilers.patch @@ -1,6 +1,6 @@ -diff -Naur Python-3.6.5-orig/Lib/distutils/sysconfig.py Python-3.6.5/Lib/distutils/sysconfig.py ---- Python-3.6.5-orig/Lib/distutils/sysconfig.py 2018-03-28 12:19:31.000000000 +0300 -+++ Python-3.6.5/Lib/distutils/sysconfig.py 2018-04-16 09:53:19.847911600 +0300 +diff -Naur Python-3.7.0-orig/Lib/distutils/sysconfig.py Python-3.7.0/Lib/distutils/sysconfig.py +--- Python-3.7.0-orig/Lib/distutils/sysconfig.py 2018-06-27 06:07:35.000000000 +0300 ++++ Python-3.7.0/Lib/distutils/sysconfig.py 2018-06-30 11:15:58.354590700 +0300 @@ -153,7 +153,23 @@ Mainly needed on Unix, so we can plug in the information that varies across Unices and is stored in Python's Makefile. diff --git a/mingw-w64-python3/0260-MINGW-compiler-enable-new-dtags.patch b/mingw-w64-python3/0260-MINGW-compiler-enable-new-dtags.patch index 11eb6986c0..ee7eeac031 100644 --- a/mingw-w64-python3/0260-MINGW-compiler-enable-new-dtags.patch +++ b/mingw-w64-python3/0260-MINGW-compiler-enable-new-dtags.patch @@ -1,7 +1,7 @@ -diff -Naur Python-3.6.5-orig/Lib/distutils/unixccompiler.py Python-3.6.5/Lib/distutils/unixccompiler.py ---- Python-3.6.5-orig/Lib/distutils/unixccompiler.py 2018-03-28 12:19:31.000000000 +0300 -+++ Python-3.6.5/Lib/distutils/unixccompiler.py 2018-04-16 09:53:21.316521300 +0300 -@@ -242,9 +242,13 @@ +diff -Naur Python-3.7.0-orig/Lib/distutils/unixccompiler.py Python-3.7.0/Lib/distutils/unixccompiler.py +--- Python-3.7.0-orig/Lib/distutils/unixccompiler.py 2018-06-27 06:07:35.000000000 +0300 ++++ Python-3.7.0/Lib/distutils/unixccompiler.py 2018-06-30 11:16:00.522994500 +0300 +@@ -240,9 +240,13 @@ # -Wl whenever gcc was used in the past it is probably # safest to keep doing so. if sysconfig.get_config_var("GNULD") == "yes": diff --git a/mingw-w64-python3/0270-CYGWIN-issue13756-Python-make-fail-on-cygwin.patch b/mingw-w64-python3/0270-CYGWIN-issue13756-Python-make-fail-on-cygwin.patch deleted file mode 100644 index 434c619133..0000000000 --- a/mingw-w64-python3/0270-CYGWIN-issue13756-Python-make-fail-on-cygwin.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff -Naur Python-3.6.5-orig/Makefile.pre.in Python-3.6.5/Makefile.pre.in ---- Python-3.6.5-orig/Makefile.pre.in 2018-04-16 09:53:16.797875600 +0300 -+++ Python-3.6.5/Makefile.pre.in 2018-04-16 09:53:22.860536100 +0300 -@@ -651,9 +651,9 @@ - $(LN) -fsn Versions/Current/$(PYTHONFRAMEWORK) $(PYTHONFRAMEWORKDIR)/$(PYTHONFRAMEWORK) - $(LN) -fsn Versions/Current/Resources $(PYTHONFRAMEWORKDIR)/Resources - --# This rule builds the Cygwin Python DLL and import library if configured -+# This rule builds the Python DLL and import library if configured - # for a shared core library; otherwise, this rule is a noop. --$(DLLLIBRARY) libpython$(VERSION).dll.a: $(LIBRARY_OBJS) -+$(DLLLIBRARY) libpython$(LDVERSION).dll.a: $(LIBRARY_OBJS) - if test -n "$(DLLLIBRARY)"; then \ - $(LDSHARED) -Wl,--out-implib=$@ -o $(DLLLIBRARY) $^ \ - $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST); \ -diff -Naur Python-3.6.5-orig/Modules/makesetup Python-3.6.5/Modules/makesetup ---- Python-3.6.5-orig/Modules/makesetup 2018-03-28 12:19:31.000000000 +0300 -+++ Python-3.6.5/Modules/makesetup 2018-04-16 09:53:22.860536100 +0300 -@@ -92,7 +92,7 @@ - else - ExtraLibDir='$(LIBPL)' - fi -- ExtraLibs="-L$ExtraLibDir -lpython\$(VERSION)";; -+ ExtraLibs="-L$ExtraLibDir -lpython\$(LDVERSION)";; - esac - - # Main loop diff --git a/mingw-w64-python3/0290-issue6672-v2-Add-Mingw-recognition-to-pyport.h-to-al.patch b/mingw-w64-python3/0290-issue6672-v2-Add-Mingw-recognition-to-pyport.h-to-al.patch index b2f4486f04..05bedf88d2 100644 --- a/mingw-w64-python3/0290-issue6672-v2-Add-Mingw-recognition-to-pyport.h-to-al.patch +++ b/mingw-w64-python3/0290-issue6672-v2-Add-Mingw-recognition-to-pyport.h-to-al.patch @@ -1,7 +1,7 @@ -diff -Naur Python-3.6.5-orig/Include/pyport.h Python-3.6.5/Include/pyport.h ---- Python-3.6.5-orig/Include/pyport.h 2018-04-16 09:53:03.979161600 +0300 -+++ Python-3.6.5/Include/pyport.h 2018-04-16 09:53:24.457747900 +0300 -@@ -611,37 +611,39 @@ +diff -Naur Python-3.7.0-orig/Include/pyport.h Python-3.7.0/Include/pyport.h +--- Python-3.7.0-orig/Include/pyport.h 2018-06-30 11:15:38.626155900 +0300 ++++ Python-3.7.0/Include/pyport.h 2018-06-30 11:16:02.675798300 +0300 +@@ -624,37 +624,39 @@ */ /* @@ -9,7 +9,7 @@ diff -Naur Python-3.6.5-orig/Include/pyport.h Python-3.6.5/Include/pyport.h + Only MSVC windows ports is handled in PC/pyconfig.h. - Cygwin is the only other autoconf platform requiring special -+ Cygwin and Mingw are autoconf platforms requiring special ++ Cygwin and Mingw is the only other autoconf platform requiring special linkage handling and it uses __declspec(). */ -#if defined(__CYGWIN__) @@ -20,8 +20,8 @@ diff -Naur Python-3.6.5-orig/Include/pyport.h Python-3.6.5/Include/pyport.h /* only get special linkage if built as shared or platform is Cygwin */ #if defined(Py_ENABLE_SHARED) || defined(__CYGWIN__) # if defined(HAVE_DECLSPEC_DLL) --# ifdef Py_BUILD_CORE -+# if defined(Py_BUILD_CORE) || defined(Py_BUILD_CORE_MODULE) +-# if defined(Py_BUILD_CORE) || defined(Py_BUILD_CORE_BUILTIN) ++# if defined(Py_BUILD_CORE) || defined(Py_BUILD_CORE_BUILTIN) || defined(Py_BUILD_CORE_MODULE) # define PyAPI_FUNC(RTYPE) __declspec(dllexport) RTYPE # define PyAPI_DATA(RTYPE) extern __declspec(dllexport) RTYPE /* module init functions inside the core need no external linkage */ @@ -31,16 +31,14 @@ diff -Naur Python-3.6.5-orig/Include/pyport.h Python-3.6.5/Include/pyport.h +# if defined(__CYGWIN__) || defined(__MINGW32__) # define PyMODINIT_FUNC __declspec(dllexport) PyObject* -# else /* __CYGWIN__ */ -+# else ++# else /* __CYGWIN__ || __MINGW32__*/ # define PyMODINIT_FUNC PyObject* -# endif /* __CYGWIN__ */ --# else /* Py_BUILD_CORE */ -+# endif -+# else /* Py_BUILD_CORE... */ ++# endif /* __CYGWIN__ || __MINGW32__*/ + # else /* Py_BUILD_CORE */ /* Building an extension module, or an embedded situation */ /* public Python functions and data are imported */ -- /* Under Cygwin, auto-import functions to prevent compilation */ -+ /* Under Cygwin/Mingw, auto-import functions to prevent compilation */ + /* Under Cygwin, auto-import functions to prevent compilation */ /* failures similar to those described at the bottom of 4.1: */ /* http://docs.python.org/extending/windows.html#a-cookbook-approach */ -# if !defined(__CYGWIN__) @@ -49,22 +47,13 @@ diff -Naur Python-3.6.5-orig/Include/pyport.h Python-3.6.5/Include/pyport.h +# else # define PyAPI_FUNC(RTYPE) __declspec(dllimport) RTYPE -# endif /* !__CYGWIN__ */ -+# endif ++# endif /* __CYGWIN__ || __MINGW32__*/ # define PyAPI_DATA(RTYPE) extern __declspec(dllimport) RTYPE /* module init functions outside the core must be exported */ # if defined(__cplusplus) -@@ -649,7 +651,7 @@ - # else /* __cplusplus */ - # define PyMODINIT_FUNC __declspec(dllexport) PyObject* - # endif /* __cplusplus */ --# endif /* Py_BUILD_CORE */ -+# endif /* Py_BUILD_CORE... */ - # endif /* HAVE_DECLSPEC */ - #endif /* Py_ENABLE_SHARED */ - -diff -Naur Python-3.6.5-orig/setup.py Python-3.6.5/setup.py ---- Python-3.6.5-orig/setup.py 2018-04-16 09:53:00.754533700 +0300 -+++ Python-3.6.5/setup.py 2018-04-16 09:53:24.473347900 +0300 +diff -Naur Python-3.7.0-orig/setup.py Python-3.7.0/setup.py +--- Python-3.7.0-orig/setup.py 2018-06-30 11:15:32.245744700 +0300 ++++ Python-3.7.0/setup.py 2018-06-30 11:16:02.675798300 +0300 @@ -224,6 +224,9 @@ def build_extensions(self): diff --git a/mingw-w64-python3/0300-MINGW-configure-for-shared-build.patch b/mingw-w64-python3/0300-MINGW-configure-for-shared-build.patch index ff1424e5b9..da73c670af 100644 --- a/mingw-w64-python3/0300-MINGW-configure-for-shared-build.patch +++ b/mingw-w64-python3/0300-MINGW-configure-for-shared-build.patch @@ -1,7 +1,7 @@ -diff -Naur Python-3.6.5-orig/configure.ac Python-3.6.5/configure.ac ---- Python-3.6.5-orig/configure.ac 2018-04-16 09:53:16.782275500 +0300 -+++ Python-3.6.5/configure.ac 2018-04-16 09:53:26.008155200 +0300 -@@ -1232,6 +1232,13 @@ +diff -Naur Python-3.7.0-orig/configure.ac Python-3.7.0/configure.ac +--- Python-3.7.0-orig/configure.ac 2018-06-30 11:15:53.851782600 +0300 ++++ Python-3.7.0/configure.ac 2018-06-30 11:16:04.813002000 +0300 +@@ -1226,6 +1226,13 @@ ;; esac @@ -15,7 +15,7 @@ diff -Naur Python-3.6.5-orig/configure.ac Python-3.6.5/configure.ac else # shared is disabled PY_ENABLE_SHARED=0 case $ac_sys_system in -@@ -1240,6 +1247,10 @@ +@@ -1234,6 +1241,10 @@ LDLIBRARY='libpython$(LDVERSION).dll.a' ;; esac @@ -26,7 +26,7 @@ diff -Naur Python-3.6.5-orig/configure.ac Python-3.6.5/configure.ac fi if test "$cross_compiling" = yes; then -@@ -2680,6 +2691,12 @@ +@@ -2732,6 +2743,12 @@ LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";; *) LDSHARED="ld";; esac @@ -39,7 +39,7 @@ diff -Naur Python-3.6.5-orig/configure.ac Python-3.6.5/configure.ac fi AC_MSG_RESULT($LDSHARED) LDCXXSHARED=${LDCXXSHARED-$LDSHARED} -@@ -5476,7 +5493,8 @@ +@@ -5486,7 +5503,8 @@ 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. diff --git a/mingw-w64-python3/0310-MINGW-dynamic-loading-support.patch b/mingw-w64-python3/0310-MINGW-dynamic-loading-support.patch index d4a999ffdf..c10925f0e9 100644 --- a/mingw-w64-python3/0310-MINGW-dynamic-loading-support.patch +++ b/mingw-w64-python3/0310-MINGW-dynamic-loading-support.patch @@ -1,7 +1,7 @@ -diff -Naur Python-3.6.5-orig/configure.ac Python-3.6.5/configure.ac ---- Python-3.6.5-orig/configure.ac 2018-04-16 09:53:27.271360900 +0300 -+++ Python-3.6.5/configure.ac 2018-04-16 09:53:27.553161400 +0300 -@@ -2551,6 +2551,9 @@ +diff -Naur Python-3.7.0-orig/configure.ac Python-3.7.0/configure.ac +--- Python-3.7.0-orig/configure.ac 2018-06-30 11:16:06.703405400 +0300 ++++ Python-3.7.0/configure.ac 2018-06-30 11:16:06.999806000 +0300 +@@ -2607,6 +2607,9 @@ CYGWIN*) SHLIB_SUFFIX=.dll;; *) SHLIB_SUFFIX=.so;; esac @@ -11,7 +11,7 @@ diff -Naur Python-3.6.5-orig/configure.ac Python-3.6.5/configure.ac fi AC_MSG_RESULT($SHLIB_SUFFIX) -@@ -3563,6 +3566,12 @@ +@@ -3634,6 +3637,12 @@ fi ;; esac @@ -24,7 +24,7 @@ diff -Naur Python-3.6.5-orig/configure.ac Python-3.6.5/configure.ac fi AC_MSG_RESULT($DYNLOADFILE) if test "$DYNLOADFILE" != "dynload_stub.o" -@@ -4835,6 +4844,12 @@ +@@ -4850,6 +4859,12 @@ *) EXT_SUFFIX=${SHLIB_SUFFIX};; esac @@ -37,10 +37,10 @@ diff -Naur Python-3.6.5-orig/configure.ac Python-3.6.5/configure.ac AC_MSG_CHECKING(LDVERSION) LDVERSION='$(VERSION)$(ABIFLAGS)' -diff -Naur Python-3.6.5-orig/Makefile.pre.in Python-3.6.5/Makefile.pre.in ---- Python-3.6.5-orig/Makefile.pre.in 2018-04-16 09:53:24.169546100 +0300 -+++ Python-3.6.5/Makefile.pre.in 2018-04-16 09:53:27.568761500 +0300 -@@ -779,6 +779,12 @@ +diff -Naur Python-3.7.0-orig/Makefile.pre.in Python-3.7.0/Makefile.pre.in +--- Python-3.7.0-orig/Makefile.pre.in 2018-06-30 11:15:34.367348400 +0300 ++++ Python-3.7.0/Makefile.pre.in 2018-06-30 11:16:07.015406000 +0300 +@@ -791,6 +791,12 @@ -DSHLIB_EXT='"$(EXT_SUFFIX)"' \ -o $@ $(srcdir)/Python/dynload_hpux.c @@ -53,9 +53,9 @@ diff -Naur Python-3.6.5-orig/Makefile.pre.in Python-3.6.5/Makefile.pre.in Python/sysmodule.o: $(srcdir)/Python/sysmodule.c Makefile $(CC) -c $(PY_CORE_CFLAGS) \ -DABIFLAGS='"$(ABIFLAGS)"' \ -diff -Naur Python-3.6.5-orig/Python/dynload_win.c Python-3.6.5/Python/dynload_win.c ---- Python-3.6.5-orig/Python/dynload_win.c 2018-03-28 12:19:31.000000000 +0300 -+++ Python-3.6.5/Python/dynload_win.c 2018-04-16 09:53:27.568761500 +0300 +diff -Naur Python-3.7.0-orig/Python/dynload_win.c Python-3.7.0/Python/dynload_win.c +--- Python-3.7.0-orig/Python/dynload_win.c 2018-06-27 06:07:35.000000000 +0300 ++++ Python-3.7.0/Python/dynload_win.c 2018-06-30 11:16:07.015406000 +0300 @@ -33,11 +33,21 @@ #define PYD_UNTAGGED_SUFFIX PYD_DEBUG_SUFFIX ".pyd" diff --git a/mingw-w64-python3/0320-MINGW-implement-exec-prefix.patch b/mingw-w64-python3/0320-MINGW-implement-exec-prefix.patch deleted file mode 100644 index 8cc1a76970..0000000000 --- a/mingw-w64-python3/0320-MINGW-implement-exec-prefix.patch +++ /dev/null @@ -1,184 +0,0 @@ -diff -Naur Python-3.6.5-orig/PC/getpathp.c Python-3.6.5/PC/getpathp.c ---- Python-3.6.5-orig/PC/getpathp.c 2018-04-16 09:53:16.797875600 +0300 -+++ Python-3.6.5/PC/getpathp.c 2018-04-16 09:53:29.128173700 +0300 -@@ -129,10 +129,17 @@ - - # define USE_POSIX_PREFIX - -+# ifdef Py_ENABLE_SHARED -+# define USE_EXEC_PREFIX -+# endif -+ - #endif - - - static wchar_t prefix[MAXPATHLEN+1]; -+#ifdef USE_EXEC_PREFIX -+static wchar_t exec_prefix[MAXPATHLEN+1]; -+#endif - static wchar_t progpath[MAXPATHLEN+1]; - static wchar_t dllpath[MAXPATHLEN+1]; - static wchar_t *module_search_path = NULL; -@@ -386,6 +393,82 @@ - /* a string loaded from the DLL at startup.*/ - extern const char *PyWin_DLLVersionString; - -+#ifdef USE_EXEC_PREFIX -+ -+/* based on getpath.c but with path relative to executabe */ -+/* search_for exec_prefix requires that paths be no more than -+ MAXPATHLEN bytes long. -+ return: 1 if found; -1 if found build directory -+*/ -+static int -+search_for_exec_prefix(wchar_t *argv0_path, wchar_t *home, wchar_t *_exec_prefix) -+{ -+ size_t n; -+ -+ /* If PYTHONHOME is set, we believe it unconditionally */ -+ if (home) { -+ wchar_t *delim; -+ delim = wcschr(home, DELIM); -+ if (delim) -+ wcsncpy(exec_prefix, delim+1, MAXPATHLEN); -+ else -+ wcsncpy(exec_prefix, home, MAXPATHLEN); -+ join(exec_prefix, lib_python); -+ join(exec_prefix, L"lib-dynload"); -+ return 1; -+ } -+ -+ /* Check to see if argv[0] is in the build directory. "pybuilddir.txt" -+ is written by setup.py and contains the relative path to the location -+ of shared library modules. */ -+ wcscpy(exec_prefix, argv0_path); -+ join(exec_prefix, L"pybuilddir.txt"); -+ if (exists(exec_prefix)) { -+ FILE *f = _Py_wfopen(exec_prefix, L"rb"); -+ if (f == NULL) -+ errno = 0; -+ else { -+ char buf[MAXPATHLEN+1]; -+ PyObject *decoded; -+ wchar_t rel_builddir_path[MAXPATHLEN+1]; -+ n = fread(buf, 1, MAXPATHLEN, f); -+ buf[n] = '\0'; -+ fclose(f); -+ decoded = PyUnicode_DecodeMBCS(buf, n, NULL); -+ if (decoded != NULL) { -+ Py_ssize_t k; -+ k = PyUnicode_AsWideChar(decoded, -+ rel_builddir_path, MAXPATHLEN); -+ Py_DECREF(decoded); -+ if (k >= 0) { -+ rel_builddir_path[k] = L'\0'; -+ wcscpy(exec_prefix, argv0_path); -+ join(exec_prefix, rel_builddir_path); -+ return -1; -+ } -+ } -+ } -+ } -+ -+ /* Search from argv0_path, until root is found */ -+ wcscpy(exec_prefix, argv0_path); -+ do { -+ n = wcslen(exec_prefix); -+ join(exec_prefix, lib_python); -+ join(exec_prefix, L"lib-dynload"); -+ if (exists(exec_prefix)) -+ return 1; -+ exec_prefix[n] = L'\0'; -+ reduce(exec_prefix); -+ } while (exec_prefix[0]); -+ -+ /* Configure exec_prefix is unused */ -+ (void)_exec_prefix; -+ -+ /* Fail */ -+ return 0; -+} -+#endif /*def USE_EXEC_PREFIX*/ - - /* Load a PYTHONPATH value from the registry. - Load from either HKEY_LOCAL_MACHINE or HKEY_CURRENT_USER. -@@ -746,6 +829,9 @@ - #ifdef USE_POSIX_PREFIX - int pfound; - #endif -+#ifdef USE_EXEC_PREFIX -+ int efound; -+#endif - - int skiphome, skipdefault; - wchar_t *machinepath = NULL; -@@ -838,6 +924,15 @@ - if (envpath && *envpath == '\0') - envpath = NULL; - -+#ifdef USE_EXEC_PREFIX -+ efound = search_for_exec_prefix(argv0_path, pythonhome, NULL); -+ if (!efound) { -+ wcsncpy(exec_prefix, argv0_path, MAXPATHLEN); -+ reduce(exec_prefix); -+ join(exec_prefix, lib_python); -+ join(exec_prefix, L"lib-dynload"); -+ } -+#endif - - skiphome = pythonhome==NULL ? 0 : 1; - #ifdef Py_ENABLE_SHARED -@@ -877,6 +972,9 @@ - #ifdef USE_POSIX_PREFIX - bufsz += wcslen(prefix) + 1; - #endif -+#ifdef USE_EXEC_PREFIX -+ bufsz += wcslen(exec_prefix) + 1; -+#endif - bufsz += wcslen(PYTHONPATH) + 1; - bufsz += wcslen(argv0_path) + 1; - if (userpath) -@@ -921,6 +1019,11 @@ - buf = wcschr(buf, L'\0'); - *buf++ = DELIM; - #endif -+#ifdef USE_EXEC_PREFIX -+ wcscpy(buf, exec_prefix); -+ buf = wcschr(buf, L'\0'); -+ *buf++ = DELIM; -+#endif - if (userpath) { - if (wcscpy_s(buf, bufsz - (buf - module_search_path), userpath)) - Py_FatalError("buffer overflow in getpathp.c's calculate_path()"); -@@ -986,6 +1089,17 @@ - reduce(prefix); - reduce(prefix); - } -+ else -+ wcscpy(prefix, argv0_path); -+#endif -+#ifdef USE_EXEC_PREFIX -+ if (efound > 0) { -+ reduce(exec_prefix); -+ reduce(exec_prefix); -+ reduce(exec_prefix); -+ } -+ else -+ wcscpy(exec_prefix, argv0_path); - #endif - if (*prefix==L'\0') { - wchar_t lookBuf[MAXPATHLEN+1]; -@@ -1055,7 +1169,13 @@ - wchar_t * - Py_GetExecPrefix(void) - { -+#ifdef USE_EXEC_PREFIX -+ if (!module_search_path) -+ calculate_path(); -+ return exec_prefix; -+#else - return Py_GetPrefix(); -+#endif - } - - wchar_t * diff --git a/mingw-w64-python3/0330-MINGW-ignore-main-program-for-frozen-scripts.patch b/mingw-w64-python3/0330-MINGW-ignore-main-program-for-frozen-scripts.patch index 46026b91ed..29efa6aa56 100644 --- a/mingw-w64-python3/0330-MINGW-ignore-main-program-for-frozen-scripts.patch +++ b/mingw-w64-python3/0330-MINGW-ignore-main-program-for-frozen-scripts.patch @@ -1,6 +1,6 @@ -diff -Naur Python-3.6.5-orig/configure.ac Python-3.6.5/configure.ac ---- Python-3.6.5-orig/configure.ac 2018-04-16 09:53:28.897970900 +0300 -+++ Python-3.6.5/configure.ac 2018-04-16 09:53:30.628384200 +0300 +diff -Naur Python-3.7.0-orig/configure.ac Python-3.7.0/configure.ac +--- Python-3.7.0-orig/configure.ac 2018-06-30 11:16:08.949809400 +0300 ++++ Python-3.7.0/configure.ac 2018-06-30 11:16:09.224609900 +0300 @@ -5523,6 +5523,16 @@ ;; esac @@ -17,11 +17,11 @@ diff -Naur Python-3.6.5-orig/configure.ac Python-3.6.5/configure.ac + AC_SUBST(SRCDIRS) SRCDIRS="Parser Objects Python Modules Programs" - case $host in -diff -Naur Python-3.6.5-orig/Makefile.pre.in Python-3.6.5/Makefile.pre.in ---- Python-3.6.5-orig/Makefile.pre.in 2018-04-16 09:53:28.897970900 +0300 -+++ Python-3.6.5/Makefile.pre.in 2018-04-16 09:53:30.633384500 +0300 -@@ -326,7 +326,7 @@ + AC_MSG_CHECKING(for build directories) +diff -Naur Python-3.7.0-orig/Makefile.pre.in Python-3.7.0/Makefile.pre.in +--- Python-3.7.0-orig/Makefile.pre.in 2018-06-30 11:16:08.949809400 +0300 ++++ Python-3.7.0/Makefile.pre.in 2018-06-30 11:16:09.224609900 +0300 +@@ -333,7 +333,7 @@ Python/codecs.o \ Python/dynamic_annotations.o \ Python/errors.o \ diff --git a/mingw-w64-python3/0340-MINGW-setup-exclude-termios-module.patch b/mingw-w64-python3/0340-MINGW-setup-exclude-termios-module.patch index 12afecdcf3..9b8b5c52a1 100644 --- a/mingw-w64-python3/0340-MINGW-setup-exclude-termios-module.patch +++ b/mingw-w64-python3/0340-MINGW-setup-exclude-termios-module.patch @@ -1,7 +1,7 @@ -diff -Naur Python-3.6.5-orig/setup.py Python-3.6.5/setup.py ---- Python-3.6.5-orig/setup.py 2018-04-16 09:53:25.770154600 +0300 -+++ Python-3.6.5/setup.py 2018-04-16 09:53:32.180998700 +0300 -@@ -1355,7 +1355,7 @@ +diff -Naur Python-3.7.0-orig/setup.py Python-3.7.0/setup.py +--- Python-3.7.0-orig/setup.py 2018-06-30 11:16:04.594601700 +0300 ++++ Python-3.7.0/setup.py 2018-06-30 11:16:11.427013900 +0300 +@@ -1321,7 +1321,7 @@ missing.append('_gdbm') # Unix-only modules diff --git a/mingw-w64-python3/0350-MINGW-setup-_multiprocessing-module.patch b/mingw-w64-python3/0350-MINGW-setup-_multiprocessing-module.patch index 9bbe75722d..99502f704a 100644 --- a/mingw-w64-python3/0350-MINGW-setup-_multiprocessing-module.patch +++ b/mingw-w64-python3/0350-MINGW-setup-_multiprocessing-module.patch @@ -1,7 +1,7 @@ -diff -Naur Python-3.6.5-orig/setup.py Python-3.6.5/setup.py ---- Python-3.6.5-orig/setup.py 2018-04-16 09:53:33.458006800 +0300 -+++ Python-3.6.5/setup.py 2018-04-16 09:53:33.675010600 +0300 -@@ -1624,7 +1624,7 @@ +diff -Naur Python-3.7.0-orig/setup.py Python-3.7.0/setup.py +--- Python-3.7.0-orig/setup.py 2018-06-30 11:16:13.307417300 +0300 ++++ Python-3.7.0/setup.py 2018-06-30 11:16:13.525817600 +0300 +@@ -1584,7 +1584,7 @@ macros = dict() libraries = ['rt'] @@ -10,16 +10,16 @@ diff -Naur Python-3.6.5-orig/setup.py Python-3.6.5/setup.py multiprocessing_srcs = [ '_multiprocessing/multiprocessing.c', '_multiprocessing/semaphore.c', ] -@@ -1637,8 +1637,12 @@ +@@ -1596,8 +1596,12 @@ + sysconfig.get_config_var('POSIX_SEMAPHORES_NOT_ENABLED')): multiprocessing_srcs.append('_multiprocessing/semaphore.c') - if sysconfig.get_config_var('WITH_THREAD'): -+ multiprocessing_libs = [] -+ if host_platform.startswith(('mingw', 'win')): -+ multiprocessing_libs += ['ws2_32'] - exts.append ( Extension('_multiprocessing', multiprocessing_srcs, - define_macros=list(macros.items()), -+ libraries=multiprocessing_libs, - include_dirs=["Modules/_multiprocessing"])) - else: - missing.append('_multiprocessing') ++ multiprocessing_libs = [] ++ if host_platform.startswith(('mingw', 'win')): ++ multiprocessing_libs += ['ws2_32'] + exts.append ( Extension('_multiprocessing', multiprocessing_srcs, + define_macros=list(macros.items()), ++ libraries=multiprocessing_libs, + include_dirs=["Modules/_multiprocessing"])) + # End multiprocessing + diff --git a/mingw-w64-python3/0360-MINGW-setup-select-module.patch b/mingw-w64-python3/0360-MINGW-setup-select-module.patch index 058962862c..82c7563e53 100644 --- a/mingw-w64-python3/0360-MINGW-setup-select-module.patch +++ b/mingw-w64-python3/0360-MINGW-setup-select-module.patch @@ -1,6 +1,6 @@ -diff -Naur Python-3.6.5-orig/Modules/selectmodule.c Python-3.6.5/Modules/selectmodule.c ---- Python-3.6.5-orig/Modules/selectmodule.c 2018-03-28 12:19:31.000000000 +0300 -+++ Python-3.6.5/Modules/selectmodule.c 2018-04-16 09:53:35.278227100 +0300 +diff -Naur Python-3.7.0-orig/Modules/selectmodule.c Python-3.7.0/Modules/selectmodule.c +--- Python-3.7.0-orig/Modules/selectmodule.c 2018-06-27 06:07:35.000000000 +0300 ++++ Python-3.7.0/Modules/selectmodule.c 2018-06-30 11:16:15.678621400 +0300 @@ -106,9 +106,9 @@ v = PyObject_AsFileDescriptor( o ); if (v == -1) goto finally; @@ -22,10 +22,10 @@ diff -Naur Python-3.6.5-orig/Modules/selectmodule.c Python-3.6.5/Modules/selectm FD_SET(v, set); /* add object and its file descriptor to the list */ -diff -Naur Python-3.6.5-orig/setup.py Python-3.6.5/setup.py ---- Python-3.6.5-orig/setup.py 2018-04-16 09:53:34.988624300 +0300 -+++ Python-3.6.5/setup.py 2018-04-16 09:53:35.293827100 +0300 -@@ -714,7 +714,11 @@ +diff -Naur Python-3.7.0-orig/setup.py Python-3.7.0/setup.py +--- Python-3.7.0-orig/setup.py 2018-06-30 11:16:15.429021000 +0300 ++++ Python-3.7.0/setup.py 2018-06-30 11:16:15.678621400 +0300 +@@ -742,7 +742,11 @@ missing.append('spwd') # select(2); not on ancient System V diff --git a/mingw-w64-python3/0370-MINGW-setup-_ctypes-module-with-system-libffi.patch b/mingw-w64-python3/0370-MINGW-setup-_ctypes-module-with-system-libffi.patch index 575a3a1fec..70779c5737 100644 --- a/mingw-w64-python3/0370-MINGW-setup-_ctypes-module-with-system-libffi.patch +++ b/mingw-w64-python3/0370-MINGW-setup-_ctypes-module-with-system-libffi.patch @@ -1,6 +1,6 @@ -diff -Naur Python-3.6.5-orig/Modules/_ctypes/callproc.c Python-3.6.5/Modules/_ctypes/callproc.c ---- Python-3.6.5-orig/Modules/_ctypes/callproc.c 2018-03-28 12:19:31.000000000 +0300 -+++ Python-3.6.5/Modules/_ctypes/callproc.c 2018-04-16 09:53:36.847437300 +0300 +diff -Naur Python-3.7.0-orig/Modules/_ctypes/callproc.c Python-3.7.0/Modules/_ctypes/callproc.c +--- Python-3.7.0-orig/Modules/_ctypes/callproc.c 2018-06-27 06:07:35.000000000 +0300 ++++ Python-3.7.0/Modules/_ctypes/callproc.c 2018-06-30 11:16:17.855425300 +0300 @@ -725,6 +725,21 @@ } @@ -23,7 +23,7 @@ diff -Naur Python-3.6.5-orig/Modules/_ctypes/callproc.c Python-3.6.5/Modules/_ct /* * libffi uses: * -@@ -753,7 +768,9 @@ +@@ -751,7 +766,9 @@ ffi_cif cif; int cc; #ifdef MS_WIN32 @@ -33,7 +33,7 @@ diff -Naur Python-3.6.5-orig/Modules/_ctypes/callproc.c Python-3.6.5/Modules/_ct #ifndef DONT_USE_SEH DWORD dwExceptionCode = 0; EXCEPTION_RECORD record; -@@ -804,7 +821,9 @@ +@@ -800,7 +817,9 @@ #ifndef DONT_USE_SEH __try { #endif @@ -43,7 +43,7 @@ diff -Naur Python-3.6.5-orig/Modules/_ctypes/callproc.c Python-3.6.5/Modules/_ct #endif ffi_call(&cif, (void *)pProc, resmem, avalues); #ifdef MS_WIN32 -@@ -838,6 +857,7 @@ +@@ -832,6 +851,7 @@ return -1; } #endif @@ -51,7 +51,7 @@ diff -Naur Python-3.6.5-orig/Modules/_ctypes/callproc.c Python-3.6.5/Modules/_ct #ifdef MS_WIN64 if (delta != 0) { PyErr_Format(PyExc_RuntimeError, -@@ -867,6 +887,7 @@ +@@ -861,6 +881,7 @@ return -1; } #endif @@ -59,19 +59,19 @@ diff -Naur Python-3.6.5-orig/Modules/_ctypes/callproc.c Python-3.6.5/Modules/_ct #endif if ((flags & FUNCFLAG_PYTHONAPI) && PyErr_Occurred()) return -1; -diff -Naur Python-3.6.5-orig/setup.py Python-3.6.5/setup.py ---- Python-3.6.5-orig/setup.py 2018-04-16 09:53:36.582633400 +0300 -+++ Python-3.6.5/setup.py 2018-04-16 09:53:36.863037300 +0300 -@@ -2058,6 +2058,8 @@ +diff -Naur Python-3.7.0-orig/setup.py Python-3.7.0/setup.py +--- Python-3.7.0-orig/setup.py 2018-06-30 11:16:17.590224900 +0300 ++++ Python-3.7.0/setup.py 2018-06-30 11:16:17.855425300 +0300 +@@ -1979,6 +1979,8 @@ ext_test = Extension('_ctypes_test', sources=['_ctypes/_ctypes_test.c'], - libraries=math_libs) + libraries=['m']) + if host_platform.startswith(('mingw', 'win')): + ext_test.libraries.extend(['oleaut32']) self.extensions.extend([ext, ext_test]) if host_platform == 'darwin': -@@ -2094,6 +2096,8 @@ +@@ -2006,6 +2008,8 @@ if ffi_inc and ffi_lib: ext.include_dirs.extend(ffi_inc) ext.libraries.append(ffi_lib) diff --git a/mingw-w64-python3/0380-MINGW-defect-winsock2-and-setup-_socket-module.patch b/mingw-w64-python3/0380-MINGW-defect-winsock2-and-setup-_socket-module.patch index e9610f930b..00aa3445ec 100644 --- a/mingw-w64-python3/0380-MINGW-defect-winsock2-and-setup-_socket-module.patch +++ b/mingw-w64-python3/0380-MINGW-defect-winsock2-and-setup-_socket-module.patch @@ -1,7 +1,7 @@ -diff -Naur Python-3.6.5-orig/configure.ac Python-3.6.5/configure.ac ---- Python-3.6.5-orig/configure.ac 2018-04-16 09:53:31.941597100 +0300 -+++ Python-3.6.5/configure.ac 2018-04-16 09:53:38.445049900 +0300 -@@ -4170,21 +4170,36 @@ +diff -Naur Python-3.7.0-orig/configure.ac Python-3.7.0/configure.ac +--- Python-3.7.0-orig/configure.ac 2018-06-30 11:16:11.193013500 +0300 ++++ Python-3.7.0/configure.ac 2018-06-30 11:16:20.179829400 +0300 +@@ -4207,21 +4207,36 @@ ],[]) AC_MSG_RESULT($was_it_defined) @@ -42,7 +42,7 @@ diff -Naur Python-3.6.5-orig/configure.ac Python-3.6.5/configure.ac [ac_cv_struct_sockaddr_storage=yes], [ac_cv_struct_sockaddr_storage=no])) AC_MSG_RESULT($ac_cv_struct_sockaddr_storage) -@@ -5409,7 +5424,10 @@ +@@ -5419,7 +5434,10 @@ AC_CHECK_TYPE(socklen_t,, AC_DEFINE(socklen_t,int, @@ -54,9 +54,9 @@ diff -Naur Python-3.6.5-orig/configure.ac Python-3.6.5/configure.ac #ifdef HAVE_SYS_TYPES_H #include #endif -diff -Naur Python-3.6.5-orig/Misc/config_mingw Python-3.6.5/Misc/config_mingw ---- Python-3.6.5-orig/Misc/config_mingw 2018-04-16 09:53:07.239593300 +0300 -+++ Python-3.6.5/Misc/config_mingw 2018-04-16 09:53:38.460650000 +0300 +diff -Naur Python-3.7.0-orig/Misc/config_mingw Python-3.7.0/Misc/config_mingw +--- Python-3.7.0-orig/Misc/config_mingw 2018-06-30 11:15:42.916163400 +0300 ++++ Python-3.7.0/Misc/config_mingw 2018-06-30 11:16:20.195429400 +0300 @@ -10,3 +10,6 @@ # files to ignore ac_cv_file__dev_ptmx=ignore #NOTE: under MSYS environment device exist @@ -64,14 +64,14 @@ diff -Naur Python-3.6.5-orig/Misc/config_mingw Python-3.6.5/Misc/config_mingw + +# force detection of winsock2 functionality - require wxp or newer +ac_cv_func_getpeername=yes -diff -Naur Python-3.6.5-orig/Modules/socketmodule.c Python-3.6.5/Modules/socketmodule.c ---- Python-3.6.5-orig/Modules/socketmodule.c 2018-03-28 12:19:31.000000000 +0300 -+++ Python-3.6.5/Modules/socketmodule.c 2018-04-16 09:53:38.460650000 +0300 -@@ -396,6 +396,12 @@ +diff -Naur Python-3.7.0-orig/Modules/socketmodule.c Python-3.7.0/Modules/socketmodule.c +--- Python-3.7.0-orig/Modules/socketmodule.c 2018-06-27 06:07:35.000000000 +0300 ++++ Python-3.7.0/Modules/socketmodule.c 2018-06-30 11:16:20.195429400 +0300 +@@ -387,6 +387,12 @@ /* Do not include addrinfo.h for MSVC7 or greater. 'addrinfo' and * EAI_* constants are defined in (the already included) ws2tcpip.h. */ -+#elif defined(__MINGW32__) ++#elif defined(__MINGW32__) && (_WIN32_WINNT < 0x0501) + /* Do not include addrinfo.h as minimum supported version is + * _WIN32_WINNT >= WindowsXP(0x0501) + */ @@ -80,9 +80,21 @@ diff -Naur Python-3.6.5-orig/Modules/socketmodule.c Python-3.6.5/Modules/socketm #else # include "addrinfo.h" #endif -diff -Naur Python-3.6.5-orig/pyconfig.h.in Python-3.6.5/pyconfig.h.in ---- Python-3.6.5-orig/pyconfig.h.in 2018-04-16 09:53:02.458549000 +0300 -+++ Python-3.6.5/pyconfig.h.in 2018-04-16 09:53:38.460650000 +0300 +@@ -565,7 +565,11 @@ + # define SET_SOCK_ERROR(err) WSASetLastError(err) + # define SOCK_TIMEOUT_ERR WSAEWOULDBLOCK + # define SOCK_INPROGRESS_ERR WSAEWOULDBLOCK ++#ifdef _MSC_VER + # define SUPPRESS_DEPRECATED_CALL __pragma(warning(suppress: 4996)) ++#else ++# define SUPPRESS_DEPRECATED_CALL ++#endif + #else + # define GET_SOCK_ERROR errno + # define SET_SOCK_ERROR(err) do { errno = err; } while (0) +diff -Naur Python-3.7.0-orig/pyconfig.h.in Python-3.7.0/pyconfig.h.in +--- Python-3.7.0-orig/pyconfig.h.in 2018-06-30 11:15:36.551352300 +0300 ++++ Python-3.7.0/pyconfig.h.in 2018-06-30 11:16:20.195429400 +0300 @@ -46,7 +46,7 @@ /* Define to 1 if you have the `acosh' function. */ #undef HAVE_ACOSH @@ -92,9 +104,9 @@ diff -Naur Python-3.6.5-orig/pyconfig.h.in Python-3.6.5/pyconfig.h.in #undef HAVE_ADDRINFO /* Define to 1 if you have the `alarm' function. */ -@@ -1227,6 +1227,9 @@ - /* Define to 1 if you have the `writev' function. */ - #undef HAVE_WRITEV +@@ -1261,6 +1261,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 header file. */ +#undef HAVE_WS2TCPIP_H @@ -102,7 +114,7 @@ diff -Naur Python-3.6.5-orig/pyconfig.h.in Python-3.6.5/pyconfig.h.in /* Define if the zlib library has inflateCopy */ #undef HAVE_ZLIB_COPY -@@ -1535,7 +1538,7 @@ +@@ -1573,7 +1576,7 @@ /* Define to `unsigned int' if does not define. */ #undef size_t @@ -111,10 +123,10 @@ diff -Naur Python-3.6.5-orig/pyconfig.h.in Python-3.6.5/pyconfig.h.in #undef socklen_t /* Define to `int' if doesn't define. */ -diff -Naur Python-3.6.5-orig/setup.py Python-3.6.5/setup.py ---- Python-3.6.5-orig/setup.py 2018-04-16 09:53:38.133049400 +0300 -+++ Python-3.6.5/setup.py 2018-04-16 09:53:38.460650000 +0300 -@@ -845,7 +845,11 @@ +diff -Naur Python-3.7.0-orig/setup.py Python-3.7.0/setup.py +--- Python-3.7.0-orig/setup.py 2018-06-30 11:16:19.774228700 +0300 ++++ Python-3.7.0/setup.py 2018-06-30 11:16:20.211029500 +0300 +@@ -879,7 +879,11 @@ exts.append( Extension('_posixsubprocess', ['_posixsubprocess.c']) ) # socket(2) @@ -125,4 +137,4 @@ diff -Naur Python-3.6.5-orig/setup.py Python-3.6.5/setup.py + libraries = socket_libs, depends = ['socketmodule.h']) ) # Detect SSL support for the socket module (via _ssl) - search_for_ssl_incs_in = [ + ssl_ext, hashlib_ext = self._detect_openssl(inc_dirs, lib_dirs) diff --git a/mingw-w64-python3/0390-MINGW-exclude-unix-only-modules.patch b/mingw-w64-python3/0390-MINGW-exclude-unix-only-modules.patch index 3b1214c0b7..5e9cdd01a4 100644 --- a/mingw-w64-python3/0390-MINGW-exclude-unix-only-modules.patch +++ b/mingw-w64-python3/0390-MINGW-exclude-unix-only-modules.patch @@ -1,7 +1,7 @@ -diff -Naur Python-3.6.5-orig/setup.py Python-3.6.5/setup.py ---- Python-3.6.5-orig/setup.py 2018-04-16 09:53:39.878454900 +0300 -+++ Python-3.6.5/setup.py 2018-04-16 09:53:40.097855400 +0300 -@@ -701,11 +701,20 @@ +diff -Naur Python-3.7.0-orig/setup.py Python-3.7.0/setup.py +--- Python-3.7.0-orig/setup.py 2018-06-30 11:16:22.207833000 +0300 ++++ Python-3.7.0/setup.py 2018-06-30 11:16:22.426233400 +0300 +@@ -729,11 +729,20 @@ if (config_h_vars.get('FLOCK_NEEDS_LIBBSD', False)): # May be necessary on AIX for flock function libs = ['bsd'] @@ -25,7 +25,7 @@ diff -Naur Python-3.6.5-orig/setup.py Python-3.6.5/setup.py # spwd, shadow passwords if (config_h_vars.get('HAVE_GETSPNAM', False) or config_h_vars.get('HAVE_GETSPENT', False)): -@@ -728,7 +737,10 @@ +@@ -756,7 +765,10 @@ # Lance Ellinghaus's syslog module # syslog daemon interface @@ -35,9 +35,9 @@ diff -Naur Python-3.6.5-orig/setup.py Python-3.6.5/setup.py + else: + missing.append('syslog') - # - # Here ends the simple stuff. From here on, modules need certain -@@ -832,17 +844,23 @@ + # Fuzz tests. + exts.append( Extension( +@@ -866,17 +878,23 @@ # crypt module. diff --git a/mingw-w64-python3/0400-MINGW-setup-msvcrt-and-_winapi-modules.patch b/mingw-w64-python3/0400-MINGW-setup-msvcrt-and-_winapi-modules.patch index 879905a244..32a6b71c96 100644 --- a/mingw-w64-python3/0400-MINGW-setup-msvcrt-and-_winapi-modules.patch +++ b/mingw-w64-python3/0400-MINGW-setup-msvcrt-and-_winapi-modules.patch @@ -1,6 +1,30 @@ -diff -Naur Python-3.6.5-orig/Modules/_winapi.c Python-3.6.5/Modules/_winapi.c ---- Python-3.6.5-orig/Modules/_winapi.c 2018-03-28 12:19:31.000000000 +0300 -+++ Python-3.6.5/Modules/_winapi.c 2018-04-16 09:53:41.627860700 +0300 +diff -Naur Python-3.7.0-orig/Python/dynamic_annotations.c Python-3.7.0/Python/dynamic_annotations.c +--- Python-3.7.0-orig/Python/dynamic_annotations.c 2018-06-27 06:07:35.000000000 +0300 ++++ Python-3.7.0/Python/dynamic_annotations.c 2018-07-02 09:39:09.139582100 +0300 +@@ -27,7 +27,7 @@ + * Author: Kostya Serebryany + */ + +-#ifdef _MSC_VER ++#ifdef MS_WINDOWS + # include + #endif + +diff -Naur Python-3.7.0-orig/Modules/main.c Python-3.7.0/Modules/main.c +--- Python-3.7.0-orig/Modules/main.c 2018-06-27 06:07:35.000000000 +0300 ++++ Python-3.7.0/Modules/main.c 2018-07-02 09:47:09.500870400 +0300 +@@ -18,7 +18,7 @@ + # endif + #endif + +-#ifdef _MSC_VER ++#if defined(_WIN32) && defined(Py_DEBUG) + # include + #endif + +diff -Naur Python-3.7.0-orig/Modules/_winapi.c Python-3.7.0/Modules/_winapi.c +--- Python-3.7.0-orig/Modules/_winapi.c 2018-06-27 06:07:35.000000000 +0300 ++++ Python-3.7.0/Modules/_winapi.c 2018-06-30 11:16:24.579037100 +0300 @@ -39,7 +39,9 @@ #define WINDOWS_LEAN_AND_MEAN @@ -11,9 +35,9 @@ diff -Naur Python-3.6.5-orig/Modules/_winapi.c Python-3.6.5/Modules/_winapi.c #include "winreparse.h" #if defined(MS_WIN32) && !defined(MS_WIN64) -diff -Naur Python-3.6.5-orig/PC/msvcrtmodule.c Python-3.6.5/PC/msvcrtmodule.c ---- Python-3.6.5-orig/PC/msvcrtmodule.c 2018-03-28 12:19:31.000000000 +0300 -+++ Python-3.6.5/PC/msvcrtmodule.c 2018-04-16 09:53:41.627860700 +0300 +diff -Naur Python-3.7.0-orig/PC/msvcrtmodule.c Python-3.7.0/PC/msvcrtmodule.c +--- Python-3.7.0-orig/PC/msvcrtmodule.c 2018-06-27 06:07:35.000000000 +0300 ++++ Python-3.7.0/PC/msvcrtmodule.c 2018-06-30 11:16:24.594637200 +0300 @@ -21,7 +21,9 @@ #include #include @@ -24,10 +48,10 @@ diff -Naur Python-3.6.5-orig/PC/msvcrtmodule.c Python-3.6.5/PC/msvcrtmodule.c #include #ifdef _MSC_VER -diff -Naur Python-3.6.5-orig/setup.py Python-3.6.5/setup.py ---- Python-3.6.5-orig/setup.py 2018-04-16 09:53:41.369458100 +0300 -+++ Python-3.6.5/setup.py 2018-04-16 09:53:41.643460800 +0300 -@@ -996,6 +996,24 @@ +diff -Naur Python-3.7.0-orig/setup.py Python-3.7.0/setup.py +--- Python-3.7.0-orig/setup.py 2018-06-30 11:16:24.298236600 +0300 ++++ Python-3.7.0/setup.py 2018-06-30 11:16:24.594637200 +0300 +@@ -962,6 +962,24 @@ min_db_ver = (3, 3) db_setup_debug = False # verbose debug prints from this script? diff --git a/mingw-w64-python3/0410-MINGW-build-extensions-with-GCC.patch b/mingw-w64-python3/0410-MINGW-build-extensions-with-GCC.patch index c4714ed6b2..d12144acc3 100644 --- a/mingw-w64-python3/0410-MINGW-build-extensions-with-GCC.patch +++ b/mingw-w64-python3/0410-MINGW-build-extensions-with-GCC.patch @@ -1,6 +1,6 @@ -diff -Naur Python-3.6.5-orig/Lib/distutils/command/build_ext.py Python-3.6.5/Lib/distutils/command/build_ext.py ---- Python-3.6.5-orig/Lib/distutils/command/build_ext.py 2018-03-28 12:19:31.000000000 +0300 -+++ Python-3.6.5/Lib/distutils/command/build_ext.py 2018-04-16 09:53:43.253475000 +0300 +diff -Naur Python-3.7.0-orig/Lib/distutils/command/build_ext.py Python-3.7.0/Lib/distutils/command/build_ext.py +--- Python-3.7.0-orig/Lib/distutils/command/build_ext.py 2018-06-27 06:07:35.000000000 +0300 ++++ Python-3.7.0/Lib/distutils/command/build_ext.py 2018-06-30 11:16:26.763041000 +0300 @@ -185,7 +185,7 @@ # for extensions under windows use different directories # for Release and Debug builds. @@ -31,27 +31,27 @@ diff -Naur Python-3.6.5-orig/Lib/distutils/command/build_ext.py Python-3.6.5/Lib if sys.platform == "win32": from distutils._msvccompiler import MSVCCompiler if not isinstance(self.compiler, MSVCCompiler): -diff -Naur Python-3.6.5-orig/Lib/distutils/util.py Python-3.6.5/Lib/distutils/util.py ---- Python-3.6.5-orig/Lib/distutils/util.py 2018-03-28 12:19:31.000000000 +0300 -+++ Python-3.6.5/Lib/distutils/util.py 2018-04-16 09:53:43.270075100 +0300 -@@ -40,6 +40,8 @@ - For other non-POSIX platforms, currently just returns 'sys.platform'. +diff -Naur Python-3.7.0-orig/Lib/distutils/util.py Python-3.7.0/Lib/distutils/util.py +--- Python-3.7.0-orig/Lib/distutils/util.py 2018-06-27 06:07:35.000000000 +0300 ++++ Python-3.7.0/Lib/distutils/util.py 2018-06-30 11:16:26.763041000 +0300 +@@ -36,6 +36,8 @@ + """ if os.name == 'nt': + if 'GCC' in sys.version: + return 'mingw' - # sniff sys.version for architecture. - prefix = " bit (" - i = sys.version.find(prefix) -diff -Naur Python-3.6.5-orig/Lib/sysconfig.py Python-3.6.5/Lib/sysconfig.py ---- Python-3.6.5-orig/Lib/sysconfig.py 2018-04-16 09:52:59.141321000 +0300 -+++ Python-3.6.5/Lib/sysconfig.py 2018-04-16 09:53:43.270075100 +0300 -@@ -641,6 +641,8 @@ - For other non-POSIX platforms, currently just returns 'sys.platform'. + if 'amd64' in sys.version.lower(): + return 'win-amd64' + return sys.platform +diff -Naur Python-3.7.0-orig/Lib/sysconfig.py Python-3.7.0/Lib/sysconfig.py +--- Python-3.7.0-orig/Lib/sysconfig.py 2018-06-30 11:15:29.968140700 +0300 ++++ Python-3.7.0/Lib/sysconfig.py 2018-06-30 11:16:26.763041000 +0300 +@@ -631,6 +631,8 @@ + """ if os.name == 'nt': + if 'GCC' in sys.version: + return 'mingw' - # sniff sys.version for architecture. - prefix = " bit (" - i = sys.version.find(prefix) + if 'amd64' in sys.version.lower(): + return 'win-amd64' + return sys.platform diff --git a/mingw-w64-python3/0420-MINGW-use-Mingw32CCompiler-as-default-compiler-for-m.patch b/mingw-w64-python3/0420-MINGW-use-Mingw32CCompiler-as-default-compiler-for-m.patch index 4600b69ef2..518ddd6657 100644 --- a/mingw-w64-python3/0420-MINGW-use-Mingw32CCompiler-as-default-compiler-for-m.patch +++ b/mingw-w64-python3/0420-MINGW-use-Mingw32CCompiler-as-default-compiler-for-m.patch @@ -1,6 +1,6 @@ -diff -Naur Python-3.6.5-orig/Lib/distutils/ccompiler.py Python-3.6.5/Lib/distutils/ccompiler.py ---- Python-3.6.5-orig/Lib/distutils/ccompiler.py 2018-03-28 12:19:31.000000000 +0300 -+++ Python-3.6.5/Lib/distutils/ccompiler.py 2018-04-16 09:53:44.862290900 +0300 +diff -Naur Python-3.7.0-orig/Lib/distutils/ccompiler.py Python-3.7.0/Lib/distutils/ccompiler.py +--- Python-3.7.0-orig/Lib/distutils/ccompiler.py 2018-06-27 06:07:35.000000000 +0300 ++++ Python-3.7.0/Lib/distutils/ccompiler.py 2018-06-30 11:16:28.962644800 +0300 @@ -9,7 +9,7 @@ from distutils.file_util import move_file from distutils.dir_util import mkpath @@ -19,9 +19,9 @@ diff -Naur Python-3.6.5-orig/Lib/distutils/ccompiler.py Python-3.6.5/Lib/distuti for pattern, compiler in _default_compilers: if re.match(pattern, platform) is not None or \ re.match(pattern, osname) is not None: -diff -Naur Python-3.6.5-orig/Lib/distutils/cygwinccompiler.py Python-3.6.5/Lib/distutils/cygwinccompiler.py ---- Python-3.6.5-orig/Lib/distutils/cygwinccompiler.py 2018-03-28 12:19:31.000000000 +0300 -+++ Python-3.6.5/Lib/distutils/cygwinccompiler.py 2018-04-16 09:53:44.862290900 +0300 +diff -Naur Python-3.7.0-orig/Lib/distutils/cygwinccompiler.py Python-3.7.0/Lib/distutils/cygwinccompiler.py +--- Python-3.7.0-orig/Lib/distutils/cygwinccompiler.py 2018-06-27 06:07:35.000000000 +0300 ++++ Python-3.7.0/Lib/distutils/cygwinccompiler.py 2018-06-30 11:16:28.962644800 +0300 @@ -255,11 +255,16 @@ output_dir = '' obj_names = [] diff --git a/mingw-w64-python3/0430-MINGW-find-import-library.patch b/mingw-w64-python3/0430-MINGW-find-import-library.patch index a75eb26331..baa16bbc7f 100644 --- a/mingw-w64-python3/0430-MINGW-find-import-library.patch +++ b/mingw-w64-python3/0430-MINGW-find-import-library.patch @@ -1,6 +1,6 @@ -diff -Naur Python-3.6.5-orig/Lib/distutils/cygwinccompiler.py Python-3.6.5/Lib/distutils/cygwinccompiler.py ---- Python-3.6.5-orig/Lib/distutils/cygwinccompiler.py 2018-04-16 09:53:46.117496100 +0300 -+++ Python-3.6.5/Lib/distutils/cygwinccompiler.py 2018-04-16 09:53:46.341896800 +0300 +diff -Naur Python-3.7.0-orig/Lib/distutils/cygwinccompiler.py Python-3.7.0/Lib/distutils/cygwinccompiler.py +--- Python-3.7.0-orig/Lib/distutils/cygwinccompiler.py 2018-06-30 11:16:30.819048100 +0300 ++++ Python-3.7.0/Lib/distutils/cygwinccompiler.py 2018-06-30 11:16:31.037448500 +0300 @@ -93,6 +93,7 @@ obj_extension = ".o" static_lib_extension = ".a" diff --git a/mingw-w64-python3/0440-MINGW-setup-_ssl-module.patch b/mingw-w64-python3/0440-MINGW-setup-_ssl-module.patch index f46c944f39..00fafb660a 100644 --- a/mingw-w64-python3/0440-MINGW-setup-_ssl-module.patch +++ b/mingw-w64-python3/0440-MINGW-setup-_ssl-module.patch @@ -1,18 +1,12 @@ -diff -Naur Python-3.6.5-orig/setup.py Python-3.6.5/setup.py ---- Python-3.6.5-orig/setup.py 2018-04-16 09:53:42.947673100 +0300 -+++ Python-3.6.5/setup.py 2018-04-16 09:53:47.803510400 +0300 -@@ -889,10 +889,13 @@ - - if (ssl_incs is not None and - ssl_libs is not None): -+ _ssl_libs = ['ssl', 'crypto'] -+ if host_platform.startswith(('mingw', 'win')): -+ _ssl_libs += ['ws2_32'] - exts.append( Extension('_ssl', ['_ssl.c'], - include_dirs = ssl_incs, - library_dirs = ssl_libs, -- libraries = ['ssl', 'crypto'], -+ libraries = _ssl_libs, - depends = ['socketmodule.h']), ) - else: - missing.append('_ssl') +diff -Naur Python-3.7.0-orig/setup.py Python-3.7.0/setup.py +--- Python-3.7.0-orig/setup.py 2018-06-30 11:16:26.482240500 +0300 ++++ Python-3.7.0/setup.py 2018-06-30 11:16:33.143452200 +0300 +@@ -2192,6 +2192,8 @@ + openssl_includes = split_var('OPENSSL_INCLUDES', '-I') + openssl_libdirs = split_var('OPENSSL_LDFLAGS', '-L') + openssl_libs = split_var('OPENSSL_LIBS', '-l') ++ if host_platform.startswith(('mingw', 'win')): ++ openssl_libs += ['ws2_32'] + if not openssl_libs: + # libssl and libcrypto not found + return None, None diff --git a/mingw-w64-python3/0460-MINGW-generalization-of-posix-build-in-sysconfig.py.patch b/mingw-w64-python3/0460-MINGW-generalization-of-posix-build-in-sysconfig.py.patch index 1dd62e4c13..265890baea 100644 --- a/mingw-w64-python3/0460-MINGW-generalization-of-posix-build-in-sysconfig.py.patch +++ b/mingw-w64-python3/0460-MINGW-generalization-of-posix-build-in-sysconfig.py.patch @@ -1,7 +1,7 @@ -diff -Naur Python-3.6.5-orig/Lib/sysconfig.py Python-3.6.5/Lib/sysconfig.py ---- Python-3.6.5-orig/Lib/sysconfig.py 2018-04-16 09:53:44.614488000 +0300 -+++ Python-3.6.5/Lib/sysconfig.py 2018-04-16 09:53:49.324726500 +0300 -@@ -95,6 +95,9 @@ +diff -Naur Python-3.7.0-orig/Lib/sysconfig.py Python-3.7.0/Lib/sysconfig.py +--- Python-3.7.0-orig/Lib/sysconfig.py 2018-06-30 11:16:28.713044400 +0300 ++++ Python-3.7.0/Lib/sysconfig.py 2018-06-30 11:16:35.280655900 +0300 +@@ -96,6 +96,9 @@ _CONFIG_VARS = None _USER_BASE = None @@ -11,7 +11,7 @@ diff -Naur Python-3.6.5-orig/Lib/sysconfig.py Python-3.6.5/Lib/sysconfig.py def _safe_realpath(path): try: -@@ -171,7 +174,7 @@ +@@ -172,7 +175,7 @@ def _get_default_scheme(): @@ -20,16 +20,16 @@ diff -Naur Python-3.6.5-orig/Lib/sysconfig.py Python-3.6.5/Lib/sysconfig.py # the default scheme for posix is posix_prefix return 'posix_prefix' return os.name -@@ -183,7 +186,7 @@ +@@ -188,7 +191,7 @@ def joinuser(*args): return os.path.expanduser(os.path.join(*args)) - if os.name == "nt": + if os.name == "nt" and not _POSIX_BUILD: base = os.environ.get("APPDATA") or "~" - if env_base: - return env_base -@@ -487,7 +490,7 @@ + return joinuser(base, "Python") + +@@ -481,7 +484,7 @@ def get_config_h_filename(): """Return the path of pyconfig.h.""" if _PYTHON_BUILD: @@ -38,7 +38,7 @@ diff -Naur Python-3.6.5-orig/Lib/sysconfig.py Python-3.6.5/Lib/sysconfig.py inc_dir = os.path.join(_sys_home or _PROJECT_BASE, "PC") else: inc_dir = _sys_home or _PROJECT_BASE -@@ -558,9 +561,9 @@ +@@ -552,9 +555,9 @@ # sys.abiflags may not be defined on all platforms. _CONFIG_VARS['abiflags'] = '' @@ -50,7 +50,7 @@ diff -Naur Python-3.6.5-orig/Lib/sysconfig.py Python-3.6.5/Lib/sysconfig.py _init_posix(_CONFIG_VARS) # For backward compatibility, see issue19555 SO = _CONFIG_VARS.get('EXT_SUFFIX') -@@ -573,7 +576,7 @@ +@@ -567,7 +570,7 @@ # Always convert srcdir to an absolute path srcdir = _CONFIG_VARS.get('srcdir', _PROJECT_BASE) diff --git a/mingw-w64-python3/0462-MINGW-support-stdcall-without-underscore.patch b/mingw-w64-python3/0462-MINGW-support-stdcall-without-underscore.patch index 4444ed5c56..ef5dcca09b 100644 --- a/mingw-w64-python3/0462-MINGW-support-stdcall-without-underscore.patch +++ b/mingw-w64-python3/0462-MINGW-support-stdcall-without-underscore.patch @@ -1,7 +1,7 @@ -diff -Naur Python-3.6.5-orig/Modules/_ctypes/_ctypes.c Python-3.6.5/Modules/_ctypes/_ctypes.c ---- Python-3.6.5-orig/Modules/_ctypes/_ctypes.c 2018-03-28 12:19:31.000000000 +0300 -+++ Python-3.6.5/Modules/_ctypes/_ctypes.c 2018-04-16 09:53:50.841938000 +0300 -@@ -3194,11 +3194,28 @@ +diff -Naur Python-3.7.0-orig/Modules/_ctypes/_ctypes.c Python-3.7.0/Modules/_ctypes/_ctypes.c +--- Python-3.7.0-orig/Modules/_ctypes/_ctypes.c 2018-06-27 06:07:35.000000000 +0300 ++++ Python-3.7.0/Modules/_ctypes/_ctypes.c 2018-06-30 11:16:37.402259700 +0300 +@@ -3187,11 +3187,28 @@ mangled_name = alloca(strlen(name) + 1 + 1 + 1 + 3); /* \0 _ @ %d */ if (!mangled_name) return NULL; diff --git a/mingw-w64-python3/0464-use-replace-instead-rename-to-avoid-failure-on-windo.patch b/mingw-w64-python3/0464-use-replace-instead-rename-to-avoid-failure-on-windo.patch index 2f5bfa6cd5..4feb9ba487 100644 --- a/mingw-w64-python3/0464-use-replace-instead-rename-to-avoid-failure-on-windo.patch +++ b/mingw-w64-python3/0464-use-replace-instead-rename-to-avoid-failure-on-windo.patch @@ -1,7 +1,7 @@ -diff -Naur Python-3.6.5-orig/setup.py Python-3.6.5/setup.py ---- Python-3.6.5-orig/setup.py 2018-04-16 09:53:49.100524000 +0300 -+++ Python-3.6.5/setup.py 2018-04-16 09:53:52.369150100 +0300 -@@ -2381,7 +2381,7 @@ +diff -Naur Python-3.7.0-orig/setup.py Python-3.7.0/setup.py +--- Python-3.7.0-orig/setup.py 2018-06-30 11:16:35.062255500 +0300 ++++ Python-3.7.0/setup.py 2018-06-30 11:16:39.523863400 +0300 +@@ -2345,7 +2345,7 @@ else: newfilename = filename + minoronly log.info('renaming %s to %s', filename, newfilename) diff --git a/mingw-w64-python3/0470-MINGW-avoid-circular-dependency-from-time-module-dur.patch b/mingw-w64-python3/0470-MINGW-avoid-circular-dependency-from-time-module-dur.patch index 82934c7011..34bef1eccc 100644 --- a/mingw-w64-python3/0470-MINGW-avoid-circular-dependency-from-time-module-dur.patch +++ b/mingw-w64-python3/0470-MINGW-avoid-circular-dependency-from-time-module-dur.patch @@ -1,6 +1,6 @@ -diff -Naur Python-3.6.5-orig/Lib/distutils/cygwinccompiler.py Python-3.6.5/Lib/distutils/cygwinccompiler.py ---- Python-3.6.5-orig/Lib/distutils/cygwinccompiler.py 2018-04-16 09:53:47.576708700 +0300 -+++ Python-3.6.5/Lib/distutils/cygwinccompiler.py 2018-04-16 09:53:53.907362900 +0300 +diff -Naur Python-3.7.0-orig/Lib/distutils/cygwinccompiler.py Python-3.7.0/Lib/distutils/cygwinccompiler.py +--- Python-3.7.0-orig/Lib/distutils/cygwinccompiler.py 2018-06-30 11:16:32.909451800 +0300 ++++ Python-3.7.0/Lib/distutils/cygwinccompiler.py 2018-06-30 11:16:41.614267100 +0300 @@ -48,7 +48,6 @@ import os import sys diff --git a/mingw-w64-python3/0480-MINGW-generalization-of-posix-build-in-distutils-sys.patch b/mingw-w64-python3/0480-MINGW-generalization-of-posix-build-in-distutils-sys.patch index f5ab859428..40a45e03f8 100644 --- a/mingw-w64-python3/0480-MINGW-generalization-of-posix-build-in-distutils-sys.patch +++ b/mingw-w64-python3/0480-MINGW-generalization-of-posix-build-in-distutils-sys.patch @@ -1,6 +1,6 @@ -diff -Naur Python-3.6.5-orig/Lib/distutils/sysconfig.py Python-3.6.5/Lib/distutils/sysconfig.py ---- Python-3.6.5-orig/Lib/distutils/sysconfig.py 2018-04-16 09:53:21.113720900 +0300 -+++ Python-3.6.5/Lib/distutils/sysconfig.py 2018-04-16 09:53:55.369174700 +0300 +diff -Naur Python-3.7.0-orig/Lib/distutils/sysconfig.py Python-3.7.0/Lib/distutils/sysconfig.py +--- Python-3.7.0-orig/Lib/distutils/sysconfig.py 2018-06-30 11:16:00.304594100 +0300 ++++ Python-3.7.0/Lib/distutils/sysconfig.py 2018-06-30 11:16:43.720270800 +0300 @@ -53,6 +53,17 @@ return _is_python_source_dir(project_base) python_build = _python_build() diff --git a/mingw-w64-python3/0490-MINGW-customize-site.patch b/mingw-w64-python3/0490-MINGW-customize-site.patch index b5e075fb21..31a47e63d3 100644 --- a/mingw-w64-python3/0490-MINGW-customize-site.patch +++ b/mingw-w64-python3/0490-MINGW-customize-site.patch @@ -1,20 +1,17 @@ -diff -Naur Python-3.6.5-orig/Lib/site.py Python-3.6.5/Lib/site.py ---- Python-3.6.5-orig/Lib/site.py 2018-03-28 12:19:31.000000000 +0300 -+++ Python-3.6.5/Lib/site.py 2018-04-16 09:53:56.915590500 +0300 -@@ -268,6 +268,12 @@ - USER_SITE = get_path('purelib', 'osx_framework_user') - return USER_SITE +diff -Naur Python-3.7.0-orig/Lib/site.py Python-3.7.0/Lib/site.py +--- Python-3.7.0-orig/Lib/site.py 2018-06-27 06:07:35.000000000 +0300 ++++ Python-3.7.0/Lib/site.py 2018-06-30 11:16:45.795074400 +0300 +@@ -265,7 +265,8 @@ + def _get_path(userbase): + version = sys.version_info -+ if sys.platform == 'win32': -+ from sysconfig import _POSIX_BUILD -+ if _POSIX_BUILD: -+ USER_SITE = get_path('purelib', 'posix_user') -+ return USER_SITE -+ - USER_SITE = get_path('purelib', '%s_user' % os.name) - return USER_SITE +- 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' -@@ -298,12 +304,13 @@ + if sys.platform == 'darwin' and sys._framework: +@@ -328,12 +329,13 @@ if prefixes is None: prefixes = PREFIXES diff --git a/mingw-w64-python3/0500-add-python-config-sh.patch b/mingw-w64-python3/0500-add-python-config-sh.patch index 5da342faf5..057814cfa4 100644 --- a/mingw-w64-python3/0500-add-python-config-sh.patch +++ b/mingw-w64-python3/0500-add-python-config-sh.patch @@ -1,6 +1,6 @@ -diff -Naur Python-3.6.5-orig/Misc/python-config.sh.in Python-3.6.5/Misc/python-config.sh.in ---- Python-3.6.5-orig/Misc/python-config.sh.in 2018-03-28 12:19:31.000000000 +0300 -+++ Python-3.6.5/Misc/python-config.sh.in 2018-04-16 09:53:58.358396900 +0300 +diff -Naur Python-3.7.0-orig/Misc/python-config.sh.in Python-3.7.0/Misc/python-config.sh.in +--- Python-3.7.0-orig/Misc/python-config.sh.in 2018-06-27 06:07:35.000000000 +0300 ++++ Python-3.7.0/Misc/python-config.sh.in 2018-06-30 11:16:47.932278200 +0300 @@ -1,32 +1,44 @@ #!/bin/sh diff --git a/mingw-w64-python3/0510-cross-darwin-feature.patch b/mingw-w64-python3/0510-cross-darwin-feature.patch index 5b540a0349..62fd583aaf 100644 --- a/mingw-w64-python3/0510-cross-darwin-feature.patch +++ b/mingw-w64-python3/0510-cross-darwin-feature.patch @@ -1,6 +1,6 @@ -diff -Naur Python-3.6.5-orig/configure.ac Python-3.6.5/configure.ac ---- Python-3.6.5-orig/configure.ac 2018-04-16 09:53:39.862854900 +0300 -+++ Python-3.6.5/configure.ac 2018-04-16 09:53:59.822816700 +0300 +diff -Naur Python-3.7.0-orig/configure.ac Python-3.7.0/configure.ac +--- Python-3.7.0-orig/configure.ac 2018-06-30 11:16:22.192232900 +0300 ++++ Python-3.7.0/configure.ac 2018-06-30 11:16:50.069481900 +0300 @@ -377,6 +377,7 @@ then # avoid using uname for cross builds @@ -43,7 +43,7 @@ diff -Naur Python-3.6.5-orig/configure.ac Python-3.6.5/configure.ac else ac_sys_system=`uname -s` if test "$ac_sys_system" = "AIX" \ -@@ -438,6 +459,9 @@ +@@ -437,6 +458,9 @@ *-*-mingw*) _host_cpu= ;; @@ -53,7 +53,7 @@ diff -Naur Python-3.6.5-orig/configure.ac Python-3.6.5/configure.ac *) # for now, limit cross builds to known configurations MACHDEP="unknown" -@@ -1593,6 +1617,26 @@ +@@ -1582,6 +1606,26 @@ AC_SUBST(BASECFLAGS) AC_SUBST(CFLAGS_NODIST) @@ -80,7 +80,7 @@ diff -Naur Python-3.6.5-orig/configure.ac Python-3.6.5/configure.ac # The -arch flags for universal builds on OSX UNIVERSAL_ARCH_FLAGS= AC_SUBST(UNIVERSAL_ARCH_FLAGS) -@@ -1905,7 +1949,7 @@ +@@ -1954,7 +1998,7 @@ ;; esac else @@ -89,7 +89,7 @@ diff -Naur Python-3.6.5-orig/configure.ac Python-3.6.5/configure.ac then # 10.4 was the first release to support Intel archs cur_target="10.4" -@@ -2442,7 +2486,7 @@ +@@ -2498,7 +2542,7 @@ if test "${enable_universalsdk}"; then : else @@ -98,7 +98,7 @@ diff -Naur Python-3.6.5-orig/configure.ac Python-3.6.5/configure.ac fi LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; -@@ -2467,7 +2511,7 @@ +@@ -2523,7 +2567,7 @@ ]])],[ac_osx_32bit=yes],[ac_osx_32bit=no],[ac_osx_32bit=yes]) if test "${ac_osx_32bit}" = "yes"; then @@ -107,7 +107,7 @@ diff -Naur Python-3.6.5-orig/configure.ac Python-3.6.5/configure.ac i386) MACOSX_DEFAULT_ARCH="i386" ;; -@@ -2479,7 +2523,7 @@ +@@ -2535,7 +2579,7 @@ ;; esac else diff --git a/mingw-w64-python3/0520-py3k-mingw-ntthreads-vs-pthreads.patch b/mingw-w64-python3/0520-py3k-mingw-ntthreads-vs-pthreads.patch index 5cb3a5e53b..8988a6490c 100644 --- a/mingw-w64-python3/0520-py3k-mingw-ntthreads-vs-pthreads.patch +++ b/mingw-w64-python3/0520-py3k-mingw-ntthreads-vs-pthreads.patch @@ -1,67 +1,25 @@ -diff -Naur Python-3.6.5-orig/configure.ac Python-3.6.5/configure.ac ---- Python-3.6.5-orig/configure.ac 2018-04-16 09:54:01.117627600 +0300 -+++ Python-3.6.5/configure.ac 2018-04-16 09:54:01.376629400 +0300 -@@ -2216,7 +2216,7 @@ - AC_HEADER_STDC - AC_CHECK_HEADERS(asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \ - fcntl.h grp.h \ --ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \ -+ieeefp.h io.h langinfo.h libintl.h process.h \ - sched.h shadow.h signal.h stropts.h termios.h \ - unistd.h utime.h \ - poll.h sys/devpoll.h sys/epoll.h sys/poll.h \ -@@ -2887,9 +2887,11 @@ - : - else - if test "$with_threads" = "yes" -o -z "$with_threads"; then -- AC_SEARCH_LIBS(sem_init, pthread rt posix4) # 'Real Time' functions on Solaris -- # posix4 on Solaris 2.6 -- # pthread (first!) on Linux -+ if test "$ac_cv_ntthread" = "no" -o -z "$ac_cv_ntthread"; then -+ AC_SEARCH_LIBS(sem_init, pthread rt posix4) # 'Real Time' functions on Solaris -+ # posix4 on Solaris 2.6 -+ # pthread (first!) on Linux -+ fi - fi - fi - -@@ -5229,6 +5231,14 @@ - - AC_CHECK_HEADERS(curses.h ncurses.h) - -+# If using nt threads, don't look for pthread.h or thread.h -+if test "x$ac_cv_ntthread" = xno ; then -+AC_HEADER_STDC -+AC_CHECK_HEADERS(pthread.h thread.h) -+AC_HEADER_DIRENT -+AC_HEADER_MAJOR -+fi -+ - # On Solaris, term.h requires curses.h - AC_CHECK_HEADERS(term.h,,,[ - #ifdef HAVE_CURSES_H -diff -Naur Python-3.6.5-orig/Python/condvar.h Python-3.6.5/Python/condvar.h ---- Python-3.6.5-orig/Python/condvar.h 2018-03-28 12:19:31.000000000 +0300 -+++ Python-3.6.5/Python/condvar.h 2018-04-16 09:54:01.392229500 +0300 -@@ -42,6 +42,12 @@ - - #include "Python.h" - -+#ifdef __MINGW32__ -+# if !defined(HAVE_PTHREAD_H) || defined(NT_THREADS) -+# undef _POSIX_THREADS -+# endif -+#endif -+ - #ifndef _POSIX_THREADS - /* This means pthreads are not implemented in libc headers, hence the macro - not present in unistd.h. But they still can be implemented as an external -diff -Naur Python-3.6.5-orig/Python/thread.c Python-3.6.5/Python/thread.c ---- Python-3.6.5-orig/Python/thread.c 2018-03-28 12:19:31.000000000 +0300 -+++ Python-3.6.5/Python/thread.c 2018-04-16 09:54:01.392229500 +0300 -@@ -7,6 +7,12 @@ - +diff -Naur Python-3.7.0-orig/Python/condvar.h Python-3.7.0/Python/condvar.h +--- Python-3.7.0-orig/Python/condvar.h 2018-06-27 06:07:35.000000000 +0300 ++++ Python-3.7.0/Python/condvar.h 2018-06-30 11:16:52.253485700 +0300 +@@ -43,6 +43,12 @@ #include "Python.h" + #include "internal/condvar.h" + ++#ifdef __MINGW32__ ++# if !defined(HAVE_PTHREAD_H) || defined(NT_THREADS) ++# undef _POSIX_THREADS ++# endif ++#endif ++ + #ifdef _POSIX_THREADS + /* + * POSIX support +diff -Naur Python-3.7.0-orig/Python/thread.c Python-3.7.0/Python/thread.c +--- Python-3.7.0-orig/Python/thread.c 2018-06-27 06:07:35.000000000 +0300 ++++ Python-3.7.0/Python/thread.c 2018-06-30 11:16:52.253485700 +0300 +@@ -8,6 +8,12 @@ + #include "Python.h" + #include "internal/pystate.h" +#ifdef __MINGW32__ +# if !defined(HAVE_PTHREAD_H) || defined(NT_THREADS) diff --git a/mingw-w64-python3/0530-mingw-system-libffi.patch b/mingw-w64-python3/0530-mingw-system-libffi.patch index 7b08907d33..f9bbfc9c12 100644 --- a/mingw-w64-python3/0530-mingw-system-libffi.patch +++ b/mingw-w64-python3/0530-mingw-system-libffi.patch @@ -1,28 +1,7 @@ -diff -Naur Python-3.6.5-orig/Modules/_ctypes/libffi/fficonfig.py.in Python-3.6.5/Modules/_ctypes/libffi/fficonfig.py.in ---- Python-3.6.5-orig/Modules/_ctypes/libffi/fficonfig.py.in 2018-03-28 12:19:31.000000000 +0300 -+++ Python-3.6.5/Modules/_ctypes/libffi/fficonfig.py.in 2018-04-16 09:54:02.941447100 +0300 -@@ -23,6 +23,7 @@ - 'FRV': ['src/frv/eabi.S', 'src/frv/ffi.c'], - 'S390': ['src/s390/sysv.S', 'src/s390/ffi.c'], - 'X86_64': ['src/x86/ffi64.c', 'src/x86/unix64.S', 'src/x86/ffi.c', 'src/x86/sysv.S'], -+ 'X86_WIN64': ['src/x86/ffi.c', 'src/x86/win64.S'], - 'SH': ['src/sh/sysv.S', 'src/sh/ffi.c'], - 'SH64': ['src/sh64/sysv.S', 'src/sh64/ffi.c'], - 'PA': ['src/pa/linux.S', 'src/pa/ffi.c'], -@@ -30,6 +31,9 @@ - 'PA_HPUX': ['src/pa/hpux32.S', 'src/pa/ffi.c'], - } - -+ffi_target = '@TARGET@' -+if ffi_target not in ['X86_WIN32', 'X86_WIN64']: -+ ffi_sources += 'src/dlmalloc.c' - ffi_sources += ffi_platforms['@TARGET@'] - - ffi_cflags = '@CFLAGS@' -diff -Naur Python-3.6.5-orig/setup.py Python-3.6.5/setup.py ---- Python-3.6.5-orig/setup.py 2018-04-16 09:53:53.640360600 +0300 -+++ Python-3.6.5/setup.py 2018-04-16 09:54:02.941447100 +0300 -@@ -2000,6 +2000,10 @@ +diff -Naur Python-3.7.0-orig/setup.py Python-3.7.0/setup.py +--- Python-3.7.0-orig/setup.py 2018-06-30 11:16:41.395866700 +0300 ++++ Python-3.7.0/setup.py 2018-06-30 11:16:54.421889600 +0300 +@@ -1967,6 +1967,10 @@ return True def configure_ctypes(self, ext): @@ -33,14 +12,3 @@ diff -Naur Python-3.6.5-orig/setup.py Python-3.6.5/setup.py if not self.use_system_libffi: if host_platform == 'darwin': return self.configure_ctypes_darwin(ext) -@@ -2027,6 +2031,10 @@ - if not self.verbose: - config_args.append("-q") - -+ if host_platform == 'win32': -+ table = str.maketrans('\\', '/') -+ ffi_builddir = ffi_builddir.translate(table) -+ ffi_srcdir = ffi_srcdir.translate(table) - # Pass empty CFLAGS because we'll just append the resulting - # CFLAGS to Python's; -g or -O2 is to be avoided. - cmd = "cd %s && env CFLAGS='' '%s/configure' %s" \ diff --git a/mingw-w64-python3/0540-mingw-semicolon-DELIM.patch b/mingw-w64-python3/0540-mingw-semicolon-DELIM.patch deleted file mode 100644 index d94725a3ce..0000000000 --- a/mingw-w64-python3/0540-mingw-semicolon-DELIM.patch +++ /dev/null @@ -1,72 +0,0 @@ -diff -Naur Python-3.6.5-orig/configure.ac Python-3.6.5/configure.ac ---- Python-3.6.5-orig/configure.ac 2018-04-16 09:54:02.684643700 +0300 -+++ Python-3.6.5/configure.ac 2018-04-16 09:54:04.531856800 +0300 -@@ -608,6 +608,16 @@ - fi - AC_MSG_RESULT($MACHDEP) - -+# Windows uses ; to separate paths, everything else uses : -+AC_MSG_CHECKING(DELIM) -+DELIM=: -+if test "$MACHDEP" = "win" -+then -+ DELIM=\; -+fi -+AC_MSG_RESULT([$DELIM]) -+AC_SUBST(DELIM) -+ - AC_MSG_CHECKING([for init system calls]) - AC_SUBST(INITSYS) - case $host in -diff -Naur Python-3.6.5-orig/Include/osdefs.h Python-3.6.5/Include/osdefs.h ---- Python-3.6.5-orig/Include/osdefs.h 2018-03-28 12:19:31.000000000 +0300 -+++ Python-3.6.5/Include/osdefs.h 2018-04-16 09:54:04.547456800 +0300 -@@ -12,6 +12,7 @@ - #define ALTSEP L'/' - #define MAXPATHLEN 256 - #define DELIM L';' -+#define DELIMSTR L";" - #endif - - /* Filename separator */ -@@ -39,6 +40,7 @@ - /* Search path entry delimiter */ - #ifndef DELIM - #define DELIM L':' -+#define DELIMSTR L":" - #endif - - #ifdef __cplusplus -diff -Naur Python-3.6.5-orig/Makefile.pre.in Python-3.6.5/Makefile.pre.in ---- Python-3.6.5-orig/Makefile.pre.in 2018-04-16 09:53:31.957197100 +0300 -+++ Python-3.6.5/Makefile.pre.in 2018-04-16 09:54:04.547456800 +0300 -@@ -110,7 +110,8 @@ - # Strict or non-strict aliasing flags used to compile dtoa.c, see above - CFLAGS_ALIASING=@CFLAGS_ALIASING@ - -- -+# ; on Windows otherwise : -+DELIM= @DELIM@ - # Machine-dependent subdirectories - MACHDEP= @MACHDEP@ - -diff -Naur Python-3.6.5-orig/Modules/Setup.dist Python-3.6.5/Modules/Setup.dist ---- Python-3.6.5-orig/Modules/Setup.dist 2018-04-16 09:53:15.174261400 +0300 -+++ Python-3.6.5/Modules/Setup.dist 2018-04-16 09:54:04.563056900 +0300 -@@ -84,14 +84,14 @@ - # Empty since this is now just the runtime prefix. - DESTPATH= - --# Site specific path components -- should begin with : if non-empty -+# Site specific path components -- should begin with $(DELIM) if non-empty - SITEPATH= - - # Standard path components for test modules - TESTPATH= - - # Path components for machine- or system-dependent modules and shared libraries --MACHDEPPATH=:$(PLATDIR) -+MACHDEPPATH=$(DELIM)$(PLATDIR) - EXTRAMACHDEPPATH= - - COREPYTHONPATH=$(DESTPATH)$(SITEPATH)$(TESTPATH)$(MACHDEPPATH)$(EXTRAMACHDEPPATH) diff --git a/mingw-w64-python3/0555-msys-mingw-prefer-unix-sep-if-MSYSTEM.patch b/mingw-w64-python3/0555-msys-mingw-prefer-unix-sep-if-MSYSTEM.patch index f3a4c94e5f..11930ba654 100644 --- a/mingw-w64-python3/0555-msys-mingw-prefer-unix-sep-if-MSYSTEM.patch +++ b/mingw-w64-python3/0555-msys-mingw-prefer-unix-sep-if-MSYSTEM.patch @@ -1,8 +1,8 @@ -diff -Naur Python-3.6.5-orig/Include/pylifecycle.h Python-3.6.5/Include/pylifecycle.h ---- Python-3.6.5-orig/Include/pylifecycle.h 2018-03-28 12:19:31.000000000 +0300 -+++ Python-3.6.5/Include/pylifecycle.h 2018-04-16 09:54:06.206663500 +0300 -@@ -7,6 +7,12 @@ - extern "C" { +diff -Naur Python-3.7.0-orig/Include/pylifecycle.h Python-3.7.0/Include/pylifecycle.h +--- Python-3.7.0-orig/Include/pylifecycle.h 2018-06-27 06:07:35.000000000 +0300 ++++ Python-3.7.0/Include/pylifecycle.h 2018-06-30 11:16:58.992697600 +0300 +@@ -36,6 +36,12 @@ + #endif +PyAPI_FUNC(wchar_t) Py_GetSepW(wchar_t *); @@ -11,12 +11,12 @@ diff -Naur Python-3.6.5-orig/Include/pylifecycle.h Python-3.6.5/Include/pylifecy +PyAPI_FUNC(void) Py_NormalizeSepsW(wchar_t *); +PyAPI_FUNC(void) Py_NormalizeSepsA(char *); + - PyAPI_FUNC(void) Py_SetProgramName(wchar_t *); - PyAPI_FUNC(wchar_t *) Py_GetProgramName(void); -diff -Naur Python-3.6.5-orig/Lib/ntpath.py Python-3.6.5/Lib/ntpath.py ---- Python-3.6.5-orig/Lib/ntpath.py 2018-03-28 12:19:31.000000000 +0300 -+++ Python-3.6.5/Lib/ntpath.py 2018-04-16 09:54:06.222263500 +0300 + PyAPI_FUNC(void) Py_SetProgramName(const wchar_t *); + PyAPI_FUNC(wchar_t *) Py_GetProgramName(void); +diff -Naur Python-3.7.0-orig/Lib/ntpath.py Python-3.7.0/Lib/ntpath.py +--- Python-3.7.0-orig/Lib/ntpath.py 2018-06-27 06:07:35.000000000 +0300 ++++ Python-3.7.0/Lib/ntpath.py 2018-06-30 11:16:58.992697600 +0300 @@ -11,9 +11,7 @@ curdir = '.' pardir = '..' @@ -27,11 +27,10 @@ diff -Naur Python-3.6.5-orig/Lib/ntpath.py Python-3.6.5/Lib/ntpath.py defpath = '.;C:\\bin' devnull = 'nul' -@@ -28,6 +26,15 @@ - import stat +@@ -23,6 +21,15 @@ import genericpath from genericpath import * -+ + +if sys.platform == "win32" and "MSYSTEM" in os.environ: + sep = '/' + altsep = '\\' @@ -40,17 +39,17 @@ diff -Naur Python-3.6.5-orig/Lib/ntpath.py Python-3.6.5/Lib/ntpath.py + altsep = '/' +bsep = str.encode(sep) +baltsep = str.encode(altsep) - ++ __all__ = ["normcase","isabs","join","splitdrive","split","splitext", "basename","dirname","commonprefix","getsize","getmtime", -@@ -33,9 +39,27 @@ + "getatime","getctime", "islink","exists","lexists","isdir","isfile", +@@ -33,9 +40,27 @@ def _get_bothseps(path): if isinstance(path, bytes): - return b'\\/' + return bsep+baltsep - else: -- return '\\/' ++ else: + return sep+altsep + +def _get_sep(path): @@ -62,7 +61,8 @@ diff -Naur Python-3.6.5-orig/Lib/ntpath.py Python-3.6.5/Lib/ntpath.py +def _get_altsep(path): + if isinstance(path, bytes): + return baltsep -+ else: + else: +- return '\\/' + return altsep + +def _get_colon(path): @@ -73,7 +73,7 @@ diff -Naur Python-3.6.5-orig/Lib/ntpath.py Python-3.6.5/Lib/ntpath.py # Normalize the case of a pathname and map slashes to backslashes. # Other normalizations (such as optimizing '../' away) are not done -@@ -48,9 +72,9 @@ +@@ -48,9 +73,9 @@ s = os.fspath(s) try: if isinstance(s, bytes): @@ -85,7 +85,7 @@ diff -Naur Python-3.6.5-orig/Lib/ntpath.py Python-3.6.5/Lib/ntpath.py except (TypeError, AttributeError): if not isinstance(s, (bytes, str)): raise TypeError("normcase() argument must be str or bytes, " -@@ -74,14 +98,9 @@ +@@ -74,14 +99,9 @@ # Join two (or more) paths. def join(path, *paths): path = os.fspath(path) @@ -103,7 +103,7 @@ diff -Naur Python-3.6.5-orig/Lib/ntpath.py Python-3.6.5/Lib/ntpath.py try: if not paths: path[:0] + sep #23780: Ensure compatible data type even if p is null. -@@ -140,14 +159,9 @@ +@@ -140,14 +160,9 @@ """ p = os.fspath(p) if len(p) >= 2: @@ -121,7 +121,7 @@ diff -Naur Python-3.6.5-orig/Lib/ntpath.py Python-3.6.5/Lib/ntpath.py normp = p.replace(altsep, sep) if (normp[0:2] == sep*2) and (normp[2:3] != sep): # is a UNC path: -@@ -223,9 +237,9 @@ +@@ -201,9 +216,9 @@ def splitext(p): p = os.fspath(p) if isinstance(p, bytes): @@ -133,7 +133,7 @@ diff -Naur Python-3.6.5-orig/Lib/ntpath.py Python-3.6.5/Lib/ntpath.py splitext.__doc__ = genericpath._splitext.__doc__ -@@ -472,15 +486,13 @@ +@@ -450,15 +465,13 @@ def normpath(path): """Normalize path, eliminating double slashes, etc.""" path = os.fspath(path) @@ -151,7 +151,7 @@ diff -Naur Python-3.6.5-orig/Lib/ntpath.py Python-3.6.5/Lib/ntpath.py curdir = '.' pardir = '..' special_prefixes = ('\\\\.\\', '\\\\?\\') -@@ -560,12 +572,11 @@ +@@ -538,12 +551,11 @@ def relpath(path, start=None): """Return a relative version of a path""" path = os.fspath(path) @@ -165,7 +165,7 @@ diff -Naur Python-3.6.5-orig/Lib/ntpath.py Python-3.6.5/Lib/ntpath.py curdir = '.' pardir = '..' -@@ -620,13 +631,11 @@ +@@ -598,13 +610,11 @@ raise ValueError('commonpath() arg is an empty sequence') paths = tuple(map(os.fspath, paths)) @@ -181,10 +181,19 @@ diff -Naur Python-3.6.5-orig/Lib/ntpath.py Python-3.6.5/Lib/ntpath.py curdir = '.' try: -diff -Naur Python-3.6.5-orig/Modules/getpath.c Python-3.6.5/Modules/getpath.c ---- Python-3.6.5-orig/Modules/getpath.c 2018-03-28 12:19:31.000000000 +0300 -+++ Python-3.6.5/Modules/getpath.c 2018-04-16 09:54:06.238863600 +0300 -@@ -135,7 +135,7 @@ +diff -Naur Python-3.7.0-orig/Modules/getpath.c Python-3.7.0/Modules/getpath.c +--- Python-3.7.0-orig/Modules/getpath.c 2018-06-27 06:07:35.000000000 +0300 ++++ Python-3.7.0/Modules/getpath.c 2018-06-30 11:16:59.008297600 +0300 +@@ -131,7 +131,7 @@ + } PyCalculatePath; + + static const wchar_t delimiter[2] = {DELIM, '\0'}; +-static const wchar_t separator[2] = {SEP, '\0'}; ++static wchar_t separator[2] = {SEP, '\0'}; + + + /* Get file status. Encode the path to the locale encoding. */ +@@ -155,7 +160,7 @@ reduce(wchar_t *dir) { size_t i = wcslen(dir); @@ -193,112 +202,122 @@ diff -Naur Python-3.6.5-orig/Modules/getpath.c Python-3.6.5/Modules/getpath.c --i; dir[i] = '\0'; } -@@ -207,12 +207,12 @@ +@@ -239,13 +244,13 @@ joinpath(wchar_t *buffer, wchar_t *stuff) { size_t n, k; -- if (stuff[0] == SEP) -+ if (stuff[0] == Py_GetSepW(buffer)) +- if (stuff[0] == SEP) { ++ if (stuff[0] == Py_GetSepW(buffer)) { n = 0; + } else { n = wcslen(buffer); -- if (n > 0 && buffer[n-1] != SEP && n < MAXPATHLEN) +- if (n > 0 && buffer[n-1] != SEP && n < MAXPATHLEN) { - buffer[n++] = SEP; -+ if (n > 0 && buffer[n-1] != Py_GetSepW(buffer) && n < MAXPATHLEN) ++ if (n > 0 && buffer[n-1] != Py_GetSepW(buffer) && n < MAXPATHLEN) { + buffer[n++] = Py_GetSepW(buffer); + } } - if (n > MAXPATHLEN) - Py_FatalError("buffer overflow in getpath.c's joinpath()"); -@@ -228,7 +228,7 @@ + if (n > MAXPATHLEN) { +@@ -265,7 +270,7 @@ static void copy_absolute(wchar_t *path, wchar_t *p, size_t pathlen) { -- if (p[0] == SEP) -+ if (p[0] == Py_GetSepW(p) || (p[0] != 0 && p[1] == L':')) +- if (p[0] == SEP) { ++ if (p[0] == Py_GetSepW(p) || (p[0] != 0 && p[1] == L':')) { wcscpy(path, p); + } else { - if (!_Py_wgetcwd(path, pathlen)) { -@@ -236,7 +236,7 @@ +@@ -274,7 +279,7 @@ wcscpy(path, p); return; } -- if (p[0] == '.' && p[1] == SEP) -+ if (p[0] == '.' && p[1] == Py_GetSepW(path)) +- if (p[0] == '.' && p[1] == SEP) { ++ if (p[0] == '.' && p[1] == Py_GetSepW(path)) { p += 2; + } joinpath(path, p); - } -@@ -248,7 +248,7 @@ +@@ -288,7 +293,7 @@ { wchar_t buffer[MAXPATHLEN+1]; -- if (path[0] == SEP) -+ if (path[0] == Py_GetSepW(path)) +- if (path[0] == SEP) { ++ if (path[0] == Py_GetSepW(path)) { return; + } copy_absolute(buffer, path, MAXPATHLEN+1); - wcscpy(path, buffer); -@@ -461,7 +461,7 @@ - extern wchar_t *Py_GetProgramName(void); - - static const wchar_t delimiter[2] = {DELIM, '\0'}; -- static const wchar_t separator[2] = {SEP, '\0'}; -+ const wchar_t separator[2] = {Py_GetSepW(NULL), '\0'}; - char *_rtpypath = Py_GETENV("PYTHONPATH"); /* XXX use wide version on Windows */ - wchar_t *rtpypath = NULL; - wchar_t *home = Py_GetPythonHome(); -@@ -490,11 +490,12 @@ - #endif - wchar_t *_pythonpath, *_prefix, *_exec_prefix; - wchar_t *lib_python; -+ const char * lib_python_VERSION = (Py_GetSepA(NULL) == '/') ? "lib/python" VERSION : "lib\\python" VERSION; - - _pythonpath = Py_DecodeLocale(PYTHONPATH, NULL); - _prefix = Py_DecodeLocale(PREFIX, NULL); - _exec_prefix = Py_DecodeLocale(EXEC_PREFIX, NULL); -- lib_python = Py_DecodeLocale("lib/python" VERSION, NULL); -+ lib_python = Py_DecodeLocale(lib_python_VERSION, NULL); - - if (!_pythonpath || !_prefix || !_exec_prefix || !lib_python) { - Py_FatalError( -@@ -512,7 +513,7 @@ +@@ -544,7 +598,7 @@ * other way to find a directory to start the search from. If * $PATH isn't exported, you lose. */ -- if (wcschr(prog, SEP)) -+ if (wcschr(prog, Py_GetSepW(prog))) - wcsncpy(progpath, prog, MAXPATHLEN); +- if (wcschr(core_config->program_name, SEP)) { ++ if (wcschr(core_config->program_name, Py_GetSepW(core_config->program_name))) { + wcsncpy(program_full_path, core_config->program_name, MAXPATHLEN); + } #ifdef __APPLE__ - /* On Mac OS X, if a script uses an interpreter of the form -@@ -561,7 +562,7 @@ - else - progpath[0] = '\0'; - PyMem_RawFree(path_buffer); -- if (progpath[0] != SEP && progpath[0] != '\0') -+ if (progpath[0] != separator[0] && progpath[0] != '\0' && progpath[1] != L':' ) - absolutize(progpath); - wcsncpy(argv0_path, progpath, MAXPATHLEN); - argv0_path[MAXPATHLEN] = '\0'; -@@ -719,7 +720,7 @@ +@@ -602,7 +660,7 @@ + else { + program_full_path[0] = '\0'; + } +- if (program_full_path[0] != SEP && program_full_path[0] != '\0') { ++ if (program_full_path[0] != separator[0] && program_full_path[0] != '\0' && program_full_path[1] != L':') { + absolutize(program_full_path); + } + +@@ -768,7 +829,7 @@ while (1) { wchar_t *delim = wcschr(defpath, DELIM); -- if (defpath[0] != SEP) -+ if (defpath[0] != separator[0] && defpath[0] != '\0' && defpath[1] != L':') +- if (defpath[0] != SEP) { ++ if (defpath[0] != separator[0] && defpath[0] != '\0' && defpath[1] != L':') { /* Paths are relative to prefix */ bufsz += prefixsz; - -@@ -760,7 +761,7 @@ + } +@@ -810,9 +875,9 @@ while (1) { wchar_t *delim = wcschr(defpath, DELIM); - if (defpath[0] != SEP) { + if (defpath[0] != separator[0] && defpath[0] != '\0' && defpath[1] != L':') { wcscat(buf, prefix); - if (prefixsz >= 2 && prefix[prefixsz - 2] != SEP && - defpath[0] != (delim ? DELIM : L'\0')) { /* not empty */ -diff -Naur Python-3.6.5-orig/Modules/posixmodule.c Python-3.6.5/Modules/posixmodule.c ---- Python-3.6.5-orig/Modules/posixmodule.c 2018-04-16 09:53:11.991429000 +0300 -+++ Python-3.6.5/Modules/posixmodule.c 2018-04-16 09:54:06.238863600 +0300 -@@ -3231,6 +3231,7 @@ +- if (prefixsz >= 2 && prefix[prefixsz - 2] != SEP && ++ if (prefixsz >= 2 && prefix[prefixsz - 2] != separator[0] && + defpath[0] != (delim ? DELIM : L'\0')) + { + /* not empty */ +@@ -1094,6 +1094,7 @@ + _PyPathConfig_Calculate(_PyPathConfig *config, const _PyCoreConfig *core_config) + { + PyCalculatePath calculate; ++ separator[0] = Py_GetSepW(NULL); + memset(&calculate, 0, sizeof(calculate)); + + _PyInitError err = calculate_init(&calculate, core_config); +diff -Naur Python-3.7.0-orig/Modules/main.c Python-3.7.0/Modules/main.c +--- Python-3.7.0-orig/Modules/main.c 2018-06-27 06:07:35.000000000 +0300 ++++ Python-3.7.0/Modules/main.c 2018-06-30 11:16:59.008297600 +0300 +@@ -26,7 +26,7 @@ + # include + #endif + +-#if defined(MS_WINDOWS) ++#if defined(_MSC_VER) + # define PYTHONHOMEHELP "\\python{major}{minor}" + #else + # define PYTHONHOMEHELP "/lib/pythonX.X" +@@ -1197,7 +1197,7 @@ + } + + /* Last fall back: hardcoded string */ +-#ifdef MS_WINDOWS ++#ifdef _MSC_VER + const wchar_t *default_program_name = L"python"; + #else + const wchar_t *default_program_name = L"python3"; +diff -Naur Python-3.7.0-orig/Modules/posixmodule.c Python-3.7.0/Modules/posixmodule.c +--- Python-3.7.0-orig/Modules/posixmodule.c 2018-06-30 11:15:49.405774800 +0300 ++++ Python-3.7.0/Modules/posixmodule.c 2018-06-30 11:16:59.008297600 +0300 +@@ -3286,6 +3286,7 @@ PyMem_RawFree(wbuf2); return PyErr_SetFromWindowsErr(0); } @@ -306,7 +325,7 @@ diff -Naur Python-3.6.5-orig/Modules/posixmodule.c Python-3.6.5/Modules/posixmod resobj = PyUnicode_FromWideChar(wbuf2, len); if (wbuf2 != wbuf) PyMem_RawFree(wbuf2); -@@ -3660,6 +3661,7 @@ +@@ -3715,6 +3716,7 @@ result = GetFullPathNameW(path->wide, result, woutbufp, &wtemp); } if (result) { @@ -314,30 +333,26 @@ diff -Naur Python-3.6.5-orig/Modules/posixmodule.c Python-3.6.5/Modules/posixmod v = PyUnicode_FromWideChar(woutbufp, wcslen(woutbufp)); if (path->narrow) Py_SETREF(v, PyUnicode_EncodeFSDefault(v)); -@@ -3739,6 +3741,7 @@ +@@ -3791,6 +3793,7 @@ target_path = tmp; } + Py_NormalizeSepsW(target_path); result = PyUnicode_FromWideChar(target_path, result_length); - - cleanup: -diff -Naur Python-3.6.5-orig/Python/pylifecycle.c Python-3.6.5/Python/pylifecycle.c ---- Python-3.6.5-orig/Python/pylifecycle.c 2018-03-28 12:19:31.000000000 +0300 -+++ Python-3.6.5/Python/pylifecycle.c 2018-04-16 09:54:06.238863600 +0300 -@@ -884,17 +884,123 @@ - PyInterpreterState_Delete(interp); - } - --#ifdef MS_WINDOWS --static wchar_t *progname = L"python"; -+#if defined(_MSC_VER) -+static wchar_t progname[PATH_MAX+1] = L"python"; - #else --static wchar_t *progname = L"python3"; -+static wchar_t progname[PATH_MAX+1] = L"python3"; + if (path->narrow) + Py_SETREF(result, PyUnicode_EncodeFSDefault(result)); +diff -Naur Python-3.7.0-orig/Python/pathconfig.c Python-3.7.0/Python/pathconfig.c +--- Python-3.7.0-orig/Python/pathconfig.c 2018-06-27 06:07:35.000000000 +0300 ++++ Python-3.7.0/Python/pathconfig.c 2018-06-30 11:16:59.023897600 +0300 +@@ -9,6 +9,114 @@ + extern "C" { #endif ++#ifdef __MINGW32__ ++#define wcstok wcstok_s ++#include ++#endif ++ +char +Py_GetSepA(char *name) +{ @@ -441,34 +456,30 @@ diff -Naur Python-3.6.5-orig/Python/pylifecycle.c Python-3.6.5/Python/pylifecycl + seps = wcschr(seps, altsep); + } +} -+ - void - Py_SetProgramName(wchar_t *pn) - { - if (pn && *pn) -- progname = pn; -+ wcsncpy(progname, pn, PATH_MAX); -+ pn = &progname[0]; -+ Py_NormalizeSepsW(pn); + + _PyPathConfig _Py_path_config = _PyPathConfig_INIT; + +@@ -202,6 +310,7 @@ + if (_Py_path_config.program_name == NULL) { + Py_FatalError("Py_SetProgramName() failed: out of memory"); + } ++ Py_NormalizeSepsW(_Py_path_config.program_name); } - wchar_t * -diff -Naur Python-3.6.5-orig/Python/sysmodule.c Python-3.6.5/Python/sysmodule.c ---- Python-3.6.5-orig/Python/sysmodule.c 2018-03-28 12:19:31.000000000 +0300 -+++ Python-3.6.5/Python/sysmodule.c 2018-04-16 09:54:06.238863600 +0300 -@@ -2240,7 +2240,7 @@ + +@@ -334,7 +443,7 @@ argv0 = fullpath; } #endif - p = wcsrchr(argv0, SEP); + p = wcsrchr(argv0, Py_GetSepW(argv0)); - } - if (p != NULL) { - n = p + 1 - argv0; -diff -Naur Python-3.6.5-orig/Python/traceback.c Python-3.6.5/Python/traceback.c ---- Python-3.6.5-orig/Python/traceback.c 2018-03-28 12:19:31.000000000 +0300 -+++ Python-3.6.5/Python/traceback.c 2018-04-16 09:54:06.254463700 +0300 -@@ -205,7 +205,7 @@ + /* Test for alternate separator */ + q = wcsrchr(p ? p : argv0, '/'); + if (q != NULL) +diff -Naur Python-3.7.0-orig/Python/traceback.c Python-3.7.0/Python/traceback.c +--- Python-3.7.0-orig/Python/traceback.c 2018-06-27 06:07:35.000000000 +0300 ++++ Python-3.7.0/Python/traceback.c 2018-06-30 11:16:59.023897600 +0300 +@@ -303,7 +303,7 @@ filepath = PyBytes_AS_STRING(filebytes); /* Search tail of filename in sys.path before giving up */ diff --git a/mingw-w64-python3/0560-mingw-use-posix-getpath.patch b/mingw-w64-python3/0560-mingw-use-posix-getpath.patch index c3195a8bea..a75493dfd9 100644 --- a/mingw-w64-python3/0560-mingw-use-posix-getpath.patch +++ b/mingw-w64-python3/0560-mingw-use-posix-getpath.patch @@ -1,98 +1,226 @@ -diff -Naur Python-3.6.5-orig/configure.ac Python-3.6.5/configure.ac ---- Python-3.6.5-orig/configure.ac 2018-04-16 09:54:05.811662600 +0300 -+++ Python-3.6.5/configure.ac 2018-04-16 09:54:08.022086100 +0300 -@@ -5601,7 +5601,7 @@ - case $host in - *-*-mingw*) - dnl default sys.path calculations for windows platforms -- MODULE_GETPATH=PC/getpathp.o -+ MODULE_GETPATH=Modules/getpath.o - ;; - esac - -diff -Naur Python-3.6.5-orig/Modules/getpath.c Python-3.6.5/Modules/getpath.c ---- Python-3.6.5-orig/Modules/getpath.c 2018-04-16 09:54:07.688480800 +0300 -+++ Python-3.6.5/Modules/getpath.c 2018-04-16 09:54:08.037686100 +0300 -@@ -10,6 +10,10 @@ - #include +diff -Naur Python-3.7.0-orig/Include/internal/pystate.h Python-3.7.0/Include/internal/pystate.h +--- Python-3.7.0-orig/Include/internal/pystate.h 2018-06-30 11:16:58.540296800 +0300 ++++ Python-3.7.0/Include/internal/pystate.h 2018-06-30 11:17:01.363901700 +0300 +@@ -43,7 +43,8 @@ + wchar_t *prefix; + #ifdef MS_WINDOWS + wchar_t *dll_path; +-#else ++#endif ++#ifndef _MSC_VER + wchar_t *exec_prefix; + #endif + /* Set by Py_SetPath(), or computed by _PyPathConfig_Init() */ +diff -Naur Python-3.7.0-orig/Modules/getpath.c Python-3.7.0/Modules/getpath.c +--- Python-3.7.0-orig/Modules/getpath.c 2018-06-30 11:17:01.020701100 +0300 ++++ Python-3.7.0/Modules/getpath.c 2018-06-30 11:17:01.363901700 +0300 +@@ -11,6 +11,11 @@ + # include #endif +#ifdef MS_WINDOWS +#include ++#include +#endif + /* Search in some common locations for the associated Python libraries. * * Two directories must be found, the platform independent directory -@@ -109,9 +113,17 @@ - #define LANDMARK L"os.py" - #endif - -+#ifdef __MINGW32__ -+#define wcstok(line, delim, pointer) wcstok(line, delim) -+#endif -+ - static wchar_t prefix[MAXPATHLEN+1]; - static wchar_t exec_prefix[MAXPATHLEN+1]; - static wchar_t progpath[MAXPATHLEN+1]; -+#ifdef MS_WINDOWS -+static wchar_t dllpath[MAXPATHLEN+1]; -+extern HANDLE PyWin_DLLhModule; -+#endif - static wchar_t *module_search_path = NULL; - - /* Get file status. Encode the path to the locale encoding. */ -@@ -137,7 +149,7 @@ - size_t i = wcslen(dir); - while (i > 0 && dir[i] != Py_GetSepW(dir)) - --i; -- dir[i] = '\0'; -+ dir[i] = 0; +@@ -323,6 +328,7 @@ + wcsncpy(prefix, calculate->argv0_path, MAXPATHLEN); + prefix[MAXPATHLEN] = L'\0'; + joinpath(prefix, L"Modules/Setup"); ++ Py_NormalizeSepsW(prefix); + if (isfile(prefix)) { + /* Check VPATH to see if argv0_path is in the build directory. */ + vpath = Py_DecodeLocale(VPATH, NULL); +@@ -333,6 +339,7 @@ + PyMem_RawFree(vpath); + joinpath(prefix, L"Lib"); + joinpath(prefix, LANDMARK); ++ Py_NormalizeSepsW(prefix); + if (ismodule(prefix)) { + return -1; + } +@@ -465,6 +465,7 @@ + wcsncpy(exec_prefix, calculate->argv0_path, MAXPATHLEN); + exec_prefix[MAXPATHLEN] = L'\0'; + joinpath(exec_prefix, rel_builddir_path); ++ Py_NormalizeSepsW(exec_prefix); + PyMem_RawFree(rel_builddir_path ); + return -1; + } +@@ -501,6 +508,7 @@ + } + wcsncpy(exec_prefix, calculate->exec_prefix, MAXPATHLEN); + joinpath(exec_prefix, L"lib/lib-dynload"); ++ Py_NormalizeSepsW(exec_prefix); + } + /* If we found EXEC_PREFIX do *not* reduce it! (Yet.) */ + } +@@ -523,6 +531,53 @@ } - static int -@@ -455,6 +467,26 @@ - return 0; - } +#ifdef MS_WINDOWS -+/* Calculates dllpath and progpath, replacing \\ with / */ -+int GetWindowsModulePaths() ++static int ++GetWindowsModulePaths(wchar_t *progpath) +{ + int result = 0; -+ result = GetModuleFileNameW(NULL, progpath, MAXPATHLEN); -+ Py_NormalizeSepsW(progpath); -+ dllpath[0] = 0; ++ wchar_t program_full_path[MAXPATHLEN+1]; ++ memset(program_full_path, 0, sizeof(program_full_path)); ++ ++ if (GetModuleFileNameW(NULL, program_full_path, MAXPATHLEN)) { ++ result = 1; ++ Py_NormalizeSepsW(program_full_path); ++ } ++ ++ wcscpy(progpath, program_full_path); ++ return result; ++} ++ ++ ++static _PyInitError ++get_dll_path(_PyPathConfig *config) ++{ ++ wchar_t dll_path[MAXPATHLEN+1]; ++ memset(dll_path, 0, sizeof(dll_path)); ++ +#ifdef Py_ENABLE_SHARED ++ extern HANDLE PyWin_DLLhModule; + if (PyWin_DLLhModule) { -+ if((GetModuleFileNameW(PyWin_DLLhModule, dllpath, MAXPATHLEN) > 0)) { -+ result = 1; -+ Py_NormalizeSepsW(dllpath); ++ if (GetModuleFileNameW(PyWin_DLLhModule, dll_path, MAXPATHLEN)) { ++ Py_NormalizeSepsW(dll_path); ++ reduce(dll_path); ++ } else { ++ dll_path[0] = 0; + } + } ++#else ++ dll_path[0] = 0; +#endif -+ return result; ++ ++ config->dll_path = _PyMem_RawWcsdup(dll_path); ++ if (config->dll_path == NULL) { ++ return _Py_INIT_NO_MEMORY(); ++ } ++ return _Py_INIT_OK(); +} +#endif /* MS_WINDOWS */ + - static void - calculate_path(void) - { -@@ -534,6 +566,10 @@ - } ++ + static _PyInitError + calculate_program_full_path(const _PyCoreConfig *core_config, + PyCalculatePath *calculate, _PyPathConfig *config) +@@ -570,6 +624,10 @@ + PyMem_RawFree(path); } #endif /* __APPLE__ */ +#ifdef MS_WINDOWS -+ else if(GetWindowsModulePaths()) { ++ else if(GetWindowsModulePaths(program_full_path)) { + } +#endif /* MS_WINDOWS */ - else if (path) { + else if (calculate->path_env) { + wchar_t *path = calculate->path_env; while (1) { - wchar_t *delim = wcschr(path, DELIM); -@@ -875,6 +911,45 @@ +@@ -743,6 +803,7 @@ + wcsncpy(calculate->zip_path, calculate->prefix, MAXPATHLEN); + } + joinpath(calculate->zip_path, L"lib/python00.zip"); ++ Py_NormalizeSepsW(calculate->zip_path); + + /* Replace "00" with version */ + size_t bufsz = wcslen(calculate->zip_path); +@@ -785,6 +846,19 @@ + + bufsz += wcslen(calculate->zip_path) + 1; + bufsz += wcslen(exec_prefix) + 1; ++#ifdef MS_WINDOWS ++ if (prefix[0] != '\0' && prefix[1] == L':') { ++ bufsz += wcslen(prefix) + 1; ++ } ++ if (calculate->argv0_path[0] != '\0' && calculate->argv0_path[1] == L':') { ++ bufsz += wcslen(calculate->argv0_path) + 1; ++ } ++ if (config->dll_path[0] != '\0' && config->dll_path[1] == L':') { ++ bufsz += wcslen(config->dll_path) + 1; ++ } else if (config->program_full_path[0] != '\0' && config->program_full_path[1] == L':'){ ++ bufsz += wcslen(config->program_full_path) + 1; ++ } ++#endif + + /* Allocate the buffer */ + wchar_t *buf = PyMem_RawMalloc(bufsz * sizeof(wchar_t)); +@@ -828,11 +893,28 @@ + } + else { + wcscat(buf, defpath); ++ wcscat(buf, delimiter); + break; + } + defpath = delim + 1; + } +- wcscat(buf, delimiter); ++#ifdef MS_WINDOWS ++ if (prefix[0] != '\0' && prefix[1] == L':') { ++ wcscat(buf, prefix); ++ wcscat(buf, delimiter); ++ } ++ if (calculate->argv0_path[0] != '\0' && calculate->argv0_path[1] == L':') { ++ wcscat(buf, calculate->argv0_path); ++ wcscat(buf, delimiter); ++ } ++ if (config->dll_path[0] != '\0' && config->dll_path[1] == L':') { ++ wcscat(buf, config->dll_path); ++ wcscat(buf, delimiter); ++ } else if (config->program_full_path[0] != '\0' && config->program_full_path[1] == L':'){ ++ wcscat(buf, config->program_full_path); ++ wcscat(buf, delimiter); ++ } ++#endif + + /* Finally, on goes the directory for dynamic-load modules */ + wcscat(buf, exec_prefix); +@@ -855,15 +928,19 @@ + if (!calculate->pythonpath) { + return DECODE_LOCALE_ERR("PYTHONPATH define", len); + } ++ Py_NormalizeSepsW(calculate->pythonpath); + calculate->prefix = Py_DecodeLocale(PREFIX, &len); + if (!calculate->prefix) { + return DECODE_LOCALE_ERR("PREFIX define", len); + } ++ Py_NormalizeSepsW(calculate->prefix); + calculate->exec_prefix = Py_DecodeLocale(EXEC_PREFIX, &len); + if (!calculate->prefix) { + return DECODE_LOCALE_ERR("EXEC_PREFIX define", len); + } +- calculate->lib_python = Py_DecodeLocale("lib/python" VERSION, &len); ++ Py_NormalizeSepsW(calculate->exec_prefix); ++ const char *lib_python_VERSION = (Py_GetSepA(NULL) == '/') ? "lib/python" VERSION : "lib\\python" VERSION; ++ calculate->lib_python = Py_DecodeLocale(lib_python_VERSION, &len); + if (!calculate->lib_python) { + return DECODE_LOCALE_ERR("EXEC_PREFIX define", len); + } +@@ -892,6 +970,13 @@ + { + _PyInitError err; + ++#ifdef MS_WINDOWS ++ err = get_dll_path(config); ++ if (_Py_INIT_FAILED(err)) { ++ return err; ++ } ++#endif ++ + err = calculate_program_full_path(core_config, calculate, config); + if (_Py_INIT_FAILED(err)) { + return err; +@@ -968,6 +1078,60 @@ + return err; } - ++ +#ifdef MS_WINDOWS +/* Load python3.dll before loading any extension module that might refer + to it. That way, we can be sure that always the python3.dll corresponding @@ -103,23 +231,36 @@ diff -Naur Python-3.6.5-orig/Modules/getpath.c Python-3.6.5/Modules/getpath.c +static int python3_checked = 0; +static HANDLE hPython3; +int -+_Py_CheckPython3() ++_Py_CheckPython3(void) +{ ++ /* This does not work well with mingw-w64-python. First it tries to ++ * look up \python3.dll, which it won't (or should not) find. But the ++ * real problem is when Python is freezed by cx_Freeze. sys.prefix ++ * is then /, and Python tries to load /\DLLs\python3.dll, which makes ++ * windows try to load python3.dll from a network address, causing ++ * a several seconds long delay before proceeding. Since this code does ++ * not do anything useful in the current state, we might just as ++ * well return immediately. */ ++#ifdef __MINGW32__ ++ return 0; ++#else + wchar_t py3path[MAXPATHLEN+1]; + wchar_t *s; -+ if (python3_checked) ++ if (python3_checked) { + return hPython3 != NULL; ++ } + python3_checked = 1; + + /* If there is a python3.dll next to the python3y.dll, + assume this is a build tree; use that DLL */ -+ wcscpy(py3path, dllpath); ++ wcscpy(py3path, _Py_path_config.dll_path); + s = wcsrchr(py3path, Py_GetSepW(py3path)); -+ if (!s) ++ if (!s) { + s = py3path; -+ else ++ } else { + s += 1; -+ wcscpy(s, L"python3.dll"); ++ } ++ wcscpy(s, L"\\python3.dll"); + hPython3 = LoadLibraryExW(py3path, NULL, LOAD_WITH_ALTERED_SEARCH_PATH); + if (hPython3 != NULL) + return 1; @@ -129,16 +270,17 @@ diff -Naur Python-3.6.5-orig/Modules/getpath.c Python-3.6.5/Modules/getpath.c + wcscat(py3path, L"\\DLLs\\python3.dll"); + hPython3 = LoadLibraryExW(py3path, NULL, LOAD_WITH_ALTERED_SEARCH_PATH); + return hPython3 != NULL; ++#endif +} +#endif + #ifdef __cplusplus } #endif -diff -Naur Python-3.6.5-orig/Modules/posixmodule.c Python-3.6.5/Modules/posixmodule.c ---- Python-3.6.5-orig/Modules/posixmodule.c 2018-04-16 09:54:07.705080900 +0300 -+++ Python-3.6.5/Modules/posixmodule.c 2018-04-16 09:54:08.037686100 +0300 -@@ -3469,7 +3469,7 @@ +diff -Naur Python-3.7.0-orig/Modules/posixmodule.c Python-3.7.0/Modules/posixmodule.c +--- Python-3.7.0-orig/Modules/posixmodule.c 2018-06-30 11:17:01.036301200 +0300 ++++ Python-3.7.0/Modules/posixmodule.c 2018-06-30 11:17:01.379501800 +0300 +@@ -3524,7 +3524,7 @@ Py_END_ALLOW_THREADS /* FindNextFile sets error to ERROR_NO_MORE_FILES if it got to the end of the directory. */ @@ -147,3 +289,34 @@ diff -Naur Python-3.6.5-orig/Modules/posixmodule.c Python-3.6.5/Modules/posixmod Py_DECREF(list); list = path_error(path); goto exit; +--- Python-3.7.0/Python/pathconfig.c.orig 2018-06-27 06:07:35.000000000 +0300 ++++ Python-3.7.0/Python/pathconfig.c 2018-07-02 08:14:54.324696000 +0300 +@@ -32,7 +140,8 @@ + CLEAR(config->program_full_path); + #ifdef MS_WINDOWS + CLEAR(config->dll_path); +-#else ++#endif ++#ifndef _MSC_VER + CLEAR(config->exec_prefix); + #endif + CLEAR(config->module_search_path); +@@ -145,7 +254,8 @@ + new_config.prefix = _PyMem_RawWcsdup(L""); + #ifdef MS_WINDOWS + new_config.dll_path = _PyMem_RawWcsdup(L""); +-#else ++#endif ++#ifndef _MSC_VER + new_config.exec_prefix = _PyMem_RawWcsdup(L""); + #endif + new_config.module_search_path = _PyMem_RawWcsdup(path); +@@ -224,7 +335,7 @@ + wchar_t * + Py_GetExecPrefix(void) + { +-#ifdef MS_WINDOWS ++#ifdef _MSC_VER + return Py_GetPrefix(); + #else + pathconfig_global_init(); diff --git a/mingw-w64-python3/0565-mingw-add-ModuleFileName-dir-to-PATH.patch b/mingw-w64-python3/0565-mingw-add-ModuleFileName-dir-to-PATH.patch index b2882be93b..52556285ee 100644 --- a/mingw-w64-python3/0565-mingw-add-ModuleFileName-dir-to-PATH.patch +++ b/mingw-w64-python3/0565-mingw-add-ModuleFileName-dir-to-PATH.patch @@ -1,18 +1,17 @@ -diff -Naur Python-3.6.5-orig/Modules/getpath.c Python-3.6.5/Modules/getpath.c ---- Python-3.6.5-orig/Modules/getpath.c 2018-04-16 09:54:09.412299000 +0300 -+++ Python-3.6.5/Modules/getpath.c 2018-04-16 09:54:09.658101800 +0300 -@@ -851,6 +851,32 @@ - else - wcsncpy(exec_prefix, _exec_prefix, MAXPATHLEN); +diff -Naur Python-3.7.0-orig/Modules/getpath.c Python-3.7.0/Modules/getpath.c +--- Python-3.7.0-orig/Modules/getpath.c 2018-06-30 11:17:03.313905200 +0300 ++++ Python-3.7.0/Modules/getpath.c 2018-06-30 11:17:03.547905600 +0300 +@@ -1031,6 +1031,31 @@ + memset(exec_prefix, 0, sizeof(exec_prefix)); + calculate_exec_prefix(core_config, calculate, exec_prefix); +#ifdef MS_WINDOWS -+ if (_path) { ++ if (calculate->path_env) { + wchar_t *module_path, *new_path; -+ /* Add path of executable/dll to system path. This -+ * is so that the correct tcl??.dll and tk??.dll get used. */ -+ path_buffer = Py_DecodeLocale(_path, NULL); -+ module_path = dllpath[0] ? dllpath : progpath; -+ new_path = (wchar_t *)alloca(sizeof(wchar_t)*(wcslen(L"PATH=")+wcslen(module_path)+1+wcslen(path_buffer)+1)); ++ // Add path of executable/dll to system path. This ++ // is so that the correct tcl??.dll and tk??.dll get used. ++ module_path = config->dll_path[0] ? config->dll_path : config->program_full_path; ++ new_path = (wchar_t *)alloca(sizeof(wchar_t)*(wcslen(L"PATH=") + wcslen(module_path) + 1 + wcslen(calculate->path_env) + 1)); + if (new_path) { + wchar_t *slashes, *end; + wcscpy(new_path, L"PATH="); @@ -20,17 +19,17 @@ diff -Naur Python-3.6.5-orig/Modules/getpath.c Python-3.6.5/Modules/getpath.c + slashes = wcschr(new_path, L'/'); + while (slashes) { + *slashes = L'\\'; -+ slashes = wcschr( slashes+1, L'/' ); ++ slashes = wcschr(slashes+1, L'/'); + } + end = wcsrchr(new_path, L'\\') ? wcsrchr(new_path, L'\\') : new_path + wcslen(new_path); + end[0] = L';'; + end[1] = L'\0'; -+ wcscat(new_path, path_buffer); ++ wcscat(new_path, calculate->path_env); + _wputenv(new_path); -+ PyMem_RawFree(path_buffer); + } + } +#endif - PyMem_RawFree(_pythonpath); - PyMem_RawFree(_prefix); - PyMem_RawFree(_exec_prefix); ++ + if ((!calculate->prefix_found || !calculate->exec_prefix_found) && + !Py_FrozenFlag) + { diff --git a/mingw-w64-python3/0570-mingw-add-BUILDIN_WIN32_MODULEs-time-msvcrt.patch b/mingw-w64-python3/0570-mingw-add-BUILDIN_WIN32_MODULEs-time-msvcrt.patch index 8b25e5b69d..68cfaf8ffd 100644 --- a/mingw-w64-python3/0570-mingw-add-BUILDIN_WIN32_MODULEs-time-msvcrt.patch +++ b/mingw-w64-python3/0570-mingw-add-BUILDIN_WIN32_MODULEs-time-msvcrt.patch @@ -1,11 +1,9 @@ -diff -Naur Python-3.6.5-orig/Modules/Setup.config.in Python-3.6.5/Modules/Setup.config.in ---- Python-3.6.5-orig/Modules/Setup.config.in 2018-04-16 09:53:15.158661400 +0300 -+++ Python-3.6.5/Modules/Setup.config.in 2018-04-16 09:54:11.159312400 +0300 -@@ -14,6 +14,7 @@ +diff -Naur Python-3.7.0-orig/Modules/Setup.config.in Python-3.7.0/Modules/Setup.config.in +--- Python-3.7.0-orig/Modules/Setup.config.in 2018-06-30 11:15:53.851782600 +0300 ++++ Python-3.7.0/Modules/Setup.config.in 2018-06-30 11:17:05.653909300 +0300 +@@ -11,4 +11,5 @@ # build-in modules for windows platform: @USE_WIN32_MODULE@winreg ../PC/winreg.c -+@USE_WIN32_MODULE@msvcrt ../PC/msvcrtmodule.c ++@USE_WIN32_MODULE@msvcrt -DPy_BUILD_CORE ../PC/msvcrtmodule.c - # The rest of the modules previously listed in this file are built - # by the setup.py script in Python 2.1 and later. diff --git a/mingw-w64-python3/0610-msys-cygwin-semi-native-build-sysconfig.patch b/mingw-w64-python3/0610-msys-cygwin-semi-native-build-sysconfig.patch index 8fa58e5a83..222306fa9d 100644 --- a/mingw-w64-python3/0610-msys-cygwin-semi-native-build-sysconfig.patch +++ b/mingw-w64-python3/0610-msys-cygwin-semi-native-build-sysconfig.patch @@ -1,7 +1,7 @@ -diff -Naur Python-3.6.5-orig/configure.ac Python-3.6.5/configure.ac ---- Python-3.6.5-orig/configure.ac 2018-04-16 09:54:09.412299000 +0300 -+++ Python-3.6.5/configure.ac 2018-04-16 09:54:12.664924200 +0300 -@@ -618,6 +618,65 @@ +diff -Naur Python-3.7.0-orig/configure.ac Python-3.7.0/configure.ac +--- Python-3.7.0-orig/configure.ac 2018-06-30 11:17:03.313905200 +0300 ++++ Python-3.7.0/configure.ac 2018-06-30 11:17:07.837913100 +0300 +@@ -595,6 +595,65 @@ AC_MSG_RESULT([$DELIM]) AC_SUBST(DELIM) @@ -67,10 +67,10 @@ diff -Naur Python-3.6.5-orig/configure.ac Python-3.6.5/configure.ac AC_MSG_CHECKING([for init system calls]) AC_SUBST(INITSYS) case $host in -diff -Naur Python-3.6.5-orig/Lib/sysconfig.py Python-3.6.5/Lib/sysconfig.py ---- Python-3.6.5-orig/Lib/sysconfig.py 2018-04-16 09:53:50.596135200 +0300 -+++ Python-3.6.5/Lib/sysconfig.py 2018-04-16 09:54:12.669924400 +0300 -@@ -328,6 +328,14 @@ +diff -Naur Python-3.7.0-orig/Lib/sysconfig.py Python-3.7.0/Lib/sysconfig.py +--- Python-3.7.0-orig/Lib/sysconfig.py 2018-06-30 11:16:37.183859300 +0300 ++++ Python-3.7.0/Lib/sysconfig.py 2018-06-30 11:17:07.837913100 +0300 +@@ -322,6 +322,14 @@ if isinstance(v, str): done[k] = v.strip() @@ -85,10 +85,10 @@ diff -Naur Python-3.6.5-orig/Lib/sysconfig.py Python-3.6.5/Lib/sysconfig.py # save the results in the global dictionary vars.update(done) return vars -diff -Naur Python-3.6.5-orig/Makefile.pre.in Python-3.6.5/Makefile.pre.in ---- Python-3.6.5-orig/Makefile.pre.in 2018-04-16 09:54:05.827262600 +0300 -+++ Python-3.6.5/Makefile.pre.in 2018-04-16 09:54:12.672924600 +0300 -@@ -128,6 +128,13 @@ +diff -Naur Python-3.7.0-orig/Makefile.pre.in Python-3.7.0/Makefile.pre.in +--- Python-3.7.0-orig/Makefile.pre.in 2018-06-30 11:17:03.313905200 +0300 ++++ Python-3.7.0/Makefile.pre.in 2018-06-30 11:17:07.837913100 +0300 +@@ -129,6 +129,13 @@ # Install prefix for data files datarootdir= @datarootdir@ diff --git a/mingw-w64-python3/0620-mingw-sysconfig-like-posix.patch b/mingw-w64-python3/0620-mingw-sysconfig-like-posix.patch index b4202fdb47..082d9d2851 100644 --- a/mingw-w64-python3/0620-mingw-sysconfig-like-posix.patch +++ b/mingw-w64-python3/0620-mingw-sysconfig-like-posix.patch @@ -1,8 +1,8 @@ -diff -Naur Python-3.6.5-orig/Lib/distutils/command/build_ext.py Python-3.6.5/Lib/distutils/command/build_ext.py ---- Python-3.6.5-orig/Lib/distutils/command/build_ext.py 2018-04-16 09:53:44.596887800 +0300 -+++ Python-3.6.5/Lib/distutils/command/build_ext.py 2018-04-16 09:54:14.249734400 +0300 +diff -Naur Python-3.7.0-orig/Lib/distutils/command/build_ext.py Python-3.7.0/Lib/distutils/command/build_ext.py +--- Python-3.7.0-orig/Lib/distutils/command/build_ext.py 2018-06-30 11:16:28.713044400 +0300 ++++ Python-3.7.0/Lib/distutils/command/build_ext.py 2018-06-30 11:17:10.099917100 +0300 @@ -220,9 +220,10 @@ - if sys.platform[:6] == 'cygwin' or sys.platform[:6] == 'atheos': + if sys.platform[:6] == 'cygwin': if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")): # building third party extensions + config_dir_name = os.path.basename(sysconfig.get_config_var('LIBPL')) @@ -13,10 +13,10 @@ diff -Naur Python-3.6.5-orig/Lib/distutils/command/build_ext.py Python-3.6.5/Lib else: # building python standard extensions self.library_dirs.append('.') -diff -Naur Python-3.6.5-orig/Lib/sysconfig.py Python-3.6.5/Lib/sysconfig.py ---- Python-3.6.5-orig/Lib/sysconfig.py 2018-04-16 09:54:14.002931500 +0300 -+++ Python-3.6.5/Lib/sysconfig.py 2018-04-16 09:54:14.249734400 +0300 -@@ -42,22 +42,22 @@ +diff -Naur Python-3.7.0-orig/Lib/sysconfig.py Python-3.7.0/Lib/sysconfig.py +--- Python-3.7.0-orig/Lib/sysconfig.py 2018-06-30 11:17:09.803516600 +0300 ++++ Python-3.7.0/Lib/sysconfig.py 2018-06-30 11:17:10.099917100 +0300 +@@ -42,23 +42,23 @@ 'data': '{base}', }, 'nt': { @@ -36,6 +36,7 @@ diff -Naur Python-3.6.5-orig/Lib/sysconfig.py Python-3.6.5/Lib/sysconfig.py + '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}', @@ -52,7 +53,7 @@ diff -Naur Python-3.6.5-orig/Lib/sysconfig.py Python-3.6.5/Lib/sysconfig.py 'data': '{userbase}', }, 'posix_user': { -@@ -455,7 +455,7 @@ +@@ -449,7 +449,7 @@ vars['INCLUDEPY'] = get_path('include') vars['EXT_SUFFIX'] = '.pyd' vars['EXE'] = '.exe' diff --git a/mingw-w64-python3/0630-mingw-_winapi_as_builtin_for_Popen_in_cygwinccompiler.patch b/mingw-w64-python3/0630-mingw-_winapi_as_builtin_for_Popen_in_cygwinccompiler.patch index d18176bddd..287e3903c5 100644 --- a/mingw-w64-python3/0630-mingw-_winapi_as_builtin_for_Popen_in_cygwinccompiler.patch +++ b/mingw-w64-python3/0630-mingw-_winapi_as_builtin_for_Popen_in_cygwinccompiler.patch @@ -1,6 +1,6 @@ -diff -Naur Python-3.6.5-orig/Lib/distutils/cygwinccompiler.py Python-3.6.5/Lib/distutils/cygwinccompiler.py ---- Python-3.6.5-orig/Lib/distutils/cygwinccompiler.py 2018-04-16 09:53:55.144373100 +0300 -+++ Python-3.6.5/Lib/distutils/cygwinccompiler.py 2018-04-16 09:54:15.851368900 +0300 +diff -Naur Python-3.7.0-orig/Lib/distutils/cygwinccompiler.py Python-3.7.0/Lib/distutils/cygwinccompiler.py +--- Python-3.7.0-orig/Lib/distutils/cygwinccompiler.py 2018-06-30 11:16:43.501870400 +0300 ++++ Python-3.7.0/Lib/distutils/cygwinccompiler.py 2018-06-30 11:17:12.330721000 +0300 @@ -58,6 +58,7 @@ from distutils import log from distutils.version import LooseVersion @@ -36,21 +36,19 @@ diff -Naur Python-3.6.5-orig/Lib/distutils/cygwinccompiler.py Python-3.6.5/Lib/d return tuple([_find_exe_version(cmd) for cmd in commands]) def is_cygwingcc(): -diff -Naur Python-3.6.5-orig/Modules/Setup.config.in Python-3.6.5/Modules/Setup.config.in ---- Python-3.6.5-orig/Modules/Setup.config.in 2018-04-16 09:54:12.403719600 +0300 -+++ Python-3.6.5/Modules/Setup.config.in 2018-04-16 09:54:15.851368900 +0300 -@@ -15,6 +15,7 @@ +diff -Naur Python-3.7.0-orig/Modules/Setup.config.in Python-3.7.0/Modules/Setup.config.in +--- Python-3.7.0-orig/Modules/Setup.config.in 2018-06-30 11:17:07.541512600 +0300 ++++ Python-3.7.0/Modules/Setup.config.in 2018-06-30 11:17:12.330721000 +0300 +@@ -12,4 +12,5 @@ # build-in modules for windows platform: @USE_WIN32_MODULE@winreg ../PC/winreg.c - @USE_WIN32_MODULE@msvcrt ../PC/msvcrtmodule.c + @USE_WIN32_MODULE@msvcrt -DPy_BUILD_CORE ../PC/msvcrtmodule.c +@USE_WIN32_MODULE@_winapi _winapi.c - # The rest of the modules previously listed in this file are built - # by the setup.py script in Python 2.1 and later. -diff -Naur Python-3.6.5-orig/setup.py Python-3.6.5/setup.py ---- Python-3.6.5-orig/setup.py 2018-04-16 09:54:04.234456200 +0300 -+++ Python-3.6.5/setup.py 2018-04-16 09:54:15.866968900 +0300 -@@ -1007,7 +1007,9 @@ +diff -Naur Python-3.7.0-orig/setup.py Python-3.7.0/setup.py +--- Python-3.7.0-orig/setup.py 2018-06-30 11:16:56.325092900 +0300 ++++ Python-3.7.0/setup.py 2018-06-30 11:17:12.330721000 +0300 +@@ -970,7 +970,9 @@ exts.append( Extension('msvcrt', [os.path.join(pc_srcdir, p) for p in ['msvcrtmodule.c']]) ) diff --git a/mingw-w64-python3/0640-mingw-x86_64-size_t-format-specifier-pid_t.patch b/mingw-w64-python3/0640-mingw-x86_64-size_t-format-specifier-pid_t.patch index 29289948de..322e966eb0 100644 --- a/mingw-w64-python3/0640-mingw-x86_64-size_t-format-specifier-pid_t.patch +++ b/mingw-w64-python3/0640-mingw-x86_64-size_t-format-specifier-pid_t.patch @@ -1,6 +1,6 @@ -diff -Naur Python-3.6.5-orig/Include/pyport.h Python-3.6.5/Include/pyport.h ---- Python-3.6.5-orig/Include/pyport.h 2018-04-16 09:53:25.770154600 +0300 -+++ Python-3.6.5/Include/pyport.h 2018-04-16 09:54:17.370184000 +0300 +diff -Naur Python-3.7.0-orig/Include/pyport.h Python-3.7.0/Include/pyport.h +--- Python-3.7.0-orig/Include/pyport.h 2018-06-30 11:16:04.579001600 +0300 ++++ Python-3.7.0/Include/pyport.h 2018-06-30 11:17:14.483524800 +0300 @@ -156,6 +156,8 @@ # define PY_FORMAT_SIZE_T "l" # elif defined(MS_WINDOWS) diff --git a/mingw-w64-python3/0650-cross-dont-add-multiarch-paths-if-cross-compiling.patch b/mingw-w64-python3/0650-cross-dont-add-multiarch-paths-if-cross-compiling.patch index e75e661706..c9e0bb56f8 100644 --- a/mingw-w64-python3/0650-cross-dont-add-multiarch-paths-if-cross-compiling.patch +++ b/mingw-w64-python3/0650-cross-dont-add-multiarch-paths-if-cross-compiling.patch @@ -1,7 +1,7 @@ -diff -Naur Python-3.6.5-orig/setup.py Python-3.6.5/setup.py ---- Python-3.6.5-orig/setup.py 2018-04-16 09:54:17.167383600 +0300 -+++ Python-3.6.5/setup.py 2018-04-16 09:54:18.863993300 +0300 -@@ -521,10 +521,10 @@ +diff -Naur Python-3.7.0-orig/setup.py Python-3.7.0/setup.py +--- Python-3.7.0-orig/setup.py 2018-06-30 11:17:14.265124400 +0300 ++++ Python-3.7.0/setup.py 2018-06-30 11:17:16.558328400 +0300 +@@ -546,10 +546,10 @@ 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') diff --git a/mingw-w64-python3/0660-mingw-use-backslashes-in-compileall-py.patch b/mingw-w64-python3/0660-mingw-use-backslashes-in-compileall-py.patch index 2f18d1ae81..e4f1fc0301 100644 --- a/mingw-w64-python3/0660-mingw-use-backslashes-in-compileall-py.patch +++ b/mingw-w64-python3/0660-mingw-use-backslashes-in-compileall-py.patch @@ -1,6 +1,6 @@ -diff -Naur Python-3.6.5-orig/Lib/compileall.py Python-3.6.5/Lib/compileall.py ---- Python-3.6.5-orig/Lib/compileall.py 2018-03-28 12:19:31.000000000 +0300 -+++ Python-3.6.5/Lib/compileall.py 2018-04-16 09:54:20.372803500 +0300 +diff -Naur Python-3.7.0-orig/Lib/compileall.py Python-3.7.0/Lib/compileall.py +--- Python-3.7.0-orig/Lib/compileall.py 2018-06-27 06:07:35.000000000 +0300 ++++ Python-3.7.0/Lib/compileall.py 2018-06-30 11:17:18.679932200 +0300 @@ -40,6 +40,8 @@ if name == '__pycache__': continue diff --git a/mingw-w64-python3/0670-msys-convert_path-fix-and-root-hack.patch b/mingw-w64-python3/0670-msys-convert_path-fix-and-root-hack.patch index 47363d2b42..8cc718d2f8 100644 --- a/mingw-w64-python3/0670-msys-convert_path-fix-and-root-hack.patch +++ b/mingw-w64-python3/0670-msys-convert_path-fix-and-root-hack.patch @@ -1,6 +1,6 @@ -diff -Naur Python-3.6.5-orig/Lib/distutils/command/install.py Python-3.6.5/Lib/distutils/command/install.py ---- Python-3.6.5-orig/Lib/distutils/command/install.py 2018-03-28 12:19:31.000000000 +0300 -+++ Python-3.6.5/Lib/distutils/command/install.py 2018-04-16 09:54:22.610431200 +0300 +diff -Naur Python-3.7.0-orig/Lib/distutils/command/install.py Python-3.7.0/Lib/distutils/command/install.py +--- Python-3.7.0-orig/Lib/distutils/command/install.py 2018-06-27 06:07:35.000000000 +0300 ++++ Python-3.7.0/Lib/distutils/command/install.py 2018-06-30 11:17:20.832735900 +0300 @@ -341,7 +341,8 @@ # Convert directories from Unix /-separated syntax to the local @@ -11,10 +11,10 @@ diff -Naur Python-3.6.5-orig/Lib/distutils/command/install.py Python-3.6.5/Lib/d 'scripts', 'data', 'headers', 'userbase', 'usersite') -diff -Naur Python-3.6.5-orig/Lib/distutils/util.py Python-3.6.5/Lib/distutils/util.py ---- Python-3.6.5-orig/Lib/distutils/util.py 2018-04-16 09:53:44.596887800 +0300 -+++ Python-3.6.5/Lib/distutils/util.py 2018-04-16 09:54:22.610431200 +0300 -@@ -133,6 +133,13 @@ +diff -Naur Python-3.7.0-orig/Lib/distutils/util.py Python-3.7.0/Lib/distutils/util.py +--- Python-3.7.0-orig/Lib/distutils/util.py 2018-06-30 11:16:28.713044400 +0300 ++++ Python-3.7.0/Lib/distutils/util.py 2018-06-30 11:17:20.832735900 +0300 +@@ -118,6 +118,13 @@ paths.remove('.') if not paths: return os.curdir @@ -28,7 +28,7 @@ diff -Naur Python-3.6.5-orig/Lib/distutils/util.py Python-3.6.5/Lib/distutils/ut return os.path.join(*paths) # convert_path () -@@ -143,6 +150,10 @@ +@@ -128,6 +135,10 @@ relative, this is equivalent to "os.path.join(new_root,pathname)". Otherwise, it requires making 'pathname' relative and then joining the two, which is tricky on DOS/Windows and Mac OS. @@ -39,7 +39,7 @@ diff -Naur Python-3.6.5-orig/Lib/distutils/util.py Python-3.6.5/Lib/distutils/ut """ if os.name == 'posix': if not os.path.isabs(pathname): -@@ -152,9 +163,20 @@ +@@ -137,9 +148,20 @@ elif os.name == 'nt': (drive, path) = os.path.splitdrive(pathname) @@ -62,10 +62,10 @@ diff -Naur Python-3.6.5-orig/Lib/distutils/util.py Python-3.6.5/Lib/distutils/ut else: raise DistutilsPlatformError("nothing known about platform '%s'" % os.name) -diff -Naur Python-3.6.5-orig/Makefile.pre.in Python-3.6.5/Makefile.pre.in ---- Python-3.6.5-orig/Makefile.pre.in 2018-04-16 09:54:14.005931700 +0300 -+++ Python-3.6.5/Makefile.pre.in 2018-04-16 09:54:22.610431200 +0300 -@@ -1487,6 +1487,12 @@ +diff -Naur Python-3.7.0-orig/Makefile.pre.in Python-3.7.0/Makefile.pre.in +--- Python-3.7.0-orig/Makefile.pre.in 2018-06-30 11:17:09.803516600 +0300 ++++ Python-3.7.0/Makefile.pre.in 2018-06-30 11:17:20.832735900 +0300 +@@ -1520,6 +1520,12 @@ else true; \ fi @@ -78,7 +78,7 @@ diff -Naur Python-3.6.5-orig/Makefile.pre.in Python-3.6.5/Makefile.pre.in # Install the dynamically loadable modules # This goes into $(exec_prefix) sharedinstall: sharedmods -@@ -1494,9 +1500,9 @@ +@@ -1527,9 +1533,9 @@ --prefix=$(prefix) \ --install-scripts=$(BINDIR) \ --install-platlib=$(DESTSHARED) \ @@ -91,7 +91,7 @@ diff -Naur Python-3.6.5-orig/Makefile.pre.in Python-3.6.5/Makefile.pre.in # Here are a couple of targets for MacOSX again, to install a full # framework-based Python. frameworkinstall installs everything, the -@@ -1577,7 +1583,7 @@ +@@ -1610,7 +1616,7 @@ $(PYTHON_FOR_BUILD) $(srcdir)/Tools/scripts/setup.py install \ --prefix=$(prefix) \ --install-scripts=$(BINDIR) \ diff --git a/mingw-w64-python3/0690-allow-static-tcltk.patch b/mingw-w64-python3/0690-allow-static-tcltk.patch index 71989c9475..57bff6e29a 100644 --- a/mingw-w64-python3/0690-allow-static-tcltk.patch +++ b/mingw-w64-python3/0690-allow-static-tcltk.patch @@ -1,7 +1,7 @@ -diff -Naur Python-3.6.5-orig/setup.py Python-3.6.5/setup.py ---- Python-3.6.5-orig/setup.py 2018-04-16 09:54:20.163601900 +0300 -+++ Python-3.6.5/setup.py 2018-04-16 09:54:24.183042400 +0300 -@@ -606,7 +606,7 @@ +diff -Naur Python-3.7.0-orig/setup.py Python-3.7.0/setup.py +--- Python-3.7.0-orig/setup.py 2018-06-30 11:17:18.461531800 +0300 ++++ Python-3.7.0/setup.py 2018-06-30 11:17:23.001139700 +0300 +@@ -631,7 +631,7 @@ if host_platform == 'hp-ux11': lib_dirs += ['/usr/lib/hpux64', '/usr/lib/hpux32'] @@ -10,7 +10,7 @@ diff -Naur Python-3.6.5-orig/setup.py Python-3.6.5/setup.py # 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. -@@ -616,6 +616,8 @@ +@@ -641,6 +641,8 @@ # directories with whitespace in the name to store libraries. cflags, ldflags = sysconfig.get_config_vars( 'CFLAGS', 'LDFLAGS') @@ -19,7 +19,7 @@ diff -Naur Python-3.6.5-orig/setup.py Python-3.6.5/setup.py for item in cflags.split(): if item.startswith('-I'): inc_dirs.append(item[2:]) -@@ -1875,14 +1877,19 @@ +@@ -1842,14 +1844,19 @@ # 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 @@ -47,7 +47,7 @@ diff -Naur Python-3.6.5-orig/setup.py Python-3.6.5/setup.py break # Now check for the header files -@@ -1950,13 +1957,21 @@ +@@ -1917,13 +1924,21 @@ # Add the Tcl/Tk libraries libs.append('tk'+ version) libs.append('tcl'+ version) diff --git a/mingw-w64-python3/0710-CROSS-properly-detect-WINDOW-_flags-for-different-nc.patch b/mingw-w64-python3/0710-CROSS-properly-detect-WINDOW-_flags-for-different-nc.patch deleted file mode 100644 index 25f92b1434..0000000000 --- a/mingw-w64-python3/0710-CROSS-properly-detect-WINDOW-_flags-for-different-nc.patch +++ /dev/null @@ -1,99 +0,0 @@ -diff -Naur Python-3.5.2-orig/configure.ac Python-3.5.2/configure.ac ---- Python-3.5.2-orig/configure.ac 2016-07-12 14:22:24.130800700 +0300 -+++ Python-3.5.2/configure.ac 2016-07-12 14:22:24.460800700 +0300 -@@ -5138,15 +5138,51 @@ - fi - - AC_MSG_CHECKING(whether WINDOW has _flags) --AC_CACHE_VAL(ac_cv_window_has_flags, - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[ - WINDOW *w; - w->_flags = 0; - ]])], - [ac_cv_window_has_flags=yes], --[ac_cv_window_has_flags=no])) -+[ac_cv_window_has_flags=no]) - AC_MSG_RESULT($ac_cv_window_has_flags) - -+py_curses_window_is_opaque=no -+if test no = $ac_cv_window_has_flags; then -+ AC_MSG_CHECKING([whether WINDOW has _flags in non-opaque structure]) -+ AC_COMPILE_IFELSE([ -+ AC_LANG_PROGRAM([[ -+ #define NCURSES_OPAQUE 0 -+ #include -+ ]],[[ -+ WINDOW *w; -+ w->_flags = 0; -+ ]])], -+ [py_curses_window_is_opaque=yes]) -+ AC_MSG_RESULT([$py_curses_window_is_opaque]) -+fi -+if test yes = $py_curses_window_is_opaque; then -+ ac_cv_window_has_flags=yes -+ AC_DEFINE([NCURSES_OPAQUE], [0], [Define to 0 if you have WINDOW _flags in non-opaque structure.]) -+fi -+ -+py_curses_window_is_internal=no -+if test no = $ac_cv_window_has_flags; then -+ AC_MSG_CHECKING([whether WINDOW has _flags as internal structure]) -+ AC_COMPILE_IFELSE([ -+ AC_LANG_PROGRAM([[ -+ #define NCURSES_INTERNALS 1 -+ #include -+ ]],[[ -+ WINDOW *w; -+ w->_flags = 0; -+ ]])], -+ [py_curses_window_is_internal=yes]) -+ AC_MSG_RESULT([$py_curses_window_is_internal]) -+fi -+if test yes = $py_curses_window_is_internal; then -+ ac_cv_window_has_flags=yes -+ AC_DEFINE([NCURSES_INTERNALS], [1], [Define to 1 if you have WINDOW _flags as internal structure.]) -+fi - - if test "$ac_cv_window_has_flags" = yes - then -diff -Naur Python-3.5.2-orig/Include/py_curses.h Python-3.5.2/Include/py_curses.h ---- Python-3.5.2-orig/Include/py_curses.h 2016-06-26 00:38:35.000000000 +0300 -+++ Python-3.5.2/Include/py_curses.h 2016-07-12 14:22:24.476800700 +0300 -@@ -14,7 +14,9 @@ - /* the following define is necessary for OS X 10.6; without it, the - Apple-supplied ncurses.h sets NCURSES_OPAQUE to 1, and then Python - can't get at the WINDOW flags field. */ -+/* NOTE configure check if ncurses require such definition - #define NCURSES_OPAQUE 0 -+*/ - #endif /* __APPLE__ */ - - #ifdef __FreeBSD__ -@@ -57,9 +59,12 @@ - #ifdef HAVE_NCURSES_H - /* configure was checking , but we will - use , which has all these features. */ -+/* NOTE configure check for existence of flags -+ * Also flags are visible only if WINDOW structure is not opaque - #ifndef WINDOW_HAS_FLAGS - #define WINDOW_HAS_FLAGS 1 - #endif -+*/ - #ifndef MVWDELCH_IS_EXPRESSION - #define MVWDELCH_IS_EXPRESSION 1 - #endif -diff -Naur Python-3.5.2-orig/pyconfig.h.in Python-3.5.2/pyconfig.h.in ---- Python-3.5.2-orig/pyconfig.h.in 2016-07-12 14:21:24.383800700 +0300 -+++ Python-3.5.2/pyconfig.h.in 2016-07-12 14:22:24.483300700 +0300 -@@ -1207,6 +1207,12 @@ - /* Define to 1 if you want to use native NT threads */ - #undef NT_THREADS - -+/* Define to 1 if you have WINDOW _flags as internal structure. */ -+#undef NCURSES_INTERNALS -+ -+/* Define to 0 if you have WINDOW _flags in non-opaque structure. */ -+#undef NCURSES_OPAQUE -+ - /* Define to the address where bug reports for this package should be sent. */ - #undef PACKAGE_BUGREPORT - diff --git a/mingw-w64-python3/0720-mingw-pdcurses_ISPAD.patch b/mingw-w64-python3/0720-mingw-pdcurses_ISPAD.patch index 87112bddf1..6038dac27c 100644 --- a/mingw-w64-python3/0720-mingw-pdcurses_ISPAD.patch +++ b/mingw-w64-python3/0720-mingw-pdcurses_ISPAD.patch @@ -1,13 +1,16 @@ -diff -Naur Python-3.6.5-orig/Include/py_curses.h Python-3.6.5/Include/py_curses.h ---- Python-3.6.5-orig/Include/py_curses.h 2018-03-28 12:19:31.000000000 +0300 -+++ Python-3.6.5/Include/py_curses.h 2018-04-16 09:54:25.653255600 +0300 -@@ -52,6 +52,10 @@ +diff -Naur Python-3.7.0-orig/Include/py_curses.h Python-3.7.0/Include/py_curses.h +--- Python-3.7.0-orig/Include/py_curses.h 2018-06-27 06:07:35.000000000 +0300 ++++ Python-3.7.0/Include/py_curses.h 2018-06-30 11:17:25.122743500 +0300 +@@ -36,6 +36,13 @@ #include #endif -+#if defined(__MINGW32__) && !defined(_ISPAD) ++#if defined(__MINGW32__) ++#include ++#if !defined(_ISPAD) +#define _ISPAD 0x10 +#endif ++#endif + #ifdef HAVE_NCURSES_H /* configure was checking , but we will diff --git a/mingw-w64-python3/0730-mingw-fix-ncurses-module.patch b/mingw-w64-python3/0730-mingw-fix-ncurses-module.patch deleted file mode 100644 index 7540d3eebd..0000000000 --- a/mingw-w64-python3/0730-mingw-fix-ncurses-module.patch +++ /dev/null @@ -1,99 +0,0 @@ -diff -Naur Python-3.6.5-orig/Modules/_cursesmodule.c Python-3.6.5/Modules/_cursesmodule.c ---- Python-3.6.5-orig/Modules/_cursesmodule.c 2018-03-28 12:19:31.000000000 +0300 -+++ Python-3.6.5/Modules/_cursesmodule.c 2018-04-16 09:54:27.146677000 +0300 -@@ -125,6 +125,10 @@ - #include - #endif - -+#ifdef __MINGW32__ -+#include -+#endif -+ - #if !defined(HAVE_NCURSES_H) && (defined(sgi) || defined(__sun) || defined(SCO5)) - #define STRICT_SYSV_CURSES /* Don't use ncurses extensions */ - typedef chtype attr_t; /* No attr_t type is available */ -@@ -1748,10 +1752,14 @@ - /* We have to simulate this by writing to a temporary FILE*, - then reading back, then writing to the argument stream. */ - char fn[100]; -+#ifndef MS_WINDOWS - int fd = -1; -+#endif - FILE *fp = NULL; - PyObject *res = NULL; - -+#ifndef MS_WINDOWS -+/* Even on unix /tmp may not exist and the program must prefer $TMPDIR ! */ - strcpy(fn, "/tmp/py.curses.putwin.XXXXXX"); - fd = mkstemp(fn); - if (fd < 0) -@@ -1759,6 +1767,14 @@ - if (_Py_set_inheritable(fd, 0, NULL) < 0) - goto exit; - fp = fdopen(fd, "wb+"); -+#else -+ strcpy(fn, "py.curses.putwin.XXXXXX"); -+ _mktemp(fn); -+ if (*fn == 0) -+ return PyErr_SetFromErrnoWithFilename(PyExc_IOError, fn); -+ fp = fopen(fn, "wb+"); -+#endif -+ - if (fp == NULL) { - PyErr_SetFromErrnoWithFilename(PyExc_IOError, fn); - goto exit; -@@ -1783,8 +1799,10 @@ - exit: - if (fp != NULL) - fclose(fp); -+ #ifndef MS_WINDOWS - else if (fd != -1) - close(fd); -+ #endif - remove(fn); - return res; - } -@@ -2324,7 +2342,9 @@ - PyCurses_GetWin(PyCursesWindowObject *self, PyObject *stream) - { - char fn[100]; -+#ifndef MS_WINDOWS - int fd = -1; -+#endif - FILE *fp = NULL; - PyObject *data; - size_t datalen; -@@ -2334,6 +2354,8 @@ - - PyCursesInitialised; - -+#ifndef MS_WINDOWS -+/* Even on unix /tmp may not exist and the program must prefer $TMPDIR ! */ - strcpy(fn, "/tmp/py.curses.getwin.XXXXXX"); - fd = mkstemp(fn); - if (fd < 0) -@@ -2341,6 +2363,13 @@ - if (_Py_set_inheritable(fd, 0, NULL) < 0) - goto error; - fp = fdopen(fd, "wb+"); -+#else -+ strcpy(fn, "py.curses.getwin.XXXXXX"); -+ _mktemp(fn); -+ if (*fn == 0) -+ return PyErr_SetFromErrnoWithFilename(PyExc_IOError, fn); -+ fp = fopen(fn, "wb+"); -+#endif - if (fp == NULL) { - PyErr_SetFromErrnoWithFilename(PyExc_IOError, fn); - goto error; -@@ -2375,8 +2404,10 @@ - error: - if (fp != NULL) - fclose(fp); -+ #ifndef MS_WINDOWS - else if (fd != -1) - close(fd); -+ #endif - remove(fn); - return res; - } diff --git a/mingw-w64-python3/0740-grammar-fixes.patch b/mingw-w64-python3/0740-grammar-fixes.patch index 6f9f242f8b..1f09af43ea 100644 --- a/mingw-w64-python3/0740-grammar-fixes.patch +++ b/mingw-w64-python3/0740-grammar-fixes.patch @@ -1,6 +1,6 @@ -diff -Naur Python-3.6.5-orig/Modules/parsermodule.c Python-3.6.5/Modules/parsermodule.c ---- Python-3.6.5-orig/Modules/parsermodule.c 2018-03-28 12:19:31.000000000 +0300 -+++ Python-3.6.5/Modules/parsermodule.c 2018-04-16 09:54:28.689890000 +0300 +diff -Naur Python-3.7.0-orig/Modules/parsermodule.c Python-3.7.0/Modules/parsermodule.c +--- Python-3.7.0-orig/Modules/parsermodule.c 2018-06-27 06:07:35.000000000 +0300 ++++ Python-3.7.0/Modules/parsermodule.c 2018-06-30 11:17:27.259947200 +0300 @@ -42,7 +42,7 @@ #undef Yield #include "ast.h" @@ -10,9 +10,9 @@ diff -Naur Python-3.6.5-orig/Modules/parsermodule.c Python-3.6.5/Modules/parserm #ifdef lint #include -diff -Naur Python-3.6.5-orig/Parser/metagrammar.c Python-3.6.5/Parser/metagrammar.c ---- Python-3.6.5-orig/Parser/metagrammar.c 2018-03-28 12:19:31.000000000 +0300 -+++ Python-3.6.5/Parser/metagrammar.c 2018-04-16 09:54:28.689890000 +0300 +diff -Naur Python-3.7.0-orig/Parser/metagrammar.c Python-3.7.0/Parser/metagrammar.c +--- Python-3.7.0-orig/Parser/metagrammar.c 2018-06-27 06:07:35.000000000 +0300 ++++ Python-3.7.0/Parser/metagrammar.c 2018-06-30 11:17:27.259947200 +0300 @@ -139,7 +139,7 @@ {7, 0}, {8, 0}, diff --git a/mingw-w64-python3/0750-builddir-fixes.patch b/mingw-w64-python3/0750-builddir-fixes.patch index 400760da32..9eba4763cd 100644 --- a/mingw-w64-python3/0750-builddir-fixes.patch +++ b/mingw-w64-python3/0750-builddir-fixes.patch @@ -1,7 +1,7 @@ -diff -Naur Python-3.6.5-orig/Makefile.pre.in Python-3.6.5/Makefile.pre.in ---- Python-3.6.5-orig/Makefile.pre.in 2018-04-16 09:54:23.962241000 +0300 -+++ Python-3.6.5/Makefile.pre.in 2018-04-16 09:54:30.201506400 +0300 -@@ -705,20 +705,20 @@ +diff -Naur Python-3.7.0-orig/Makefile.pre.in Python-3.7.0/Makefile.pre.in +--- Python-3.7.0-orig/Makefile.pre.in 2018-06-30 11:17:22.782739400 +0300 ++++ Python-3.7.0/Makefile.pre.in 2018-06-30 11:17:29.490751100 +0300 +@@ -725,20 +725,20 @@ Programs/_freeze_importlib.o: Programs/_freeze_importlib.c Makefile @@ -26,7 +26,7 @@ diff -Naur Python-3.6.5-orig/Makefile.pre.in Python-3.6.5/Makefile.pre.in $(srcdir)/Lib/importlib/_bootstrap.py \ $(srcdir)/Python/importlib.h.new $(UPDATE_FILE) $(srcdir)/Python/importlib.h $(srcdir)/Python/importlib.h.new -@@ -1664,7 +1664,7 @@ +@@ -1697,7 +1697,7 @@ find build -name '*.py[co]' -exec rm -f {} ';' || true -rm -f pybuilddir.txt -rm -f Lib/lib2to3/*Grammar*.pickle @@ -34,10 +34,10 @@ diff -Naur Python-3.6.5-orig/Makefile.pre.in Python-3.6.5/Makefile.pre.in + -rm -f Programs/_testembed Programs/_freeze_importlib$(EXE) -find build -type f -a ! -name '*.gc??' -exec rm -f {} ';' -rm -f Include/pydtrace_probes.h - -diff -Naur Python-3.6.5-orig/Programs/_freeze_importlib.c Python-3.6.5/Programs/_freeze_importlib.c ---- Python-3.6.5-orig/Programs/_freeze_importlib.c 2018-03-28 12:19:31.000000000 +0300 -+++ Python-3.6.5/Programs/_freeze_importlib.c 2018-04-16 09:54:30.217106500 +0300 + -rm -f profile-gen-stamp +diff -Naur Python-3.7.0-orig/Programs/_freeze_importlib.c Python-3.7.0/Programs/_freeze_importlib.c +--- Python-3.7.0-orig/Programs/_freeze_importlib.c 2018-06-27 06:07:35.000000000 +0300 ++++ Python-3.7.0/Programs/_freeze_importlib.c 2018-06-30 11:17:29.490751100 +0300 @@ -20,7 +20,7 @@ {0, 0, 0} /* sentinel */ }; diff --git a/mingw-w64-python3/0760-msys-monkeypatch-os-system-via-sh-exe.patch b/mingw-w64-python3/0760-msys-monkeypatch-os-system-via-sh-exe.patch index 84b03372de..c539bcd899 100644 --- a/mingw-w64-python3/0760-msys-monkeypatch-os-system-via-sh-exe.patch +++ b/mingw-w64-python3/0760-msys-monkeypatch-os-system-via-sh-exe.patch @@ -1,6 +1,6 @@ -diff -Naur Python-3.6.5-orig/setup.py Python-3.6.5/setup.py ---- Python-3.6.5-orig/setup.py 2018-04-16 09:54:25.453653700 +0300 -+++ Python-3.6.5/setup.py 2018-04-16 09:54:31.685121200 +0300 +diff -Naur Python-3.7.0-orig/setup.py Python-3.7.0/setup.py +--- Python-3.7.0-orig/setup.py 2018-06-30 11:17:24.904343100 +0300 ++++ Python-3.7.0/setup.py 2018-06-30 11:17:31.627954900 +0300 @@ -39,6 +39,17 @@ return sys.platform host_platform = get_platform() diff --git a/mingw-w64-python3/0770-msys-replace-slashes-used-in-io-redirection.patch b/mingw-w64-python3/0770-msys-replace-slashes-used-in-io-redirection.patch index 75d38707be..1bbd0ac898 100644 --- a/mingw-w64-python3/0770-msys-replace-slashes-used-in-io-redirection.patch +++ b/mingw-w64-python3/0770-msys-replace-slashes-used-in-io-redirection.patch @@ -1,7 +1,7 @@ -diff -Naur Python-3.6.5-orig/setup.py Python-3.6.5/setup.py ---- Python-3.6.5-orig/setup.py 2018-04-16 09:54:32.962732900 +0300 -+++ Python-3.6.5/setup.py 2018-04-16 09:54:33.229933500 +0300 -@@ -444,7 +444,7 @@ +diff -Naur Python-3.7.0-orig/setup.py Python-3.7.0/setup.py +--- Python-3.7.0-orig/setup.py 2018-06-30 11:17:33.499958200 +0300 ++++ Python-3.7.0/setup.py 2018-06-30 11:17:33.733958600 +0300 +@@ -476,7 +476,7 @@ # Debian/Ubuntu multiarch support. # https://wiki.ubuntu.com/MultiarchSpec cc = sysconfig.get_config_var('CC') @@ -10,7 +10,7 @@ diff -Naur Python-3.6.5-orig/setup.py Python-3.6.5/setup.py if not os.path.exists(self.build_temp): os.makedirs(self.build_temp) ret = os.system( -@@ -469,7 +469,7 @@ +@@ -501,7 +501,7 @@ opt = '' if cross_compiling: opt = '-t' + sysconfig.get_config_var('HOST_GNU_TYPE') @@ -19,7 +19,7 @@ diff -Naur Python-3.6.5-orig/setup.py Python-3.6.5/setup.py if not os.path.exists(self.build_temp): os.makedirs(self.build_temp) ret = os.system( -@@ -488,7 +488,7 @@ +@@ -520,7 +520,7 @@ def add_gcc_paths(self): gcc = sysconfig.get_config_var('CC') @@ -28,7 +28,7 @@ diff -Naur Python-3.6.5-orig/setup.py Python-3.6.5/setup.py if not os.path.exists(self.build_temp): os.makedirs(self.build_temp) ret = os.system('%s -E -v - %s 1>/dev/null' % (gcc, tmpfile)) -@@ -777,7 +777,7 @@ +@@ -811,7 +811,7 @@ readline_termcap_library = "" curses_library = "" # Cannot use os.popen here in py3k. @@ -37,16 +37,7 @@ diff -Naur Python-3.6.5-orig/setup.py Python-3.6.5/setup.py if not os.path.exists(self.build_temp): os.makedirs(self.build_temp) # Determine if readline is already linked against curses or tinfo. -@@ -922,7 +922,7 @@ - opensslv_h = find_file('openssl/opensslv.h', [], - inc_dirs + search_for_ssl_incs_in) - if opensslv_h: -- name = os.path.join(opensslv_h[0], 'openssl/opensslv.h') -+ name = os.path.join(opensslv_h[0], 'openssl/opensslv.h').replace('\\','/') - if host_platform == 'darwin' and is_macosx_sdk_path(name): - name = os.path.join(macosx_sdk_root(), name[1:]) - try: -@@ -1834,16 +1834,16 @@ +@@ -1801,16 +1801,16 @@ cflags = sysconfig.get_config_vars('CFLAGS')[0] archs = re.findall(r'-arch\s+(\w+)', cflags) diff --git a/mingw-w64-python3/0790-mingw-add-_exec_prefix-for-tcltk-dlls.patch b/mingw-w64-python3/0790-mingw-add-_exec_prefix-for-tcltk-dlls.patch index ec8d6d9151..4c7c1ca36d 100644 --- a/mingw-w64-python3/0790-mingw-add-_exec_prefix-for-tcltk-dlls.patch +++ b/mingw-w64-python3/0790-mingw-add-_exec_prefix-for-tcltk-dlls.patch @@ -1,29 +1,28 @@ -diff -Naur Python-3.6.5-orig/Modules/getpath.c Python-3.6.5/Modules/getpath.c ---- Python-3.6.5-orig/Modules/getpath.c 2018-04-16 09:54:10.929109600 +0300 -+++ Python-3.6.5/Modules/getpath.c 2018-04-16 09:54:34.743149100 +0300 -@@ -771,7 +771,10 @@ +diff -Naur Python-3.7.0-orig/Modules/getpath.c Python-3.7.0/Modules/getpath.c +--- Python-3.7.0-orig/Modules/getpath.c 2018-06-30 11:17:05.435508900 +0300 ++++ Python-3.7.0/Modules/getpath.c 2018-06-30 11:17:35.839962300 +0300 +@@ -884,6 +884,10 @@ - bufsz += wcslen(zip_path) + 1; + bufsz += wcslen(calculate->zip_path) + 1; bufsz += wcslen(exec_prefix) + 1; -- +#ifdef MS_WINDOWS -+ if (_exec_prefix) -+ bufsz += wcslen(_exec_prefix) + 1; ++ if (calculate->exec_prefix) ++ bufsz += wcslen(calculate->exec_prefix) + 1; +#endif - buf = PyMem_RawMalloc(bufsz * sizeof(wchar_t)); - if (buf == NULL) { - Py_FatalError( -@@ -850,6 +853,13 @@ + + /* Allocate the buffer */ + wchar_t *buf = PyMem_RawMalloc(bufsz * sizeof(wchar_t)); +@@ -931,6 +935,13 @@ + } + defpath = delim + 1; } - else - wcsncpy(exec_prefix, _exec_prefix, MAXPATHLEN); +#ifdef MS_WINDOWS -+ if (_exec_prefix) { ++ if (calculate->exec_prefix) { + /* Next add bin folder where the exe was found, for System DLLs e.g. tcl86.dll, tk86.dll */ + wcscat(buf, delimiter); -+ wcscat(buf, _exec_prefix); ++ wcscat(buf, calculate->exec_prefix); + } +#endif + wcscat(buf, delimiter); - #ifdef MS_WINDOWS - if (_path) { + /* Finally, on goes the directory for dynamic-load modules */ diff --git a/mingw-w64-python3/0800-mingw-install-layout-as-posix.patch b/mingw-w64-python3/0800-mingw-install-layout-as-posix.patch index 7b3ebb3515..283d5f9190 100644 --- a/mingw-w64-python3/0800-mingw-install-layout-as-posix.patch +++ b/mingw-w64-python3/0800-mingw-install-layout-as-posix.patch @@ -1,6 +1,6 @@ -diff -Naur Python-3.6.5-orig/Lib/distutils/command/install.py Python-3.6.5/Lib/distutils/command/install.py ---- Python-3.6.5-orig/Lib/distutils/command/install.py 2018-04-16 09:54:23.946641000 +0300 -+++ Python-3.6.5/Lib/distutils/command/install.py 2018-04-16 09:54:36.231764200 +0300 +diff -Naur Python-3.7.0-orig/Lib/distutils/command/install.py Python-3.7.0/Lib/distutils/command/install.py +--- Python-3.7.0-orig/Lib/distutils/command/install.py 2018-06-30 11:17:22.767139300 +0300 ++++ Python-3.7.0/Lib/distutils/command/install.py 2018-06-30 11:17:37.977166100 +0300 @@ -20,10 +20,10 @@ HAS_USER_SITE = True diff --git a/mingw-w64-python3/0810-remove_path_max.default.patch b/mingw-w64-python3/0810-remove_path_max.default.patch index 36293d10e5..faa9e8cc59 100644 --- a/mingw-w64-python3/0810-remove_path_max.default.patch +++ b/mingw-w64-python3/0810-remove_path_max.default.patch @@ -1,6 +1,6 @@ -diff -Naur Python-3.6.5-orig/Include/osdefs.h Python-3.6.5/Include/osdefs.h ---- Python-3.6.5-orig/Include/osdefs.h 2018-04-16 09:54:05.811662600 +0300 -+++ Python-3.6.5/Include/osdefs.h 2018-04-16 09:54:37.731375600 +0300 +diff -Naur Python-3.7.0-orig/Include/osdefs.h Python-3.7.0/Include/osdefs.h +--- Python-3.7.0-orig/Include/osdefs.h 2018-06-30 11:16:58.555896800 +0300 ++++ Python-3.7.0/Include/osdefs.h 2018-06-30 11:17:40.067569700 +0300 @@ -10,7 +10,6 @@ #ifdef MS_WINDOWS #define SEP L'\\' diff --git a/mingw-w64-python3/0820-dont-link-with-gettext.patch b/mingw-w64-python3/0820-dont-link-with-gettext.patch index e304423055..ab15833d22 100644 --- a/mingw-w64-python3/0820-dont-link-with-gettext.patch +++ b/mingw-w64-python3/0820-dont-link-with-gettext.patch @@ -1,7 +1,7 @@ -diff -Naur Python-3.6.5-orig/configure.ac Python-3.6.5/configure.ac ---- Python-3.6.5-orig/configure.ac 2018-04-16 09:54:13.999931300 +0300 -+++ Python-3.6.5/configure.ac 2018-04-16 09:54:39.250393300 +0300 -@@ -2965,10 +2965,19 @@ +diff -Naur Python-3.7.0-orig/configure.ac Python-3.7.0/configure.ac +--- Python-3.7.0-orig/configure.ac 2018-06-30 11:17:09.787916500 +0300 ++++ Python-3.7.0/configure.ac 2018-06-30 11:17:42.204773500 +0300 +@@ -3049,10 +3049,19 @@ fi # check if we need libintl for locale functions @@ -21,9 +21,9 @@ diff -Naur Python-3.6.5-orig/configure.ac Python-3.6.5/configure.ac # checks for system dependent C++ extensions support case "$ac_sys_system" in -diff -Naur Python-3.6.5-orig/Modules/_localemodule.c Python-3.6.5/Modules/_localemodule.c ---- Python-3.6.5-orig/Modules/_localemodule.c 2018-03-28 12:19:31.000000000 +0300 -+++ Python-3.6.5/Modules/_localemodule.c 2018-04-16 09:54:39.266993400 +0300 +diff -Naur Python-3.7.0-orig/Modules/_localemodule.c Python-3.7.0/Modules/_localemodule.c +--- Python-3.7.0-orig/Modules/_localemodule.c 2018-06-27 06:07:35.000000000 +0300 ++++ Python-3.7.0/Modules/_localemodule.c 2018-06-30 11:17:42.204773500 +0300 @@ -11,6 +11,13 @@ #define PY_SSIZE_T_CLEAN diff --git a/mingw-w64-python3/0830-ctypes-python-dll.patch b/mingw-w64-python3/0830-ctypes-python-dll.patch index dc722bc357..5fc12190b0 100644 --- a/mingw-w64-python3/0830-ctypes-python-dll.patch +++ b/mingw-w64-python3/0830-ctypes-python-dll.patch @@ -1,7 +1,7 @@ -diff -Naur Python-3.6.5-orig/Lib/ctypes/__init__.py Python-3.6.5/Lib/ctypes/__init__.py ---- Python-3.6.5-orig/Lib/ctypes/__init__.py 2018-03-28 12:19:31.000000000 +0300 -+++ Python-3.6.5/Lib/ctypes/__init__.py 2018-04-16 09:54:40.786407600 +0300 -@@ -428,7 +428,9 @@ +diff -Naur Python-3.7.0-orig/Lib/ctypes/__init__.py Python-3.7.0/Lib/ctypes/__init__.py +--- Python-3.7.0-orig/Lib/ctypes/__init__.py 2018-06-27 06:07:35.000000000 +0300 ++++ Python-3.7.0/Lib/ctypes/__init__.py 2018-06-30 11:17:44.326377200 +0300 +@@ -436,7 +436,9 @@ cdll = LibraryLoader(CDLL) pydll = LibraryLoader(PyDLL) diff --git a/mingw-w64-python3/0840-gdbm-module-includes.patch b/mingw-w64-python3/0840-gdbm-module-includes.patch index 2a63fff64f..e1827f2101 100644 --- a/mingw-w64-python3/0840-gdbm-module-includes.patch +++ b/mingw-w64-python3/0840-gdbm-module-includes.patch @@ -1,6 +1,6 @@ -diff -Naur Python-3.6.5-orig/Modules/_gdbmmodule.c Python-3.6.5/Modules/_gdbmmodule.c ---- Python-3.6.5-orig/Modules/_gdbmmodule.c 2018-03-28 12:19:31.000000000 +0300 -+++ Python-3.6.5/Modules/_gdbmmodule.c 2018-04-16 09:54:42.275225300 +0300 +diff -Naur Python-3.7.0-orig/Modules/_gdbmmodule.c Python-3.7.0/Modules/_gdbmmodule.c +--- Python-3.7.0-orig/Modules/_gdbmmodule.c 2018-06-27 06:07:35.000000000 +0300 ++++ Python-3.7.0/Modules/_gdbmmodule.c 2018-06-30 11:17:46.447980900 +0300 @@ -11,7 +11,7 @@ #include #include "gdbm.h" diff --git a/mingw-w64-python3/0845-3.7-_abs-mingw.patch b/mingw-w64-python3/0845-3.7-_abs-mingw.patch new file mode 100644 index 0000000000..31f88c9b31 --- /dev/null +++ b/mingw-w64-python3/0845-3.7-_abs-mingw.patch @@ -0,0 +1,11 @@ +--- Python-3.7.0/Modules/_abc.c.orig 2018-05-25 05:27:45.000000000 -0600 ++++ Python-3.7.0/Modules/_abc.c 2018-06-05 16:17:01.509150400 -0500 +@@ -66,7 +66,7 @@ unpackiter_iternext(unpackiterobject *se + "Internal state held by ABC machinery."); + + static PyTypeObject _abc_data_type = { +- PyVarObject_HEAD_INIT(&PyType_Type, 0) ++ PyVarObject_HEAD_INIT(NULL, 0) + "_abc_data", /*tp_name*/ + sizeof(_abc_data), /*tp_size*/ + .tp_dealloc = (destructor)abc_data_dealloc, diff --git a/mingw-w64-python3/0850-use-gnu_printf-in-format.patch b/mingw-w64-python3/0850-use-gnu_printf-in-format.patch index ca3c53b008..f696ad3a04 100644 --- a/mingw-w64-python3/0850-use-gnu_printf-in-format.patch +++ b/mingw-w64-python3/0850-use-gnu_printf-in-format.patch @@ -1,37 +1,37 @@ -diff -Naur Python-3.6.5-orig/Include/bytesobject.h Python-3.6.5/Include/bytesobject.h ---- Python-3.6.5-orig/Include/bytesobject.h 2018-03-28 12:19:31.000000000 +0300 -+++ Python-3.6.5/Include/bytesobject.h 2018-04-16 09:54:43.856638800 +0300 +diff -Naur Python-3.7.0-orig/Include/bytesobject.h Python-3.7.0/Include/bytesobject.h +--- Python-3.7.0-orig/Include/bytesobject.h 2018-06-27 06:07:35.000000000 +0300 ++++ Python-3.7.0/Include/bytesobject.h 2018-06-30 11:17:48.631984800 +0300 @@ -52,9 +52,9 @@ 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_GCC_ATTRIBUTE((format(gnu_printf, 1, 0))); +- Py_GCC_ATTRIBUTE((format(printf, 1, 0))); ++ Py_GCC_ATTRIBUTE((format(gnu_printf, 1, 0))); PyAPI_FUNC(PyObject *) PyBytes_FromFormat(const char*, ...) -- Py_GCC_ATTRIBUTE((format(printf, 1, 2))); -+ Py_GCC_ATTRIBUTE((format(gnu_printf, 1, 2))); +- Py_GCC_ATTRIBUTE((format(printf, 1, 2))); ++ Py_GCC_ATTRIBUTE((format(gnu_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 -Naur Python-3.6.5-orig/Include/pgenheaders.h Python-3.6.5/Include/pgenheaders.h ---- Python-3.6.5-orig/Include/pgenheaders.h 2018-03-28 12:19:31.000000000 +0300 -+++ Python-3.6.5/Include/pgenheaders.h 2018-04-16 09:54:43.858638900 +0300 +diff -Naur Python-3.7.0-orig/Include/pgenheaders.h Python-3.7.0/Include/pgenheaders.h +--- Python-3.7.0-orig/Include/pgenheaders.h 2018-06-27 06:07:35.000000000 +0300 ++++ Python-3.7.0/Include/pgenheaders.h 2018-06-30 11:17:48.631984800 +0300 @@ -10,9 +10,9 @@ #include "Python.h" PyAPI_FUNC(void) PySys_WriteStdout(const char *format, ...) -- Py_GCC_ATTRIBUTE((format(printf, 1, 2))); -+ Py_GCC_ATTRIBUTE((format(gnu_printf, 1, 2))); +- Py_GCC_ATTRIBUTE((format(printf, 1, 2))); ++ Py_GCC_ATTRIBUTE((format(gnu_printf, 1, 2))); PyAPI_FUNC(void) PySys_WriteStderr(const char *format, ...) -- Py_GCC_ATTRIBUTE((format(printf, 1, 2))); -+ Py_GCC_ATTRIBUTE((format(gnu_printf, 1, 2))); +- Py_GCC_ATTRIBUTE((format(printf, 1, 2))); ++ Py_GCC_ATTRIBUTE((format(gnu_printf, 1, 2))); #define addarc _Py_addarc #define addbit _Py_addbit -diff -Naur Python-3.6.5-orig/Include/pyerrors.h Python-3.6.5/Include/pyerrors.h ---- Python-3.6.5-orig/Include/pyerrors.h 2018-03-28 12:19:31.000000000 +0300 -+++ Python-3.6.5/Include/pyerrors.h 2018-04-16 09:54:43.861639100 +0300 -@@ -493,9 +493,9 @@ +diff -Naur Python-3.7.0-orig/Include/pyerrors.h Python-3.7.0/Include/pyerrors.h +--- Python-3.7.0-orig/Include/pyerrors.h 2018-06-27 06:07:35.000000000 +0300 ++++ Python-3.7.0/Include/pyerrors.h 2018-06-30 11:17:48.631984800 +0300 +@@ -494,9 +494,9 @@ #include PyAPI_FUNC(int) PyOS_snprintf(char *str, size_t size, const char *format, ...) @@ -43,9 +43,9 @@ diff -Naur Python-3.6.5-orig/Include/pyerrors.h Python-3.6.5/Include/pyerrors.h #ifdef __cplusplus } -diff -Naur Python-3.6.5-orig/Include/sysmodule.h Python-3.6.5/Include/sysmodule.h ---- Python-3.6.5-orig/Include/sysmodule.h 2018-03-28 12:19:31.000000000 +0300 -+++ Python-3.6.5/Include/sysmodule.h 2018-04-16 09:54:43.864639300 +0300 +diff -Naur Python-3.7.0-orig/Include/sysmodule.h Python-3.7.0/Include/sysmodule.h +--- Python-3.7.0-orig/Include/sysmodule.h 2018-06-27 06:07:35.000000000 +0300 ++++ Python-3.7.0/Include/sysmodule.h 2018-06-30 11:17:48.631984800 +0300 @@ -19,9 +19,9 @@ PyAPI_FUNC(void) PySys_SetPath(const wchar_t *); diff --git a/mingw-w64-python3/0860-fix-_Py_CheckPython3-prototype.patch b/mingw-w64-python3/0860-fix-_Py_CheckPython3-prototype.patch deleted file mode 100644 index da70c17ce6..0000000000 --- a/mingw-w64-python3/0860-fix-_Py_CheckPython3-prototype.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur Python-3.6.5-orig/Include/pylifecycle.h Python-3.6.5/Include/pylifecycle.h ---- Python-3.6.5-orig/Include/pylifecycle.h 2018-04-16 09:54:07.672880800 +0300 -+++ Python-3.6.5/Include/pylifecycle.h 2018-04-16 09:54:45.464450300 +0300 -@@ -66,7 +66,7 @@ - PyAPI_FUNC(wchar_t *) Py_GetPath(void); - PyAPI_FUNC(void) Py_SetPath(const wchar_t *); - #ifdef MS_WINDOWS --int _Py_CheckPython3(); -+int _Py_CheckPython3(void); - #endif - - /* In their own files */ diff --git a/mingw-w64-python3/0870-mingw-fix-ssl-dont-use-enum_certificates.patch b/mingw-w64-python3/0870-mingw-fix-ssl-dont-use-enum_certificates.patch index 63d84297c8..b30f539856 100644 --- a/mingw-w64-python3/0870-mingw-fix-ssl-dont-use-enum_certificates.patch +++ b/mingw-w64-python3/0870-mingw-fix-ssl-dont-use-enum_certificates.patch @@ -1,8 +1,8 @@ -diff -Naur Python-3.6.5-orig/Lib/ssl.py Python-3.6.5/Lib/ssl.py ---- Python-3.6.5-orig/Lib/ssl.py 2018-03-28 12:19:31.000000000 +0300 -+++ Python-3.6.5/Lib/ssl.py 2018-04-16 09:54:46.986256900 +0300 -@@ -156,7 +156,7 @@ - _SSLv2_IF_EXISTS = getattr(_SSLMethod, 'PROTOCOL_SSLv2', None) +diff -Naur Python-3.7.0-orig/Lib/ssl.py Python-3.7.0/Lib/ssl.py +--- Python-3.7.0-orig/Lib/ssl.py 2018-06-27 06:07:35.000000000 +0300 ++++ Python-3.7.0/Lib/ssl.py 2018-06-30 11:17:50.769188500 +0300 +@@ -165,7 +165,7 @@ + MAXIMUM_SUPPORTED = _ssl.PROTO_MAXIMUM_SUPPORTED -if sys.platform == "win32": @@ -10,7 +10,7 @@ diff -Naur Python-3.6.5-orig/Lib/ssl.py Python-3.6.5/Lib/ssl.py from _ssl import enum_certificates, enum_crls from socket import socket, AF_INET, SOCK_STREAM, create_connection -@@ -451,7 +451,7 @@ +@@ -474,7 +474,7 @@ def load_default_certs(self, purpose=Purpose.SERVER_AUTH): if not isinstance(purpose, _ASN1Object): raise TypeError(purpose) diff --git a/mingw-w64-python3/0890-mingw-build-optimized-ext.patch b/mingw-w64-python3/0890-mingw-build-optimized-ext.patch index 38faa35131..ed3e91a19e 100644 --- a/mingw-w64-python3/0890-mingw-build-optimized-ext.patch +++ b/mingw-w64-python3/0890-mingw-build-optimized-ext.patch @@ -1,6 +1,6 @@ -diff -Naur Python-3.6.5-orig/Lib/distutils/cygwinccompiler.py Python-3.6.5/Lib/distutils/cygwinccompiler.py ---- Python-3.6.5-orig/Lib/distutils/cygwinccompiler.py 2018-04-16 09:54:17.150783500 +0300 -+++ Python-3.6.5/Lib/distutils/cygwinccompiler.py 2018-04-16 09:54:48.545070000 +0300 +diff -Naur Python-3.7.0-orig/Lib/distutils/cygwinccompiler.py Python-3.7.0/Lib/distutils/cygwinccompiler.py +--- Python-3.7.0-orig/Lib/distutils/cygwinccompiler.py 2018-06-30 11:17:14.265124400 +0300 ++++ Python-3.7.0/Lib/distutils/cygwinccompiler.py 2018-06-30 11:17:52.890792200 +0300 @@ -305,9 +305,9 @@ raise CCompilerError( 'Cygwin gcc cannot be used with --compiler=mingw32') diff --git a/mingw-w64-python3/0900-cygwinccompiler-dont-strip-modules-if-pydebug.patch b/mingw-w64-python3/0900-cygwinccompiler-dont-strip-modules-if-pydebug.patch index 429b74991c..2e3f6d808f 100644 --- a/mingw-w64-python3/0900-cygwinccompiler-dont-strip-modules-if-pydebug.patch +++ b/mingw-w64-python3/0900-cygwinccompiler-dont-strip-modules-if-pydebug.patch @@ -1,9 +1,9 @@ -diff -Naur Python-3.6.5-orig/Lib/distutils/cygwinccompiler.py Python-3.6.5/Lib/distutils/cygwinccompiler.py ---- Python-3.6.5-orig/Lib/distutils/cygwinccompiler.py 2018-04-16 09:54:49.754677800 +0300 -+++ Python-3.6.5/Lib/distutils/cygwinccompiler.py 2018-04-16 09:54:49.985083200 +0300 +diff -Naur Python-3.7.0-orig/Lib/distutils/cygwinccompiler.py Python-3.7.0/Lib/distutils/cygwinccompiler.py +--- Python-3.7.0-orig/Lib/distutils/cygwinccompiler.py 2018-06-30 11:17:54.747195500 +0300 ++++ Python-3.7.0/Lib/distutils/cygwinccompiler.py 2018-06-30 11:17:54.981195900 +0300 @@ -238,7 +238,7 @@ - # (On my machine: 10KB < stripped_file < ??100KB - # unstripped_file = stripped_file + XXX KB + # (On my machine: 10KiB < stripped_file < ??100KiB + # unstripped_file = stripped_file + XXX KiB # ( XXX=254 for a typical python extension)) - if not debug: + if not debug and not hasattr(sys, 'gettotalrefcount'): diff --git a/mingw-w64-python3/0910-fix-using-dllhandle-and-winver-mingw.patch b/mingw-w64-python3/0910-fix-using-dllhandle-and-winver-mingw.patch index d00f8126b9..eea3246de3 100644 --- a/mingw-w64-python3/0910-fix-using-dllhandle-and-winver-mingw.patch +++ b/mingw-w64-python3/0910-fix-using-dllhandle-and-winver-mingw.patch @@ -1,7 +1,7 @@ -diff -Naur Python-3.6.5-orig/Python/sysmodule.c Python-3.6.5/Python/sysmodule.c ---- Python-3.6.5-orig/Python/sysmodule.c 2018-04-16 09:54:07.705080900 +0300 -+++ Python-3.6.5/Python/sysmodule.c 2018-04-16 09:54:51.457710300 +0300 -@@ -27,7 +27,7 @@ +diff -Naur Python-3.7.0-orig/Python/sysmodule.c Python-3.7.0/Python/sysmodule.c +--- Python-3.7.0-orig/Python/sysmodule.c 2018-06-27 06:07:35.000000000 +0300 ++++ Python-3.7.0/Python/sysmodule.c 2018-06-30 11:17:57.071599600 +0300 +@@ -28,7 +28,7 @@ #include #endif /* MS_WINDOWS */ @@ -10,7 +10,7 @@ diff -Naur Python-3.6.5-orig/Python/sysmodule.c Python-3.6.5/Python/sysmodule.c extern void *PyWin_DLLhModule; /* A string loaded from the DLL at startup: */ extern const char *PyWin_DLLVersionString; -@@ -1989,7 +1989,7 @@ +@@ -2333,7 +2333,7 @@ PyUnicode_FromString("little")); #endif diff --git a/mingw-w64-python3/0920-mingw-add-LIBPL-to-library-dirs.patch b/mingw-w64-python3/0920-mingw-add-LIBPL-to-library-dirs.patch index 3ad6196a2d..03e85367dd 100644 --- a/mingw-w64-python3/0920-mingw-add-LIBPL-to-library-dirs.patch +++ b/mingw-w64-python3/0920-mingw-add-LIBPL-to-library-dirs.patch @@ -1,12 +1,12 @@ -diff -Naur Python-3.6.5-orig/Lib/distutils/command/build_ext.py Python-3.6.5/Lib/distutils/command/build_ext.py ---- Python-3.6.5-orig/Lib/distutils/command/build_ext.py 2018-04-16 09:54:15.583564800 +0300 -+++ Python-3.6.5/Lib/distutils/command/build_ext.py 2018-04-16 09:54:53.032726900 +0300 +diff -Naur Python-3.7.0-orig/Lib/distutils/command/build_ext.py Python-3.7.0/Lib/distutils/command/build_ext.py +--- Python-3.7.0-orig/Lib/distutils/command/build_ext.py 2018-06-30 11:17:12.034320500 +0300 ++++ Python-3.7.0/Lib/distutils/command/build_ext.py 2018-06-30 11:17:59.193203300 +0300 @@ -217,7 +217,7 @@ - # for extensions under Cygwin and AtheOS Python's library directory must be + # For extensions under Cygwin, Python's library directory must be # appended to library_dirs -- if sys.platform[:6] == 'cygwin' or sys.platform[:6] == 'atheos': -+ if sys.platform[:6] == 'cygwin' or sys.platform[:6] == 'atheos' or self.plat_name.startswith(('mingw')): +- if sys.platform[:6] == 'cygwin': ++ if sys.platform[:6] == 'cygwin' or self.plat_name.startswith(('mingw')): if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")): # building third party extensions config_dir_name = os.path.basename(sysconfig.get_config_var('LIBPL')) diff --git a/mingw-w64-python3/0930-mingw-w64-build-overlapped-module.patch b/mingw-w64-python3/0930-mingw-w64-build-overlapped-module.patch index 67c7b7fff9..cd181eb398 100644 --- a/mingw-w64-python3/0930-mingw-w64-build-overlapped-module.patch +++ b/mingw-w64-python3/0930-mingw-w64-build-overlapped-module.patch @@ -1,7 +1,7 @@ -diff -Naur Python-3.6.5-orig/setup.py Python-3.6.5/setup.py ---- Python-3.6.5-orig/setup.py 2018-04-16 09:54:34.518347500 +0300 -+++ Python-3.6.5/setup.py 2018-04-16 09:54:54.523342100 +0300 -@@ -1724,6 +1724,10 @@ +diff -Naur Python-3.7.0-orig/setup.py Python-3.7.0/setup.py +--- Python-3.7.0-orig/setup.py 2018-06-30 11:17:35.605961900 +0300 ++++ Python-3.7.0/setup.py 2018-06-30 11:18:01.268007000 +0300 +@@ -1678,6 +1678,10 @@ '-framework', 'CoreFoundation', ])) diff --git a/mingw-w64-python3/0940-mingw-w64-Also-define-_Py_BEGIN_END_SUPPRESS_IPH-when-Py_BUILD_CORE_MODULE.patch b/mingw-w64-python3/0940-mingw-w64-Also-define-_Py_BEGIN_END_SUPPRESS_IPH-when-Py_BUILD_CORE_MODULE.patch index a4502e4044..c45be21535 100644 --- a/mingw-w64-python3/0940-mingw-w64-Also-define-_Py_BEGIN_END_SUPPRESS_IPH-when-Py_BUILD_CORE_MODULE.patch +++ b/mingw-w64-python3/0940-mingw-w64-Also-define-_Py_BEGIN_END_SUPPRESS_IPH-when-Py_BUILD_CORE_MODULE.patch @@ -1,12 +1,12 @@ -diff -Naur Python-3.6.5-orig/Include/pyport.h Python-3.6.5/Include/pyport.h ---- Python-3.6.5-orig/Include/pyport.h 2018-04-16 09:54:18.658792000 +0300 -+++ Python-3.6.5/Include/pyport.h 2018-04-16 09:54:56.032557500 +0300 -@@ -759,7 +759,7 @@ +diff -Naur Python-3.7.0-orig/Include/pyport.h Python-3.7.0/Include/pyport.h +--- Python-3.7.0-orig/Include/pyport.h 2018-04-16 09:54:18.658792000 +0300 ++++ Python-3.7.0/Include/pyport.h 2018-04-16 09:54:56.032557500 +0300 +@@ -772,7 +772,7 @@ #define PY_LITTLE_ENDIAN 1 #endif --#ifdef Py_BUILD_CORE -+#if defined Py_BUILD_CORE || defined Py_BUILD_CORE_MODULE +-#if defined(Py_BUILD_CORE) || defined(Py_BUILD_CORE_BUILTIN) ++#if defined(Py_BUILD_CORE) || defined(Py_BUILD_CORE_BUILTIN) || defined(Py_BUILD_CORE_MODULE) /* * Macros to protect CRT calls against instant termination when passed an * invalid parameter (issue23524). diff --git a/mingw-w64-python3/0950-mingw-w64-XP3-compat-GetProcAddress-GetTickCount64.patch b/mingw-w64-python3/0950-mingw-w64-XP3-compat-GetProcAddress-GetTickCount64.patch deleted file mode 100644 index 99cf201d56..0000000000 --- a/mingw-w64-python3/0950-mingw-w64-XP3-compat-GetProcAddress-GetTickCount64.patch +++ /dev/null @@ -1,48 +0,0 @@ -diff -Naur Python-3.6.5-orig/Python/pytime.c Python-3.6.5/Python/pytime.c ---- Python-3.6.5-orig/Python/pytime.c 2018-03-28 12:19:31.000000000 +0300 -+++ Python-3.6.5/Python/pytime.c 2018-04-16 09:54:57.546971500 +0300 -@@ -570,7 +570,7 @@ - /* 11,644,473,600,000,000,000: number of nanoseconds between - the 1st january 1601 and the 1st january 1970 (369 years + 89 leap - days). */ -- *tp = large.QuadPart * 100 - 11644473600000000000; -+ *tp = large.QuadPart * 100 - 11644473600000000000ULL; - if (info) { - DWORD timeAdjustment, timeIncrement; - BOOL isTimeAdjustmentDisabled, ok; -@@ -664,6 +664,35 @@ - return pygettimeofday(t, info, 1); - } - -+#if defined(MS_WINDOWS) && _WIN32_WINNT < 0x0600 -+/* GetTickCount64() is not available on XP. */ -+ULONGLONG GetTickCount64 () -+{ -+ static ULONGLONG (CALLBACK *Py_GetTickCount64)() = (ULONGLONG (*)(void))-1; -+ static DWORD last_ticks = 0; -+ static DWORD n_overflow = 0; -+ DWORD ticks = 0; -+ HINSTANCE hKernel32; -+ -+ if (Py_GetTickCount64 == (void*)-1) -+ { -+ hKernel32 = GetModuleHandleW(L"KERNEL32"); -+ Py_GetTickCount64 = *(ULONGLONG (*)(void))(GetProcAddress(hKernel32, -+ "GetTickCount64")); -+ } -+ if (Py_GetTickCount64 != (void*) NULL) -+ { -+ return Py_GetTickCount64(); -+ } -+ -+ ticks = GetTickCount(); -+ if (ticks < last_ticks) -+ n_overflow++; -+ last_ticks = ticks; -+ return ((ULONGLONG)n_overflow << 32LL) + (ULONGLONG)GetTickCount(); -+} -+#endif -+ - static int - pymonotonic(_PyTime_t *tp, _Py_clock_info_t *info, int raise) - { diff --git a/mingw-w64-python3/0960-mingw-w64-XP3-compat-GetProcAddress-GetFinalPathNameByHandleW.patch b/mingw-w64-python3/0960-mingw-w64-XP3-compat-GetProcAddress-GetFinalPathNameByHandleW.patch deleted file mode 100644 index 8db28759b3..0000000000 --- a/mingw-w64-python3/0960-mingw-w64-XP3-compat-GetProcAddress-GetFinalPathNameByHandleW.patch +++ /dev/null @@ -1,93 +0,0 @@ -diff -Naur Python-3.6.5-orig/Modules/posixmodule.c Python-3.6.5/Modules/posixmodule.c ---- Python-3.6.5-orig/Modules/posixmodule.c 2018-04-16 09:54:09.427899000 +0300 -+++ Python-3.6.5/Modules/posixmodule.c 2018-04-16 09:54:59.098180600 +0300 -@@ -1511,6 +1511,31 @@ - return TRUE; - } - -+/* Grab GetFinalPathNameByHandle dynamically from kernel32 */ -+static int has_GetFinalPathNameByHandle = -1; -+static DWORD (CALLBACK *Py_GetFinalPathNameByHandleW)(HANDLE, LPWSTR, DWORD, -+ DWORD); -+static int -+check_GetFinalPathNameByHandle() -+{ -+ HINSTANCE hKernel32; -+ DWORD (CALLBACK *Py_GetFinalPathNameByHandleA)(HANDLE, LPSTR, DWORD, -+ DWORD); -+ -+ /* only recheck */ -+ if (-1 == has_GetFinalPathNameByHandle) -+ { -+ hKernel32 = GetModuleHandleW(L"KERNEL32"); -+ *(FARPROC*)&Py_GetFinalPathNameByHandleA = GetProcAddress(hKernel32, -+ "GetFinalPathNameByHandleA"); -+ *(FARPROC*)&Py_GetFinalPathNameByHandleW = GetProcAddress(hKernel32, -+ "GetFinalPathNameByHandleW"); -+ has_GetFinalPathNameByHandle = Py_GetFinalPathNameByHandleA && -+ Py_GetFinalPathNameByHandleW; -+ } -+ return has_GetFinalPathNameByHandle; -+} -+ - static BOOL - get_target_path(HANDLE hdl, wchar_t **target_path) - { -@@ -1519,8 +1544,8 @@ - - /* We have a good handle to the target, use it to determine - the target path name (then we'll call lstat on it). */ -- buf_size = GetFinalPathNameByHandleW(hdl, 0, 0, -- VOLUME_NAME_DOS); -+ buf_size = Py_GetFinalPathNameByHandleW(hdl, 0, 0, -+ VOLUME_NAME_DOS); - if(!buf_size) - return FALSE; - -@@ -1530,7 +1555,7 @@ - return FALSE; - } - -- result_length = GetFinalPathNameByHandleW(hdl, -+ result_length = Py_GetFinalPathNameByHandleW(hdl, - buf, buf_size, VOLUME_NAME_DOS); - - if(!result_length) { -@@ -1560,6 +1585,12 @@ - wchar_t *target_path; - const wchar_t *dot; - -+ if(!check_GetFinalPathNameByHandle()) { -+ /* If the OS doesn't have GetFinalPathNameByHandle, don't -+ traverse reparse point. */ -+ traverse = FALSE; -+ } -+ - hFile = CreateFileW( - path, - FILE_READ_ATTRIBUTES, /* desired access */ -@@ -3697,6 +3728,13 @@ - if (path_wchar == NULL) - return NULL; - -+ if(!check_GetFinalPathNameByHandle()) { -+ /* If the OS doesn't have GetFinalPathNameByHandle, return a -+ NotImplementedError. */ -+ return PyErr_Format(PyExc_NotImplementedError, -+ "GetFinalPathNameByHandle not available on this platform"); -+ } -+ - Py_BEGIN_ALLOW_THREADS - hFile = CreateFileW( - path_wchar, -@@ -3716,8 +3754,8 @@ - target path name. */ - while (1) { - Py_BEGIN_ALLOW_THREADS -- result_length = GetFinalPathNameByHandleW(hFile, target_path, -- buf_size, VOLUME_NAME_DOS); -+ result_length = Py_GetFinalPathNameByHandleW(hFile, target_path, -+ buf_size, VOLUME_NAME_DOS); - Py_END_ALLOW_THREADS - - if (!result_length) { diff --git a/mingw-w64-python3/0970-Add-AMD64-to-sys-config-so-msvccompiler-get_build_version-works.patch b/mingw-w64-python3/0970-Add-AMD64-to-sys-config-so-msvccompiler-get_build_version-works.patch index d934a3db57..9b38651593 100644 --- a/mingw-w64-python3/0970-Add-AMD64-to-sys-config-so-msvccompiler-get_build_version-works.patch +++ b/mingw-w64-python3/0970-Add-AMD64-to-sys-config-so-msvccompiler-get_build_version-works.patch @@ -1,10 +1,10 @@ -diff -Naur Python-3.6.5-orig/Python/getcompiler.c Python-3.6.5/Python/getcompiler.c ---- Python-3.6.5-orig/Python/getcompiler.c 2018-03-28 12:19:31.000000000 +0300 -+++ Python-3.6.5/Python/getcompiler.c 2018-04-16 09:55:00.617392300 +0300 -@@ -6,7 +6,22 @@ - #ifndef COMPILER - - #ifdef __GNUC__ +diff -Naur Python-3.7.0-orig/Python/getcompiler.c Python-3.7.0/Python/getcompiler.c +--- Python-3.7.0-orig/Python/getcompiler.c 2018-06-27 06:07:35.000000000 +0300 ++++ Python-3.7.0/Python/getcompiler.c 2018-06-30 11:18:07.586018100 +0300 +@@ -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 @@ -22,6 +22,6 @@ diff -Naur Python-3.6.5-orig/Python/getcompiler.c Python-3.6.5/Python/getcompile +#define ARCH_SUFFIX "" +#endif +#define COMPILER COMP_SEP "[GCC " __VERSION__ ARCH_SUFFIX "]" - #endif - - #endif /* !COMPILER */ + // Generic fallbacks. + #elif defined(__cplusplus) + #define COMPILER "[C++]" diff --git a/mingw-w64-python3/0980-mingw-readline-features-skip.patch b/mingw-w64-python3/0980-mingw-readline-features-skip.patch deleted file mode 100644 index 534f0850ca..0000000000 --- a/mingw-w64-python3/0980-mingw-readline-features-skip.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff -Naur Python-3.6.5-orig/configure.ac Python-3.6.5/configure.ac ---- Python-3.6.5-orig/configure.ac 2018-04-16 09:54:40.564804500 +0300 -+++ Python-3.6.5/configure.ac 2018-04-16 09:55:02.075609100 +0300 -@@ -5106,9 +5106,16 @@ - [Define if you have readline 4.0]), ,$READLINE_LIBS) - - # also in 4.0, but not in editline -+case $host in -+ *-*-mingw*) -+ dnl Windows don't have resize terminal signal. -+ ;; -+ *) - AC_CHECK_LIB(readline, rl_resize_terminal, - AC_DEFINE(HAVE_RL_RESIZE_TERMINAL, 1, - [Define if you have readline 4.0]), ,$READLINE_LIBS) -+ ;; -+esac - - # check for readline 4.2 - AC_CHECK_LIB(readline, rl_completion_matches, diff --git a/mingw-w64-python3/0980-mingw-readline-module.patch b/mingw-w64-python3/0980-mingw-readline-module.patch new file mode 100644 index 0000000000..ee14b43326 --- /dev/null +++ b/mingw-w64-python3/0980-mingw-readline-module.patch @@ -0,0 +1,43 @@ +diff -Naur Python-3.7.0-orig/configure.ac Python-3.7.0/configure.ac +--- Python-3.7.0-orig/configure.ac 2018-06-30 11:17:44.107976800 +0300 ++++ Python-3.7.0/configure.ac 2018-06-30 11:18:09.692021800 +0300 +@@ -5116,9 +5116,16 @@ + [Define if you have readline 4.0]), ,$READLINE_LIBS) + + # also in 4.0, but not in editline ++case $host in ++ *-*-mingw*) ++ dnl Windows don't have resize terminal signal. ++ ;; ++ *) + AC_CHECK_LIB(readline, rl_resize_terminal, + AC_DEFINE(HAVE_RL_RESIZE_TERMINAL, 1, + [Define if you have readline 4.0]), ,$READLINE_LIBS) ++ ;; ++esac + + # check for readline 4.2 + AC_CHECK_LIB(readline, rl_completion_matches, +--- Python-3.7.0/setup.py.orig 2018-07-05 02:42:31.000000000 -0500 ++++ Python-3.7.0/setup.py 2018-07-05 02:42:56.000000000 -0500 +@@ -874,6 +874,8 @@ + readline_extra_link_args = () + + readline_libs = ['readline'] ++ if host_platform.startswith(('mingw', 'win')): ++ readline_libs.append('ws2_32') + if readline_termcap_library: + pass # Issue 7384: Already linked against curses or tinfo. + elif curses_library: +--- Python-3.7.0/Modules/readline.c.orig 2018-07-05 02:43:06.000000000 -0500 ++++ Python-3.7.0/Modules/readline.c 2018-07-05 02:43:46.000000000 -0500 +@@ -11,6 +11,9 @@ + #include + #include + #include ++#ifdef _WIN32 ++#include ++#endif + + #if defined(HAVE_SETLOCALE) + /* GNU readline() mistakenly sets the LC_CTYPE locale. diff --git a/mingw-w64-python3/0990-MINGW-link-with-additional-library.patch b/mingw-w64-python3/0990-MINGW-link-with-additional-library.patch index 189413a3ee..a8d35e1f81 100644 --- a/mingw-w64-python3/0990-MINGW-link-with-additional-library.patch +++ b/mingw-w64-python3/0990-MINGW-link-with-additional-library.patch @@ -1,14 +1,14 @@ -diff -Naur Python-3.6.5-orig/configure.ac Python-3.6.5/configure.ac ---- Python-3.6.5-orig/configure.ac 2018-04-16 09:55:03.356815800 +0300 -+++ Python-3.6.5/configure.ac 2018-04-16 09:55:03.560616200 +0300 -@@ -5703,6 +5703,15 @@ +diff -Naur Python-3.7.0-orig/configure.ac Python-3.7.0/configure.ac +--- Python-3.7.0-orig/configure.ac 2018-06-30 11:18:11.579625100 +0300 ++++ Python-3.7.0/configure.ac 2018-06-30 11:18:11.798025500 +0300 +@@ -5713,6 +5713,15 @@ done AC_MSG_RESULT(done) +# For mingw build need additional library for linking +case $host in + *-*-mingw*) -+ LIBS="$LIBS -lversion" ++ LIBS="$LIBS -lversion -lshlwapi" + ;; + *) + ;; diff --git a/mingw-w64-python3/1010-install-msilib.patch b/mingw-w64-python3/1010-install-msilib.patch index 34010180e8..ef10e56105 100644 --- a/mingw-w64-python3/1010-install-msilib.patch +++ b/mingw-w64-python3/1010-install-msilib.patch @@ -1,8 +1,8 @@ -diff -Naur Python-3.6.5-orig/Makefile.pre.in Python-3.6.5/Makefile.pre.in ---- Python-3.6.5-orig/Makefile.pre.in 2018-04-16 09:54:31.470716800 +0300 -+++ Python-3.6.5/Makefile.pre.in 2018-04-16 09:55:05.104031800 +0300 -@@ -1301,6 +1301,7 @@ - test/test_importlib/import_ test/test_importlib/source \ +diff -Naur Python-3.7.0-orig/Makefile.pre.in Python-3.7.0/Makefile.pre.in +--- Python-3.7.0-orig/Makefile.pre.in 2018-06-30 11:17:31.409554500 +0300 ++++ Python-3.7.0/Makefile.pre.in 2018-06-30 11:18:13.935229200 +0300 +@@ -1335,6 +1335,7 @@ + distutils distutils/command distutils/tests $(XMLLIBSUBDIRS) \ test/test_tools test/test_warnings test/test_warnings/data \ turtledemo \ + msilib \ diff --git a/mingw-w64-python3/1500-mingw-w64-dont-look-in-DLLs-folder-for-python-dll.patch b/mingw-w64-python3/1500-mingw-w64-dont-look-in-DLLs-folder-for-python-dll.patch deleted file mode 100644 index a9c25234cf..0000000000 --- a/mingw-w64-python3/1500-mingw-w64-dont-look-in-DLLs-folder-for-python-dll.patch +++ /dev/null @@ -1,29 +0,0 @@ -diff -Naur Python-3.6.5-orig/Modules/getpath.c Python-3.6.5/Modules/getpath.c ---- Python-3.6.5-orig/Modules/getpath.c 2018-04-16 09:54:35.994763600 +0300 -+++ Python-3.6.5/Modules/getpath.c 2018-04-16 09:55:06.587241400 +0300 -@@ -959,6 +959,17 @@ - int - _Py_CheckPython3() - { -+ /* This does not work well with mingw-w64-python. First it tries to -+ * look up \python3.dll, which it won't (or should not) find. But the -+ * real problem is when Python is freezed by cx_Freeze. sys.prefix -+ * is then /, and Python tries to load /\DLLs\python3.dll, which makes -+ * windows try to load python3.dll from a network address, causing -+ * a several seconds long delay before proceeding. Since this code does -+ * not do anything useful in the current state, we might just as -+ * well return immediately. */ -+#ifdef __MINGW32__ -+ return 0; -+#else - wchar_t py3path[MAXPATHLEN+1]; - wchar_t *s; - if (python3_checked) -@@ -983,6 +994,7 @@ - wcscat(py3path, L"\\DLLs\\python3.dll"); - hPython3 = LoadLibraryExW(py3path, NULL, LOAD_WITH_ALTERED_SEARCH_PATH); - return hPython3 != NULL; -+#endif - } - #endif - diff --git a/mingw-w64-python3/1600-fix-disable-blake2-sse.patch b/mingw-w64-python3/1600-fix-disable-blake2-sse.patch deleted file mode 100644 index 0f28b8e19e..0000000000 --- a/mingw-w64-python3/1600-fix-disable-blake2-sse.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -Naur Python-3.6.5-orig/setup.py Python-3.6.5/setup.py ---- Python-3.6.5-orig/setup.py 2018-04-16 09:54:55.809553400 +0300 -+++ Python-3.6.5/setup.py 2018-04-16 09:55:08.161456200 +0300 -@@ -973,6 +973,7 @@ - - blake2_macros = [] - if (not cross_compiling and -+ not host_platform.startswith(('mingw', 'win')) and - os.uname().machine == "x86_64" and - sys.maxsize > 2**32): - # Every x86_64 machine has at least SSE2. Check for sys.maxsize diff --git a/mingw-w64-python3/1610-fix-have-wspawnv.patch b/mingw-w64-python3/1610-fix-have-wspawnv.patch index 5283e18190..10b04b882a 100644 --- a/mingw-w64-python3/1610-fix-have-wspawnv.patch +++ b/mingw-w64-python3/1610-fix-have-wspawnv.patch @@ -1,7 +1,7 @@ -diff -Naur Python-3.6.5-orig/Modules/posixmodule.c Python-3.6.5/Modules/posixmodule.c ---- Python-3.6.5-orig/Modules/posixmodule.c 2018-04-16 09:55:00.365589100 +0300 -+++ Python-3.6.5/Modules/posixmodule.c 2018-04-16 09:55:09.709466900 +0300 -@@ -183,6 +183,7 @@ +diff -Naur Python-3.7.0-orig/Modules/posixmodule.c Python-3.7.0/Modules/posixmodule.c +--- Python-3.7.0-orig/Modules/posixmodule.c 2018-06-30 11:18:07.352017600 +0300 ++++ Python-3.7.0/Modules/posixmodule.c 2018-06-30 11:18:18.194036700 +0300 +@@ -180,6 +180,7 @@ #define HAVE_GETPPID 1 #define HAVE_GETLOGIN 1 #define HAVE_SPAWNV 1 diff --git a/mingw-w64-python3/1620-fix-signal-module-build.patch b/mingw-w64-python3/1620-fix-signal-module-build.patch index 732cc81a77..37741d9038 100644 --- a/mingw-w64-python3/1620-fix-signal-module-build.patch +++ b/mingw-w64-python3/1620-fix-signal-module-build.patch @@ -1,12 +1,12 @@ -diff -Naur Python-3.6.5-orig/Modules/Setup.dist Python-3.6.5/Modules/Setup.dist ---- Python-3.6.5-orig/Modules/Setup.dist 2018-04-16 09:54:05.842862600 +0300 -+++ Python-3.6.5/Modules/Setup.dist 2018-04-16 09:55:11.276677000 +0300 +diff -Naur Python-3.7.0-orig/Modules/Setup.dist Python-3.7.0/Modules/Setup.dist +--- Python-3.7.0-orig/Modules/Setup.dist 2018-06-30 11:15:53.851782600 +0300 ++++ Python-3.7.0/Modules/Setup.dist 2018-06-30 11:18:20.315640400 +0300 @@ -114,7 +114,7 @@ - _collections _collectionsmodule.c # Container types - itertools itertoolsmodule.c # Functions creating iterators for efficient looping - atexit atexitmodule.c # Register functions to be run at interpreter-shutdown --_signal signalmodule.c -+_signal signalmodule.c -lws2_32 - _stat _stat.c # stat.h interface - time timemodule.c # -lm # time operations and variables - + _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 signalmodule.c ++_signal -DPy_BUILD_CORE signalmodule.c -lws2_32 + _stat _stat.c # stat.h interface + time -DPy_BUILD_CORE timemodule.c # -lm # time operations and variables + _thread -DPy_BUILD_CORE _threadmodule.c # low-level threading interface diff --git a/mingw-w64-python3/1630-build-winconsoleio.patch b/mingw-w64-python3/1630-build-winconsoleio.patch index c2fb901aa5..a886ff37fe 100644 --- a/mingw-w64-python3/1630-build-winconsoleio.patch +++ b/mingw-w64-python3/1630-build-winconsoleio.patch @@ -1,12 +1,12 @@ -diff -Naur Python-3.6.5-orig/Modules/Setup.dist Python-3.6.5/Modules/Setup.dist ---- Python-3.6.5-orig/Modules/Setup.dist 2018-04-16 09:55:12.504686700 +0300 -+++ Python-3.6.5/Modules/Setup.dist 2018-04-16 09:55:12.723289700 +0300 -@@ -122,7 +122,7 @@ +diff -Naur Python-3.7.0-orig/Modules/Setup.dist Python-3.7.0/Modules/Setup.dist +--- Python-3.7.0-orig/Modules/Setup.dist 2018-06-30 11:18:22.156443600 +0300 ++++ Python-3.7.0/Modules/Setup.dist 2018-06-30 11:18:22.374844000 +0300 +@@ -123,7 +123,7 @@ _locale _localemodule.c # -lintl # Standard I/O baseline --_io -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 -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 +-_io -DPy_BUILD_CORE -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 -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 # The zipimport module is always imported at startup. Having it as a # builtin module avoids some bootstrapping problems and reduces overhead. diff --git a/mingw-w64-python3/1640-dont-include-consoleapi-h.patch b/mingw-w64-python3/1640-dont-include-consoleapi-h.patch deleted file mode 100644 index 0b1bd66915..0000000000 --- a/mingw-w64-python3/1640-dont-include-consoleapi-h.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur Python-3.6.5-orig/Modules/_io/_iomodule.c Python-3.6.5/Modules/_io/_iomodule.c ---- Python-3.6.5-orig/Modules/_io/_iomodule.c 2018-03-28 12:19:31.000000000 +0300 -+++ Python-3.6.5/Modules/_io/_iomodule.c 2018-04-16 09:55:14.166902200 +0300 -@@ -20,7 +20,7 @@ - #include - #endif /* HAVE_SYS_STAT_H */ - --#ifdef MS_WINDOWS -+#if defined(MS_WINDOWS) && !defined(__MINGW32__) - #include - #endif - diff --git a/mingw-w64-python3/1650-expose-sem_unlink.patch b/mingw-w64-python3/1650-expose-sem_unlink.patch index e3ce79eada..e384a0b77f 100644 --- a/mingw-w64-python3/1650-expose-sem_unlink.patch +++ b/mingw-w64-python3/1650-expose-sem_unlink.patch @@ -1,6 +1,6 @@ -diff -Naur Python-3.6.5-orig/Modules/_multiprocessing/multiprocessing.c Python-3.6.5/Modules/_multiprocessing/multiprocessing.c ---- Python-3.6.5-orig/Modules/_multiprocessing/multiprocessing.c 2018-03-28 12:19:31.000000000 +0300 -+++ Python-3.6.5/Modules/_multiprocessing/multiprocessing.c 2018-04-16 09:55:15.599311500 +0300 +diff -Naur Python-3.7.0-orig/Modules/_multiprocessing/multiprocessing.c Python-3.7.0/Modules/_multiprocessing/multiprocessing.c +--- Python-3.7.0-orig/Modules/_multiprocessing/multiprocessing.c 2018-06-27 06:07:35.000000000 +0300 ++++ Python-3.7.0/Modules/_multiprocessing/multiprocessing.c 2018-06-30 11:18:24.512047800 +0300 @@ -128,7 +128,7 @@ {"recv", multiprocessing_recv, METH_VARARGS, ""}, {"send", multiprocessing_send, METH_VARARGS, ""}, diff --git a/mingw-w64-python3/1690-need-win7-headers.patch b/mingw-w64-python3/1690-need-win7-headers.patch deleted file mode 100644 index e58b402e56..0000000000 --- a/mingw-w64-python3/1690-need-win7-headers.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur Python-3.6.5-orig/Makefile.pre.in Python-3.6.5/Makefile.pre.in ---- Python-3.6.5-orig/Makefile.pre.in 2018-04-16 09:55:06.384441000 +0300 -+++ Python-3.6.5/Makefile.pre.in 2018-04-16 09:55:17.048519100 +0300 -@@ -106,7 +106,7 @@ - # Extra C flags added for building the interpreter object files. - CFLAGSFORSHARED=@CFLAGSFORSHARED@ - # C flags used for building the interpreter object files --PY_CORE_CFLAGS= $(PY_CFLAGS) $(PY_CFLAGS_NODIST) $(PY_CPPFLAGS) $(CFLAGSFORSHARED) -DPy_BUILD_CORE -+PY_CORE_CFLAGS= $(PY_CFLAGS) $(PY_CFLAGS_NODIST) $(PY_CPPFLAGS) $(CFLAGSFORSHARED) -DPy_BUILD_CORE -D_WIN32_WINNT=0x0601 - # Strict or non-strict aliasing flags used to compile dtoa.c, see above - CFLAGS_ALIASING=@CFLAGS_ALIASING@ - diff --git a/mingw-w64-python3/1700-cygpty-isatty-disable-readline.patch b/mingw-w64-python3/1700-cygpty-isatty-disable-readline.patch index b715cb7417..a8a366be0e 100644 --- a/mingw-w64-python3/1700-cygpty-isatty-disable-readline.patch +++ b/mingw-w64-python3/1700-cygpty-isatty-disable-readline.patch @@ -1,6 +1,6 @@ -diff -Naur Python-3.6.5-orig/Include/iscygpty.h Python-3.6.5/Include/iscygpty.h ---- Python-3.6.5-orig/Include/iscygpty.h 1970-01-01 03:00:00.000000000 +0300 -+++ Python-3.6.5/Include/iscygpty.h 2018-04-16 09:55:18.555329200 +0300 +diff -Naur Python-3.7.0-orig/Include/iscygpty.h Python-3.7.0/Include/iscygpty.h +--- Python-3.7.0-orig/Include/iscygpty.h 1970-01-01 03:00:00.000000000 +0300 ++++ Python-3.7.0/Include/iscygpty.h 2018-06-30 11:18:28.739655200 +0300 @@ -0,0 +1,41 @@ +/* + * iscygpty.h -- part of ptycheck @@ -43,18 +43,18 @@ diff -Naur Python-3.6.5-orig/Include/iscygpty.h Python-3.6.5/Include/iscygpty.h +#endif + +#endif /* _ISCYGPTY_H */ -diff -Naur Python-3.6.5-orig/Makefile.pre.in Python-3.6.5/Makefile.pre.in ---- Python-3.6.5-orig/Makefile.pre.in 2018-04-16 09:55:18.283727500 +0300 -+++ Python-3.6.5/Makefile.pre.in 2018-04-16 09:55:18.555329200 +0300 -@@ -344,6 +344,7 @@ +diff -Naur Python-3.7.0-orig/Makefile.pre.in Python-3.7.0/Makefile.pre.in +--- Python-3.7.0-orig/Makefile.pre.in 2018-06-30 11:18:28.490054800 +0300 ++++ Python-3.7.0/Makefile.pre.in 2018-06-30 11:18:28.739655200 +0300 +@@ -351,6 +351,7 @@ Python/graminit.o \ Python/import.o \ Python/importdl.o \ + Python/iscygpty.o \ Python/marshal.o \ Python/modsupport.o \ - Python/mystrtoul.o \ -@@ -973,6 +974,7 @@ + Python/mysnprintf.o \ +@@ -985,6 +986,7 @@ $(srcdir)/Include/genobject.h \ $(srcdir)/Include/import.h \ $(srcdir)/Include/intrcheck.h \ @@ -62,9 +62,9 @@ diff -Naur Python-3.6.5-orig/Makefile.pre.in Python-3.6.5/Makefile.pre.in $(srcdir)/Include/iterobject.h \ $(srcdir)/Include/listobject.h \ $(srcdir)/Include/longintrepr.h \ -diff -Naur Python-3.6.5-orig/Modules/_io/fileio.c Python-3.6.5/Modules/_io/fileio.c ---- Python-3.6.5-orig/Modules/_io/fileio.c 2018-03-28 12:19:31.000000000 +0300 -+++ Python-3.6.5/Modules/_io/fileio.c 2018-04-16 09:55:18.570929200 +0300 +diff -Naur Python-3.7.0-orig/Modules/_io/fileio.c Python-3.7.0/Modules/_io/fileio.c +--- Python-3.7.0-orig/Modules/_io/fileio.c 2018-06-27 06:07:35.000000000 +0300 ++++ Python-3.7.0/Modules/_io/fileio.c 2018-06-30 11:18:28.739655200 +0300 @@ -17,6 +17,7 @@ #endif #include /* For offsetof */ @@ -73,7 +73,7 @@ diff -Naur Python-3.6.5-orig/Modules/_io/fileio.c Python-3.6.5/Modules/_io/filei /* * Known likely problems: -@@ -1119,7 +1120,7 @@ +@@ -1116,7 +1117,7 @@ return err_closed(); Py_BEGIN_ALLOW_THREADS _Py_BEGIN_SUPPRESS_IPH @@ -82,10 +82,10 @@ diff -Naur Python-3.6.5-orig/Modules/_io/fileio.c Python-3.6.5/Modules/_io/filei _Py_END_SUPPRESS_IPH Py_END_ALLOW_THREADS return PyBool_FromLong(res); -diff -Naur Python-3.6.5-orig/Modules/posixmodule.c Python-3.6.5/Modules/posixmodule.c ---- Python-3.6.5-orig/Modules/posixmodule.c 2018-04-16 09:55:11.048875200 +0300 -+++ Python-3.6.5/Modules/posixmodule.c 2018-04-16 09:55:18.570929200 +0300 -@@ -31,6 +31,7 @@ +diff -Naur Python-3.7.0-orig/Modules/posixmodule.c Python-3.7.0/Modules/posixmodule.c +--- Python-3.7.0-orig/Modules/posixmodule.c 2018-06-30 11:18:20.097240000 +0300 ++++ Python-3.7.0/Modules/posixmodule.c 2018-06-30 11:18:28.755255200 +0300 +@@ -32,6 +32,7 @@ #else #include "winreparse.h" #endif @@ -93,7 +93,7 @@ diff -Naur Python-3.6.5-orig/Modules/posixmodule.c Python-3.6.5/Modules/posixmod /* On android API level 21, 'AT_EACCESS' is not declared although * HAVE_FACCESSAT is defined. */ -@@ -8393,7 +8394,7 @@ +@@ -8584,7 +8585,7 @@ { int return_value; _Py_BEGIN_SUPPRESS_IPH @@ -102,18 +102,18 @@ diff -Naur Python-3.6.5-orig/Modules/posixmodule.c Python-3.6.5/Modules/posixmod _Py_END_SUPPRESS_IPH return return_value; } -diff -Naur Python-3.6.5-orig/Modules/readline.c Python-3.6.5/Modules/readline.c ---- Python-3.6.5-orig/Modules/readline.c 2018-03-28 12:19:31.000000000 +0300 -+++ Python-3.6.5/Modules/readline.c 2018-04-16 09:55:18.570929200 +0300 +diff -Naur Python-3.7.0-orig/Modules/readline.c Python-3.7.0/Modules/readline.c +--- Python-3.7.0-orig/Modules/readline.c 2018-06-27 06:07:35.000000000 +0300 ++++ Python-3.7.0/Modules/readline.c 2018-06-30 11:18:28.755255200 +0300 @@ -6,6 +6,7 @@ /* Standard definitions */ #include "Python.h" +#include "iscygpty.h" #include - #include #include -@@ -1406,6 +1407,11 @@ + #include +@@ -1339,6 +1340,11 @@ PyObject *m; readlinestate *mod_state; @@ -125,18 +125,18 @@ diff -Naur Python-3.6.5-orig/Modules/readline.c Python-3.6.5/Modules/readline.c #ifdef __APPLE__ if (strncmp(rl_library_version, libedit_version_tag, strlen(libedit_version_tag)) == 0) { using_libedit_emulation = 1; -diff -Naur Python-3.6.5-orig/Python/frozenmain.c Python-3.6.5/Python/frozenmain.c ---- Python-3.6.5-orig/Python/frozenmain.c 2018-03-28 12:19:31.000000000 +0300 -+++ Python-3.6.5/Python/frozenmain.c 2018-04-16 09:55:18.586529200 +0300 -@@ -3,6 +3,7 @@ - +diff -Naur Python-3.7.0-orig/Python/frozenmain.c Python-3.7.0/Python/frozenmain.c +--- Python-3.7.0-orig/Python/frozenmain.c 2018-06-27 06:07:35.000000000 +0300 ++++ Python-3.7.0/Python/frozenmain.c 2018-06-30 11:18:28.755255200 +0300 +@@ -4,6 +4,7 @@ #include "Python.h" + #include "internal/pystate.h" #include +#include "iscygpty.h" #ifdef MS_WINDOWS extern void PyWinFreeze_ExeInit(void); -@@ -93,7 +94,7 @@ +@@ -101,7 +102,7 @@ else sts = 0; @@ -145,9 +145,9 @@ diff -Naur Python-3.6.5-orig/Python/frozenmain.c Python-3.6.5/Python/frozenmain. sts = PyRun_AnyFile(stdin, "") != 0; #ifdef MS_WINDOWS -diff -Naur Python-3.6.5-orig/Python/iscygpty.c Python-3.6.5/Python/iscygpty.c ---- Python-3.6.5-orig/Python/iscygpty.c 1970-01-01 03:00:00.000000000 +0300 -+++ Python-3.6.5/Python/iscygpty.c 2018-04-16 09:55:18.586529200 +0300 +diff -Naur Python-3.7.0-orig/Python/iscygpty.c Python-3.7.0/Python/iscygpty.c +--- Python-3.7.0-orig/Python/iscygpty.c 1970-01-01 03:00:00.000000000 +0300 ++++ Python-3.7.0/Python/iscygpty.c 2018-06-30 11:18:28.770855300 +0300 @@ -0,0 +1,185 @@ +/* + * iscygpty.c -- part of ptycheck @@ -334,10 +334,10 @@ diff -Naur Python-3.6.5-orig/Python/iscygpty.c Python-3.6.5/Python/iscygpty.c +#endif /* _WIN32 */ + +/* vim: set ts=4 sw=4: */ -diff -Naur Python-3.6.5-orig/Python/pylifecycle.c Python-3.6.5/Python/pylifecycle.c ---- Python-3.6.5-orig/Python/pylifecycle.c 2018-04-16 09:54:07.705080900 +0300 -+++ Python-3.6.5/Python/pylifecycle.c 2018-04-16 09:55:18.586529200 +0300 -@@ -14,6 +14,7 @@ +diff -Naur Python-3.7.0-orig/Python/pylifecycle.c Python-3.7.0/Python/pylifecycle.c +--- Python-3.7.0-orig/Python/pylifecycle.c 2018-06-27 06:07:35.000000000 +0300 ++++ Python-3.7.0/Python/pylifecycle.c 2018-06-30 11:18:28.770855300 +0300 +@@ -17,6 +17,7 @@ #include "ast.h" #include "marshal.h" #include "osdefs.h" @@ -345,7 +345,7 @@ diff -Naur Python-3.6.5-orig/Python/pylifecycle.c Python-3.6.5/Python/pylifecycl #include #ifdef HAVE_SIGNAL_H -@@ -1701,7 +1702,7 @@ +@@ -2187,7 +2188,7 @@ int Py_FdIsInteractive(FILE *fp, const char *filename) { @@ -354,10 +354,10 @@ diff -Naur Python-3.6.5-orig/Python/pylifecycle.c Python-3.6.5/Python/pylifecycl return 1; if (!Py_InteractiveFlag) return 0; -diff -Naur Python-3.6.5-orig/setup.py Python-3.6.5/setup.py ---- Python-3.6.5-orig/setup.py 2018-04-16 09:55:09.463465800 +0300 -+++ Python-3.6.5/setup.py 2018-04-16 09:55:18.586529200 +0300 -@@ -848,10 +848,11 @@ +diff -Naur Python-3.7.0-orig/setup.py Python-3.7.0/setup.py +--- Python-3.7.0-orig/setup.py 2018-06-30 11:18:03.140010200 +0300 ++++ Python-3.7.0/setup.py 2018-06-30 11:18:28.770855300 +0300 +@@ -882,7 +882,7 @@ ['/usr/lib/termcap'], 'termcap'): readline_libs.append('termcap') @@ -365,9 +365,4 @@ diff -Naur Python-3.6.5-orig/setup.py Python-3.6.5/setup.py + exts.append( Extension('readline', ['readline.c', '../Python/iscygpty.c'], library_dirs=['/usr/lib/termcap'], extra_link_args=readline_extra_link_args, -- libraries=readline_libs) ) -+ libraries=readline_libs, -+ extra_compile_args=["-D_WIN32_WINNT=0x0600"]) ) - else: - missing.append('readline') - + libraries=readline_libs) ) diff --git a/mingw-w64-python3/1701-disable-broken-gdbm-module.patch b/mingw-w64-python3/1701-disable-broken-gdbm-module.patch index 785a55373c..435837a220 100644 --- a/mingw-w64-python3/1701-disable-broken-gdbm-module.patch +++ b/mingw-w64-python3/1701-disable-broken-gdbm-module.patch @@ -1,7 +1,7 @@ -diff -Naur Python-3.6.5-orig/setup.py Python-3.6.5/setup.py ---- Python-3.6.5-orig/setup.py 2018-04-16 09:55:20.108348800 +0300 -+++ Python-3.6.5/setup.py 2018-04-16 09:55:20.311351800 +0300 -@@ -1345,7 +1345,7 @@ +diff -Naur Python-3.7.0-orig/setup.py Python-3.7.0/setup.py +--- Python-3.7.0-orig/setup.py 2018-06-30 11:18:30.861258900 +0300 ++++ Python-3.7.0/setup.py 2018-06-30 11:18:31.079659300 +0300 +@@ -1307,7 +1307,7 @@ if dbm_args: dbm_order = [arg.split('=')[-1] for arg in dbm_args][-1].split(":") else: diff --git a/mingw-w64-python3/1800-link-win-resource-files-and-build-pythonw.patch b/mingw-w64-python3/1800-link-win-resource-files-and-build-pythonw.patch index 3cb33131a8..cea11c6dbb 100644 --- a/mingw-w64-python3/1800-link-win-resource-files-and-build-pythonw.patch +++ b/mingw-w64-python3/1800-link-win-resource-files-and-build-pythonw.patch @@ -1,7 +1,7 @@ -diff -Naur Python-3.6.5-orig/Makefile.pre.in Python-3.6.5/Makefile.pre.in ---- Python-3.6.5-orig/Makefile.pre.in 2018-04-16 09:55:20.076148700 +0300 -+++ Python-3.6.5/Makefile.pre.in 2018-04-16 09:55:21.802363500 +0300 -@@ -236,6 +236,7 @@ +diff -Naur Python-3.7.0-orig/Makefile.pre.in Python-3.7.0/Makefile.pre.in +--- Python-3.7.0-orig/Makefile.pre.in 2018-06-30 11:18:30.830058900 +0300 ++++ Python-3.7.0/Makefile.pre.in 2018-06-30 11:18:33.201263000 +0300 +@@ -241,6 +241,7 @@ PYTHON= python$(EXE) BUILDPYTHON= python$(BUILDEXE) @@ -9,7 +9,7 @@ diff -Naur Python-3.6.5-orig/Makefile.pre.in Python-3.6.5/Makefile.pre.in PYTHON_FOR_REGEN=@PYTHON_FOR_REGEN@ UPDATE_FILE=@PYTHON_FOR_REGEN@ $(srcdir)/Tools/scripts/update_file.py -@@ -449,7 +450,7 @@ +@@ -460,7 +461,7 @@ # Default target all: @DEF_MAKE_ALL_RULE@ @@ -18,9 +18,9 @@ diff -Naur Python-3.6.5-orig/Makefile.pre.in Python-3.6.5/Makefile.pre.in Programs/_testembed python-config # Check that the source is clean when building out of source. -@@ -551,9 +552,27 @@ +@@ -574,9 +575,27 @@ clinic: check-clean-src $(srcdir)/Modules/_blake2/blake2s_impl.c - $(PYTHON_FOR_REGEN) ./Tools/clinic/clinic.py --make + $(PYTHON_FOR_REGEN) $(srcdir)/Tools/clinic/clinic.py --make --srcdir $(srcdir) +pythonnt_rc.h: + # FIXME: FIELD3 not set @@ -38,19 +38,19 @@ diff -Naur Python-3.6.5-orig/Makefile.pre.in Python-3.6.5/Makefile.pre.in + windres -I$(srcdir)/Include -I$(srcdir)/PC -I. $(srcdir)/PC/python_nt.rc $@ + +$(BUILDPYTHONW): Programs/python.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY) pythonw_exe.o -+ $(LINKCC) $(PY_LDFLAGS) $(LINKFORSHARED) -mwindows -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) pythonw_exe.o ++ $(LINKCC) $(PY_LDFLAGS) $(LINKFORSHARED) -municode -mwindows -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) pythonw_exe.o + # Build the interpreter -$(BUILDPYTHON): Programs/python.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY) - $(LINKCC) $(PY_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) +$(BUILDPYTHON): Programs/python.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY) python_exe.o -+ $(LINKCC) $(PY_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) python_exe.o ++ $(LINKCC) $(PY_LDFLAGS) $(LINKFORSHARED) -municode -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) 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 -@@ -662,10 +681,10 @@ +@@ -682,10 +701,10 @@ - # This rule builds the Python DLL and import library if configured + # 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 @@ -61,7 +61,7 @@ diff -Naur Python-3.6.5-orig/Makefile.pre.in Python-3.6.5/Makefile.pre.in else true; \ fi -@@ -1164,6 +1183,7 @@ +@@ -1183,6 +1202,7 @@ done if test "$(PYTHONFRAMEWORKDIR)" = "no-framework" ; then \ $(INSTALL_PROGRAM) $(BUILDPYTHON) $(DESTDIR)$(BINDIR)/python$(LDVERSION)$(EXE); \ diff --git a/mingw-w64-python3/1810-3.7-mpdec-mingw.patch b/mingw-w64-python3/1810-3.7-mpdec-mingw.patch new file mode 100644 index 0000000000..a11a15bc0f --- /dev/null +++ b/mingw-w64-python3/1810-3.7-mpdec-mingw.patch @@ -0,0 +1,11 @@ +--- a/setup.py ++++ b/setup.py +@@ -2090,7 +2090,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: diff --git a/mingw-w64-python3/1830-mingw-implement-setenv-for-PY_COERCE_C_LOCALE.patch b/mingw-w64-python3/1830-mingw-implement-setenv-for-PY_COERCE_C_LOCALE.patch new file mode 100644 index 0000000000..4269e5e626 --- /dev/null +++ b/mingw-w64-python3/1830-mingw-implement-setenv-for-PY_COERCE_C_LOCALE.patch @@ -0,0 +1,29 @@ +--- Python-3.7.0/Python/pylifecycle.c.orig 2018-07-01 12:04:33.674705100 +0300 ++++ Python-3.7.0/Python/pylifecycle.c 2018-07-01 12:06:30.394110100 +0300 +@@ -40,6 +40,26 @@ + #define PyWindowsConsoleIO_Check(op) (PyObject_TypeCheck((op), &PyWindowsConsoleIO_Type)) + #endif + ++#if defined(__MINGW32__) && defined(PY_COERCE_C_LOCALE) ++static int ++setenv (const char *var, const char *val, int ovr) ++{ ++ BOOL b; ++ char c[2]; ++ if (!ovr) ++ { ++ DWORD d; ++ d = GetEnvironmentVariableA (var, c, 2); ++ if (0 != d && GetLastError () != ERROR_ENVVAR_NOT_FOUND) ++ return; ++ } ++ b = SetEnvironmentVariableA (var, val); ++ if (b) ++ return 0; ++ return 1; ++} ++#endif ++ + _Py_IDENTIFIER(flush); + _Py_IDENTIFIER(name); + _Py_IDENTIFIER(stdin); diff --git a/mingw-w64-python3/1840-fix-building-core-modules.patch b/mingw-w64-python3/1840-fix-building-core-modules.patch new file mode 100644 index 0000000000..11d1282fc6 --- /dev/null +++ b/mingw-w64-python3/1840-fix-building-core-modules.patch @@ -0,0 +1,11 @@ +--- Python-3.7.0/Modules/makesetup.orig 2018-07-01 18:35:00.747322100 +0300 ++++ Python-3.7.0/Modules/makesetup 2018-07-01 18:35:16.737350200 +0300 +@@ -233,7 +233,7 @@ + case $doconfig in + no) cc="$cc \$(CCSHARED) \$(PY_CFLAGS) \$(PY_CPPFLAGS)";; + *) +- cc="$cc \$(PY_STDMODULE_CFLAGS)";; ++ cc="$cc \$(PY_CORE_CFLAGS)";; + esac + rule="$obj: $src; $cc $cpps -c $src -o $obj" + echo "$rule" >>$rulesf diff --git a/mingw-w64-python3/PKGBUILD b/mingw-w64-python3/PKGBUILD index 6e5c02822c..e88e3e1a09 100644 --- a/mingw-w64-python3/PKGBUILD +++ b/mingw-w64-python3/PKGBUILD @@ -16,9 +16,9 @@ _realname=python3 pkgbase="mingw-w64-${_realname}" pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -_pybasever=3.6 -pkgver=${_pybasever}.5 -pkgrel=2 +_pybasever=3.7 +pkgver=${_pybasever}.0 +pkgrel=1 pkgdesc="A high-level scripting language (mingw-w64)" arch=('any') license=('PSF') @@ -27,6 +27,7 @@ depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-expat" "${MINGW_PACKAGE_PREFIX}-bzip2" "${MINGW_PACKAGE_PREFIX}-libffi" + "${MINGW_PACKAGE_PREFIX}-libmpcdec" "${MINGW_PACKAGE_PREFIX}-ncurses" "${MINGW_PACKAGE_PREFIX}-openssl" "${MINGW_PACKAGE_PREFIX}-readline" @@ -37,10 +38,11 @@ depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-sqlite3" ) makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") -options=('!makeflags') # '!strip' 'debug') +options=('makeflags') # 'debug' '!strip' ) source=("https://www.python.org/ftp/python/${pkgver%rc?}/Python-${pkgver}.tar.xz" 0000-make-_sysconfigdata.py-relocatable.patch 0001-fix-_nt_quote_args-using-subprocess-list2cmdline.patch + 0002-restore-setup-config.patch 0100-MINGW-BASE-use-NT-thread-model.patch 0110-MINGW-translate-gcc-internal-defines-to-python-platf.patch 0130-MINGW-configure-MACHDEP-and-platform-for-build.patch @@ -50,16 +52,12 @@ source=("https://www.python.org/ftp/python/${pkgver%rc?}/Python-${pkgver}.tar.xz 0180-MINGW-init-system-calls.patch 0200-MINGW-build-in-windows-modules-winreg.patch 0210-MINGW-determine-if-pwdmodule-should-be-used.patch - 0220-MINGW-default-sys.path-calculations-for-windows-plat.patch 0230-MINGW-AC_LIBOBJ-replacement-of-fileblocks.patch - 0240-MINGW-use-main-to-start-execution.patch 0250-MINGW-compiler-customize-mingw-cygwin-compilers.patch 0260-MINGW-compiler-enable-new-dtags.patch - 0270-CYGWIN-issue13756-Python-make-fail-on-cygwin.patch 0290-issue6672-v2-Add-Mingw-recognition-to-pyport.h-to-al.patch 0300-MINGW-configure-for-shared-build.patch 0310-MINGW-dynamic-loading-support.patch - 0320-MINGW-implement-exec-prefix.patch 0330-MINGW-ignore-main-program-for-frozen-scripts.patch 0340-MINGW-setup-exclude-termios-module.patch 0350-MINGW-setup-_multiprocessing-module.patch @@ -82,7 +80,6 @@ source=("https://www.python.org/ftp/python/${pkgver%rc?}/Python-${pkgver}.tar.xz 0510-cross-darwin-feature.patch 0520-py3k-mingw-ntthreads-vs-pthreads.patch 0530-mingw-system-libffi.patch - 0540-mingw-semicolon-DELIM.patch 0555-msys-mingw-prefer-unix-sep-if-MSYSTEM.patch 0560-mingw-use-posix-getpath.patch 0565-mingw-add-ModuleFileName-dir-to-PATH.patch @@ -95,9 +92,7 @@ source=("https://www.python.org/ftp/python/${pkgver%rc?}/Python-${pkgver}.tar.xz 0660-mingw-use-backslashes-in-compileall-py.patch 0670-msys-convert_path-fix-and-root-hack.patch 0690-allow-static-tcltk.patch - 0710-CROSS-properly-detect-WINDOW-_flags-for-different-nc.patch 0720-mingw-pdcurses_ISPAD.patch - 0730-mingw-fix-ncurses-module.patch 0740-grammar-fixes.patch 0750-builddir-fixes.patch 0760-msys-monkeypatch-os-system-via-sh-exe.patch @@ -108,8 +103,8 @@ source=("https://www.python.org/ftp/python/${pkgver%rc?}/Python-${pkgver}.tar.xz 0820-dont-link-with-gettext.patch 0830-ctypes-python-dll.patch 0840-gdbm-module-includes.patch + 0845-3.7-_abs-mingw.patch 0850-use-gnu_printf-in-format.patch - 0860-fix-_Py_CheckPython3-prototype.patch 0870-mingw-fix-ssl-dont-use-enum_certificates.patch 0890-mingw-build-optimized-ext.patch 0900-cygwinccompiler-dont-strip-modules-if-pydebug.patch @@ -117,23 +112,20 @@ source=("https://www.python.org/ftp/python/${pkgver%rc?}/Python-${pkgver}.tar.xz 0920-mingw-add-LIBPL-to-library-dirs.patch 0930-mingw-w64-build-overlapped-module.patch 0940-mingw-w64-Also-define-_Py_BEGIN_END_SUPPRESS_IPH-when-Py_BUILD_CORE_MODULE.patch - 0950-mingw-w64-XP3-compat-GetProcAddress-GetTickCount64.patch - 0960-mingw-w64-XP3-compat-GetProcAddress-GetFinalPathNameByHandleW.patch 0970-Add-AMD64-to-sys-config-so-msvccompiler-get_build_version-works.patch - 0980-mingw-readline-features-skip.patch + 0980-mingw-readline-module.patch 0990-MINGW-link-with-additional-library.patch 1010-install-msilib.patch - 1500-mingw-w64-dont-look-in-DLLs-folder-for-python-dll.patch - 1600-fix-disable-blake2-sse.patch 1610-fix-have-wspawnv.patch 1620-fix-signal-module-build.patch 1630-build-winconsoleio.patch - 1640-dont-include-consoleapi-h.patch 1650-expose-sem_unlink.patch - 1690-need-win7-headers.patch 1700-cygpty-isatty-disable-readline.patch 1701-disable-broken-gdbm-module.patch 1800-link-win-resource-files-and-build-pythonw.patch + 1810-3.7-mpdec-mingw.patch + 1830-mingw-implement-setenv-for-PY_COERCE_C_LOCALE.patch + 1840-fix-building-core-modules.patch smoketests.py) # Helper macros to help make tasks easier # @@ -161,14 +153,16 @@ prepare() { # these are created by patches rm -f Misc/config_mingw \ Misc/cross_mingw32 \ + Modules/Setup.config.in \ Python/fileblocks.c plain "Apply Ray Donnelly's should-be-upstreamed patches" apply_patch_with_msg \ 0000-make-_sysconfigdata.py-relocatable.patch \ - 0001-fix-_nt_quote_args-using-subprocess-list2cmdline.patch + 0001-fix-_nt_quote_args-using-subprocess-list2cmdline.patch \ + 0002-restore-setup-config.patch - plain "Apply Roumen Petrov's core patches (14)" + plain "Apply Roumen Petrov's core patches (10)" apply_patch_with_msg \ 0100-MINGW-BASE-use-NT-thread-model.patch \ 0110-MINGW-translate-gcc-internal-defines-to-python-platf.patch \ @@ -179,22 +173,18 @@ prepare() { 0180-MINGW-init-system-calls.patch \ 0200-MINGW-build-in-windows-modules-winreg.patch \ 0210-MINGW-determine-if-pwdmodule-should-be-used.patch \ - 0220-MINGW-default-sys.path-calculations-for-windows-plat.patch \ - 0230-MINGW-AC_LIBOBJ-replacement-of-fileblocks.patch \ - 0240-MINGW-use-main-to-start-execution.patch + 0230-MINGW-AC_LIBOBJ-replacement-of-fileblocks.patch plain "Apply Roumen Petrov's compiler patch (2)" apply_patch_with_msg \ 0250-MINGW-compiler-customize-mingw-cygwin-compilers.patch \ 0260-MINGW-compiler-enable-new-dtags.patch - plain "Apply Roumen Petrov's extensions patches (23)" + plain "Apply Roumen Petrov's extensions patches (21)" apply_patch_with_msg \ - 0270-CYGWIN-issue13756-Python-make-fail-on-cygwin.patch \ 0290-issue6672-v2-Add-Mingw-recognition-to-pyport.h-to-al.patch \ 0300-MINGW-configure-for-shared-build.patch \ 0310-MINGW-dynamic-loading-support.patch \ - 0320-MINGW-implement-exec-prefix.patch \ 0330-MINGW-ignore-main-program-for-frozen-scripts.patch \ 0340-MINGW-setup-exclude-termios-module.patch \ 0350-MINGW-setup-_multiprocessing-module.patch \ @@ -220,7 +210,6 @@ prepare() { 0510-cross-darwin-feature.patch \ 0520-py3k-mingw-ntthreads-vs-pthreads.patch \ 0530-mingw-system-libffi.patch \ - 0540-mingw-semicolon-DELIM.patch \ 0555-msys-mingw-prefer-unix-sep-if-MSYSTEM.patch \ 0560-mingw-use-posix-getpath.patch \ 0565-mingw-add-ModuleFileName-dir-to-PATH.patch \ @@ -236,22 +225,20 @@ prepare() { 0660-mingw-use-backslashes-in-compileall-py.patch \ 0670-msys-convert_path-fix-and-root-hack.patch \ 0690-allow-static-tcltk.patch - #patch -Np1 -i "${srcdir}"/0710-CROSS-properly-detect-WINDOW-_flags-for-different-nc.patch + apply_patch_with_msg \ 0720-mingw-pdcurses_ISPAD.patch \ - 0730-mingw-fix-ncurses-module.patch \ 0740-grammar-fixes.patch \ 0750-builddir-fixes.patch \ 0760-msys-monkeypatch-os-system-via-sh-exe.patch \ 0770-msys-replace-slashes-used-in-io-redirection.patch \ - 0790-mingw-add-_exec_prefix-for-tcltk-dlls.patch \ 0800-mingw-install-layout-as-posix.patch \ 0810-remove_path_max.default.patch \ 0820-dont-link-with-gettext.patch \ 0830-ctypes-python-dll.patch \ 0840-gdbm-module-includes.patch \ + 0845-3.7-_abs-mingw.patch \ 0850-use-gnu_printf-in-format.patch \ - 0860-fix-_Py_CheckPython3-prototype.patch \ 0870-mingw-fix-ssl-dont-use-enum_certificates.patch \ 0890-mingw-build-optimized-ext.patch \ 0900-cygwinccompiler-dont-strip-modules-if-pydebug.patch \ @@ -259,30 +246,20 @@ prepare() { 0920-mingw-add-LIBPL-to-library-dirs.patch \ 0930-mingw-w64-build-overlapped-module.patch \ 0940-mingw-w64-Also-define-_Py_BEGIN_END_SUPPRESS_IPH-when-Py_BUILD_CORE_MODULE.patch \ - 0950-mingw-w64-XP3-compat-GetProcAddress-GetTickCount64.patch \ - 0960-mingw-w64-XP3-compat-GetProcAddress-GetFinalPathNameByHandleW.patch \ 0970-Add-AMD64-to-sys-config-so-msvccompiler-get_build_version-works.patch \ - 0980-mingw-readline-features-skip.patch \ + 0980-mingw-readline-module.patch \ 0990-MINGW-link-with-additional-library.patch \ 1010-install-msilib.patch - - plain "Apply patch contributed by Frode Solheim from FS-UAE project (1)" - apply_patch_with_msg \ - 1500-mingw-w64-dont-look-in-DLLs-folder-for-python-dll.patch + + #0790-mingw-add-_exec_prefix-for-tcltk-dlls.patch plain "New patches added for the update from 3.5.3 to 3.6.1" apply_patch_with_msg \ - 1600-fix-disable-blake2-sse.patch \ 1610-fix-have-wspawnv.patch \ 1620-fix-signal-module-build.patch \ 1630-build-winconsoleio.patch \ - 1640-dont-include-consoleapi-h.patch \ 1650-expose-sem_unlink.patch - # 3.6.3 needs some win 7 headers at build time for optional win 7 features - apply_patch_with_msg \ - 1690-need-win7-headers.patch - # Extend some isatty calls to check for mintty when checking for # a terminal output. Disable the readline module under non-mintty as it # breaks things with a real console (like conemu or winpty) @@ -301,6 +278,11 @@ prepare() { apply_patch_with_msg \ 1800-link-win-resource-files-and-build-pythonw.patch + apply_patch_with_msg \ + 1810-3.7-mpdec-mingw.patch \ + 1830-mingw-implement-setenv-for-PY_COERCE_C_LOCALE.patch \ + 1840-fix-building-core-modules.patch + autoreconf -vfi # Temporary workaround for FS#22322 @@ -319,7 +301,7 @@ prepare() { # Ensure that we are using the system copy of various libraries (expat, zlib and libffi), # rather than copies shipped in the tarball rm -r Modules/expat - rm -r Modules/zlib + #rm -r Modules/zlib rm -r Modules/_ctypes/{darwin,libffi}* } @@ -337,8 +319,8 @@ check() { build() { local PREFIX_WIN=$(cygpath -wm ${MINGW_PREFIX}) - CFLAGS+=" -fwrapv -D__USE_MINGW_ANSI_STDIO=1 " - CXXFLAGS+=" -fwrapv -D__USE_MINGW_ANSI_STDIO=1" + CFLAGS+=" -fwrapv -D__USE_MINGW_ANSI_STDIO=1 -D_WIN32_WINNT=0x0601" + CXXFLAGS+=" -fwrapv -D__USE_MINGW_ANSI_STDIO=1 -D_WIN32_WINNT=0x0601" CPPFLAGS+=" -I${PREFIX_WIN}/include/ncursesw " declare -a _extra_config @@ -360,7 +342,7 @@ build() { # Workaround for conftest error on 64-bit builds export ac_cv_working_tzset=no - [ -d "${srcdir}/build-${CARCH}" ] && rm -rf "${srcdir}/build-${CARCH}" + [[ -d "${srcdir}/build-${CARCH}" ]] && rm -rf "${srcdir}/build-${CARCH}" mkdir -p "${srcdir}/build-${CARCH}" && cd "${srcdir}/build-${CARCH}" MSYSTEM=MINGW ../Python-${pkgver}/configure \ @@ -368,12 +350,13 @@ build() { --host=${MINGW_CHOST} \ --build=${MINGW_CHOST} \ --enable-shared \ - --with-threads \ --with-system-expat \ --with-system-ffi \ + --with-system-libmpdec \ --without-ensurepip \ "${_extra_config[@]}" \ OPT="" + #--with-nt-threads make } @@ -384,7 +367,7 @@ package() { local PREFIX_WIN=$(cygpath -wm ${MINGW_PREFIX}) MSYSTEM=MINGW \ MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ - make install DESTDIR="$pkgdir" + make -j1 install DESTDIR="${pkgdir}" if check_option "debug" "n"; then VERABI=${_pybasever}m else @@ -420,7 +403,7 @@ package() { sed -i "s#${srcdir}/Python-${pkgver}:##" "${pkgdir}${MINGW_PREFIX}"/lib/python${_pybasever}/config-${VERABI}/Makefile for fscripts in 2to3-${_pybasever} idle3 idle${_pybasever} pydoc3 pydoc${_pybasever} pyvenv pyvenv-${_pybasever}; do - sed -e "s|${MINGW_PREFIX}/bin/python${_pybasever}.exe|/usr/bin/env python${_pybasever}.exe|g" -i "${pkgdir}${MINGW_PREFIX}"/bin/$fscripts + sed -e "s|${PREFIX_WIN}/bin/python${_pybasever}.exe|/usr/bin/env python${_pybasever}.exe|g" -i "${pkgdir}${MINGW_PREFIX}"/bin/${fscripts} done sed -i "s|#!${pkgdir}${MINGW_PREFIX}/bin/python${VERABI}.exe|#!/usr/bin/env python${_pybasever}.exe|" "${pkgdir}${MINGW_PREFIX}"/lib/python${_pybasever}/config-${VERABI}/python-config.py @@ -440,100 +423,91 @@ package() { "${pkgdir}${MINGW_PREFIX}"/lib/python${_pybasever}/smtpd.py } -sha256sums=('f434053ba1b5c8a5cc597e966ead3c5143012af827fd3f0697d21450bb8d87a6' - '15fcd682901a7d3b76c5616e991dcb1616a823117f0cd3169e8df34c09e2d108' - '00ee34263e56d073dd4bed327dab7f28d35a175ba552be54bd31fcfe2a507543' - '9d6feeb319d5d82304b4b467579024f54c58f837148ae768ebe76cf5423c3ea3' - '08c538159182534cf4cb46e5a6dfd4ae7c0939a53d7e750e1f4c002f29580615' - '250363160794111313d07cf49b9f461f081ba621e2de44bedba452959b714fe9' - '9aade12717e34bf77a6e29a501e71acea1a9a067c103f843931be265d55ba5c3' - 'e9b0589928548c98630609ce2351dcb32dfa1a92dc77e207c487c453c34cf6c1' - '014558f3083505477ab8a106d0aac96706dad7fde24cab46cbc849aba82f1762' - '56a4dd7f627635b811517b08004f1afc1549abeb18f45c63b1c8d8dc3e2c89b1' - '3ef304b736b0a59d8561fb1fb1aacadd7e7b82c43213a311f1121d8326c6211a' - 'ad194d563368031e170abd225ddf834744215a7db6b51b2fda19e062638f268c' - 'c0584864511f6a608ef5e613b338b17284c7d9aa811063e76b029664286552d4' - '9d9257718a48a6db6e779b8ed08efd69873e1ec11a0317116f5919ef6b501f26' - '6d147fad9fafb89e91a6effbb3ddff5e9d804a5a56500d88b83169d389c783f6' - '2da98aea69050989d6d35b8c583346ace6ed357a4ef20bb313d4fad871750f2c' - '217d61d33b3b6af2bdc40bcda3d0e1cf0b35f5fc05cbd36629253f6d00018d9d' - '9095f717510892b76c2f10d51a12096f03c9138aada04c357564cd0ffc8d5b34' - '0cab47fda75024ae1131db771fb78df519e7dd10f63c6e3726bab6008822416a' - '8f147960d444564c9e63b2cff57a721908a75b4f297425412c3030be695bdd62' - 'f052e0a960e90246062a647ea3f857be3bc6aeffe5b958406a475064c3fb10b1' - '32ddf02e4be9335445553f92f0d27476ce4ae05989fb6fe37b82b92a2e2c7c2b' - '232a644cecd75323510ee68507f96a35bd2f5c02f08adf21cb5260b67f7e8e73' - '48bd1f91fcce6da60edaafae626e997387f48155a1ae1a5837890c56437cf404' - '842ec633a6c0cfe7b2f77820a98885e47d53596abb543d27e5988d6bcd77b3e4' - '91473e14b85a9bed9eff21840ef28e71324efad06c25889f39d55bb9ef134173' - '2fb436ebebfea9ec68ec69fee1d0c42ea862da7282394a6c7ca3474567795c35' - '55d5a1ab8ee338141d867278ec62bb254310910531fe33a90b49815de8afee26' - '8e21169ca12c081f9f1ce54b187f73a26d2924029b9fa125b7858128c9da8ec0' - '476c1066580562e67eb45ddb250339ce58312704bc6532c69d1fb87934b94962' - 'ae94a39e99a17c510dde9f9953df89e2614fae97458afde8b44171ef68c17e15' - 'd4eba2c4d78dd58dfb2d2da1e3b2a22c104e5fa3d78784916b1593e80780bb67' - 'e4208040eaaee7eedee7d39bc5587608b5313bba3e21030bc27b7568c15fab53' - '2f184f7fb699ac239c4ab83143b197d3be601751f411d87b0928f5ab49e1aef5' - '644d7bf31f74fb9a0ff0ab4b61608e1c98a9781e8ec05d1faee56d4a3bc1fef1' - '070ae4b558731c5831e1d6d512d57068cfb9ca370955456db91c225a1dc3e814' - '7433a7485360b96730b1425f65a58aeae04f680737912e20b214409040d455af' - 'c6fa00f86388f84b72d11dfc2d32a2bee1bc19160ac13e5285f214f27baa05cc' - '7acbddc62c73209c30086e6b65e1c5b5ee2bc16ef20a3a8d6e7b87d739435de5' - '506a1b31a79c8748390df807c5a6cf24b9b9be70e7d19e778207df425e636691' - '6bb2ca71df938342c06c3ffce2201049c2367143e8368074faba046756028b42' - '72cdcfd5dccff194bd86cc89f20d3298860664ed562b1a952cc6336013de912b' - '42a861d7389d2f8a29b66d5a620a0810f019aaed1fb103020df35087d0a3d83b' - 'cbcb68e25c93ed670fe03a1bbe9cf4eda08f39b4a1356dfd8d797b65335c4964' - '46c43cd2d0d87fd28b21e373413dabff6081272ed73d754f145ac2948bd943e6' - 'b520a0acd1efe3a6484f0ac840f295807505fea2ac910a97f40d703ec8c935e4' - '721a1cadd9d9df1e1a674e13a2e047247e31b0541784e39436e214c7de194997' - '3e1d588bc9afa6c94e30793b005f574cf0626eaef9e863e57afbcd70abdf011e' - '52bcc4897c24e3e952a39d40f1a4d2d14c6fe5c76dc8217b6ba986b098426ec3' - '961a89adec4b0d0cd98d03f06fdc6aefade097e5d395ecfac6623f271ced02c3' - 'c82f17e93c38bdac64d5aeb5dd849c881ec8b8965e0908e2e139b1e98b11fcfb' - '666c8dd8a4018f9aef40f704fdfc9c9867ac6e13c92a4492202897d05aa589ce' - 'a5539ec33f326ad01f25ef3ccb7580d0e61fcbac7caf58ea26d1a6c4148c369e' - '1155cde9c3b3f3745d39757e47600a78645979a1fdbbdbb6ecc6a6a3f2c264df' - '899920d9aa168a8223a420fb56b52c16600c85ee1618b381f486720eb46b8e84' - '9e66c59887c4a634b34672962ad8187a3f6fdf310719ac8e91fbdf55b40db9d1' - 'b119a2158d6d02732e1902d16f19c2e9c319389972ae8ffb22f6dd80b9efd62d' - 'f643831842e9c2c15f1ecb3ec96022f6f32af2a88e0e4501e56b20d86905995d' - '95f96d5dc0fe3e7e4bac947f39a950e4b85d48d0c868cb552be2e39d7dd0fdb2' - '71c2d070f3f434a0e54b723268a73fdbf81a7abe24b55f292a37a26cc46bdef8' - '107460105cdb3f1d34e5add1282fd527c340f0e9df7373b3d3dd70f1733774e4' - 'f66d893d370e36f04657e03fb3aadcae6861bf7848b7e6fe86b4fa26456847e9' - '2634032f94a13891389d9ca3462d35fb70d658aae03e0f95ea454e7d9d210b4f' - 'd172428e0d4356c50cb663f77ddb95e73b04704e2d4fcc7ad9e1f82c01a8c313' - '7fe090490f2b5771c78bf633f15a5e7f897d0c3fff9a0d4b551f148de7102035' - '623296db23b953f4778ade05652c935dff5e4b30dc46cf07fbcc147c3615ed7c' - '58423347b070338e944518a5679b106148ed3802953beab526b6492a94342522' - '69a46dae793fd60335746a26bfc51105ff4295d0812417fd73e958bafbb2acf8' - '3a46d9d83837d0ab49db7cc2229faee8ae75af68ec1062f55c21b0c16da47131' - '0db36c70c817ae8a6479502247e2fd50af5cbfdfb8f72225ce31ab63d48b5b55' - '405c1392ddc5623c314d38bc2eead1fccb33e9c4abf757b221d596cfb8610d0f' - '399acaccbcd428fc2728fa4fefe4609e8a4818539afd7c324f70db25273d524c' - 'abcdf15dcf814309160bdd6376139f4e0b9db88254a9fbd41b9b75ed49729716' - '362d63fcdcd3aca22ebb5b03d927f0be0fc85cbd39e213180a88e0a61401e900' - '5feb0769b95901d730c226c60a31687f98325fa83dd4550a9c43af0f314fea8a' - '138110a98a56903eb3730ef3bba73c87fdf62348cb641a6f1f5b62cb8bd0d388' - 'ac27efa31feadcb05ee2e5f5350f62e2b1fed6d3933e988c1dbd83bcba7a4a6a' - '10f7542947372442a681c6119716b42639e4fd00b80f648f2f5c4aa9508f3f8b' - '19316b6ccf12912220311e6f9b1b2356e8a94025da91c7108afe3bba9c91cd0d' - '057cc123a859ba2a7a7c003879e87d87bdf7b8366f5403ff979a1a95ac78b305' - 'a3cd9131e2ae447ae0fd0b6edc54c500753a496ab2ab349a447127e8e42ca2dc' - '79a41fe36f515a67aefb518e4717e17914e98ade1fbc5176a8688de84e96aebf' - '6b1d03e9912ccc05275e60e2130ebc3a60ef054f08f5619ffec4637de27ed072' - '8f3c3a4e266321286b744b9c803c08108da282d9e5719dc270aaa86930c91889' - 'cf094a0e160c327bd54aa3d58712e8cf01b0ae142b5a697cd5b0c106c5e58581' - 'bb4a837e9241f7e4b3fe63b364496675cf1f7c06c4c2907440bce9d300848718' - 'f1b6425c636f0ba1a7796d2b8acda6c87f23bf4bcec505b9062ad0a239b43b03' - 'a11dc4586e9533030f0e8f4c9ca745e5f95a0ba3d38754f564627b0f757e4a98' - '82b8df512a5ab5b00dc5d3b4c8407d74137f369eede8cffdcbff61ea62fb51c0' - 'b84a5449b066c32672455d80b82382789b118014b1e341bbb9b6e9230b8d5979' - '2eddc5b8aa6be2d07f8721c172b6c584cec2c0f78615ffdcd3f18178a299ea18' - '85dd94a7fd1361c982802f0a1ce30115c96dc829c600a39ccccd1889e8a0e259' - '38e4812481335e1a3ce2cb2c843ead94267fc0ecb7f7797408d4b36d9de3d1d9' - 'd4b0316fc3b73b3c6ee545f27a64fb21baee315732aacddde08529c530c0516d' - '35f4dfc8362356a2f51bae3fc0ae5802a278302ea89a36828769d48b12ed195b' - '0c345b144f36b92b216d6d277875326faf2e4187ac62101d3bd9aba9ed053998' +sha256sums=('0382996d1ee6aafe59763426cf0139ffebe36984474d0ec4126dd1c40a8b3549' + '5d9d0db2329c3b2ee57c47af99594d736ce0693c8eca6b60779ed9ccefd1149e' + '2e773f19d425c355297a918986ff036fe11a6174f5c8dc55d208d8ceaf538571' + '825c54ed62cb9a0e79fc1f60d1d4e8e7d83a5f41a53dc17fa5a2a63f0d728dfc' + '8624b179fda5e2090d495a8ec77e33d3d390000d5cbdb778f719f56748d8535a' + '1d2c95e6fc744a0a6a0d4927904a0f72c469282a2ed48b51074b7b81b8434cde' + '6e1f3faead24a7b7abc5bdb9039eadb3a6816751eaa0b36fab7853d563ece2d1' + 'ed9308b9f2cfb43535dcd80673de6b4c15b63eef1a89a07bf7dc57aa28a78969' + '8b38e6e7560c3d4eafca556b63fbf5403e43507457b18988c15386bde00f82bd' + '937e203ffa3d06d1a0ee0a565d41a4410125c6a83a19bee6239a9a5fdccf25af' + '9c6f71f5ef223632c34ffd4dbef1e69af6c49b5e19de21004dc25f1cf1367f4f' + 'cc017070cbce62dd14ca94a9cb281da376471c8b89b727b78223acedc48f0641' + '75a1c81893b1d714b94f84a9630123af5b817abc5fb04d24a07edf0b3fd3fe6e' + '30b69e40f26482b54c6dd55503ac3f774a0bf4b400c8db869948bc79dd4214f1' + 'b2b3c35f33d0c814a914044b8a1019614c50c29dbc212c563c02d8bf24e850a4' + 'a31acd0faed68401a0c929de14d97b21cda7e23adb10ee1742eef3c8b3d4e0d8' + '7d9259136004f3e0cde7a9aeb7ef93d1b7db38aaf9b156b39ce4277a73938daa' + 'efec9fba5b63cd91b8c2c9cc9725cce7a57db07108158bfaf7214e5b91c31d05' + 'd139bb01d86f013c5038250d3a160485da000438fcb85a4e2ac75ec36653d8de' + '1f11410b04263e4ad3aef3fd3794c6e9d72f38ee9777084aa77dfd61902d9097' + '7660bfa1dffaddd4668c1e556deb728be0c91e3e45684d8682bd91726d2f8e07' + '64dd1c8d0675c82abd3a270a7d810c51455e962f41689ae6b5986f61b3fb4a5a' + '823ae704ef358880b024fa0cea87df8dfc55850f75d7ff8c78b3916cf02e3275' + 'bd0ce079e594f1312fe12591d951e31729da41e0c770293a2d13ae98466a5adc' + '32c0ebcd8b4f558abbc05d5c7ca2c11bba71d57ed910489a3d636dd4795d2948' + '6f2534578ebb2ffa36425c50465ee0ad196e27506d6ac7f3f5ffa5b9db8d7560' + 'affef168e5a8662c110c147ef76d1c7f1579114de6ce54f6643878dcda089706' + '289ca1f7322a670ee89ac3a61defca829def425d5690e5eac2884c2899c85ff6' + 'dbc197219fe12f031c421d516c8445c8801245ed595c4fd32bc5a6af7e6d090f' + '02c4b25f5de67b71220e49d6b9b45d5d6e6681a8c22e24e5a2f49c18f4348a9f' + 'e1ab5a8372c5aee2f2462ccf9137ff6f704b676922221f05aa6daa225f42d85b' + '9a2c8bb95cf656c003f534b35b57f8cfedcb7380a7d5d396eeb63f3477800aa1' + '39887ee7ac922fe26aa537aa14d3706616154ffe7cedd8aeb6ad104113f6e061' + 'ea3c24aed4f84087f9b475efccb45c4b0637906eb4b8841dfd12bf774bfb19cc' + '4079b7e4f2eafb5c8b63c531153228a52cc411d9243a2f3e9e4d40b7cad16058' + '6e785abec993d1ca031811f03e6fca63b414c96334bf95a8c55d8f22fe050549' + '2b47bf9bd6e771481c7a3acaf8fc817ebcac89d9dfb9eafaeccc362b5d694b87' + '96d9917f0fd66d3e2d2cbadee41fac4b5d059a95c8020caa7055313426f4a83f' + '10701638d3cc24ee58351cfeb7fc51cf73876f1377344eb805172c55c7d6bbda' + '63d75a9b2e70c209c24037b28365ee82da5b8895b68877443c551c08e565e035' + '4675f4245861062b6b797173eb0351b60a9ef0fb616e72afa2c1577e231ca36b' + 'c12865395f185b0e08196bfcc1a458a819bfea3fa4e4ad3459d3413b92c30f59' + '609866ecdd1da7108d2d2451482370d80ed8fd382f1f86c21e9f4d98652078fd' + 'f31f8b180db2d3c6b2160cb127aa96f10162d8c88b67d5f31e0d838a9346218a' + 'd73760ff429ec8203933a17dc541c28f7798ee9696ab57148bf4bcb83934fbd8' + '098f4f1dfbfb548a77f08bf226478527565a38fe56a45c7cae4fe52513f87620' + '2b6b393db0275da2589f149c615028e458c22f7107f00e0752b1c16674e28a84' + 'e793efc0a7270b603a508c89c048b0b375dc32bf67f63829183ffbbdcbb68b28' + '44be8a0861fc047efae9b5217d2717a8b8204cf315d5fc1fcab2a98cf6a0a3ba' + '2ec7f8bda9a56d7db86bbac0bb730de0d8a835604874d12fb919aaed773dee5d' + 'c10184dcea5de5d9ffa98aa9c0cea2cbc6ed8277040bead6c69e0f6daf3c7592' + '3745fd2e48083973a1adde5028f8f7d0fd4cb2335d310f737f8c0e1e8fdeb9b4' + 'd8eba4cc5e08190d968ac62571b1834e735a527ceb6cbb41bda006f0090fbea5' + '507ed1bc3b5de5c5822555926a5d255af8c8f5d2e686773be4d17d44ad2b388f' + '2a1d73a2d710969a3e2273712deb985351478d5c9d2b740c8c094ec7fafdc253' + 'e8435d6ba9f9890e5dcc9f59af26c9161c032b10cf1eca18a4d80f4e266a1157' + '0e2eff65f646009edbc0630ecee34aeb5f937367bbe14d85b92fc429207f49c2' + '177d34a5a6792eab873182212c074ff4e4ae8e1eddd180c03d2c0f507f45dd52' + 'b436a578bd9e8b6d8cdc247216f7c6bce4962cae67794b3ab8cca603f2890010' + '20f178f1af127adc69d971966ee29c3c684c7d85f89171b4000bce6b45a04200' + 'dbaf97c870809a31ecd6b79cda29217f77ab342b3b8caac7af116e7fa6510047' + 'feb59f0474aad136b7631853c233335d5c5f941936ac7a32ea94eabafc2c662f' + '75913daa9c4fb96145126a3830630587b575b6c83bb1bf8c64e598ad2417422c' + '8852a1583b046ff3c0d439fa6ab151eaa4e807acf59e403dd037f77cc9e8ddf3' + 'a4542b674b90e139d33edd35baab358d9642ae3f241950b6c510ebafb1ca3641' + '3239045870728f304e3aa45306c2e09504c130ec3b34d1954a28e46dc4b1e221' + 'ff2419439a9b8945cb7080343cd260421034c1c63d0af29ceede19e23b3d2a4b' + 'f0d486d1fdf6bd62340514f21d5becb0633239ab9534101bbbb3ac44c338c642' + '00fd1882e3a23ea11fddfba106cbe4889d1e22a19804537ab3be236d5597db81' + 'ad965abba8140c1c5f367e544077e755cc65af3a1cc4b610dc0291d08dcb84eb' + '74eb5ff5ce7505f51dc0d97f65440887f245d958f11028368ff4e2286ba30068' + '6dcc10eb1cc000ff5ddf9bfdf3026a237321ccc2e26398b8f6dce75fe6da577b' + 'b1b05431ac86ed2e40c85a0c259e948406bc31e314fc18f67f86bb8af10c6754' + 'c2344e94c3a1a5b86368993b5ded2c4887b729b31864493e612acd8a42266733' + '3157e3c7e5df856ab17565a7201ece1220268b8c4cdd24e20e42fb972d0b905d' + '0818632dc43759afa70cee332822e5fb0e5a4f98d0b5e2f7ea1a52d0b990b81e' + '7e0f533fb57e49e589568819f28da0ab4c475f5d59fcc2b594fdb16d9fb07cb3' + '3759708ef8435ce77219695ed9ca28cb4b9d9a2c07455996f94189649c57765c' + '2da38cde34a6e9084eee6e16ae5991a1ee230db0f2f68dbe82f3c855cd747e2c' + 'cd9e9b634e050ae04670d3d6e287261c123496ad3503134a513c62275d5e6b95' + 'ec23a0bf972ac8629d76ed6246c3ad291a6175751a7e303d7ac9fc4c4c28267c' + '9054fa6a708cc28206592465c252d7ebcc2db2692aa9a88e31dc4f165bada889' + '6bd29223634b2fc3e78ddff83d4c0e807da25fe280cddefd360984ab93edd7a3' + 'aa4f2f4aed732f1f10df665bb679be1371df732df4b91390fee2c3123261158d' + '27c543d2d4a8830cf565cb1b5548108e00810e2bb924a02fcbe2b85bf141b94b' + 'bb33719ccf7cf3521ee1c965d0861067a3594eeb93ce7f5dcd22a10274d51b94' + '8ede3ee5a9a7a1bc220d0fef0beed8b744201a8301a0affc986bcda14f2c31b5' 'f4f5359b35741b703cbd22dc73438c181b8541e30b3f7614bd272f7cd2c59049')