Blame 0210-MINGW-determine-if-pwdmodule-should-be-used.patch

ddb6764
diff -rupN Python-2.7.13/configure.ac Python-2.7.13-new/configure.ac
ddb6764
--- Python-2.7.13/configure.ac	2017-01-21 01:46:05.707616086 +0100
ddb6764
+++ Python-2.7.13-new/configure.ac	2017-01-21 01:46:05.710616054 +0100
ddb6764
@@ -2637,6 +2637,13 @@ case $host in
ddb6764
   *-*-mingw*) USE_WIN32_MODULE=;;
ddb6764
 esac
ddb6764
 
ddb6764
+# Determine if pwdmodule should be used.
ddb6764
+AC_SUBST(USE_PWD_MODULE)
ddb6764
+USE_PWD_MODULE=
ddb6764
+case $host in
ddb6764
+  *-*-mingw*) USE_PWD_MODULE='#';;
ddb6764
+esac
ddb6764
+
ddb6764
 # Determine if signalmodule should be used.
ddb6764
 AC_SUBST(USE_SIGNAL_MODULE)
ddb6764
 AC_SUBST(SIGNAL_OBJS)
ddb6764
diff -rupN Python-2.7.13/Modules/Setup.config.in Python-2.7.13-new/Modules/Setup.config.in
ddb6764
--- Python-2.7.13/Modules/Setup.config.in	2017-01-21 01:46:05.708616075 +0100
ddb6764
+++ Python-2.7.13-new/Modules/Setup.config.in	2017-01-21 01:46:05.710616054 +0100
ddb6764
@@ -6,6 +6,9 @@
ddb6764
 # init system calls(posix/nt/...) for INITFUNC (used by makesetup)
ddb6764
 @INITSYS@ posixmodule.c
ddb6764
 
ddb6764
+# This is needed to find out the user's home dir if $HOME is not set
ddb6764
+@USE_PWD_MODULE@pwd pwdmodule.c
ddb6764
+
ddb6764
 # Threading
ddb6764
 @USE_THREAD_MODULE@thread threadmodule.c
ddb6764
 
ddb6764
diff -rupN Python-2.7.13/Modules/Setup.dist Python-2.7.13-new/Modules/Setup.dist
ddb6764
--- Python-2.7.13/Modules/Setup.dist	2017-01-21 01:46:05.392619449 +0100
ddb6764
+++ Python-2.7.13-new/Modules/Setup.dist	2017-01-21 01:46:05.710616054 +0100
ddb6764
@@ -113,8 +113,6 @@ PYTHONPATH=$(COREPYTHONPATH)
ddb6764
 # setup.py script in the root of the Python source tree.
ddb6764
 
ddb6764
 errno errnomodule.c		# posix (UNIX) errno values
ddb6764
-pwd pwdmodule.c			# this is needed to find out the user's home dir
ddb6764
-				# if $HOME is not set
ddb6764
 _sre _sre.c			# Fredrik Lundh's new regular expressions
ddb6764
 _codecs _codecsmodule.c		# access to the builtin codecs and codec registry
ddb6764
 _weakref _weakref.c             # weak references