diff -rupN Python-2.7.13/configure.ac Python-2.7.13-new/configure.ac
--- Python-2.7.13/configure.ac 2017-01-21 01:46:05.707616086 +0100
+++ Python-2.7.13-new/configure.ac 2017-01-21 01:46:05.710616054 +0100
@@ -2637,6 +2637,13 @@ case $host in
*-*-mingw*) USE_WIN32_MODULE=;;
esac
+# Determine if pwdmodule should be used.
+AC_SUBST(USE_PWD_MODULE)
+USE_PWD_MODULE=
+case $host in
+ *-*-mingw*) USE_PWD_MODULE='#';;
+esac
+
# Determine if signalmodule should be used.
AC_SUBST(USE_SIGNAL_MODULE)
AC_SUBST(SIGNAL_OBJS)
diff -rupN Python-2.7.13/Modules/Setup.config.in Python-2.7.13-new/Modules/Setup.config.in
--- Python-2.7.13/Modules/Setup.config.in 2017-01-21 01:46:05.708616075 +0100
+++ Python-2.7.13-new/Modules/Setup.config.in 2017-01-21 01:46:05.710616054 +0100
@@ -6,6 +6,9 @@
# init system calls(posix/nt/...) for INITFUNC (used by makesetup)
@INITSYS@ posixmodule.c
+# 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
diff -rupN Python-2.7.13/Modules/Setup.dist Python-2.7.13-new/Modules/Setup.dist
--- Python-2.7.13/Modules/Setup.dist 2017-01-21 01:46:05.392619449 +0100
+++ Python-2.7.13-new/Modules/Setup.dist 2017-01-21 01:46:05.710616054 +0100
@@ -113,8 +113,6 @@ PYTHONPATH=$(COREPYTHONPATH)
# 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