Upgrade python to 2.7.3 in cygwin

AppEngine is using Python 2.7, but the version of python installed with cygwin is 2.6. I have been trying to find how to install Python 2.7.3 on my machine, then I find this post

I installed successfully on my machine, and here is the step:

  1. download Python
  2. download the patch to the same directory.
  3. extract Python to current directory apply the patch
    $ bzcat Python-2.7.3-cygwin.patch.bz2 | patch -p0
    patching file Python-2.7.3/Include/py_curses.h
    patching file Python-2.7.3/Modules/_curses_panel.c
    patching file Python-2.7.3/Modules/_io/_iomodule.c
    patching file Python-2.7.3/Modules/_io/_iomodule.h
    patching file Python-2.7.3/configure
  4. Remove the soft link for the current version of python
    $ ls -l /usr/bin/python
    lrwxrwxrwx 1 CGuo mkgroup 22 Sep 17 17:33 /usr/bin/python -> /usr/bin/python2.6.exe
    CGuo@CGUO-E8420 ~/Downloads/Python-2.7.3
    $ rm /usr/bin/python
  5. Run configure with /usr/local. I first tried with /usr/bin and it failed with permission issues.
    CGuo@CGUO-E8420 ~/Downloads/Python-2.7.3
    $ ./configure --prefix=/usr/local
    checking for --enable-universalsdk... no
    checking for --with-universal-archs... 32-bit
    checking MACHDEP... cygwin
    checking EXTRAPLATDIR...
    checking machine type as ...