Ticket #13319: python-2.7.3.p3-python-2.7.3.p2.diff

File python-2.7.3.p3-python-2.7.3.p2.diff, 14.8 KB (added by kcrisman, 9 years ago)

Diff from #13631 to the kcrisman p3 spkg

  • SPKG.txt

    # HG changeset patch
    # User Karl-Dieter Crisman <kcrisman@gmail.com>
    # Date 1354647532 18000
    # Node ID 439f3c187b53dc9f0a328262207c54082589301f
    # Parent  ba32bad781d4168138021df319db41ab65d5f3c8
    Trac #13319 - allow Python to build on recent Cygwin
    
    Added patches for Python issues 9665, 14437, and 14438
    Also ran autotools to update configure files properly
    Rebase to #13631 of Jean-Pierre Flori's work
    
    diff --git a/SPKG.txt b/SPKG.txt
    a b  
    6060 * sys_path_security.patch: ensure that the current working directory
    6161   or the script directory is prepended to sys.path only if there is no
    6262   security risk in doing so.
     63 * io-issue_14437.patch: Fixes Python issue #14437 (building _io on Cygwin)
     64 * ncurses-issue_9665.patch: Fixes Python issue #9665 (by patching configure
     65   and configure.in after running autotools)
     66 * ncurses-issue_14438.patch: Fixes Python issue #14438 (ncurses)
    6367
    6468== Changelog ==
    6569
     70=== python-2.7.3.p3 (Jean-Pierre Flori, Karl-Dieter Crisman, 4 December 2012) ===
     71 * Trac #13319: let Python build on Cygwin.
     72 * Includes fixes from Python issues #9665, #14437, #14438.
     73 * Jeroen's autotools was run in order to update the configure script.
     74
    6675=== python-2.7.3.p2 (Jeroen Demeyer, 29 October 2012) ===
    6776 * Trac #13631: Keep in mind umask when checking security of "python -c"
    6877
  • new file patches/io-issue_14437.patch

    diff --git a/patches/io-issue_14437.patch b/patches/io-issue_14437.patch
    new file mode 100644
    - +  
     1diff -ur src.orig/Misc/NEWS src/Misc/NEWS
     2--- src.orig/Misc/NEWS  2012-08-01 10:51:33.927830611 +0200
     3+++ src/Misc/NEWS       2012-08-01 10:58:44.139814595 +0200
     4@@ -12,6 +12,11 @@
     5 - Issue #6884: Fix long-standing bugs with MANIFEST.in parsing in distutils
     6   on Windows.
     7 
     8+Build
     9+-----
     10+
     11+- Issue #14437: Fix building the _io module under Cygwin.
     12+
     13 
     14 What's New in Python 2.7.3 release candidate 2?
     15 ===============================================
     16Seulement dans src/Misc: NEWS.orig
     17diff -ur src.orig/Modules/_io/_iomodule.h src/Modules/_io/_iomodule.h
     18--- src.orig/Modules/_io/_iomodule.h    2012-08-01 10:51:36.487830516 +0200
     19+++ src/Modules/_io/_iomodule.h 2012-08-01 10:58:44.151814610 +0200
     20@@ -72,7 +72,7 @@
     21     PyObject *filename; /* Not used, but part of the IOError object */
     22     Py_ssize_t written;
     23 } PyBlockingIOErrorObject;
     24-PyAPI_DATA(PyObject *) PyExc_BlockingIOError;
     25+extern PyObject *PyExc_BlockingIOError;
     26 
     27 /*
     28  * Offset type for positioning.
  • new file patches/ncurses-issue_14438.patch

    diff --git a/patches/ncurses-issue_14438.patch b/patches/ncurses-issue_14438.patch
    new file mode 100644
    - +  
     1diff -ur src.orig/Include/py_curses.h src/Include/py_curses.h
     2--- src.orig/Include/py_curses.h        2012-08-01 10:51:27.075830866 +0200
     3+++ src/Include/py_curses.h     2012-08-01 11:01:05.311809409 +0200
     4@@ -17,6 +17,13 @@
     5 #define NCURSES_OPAQUE 0
     6 #endif /* __APPLE__ */
     7 
     8+#ifdef __CYGWIN__
     9+/* the following define is necessary for Cygwin; without it, the
     10+   Cygwin-supplied ncurses.h sets NCURSES_OPAQUE to 1, and then Python
     11+   can't get at the WINDOW flags field. */
     12+#define NCURSES_INTERNALS
     13+#endif /* __CYGWIN__ */
     14+
     15 #ifdef __FreeBSD__
     16 /*
     17 ** On FreeBSD, [n]curses.h and stdlib.h/wchar.h use different guards
     18Seulement dans src/Include: py_curses.h.orig
  • new file patches/ncurses-issue_9665.patch

    diff --git a/patches/ncurses-issue_9665.patch b/patches/ncurses-issue_9665.patch
    new file mode 100644
    - +  
     1diff -ur src.orig/configure.in src/configure.in
     2--- src.orig/configure.in       2012-09-30 19:16:16.208133911 +0200
     3+++ src/configure.in    2012-09-30 19:15:12.800599068 +0200
     4@@ -1113,6 +1113,9 @@
     5        OSF*)
     6            BASECFLAGS="$BASECFLAGS -mieee"
     7            ;;
     8+       CYGWIN*)
     9+           BASECFLAGS="-I/usr/include/ncurses $BASECFLAGS"
     10+           ;;
     11     esac
     12     ;;
     13
     14diff -ur src.orig/configure src/configure
     15--- src.orig/configure  2012-09-30 19:16:16.216133852 +0200
     16+++ src/configure       2012-09-30 19:15:44.876363826 +0200
     17@@ -2600,7 +2600,7 @@
     18       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
     19 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
     20 as_fn_error $? "failed to load site script $ac_site_file
     21-See \`config.log' for more details" "$LINENO" 5 ; }
     22+See \`config.log' for more details" "$LINENO" 5; }
     23   fi
     24 done
     25 
     26@@ -3532,7 +3532,7 @@
     27 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
     28 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
     29 as_fn_error $? "no acceptable C compiler found in \$PATH
     30-See \`config.log' for more details" "$LINENO" 5 ; }
     31+See \`config.log' for more details" "$LINENO" 5; }
     32 
     33 # Provide some information about the compiler.
     34 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
     35@@ -3647,7 +3647,7 @@
     36 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
     37 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
     38 as_fn_error 77 "C compiler cannot create executables
     39-See \`config.log' for more details" "$LINENO" 5 ; }
     40+See \`config.log' for more details" "$LINENO" 5; }
     41 else
     42   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
     43 $as_echo "yes" >&6; }
     44@@ -3690,7 +3690,7 @@
     45   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
     46 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
     47 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
     48-See \`config.log' for more details" "$LINENO" 5 ; }
     49+See \`config.log' for more details" "$LINENO" 5; }
     50 fi
     51 rm -f conftest conftest$ac_cv_exeext
     52 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
     53@@ -3749,7 +3749,7 @@
     54 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
     55 as_fn_error $? "cannot run C compiled programs.
     56 If you meant to cross compile, use \`--host'.
     57-See \`config.log' for more details" "$LINENO" 5 ; }
     58+See \`config.log' for more details" "$LINENO" 5; }
     59     fi
     60   fi
     61 fi
     62@@ -3801,7 +3801,7 @@
     63 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
     64 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
     65 as_fn_error $? "cannot compute suffix of object files: cannot compile
     66-See \`config.log' for more details" "$LINENO" 5 ; }
     67+See \`config.log' for more details" "$LINENO" 5; }
     68 fi
     69 rm -f conftest.$ac_cv_objext conftest.$ac_ext
     70 fi
     71@@ -4344,7 +4344,7 @@
     72   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
     73 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
     74 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
     75-See \`config.log' for more details" "$LINENO" 5 ; }
     76+See \`config.log' for more details" "$LINENO" 5; }
     77 fi
     78 
     79 ac_ext=c
     80@@ -5613,6 +5613,9 @@
     81        OSF*)
     82            BASECFLAGS="$BASECFLAGS -mieee"
     83            ;;
     84+       CYGWIN*)
     85+           BASECFLAGS="-I/usr/include/ncurses $BASECFLAGS"
     86+           ;;
     87     esac
     88     ;;
     89 
     90@@ -6697,7 +6700,7 @@
     91      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
     92 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
     93 as_fn_error 77 "cannot compute sizeof (int)
     94-See \`config.log' for more details" "$LINENO" 5 ; }
     95+See \`config.log' for more details" "$LINENO" 5; }
     96    else
     97      ac_cv_sizeof_int=0
     98    fi
     99@@ -6730,7 +6733,7 @@
     100      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
     101 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
     102 as_fn_error 77 "cannot compute sizeof (long)
     103-See \`config.log' for more details" "$LINENO" 5 ; }
     104+See \`config.log' for more details" "$LINENO" 5; }
     105    else
     106      ac_cv_sizeof_long=0
     107    fi
     108@@ -6763,7 +6766,7 @@
     109      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
     110 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
     111 as_fn_error 77 "cannot compute sizeof (void *)
     112-See \`config.log' for more details" "$LINENO" 5 ; }
     113+See \`config.log' for more details" "$LINENO" 5; }
     114    else
     115      ac_cv_sizeof_void_p=0
     116    fi
     117@@ -6796,7 +6799,7 @@
     118      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
     119 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
     120 as_fn_error 77 "cannot compute sizeof (short)
     121-See \`config.log' for more details" "$LINENO" 5 ; }
     122+See \`config.log' for more details" "$LINENO" 5; }
     123    else
     124      ac_cv_sizeof_short=0
     125    fi
     126@@ -6829,7 +6832,7 @@
     127      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
     128 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
     129 as_fn_error 77 "cannot compute sizeof (float)
     130-See \`config.log' for more details" "$LINENO" 5 ; }
     131+See \`config.log' for more details" "$LINENO" 5; }
     132    else
     133      ac_cv_sizeof_float=0
     134    fi
     135@@ -6862,7 +6865,7 @@
     136      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
     137 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
     138 as_fn_error 77 "cannot compute sizeof (double)
     139-See \`config.log' for more details" "$LINENO" 5 ; }
     140+See \`config.log' for more details" "$LINENO" 5; }
     141    else
     142      ac_cv_sizeof_double=0
     143    fi
     144@@ -6895,7 +6898,7 @@
     145      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
     146 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
     147 as_fn_error 77 "cannot compute sizeof (fpos_t)
     148-See \`config.log' for more details" "$LINENO" 5 ; }
     149+See \`config.log' for more details" "$LINENO" 5; }
     150    else
     151      ac_cv_sizeof_fpos_t=0
     152    fi
     153@@ -6928,7 +6931,7 @@
     154      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
     155 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
     156 as_fn_error 77 "cannot compute sizeof (size_t)
     157-See \`config.log' for more details" "$LINENO" 5 ; }
     158+See \`config.log' for more details" "$LINENO" 5; }
     159    else
     160      ac_cv_sizeof_size_t=0
     161    fi
     162@@ -6961,7 +6964,7 @@
     163      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
     164 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
     165 as_fn_error 77 "cannot compute sizeof (pid_t)
     166-See \`config.log' for more details" "$LINENO" 5 ; }
     167+See \`config.log' for more details" "$LINENO" 5; }
     168    else
     169      ac_cv_sizeof_pid_t=0
     170    fi
     171@@ -7021,7 +7024,7 @@
     172      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
     173 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
     174 as_fn_error 77 "cannot compute sizeof (long long)
     175-See \`config.log' for more details" "$LINENO" 5 ; }
     176+See \`config.log' for more details" "$LINENO" 5; }
     177    else
     178      ac_cv_sizeof_long_long=0
     179    fi
     180@@ -7082,7 +7085,7 @@
     181      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
     182 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
     183 as_fn_error 77 "cannot compute sizeof (long double)
     184-See \`config.log' for more details" "$LINENO" 5 ; }
     185+See \`config.log' for more details" "$LINENO" 5; }
     186    else
     187      ac_cv_sizeof_long_double=0
     188    fi
     189@@ -7143,7 +7146,7 @@
     190      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
     191 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
     192 as_fn_error 77 "cannot compute sizeof (_Bool)
     193-See \`config.log' for more details" "$LINENO" 5 ; }
     194+See \`config.log' for more details" "$LINENO" 5; }
     195    else
     196      ac_cv_sizeof__Bool=0
     197    fi
     198@@ -7191,7 +7194,7 @@
     199      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
     200 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
     201 as_fn_error 77 "cannot compute sizeof (uintptr_t)
     202-See \`config.log' for more details" "$LINENO" 5 ; }
     203+See \`config.log' for more details" "$LINENO" 5; }
     204    else
     205      ac_cv_sizeof_uintptr_t=0
     206    fi
     207@@ -7232,7 +7235,7 @@
     208      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
     209 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
     210 as_fn_error 77 "cannot compute sizeof (off_t)
     211-See \`config.log' for more details" "$LINENO" 5 ; }
     212+See \`config.log' for more details" "$LINENO" 5; }
     213    else
     214      ac_cv_sizeof_off_t=0
     215    fi
     216@@ -7294,7 +7297,7 @@
     217      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
     218 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
     219 as_fn_error 77 "cannot compute sizeof (time_t)
     220-See \`config.log' for more details" "$LINENO" 5 ; }
     221+See \`config.log' for more details" "$LINENO" 5; }
     222    else
     223      ac_cv_sizeof_time_t=0
     224    fi
     225@@ -7365,7 +7368,7 @@
     226      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
     227 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
     228 as_fn_error 77 "cannot compute sizeof (pthread_t)
     229-See \`config.log' for more details" "$LINENO" 5 ; }
     230+See \`config.log' for more details" "$LINENO" 5; }
     231    else
     232      ac_cv_sizeof_pthread_t=0
     233    fi
     234@@ -12343,7 +12346,7 @@
     235 15|30)
     236   ;;
     237 *)
     238-  as_fn_error $? "bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" "$LINENO" 5  ;;
     239+  as_fn_error $? "bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" "$LINENO" 5 ;;
     240 esac
     241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
     242 $as_echo "$enable_big_digits" >&6; }
     243@@ -12395,7 +12398,7 @@
     244      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
     245 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
     246 as_fn_error 77 "cannot compute sizeof (wchar_t)
     247-See \`config.log' for more details" "$LINENO" 5 ; }
     248+See \`config.log' for more details" "$LINENO" 5; }
     249    else
     250      ac_cv_sizeof_wchar_t=0
     251    fi
     252@@ -12514,7 +12517,7 @@
     253       $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
     254 
     255       ;;
     256-*) as_fn_error $? "invalid value for --enable-unicode. Use either ucs2 or ucs4 (lowercase)." "$LINENO" 5  ;;
     257+*) as_fn_error $? "invalid value for --enable-unicode. Use either ucs2 or ucs4 (lowercase)." "$LINENO" 5 ;;
     258 esac
     259 
     260 
     261@@ -12780,7 +12783,7 @@
     262      ;; #(
     263    *)
     264      as_fn_error $? "unknown endianness
     265- presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5  ;;
     266+ presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
     267  esac
     268 
     269 
     270@@ -14580,7 +14583,7 @@
     271     "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
     272     "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
     273 
     274-  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
     275+  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
     276   esac
     277 done
     278 
     279@@ -14895,7 +14898,7 @@
     280   esac
     281   case $ac_mode$ac_tag in
     282   :[FHL]*:*);;
     283-  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
     284+  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
     285   :[FH]-) ac_tag=-:-;;
     286   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
     287   esac
     288@@ -14923,7 +14926,7 @@
     289           [\\/$]*) false;;
     290           *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
     291           esac ||
     292-          as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
     293+          as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
     294       esac
     295       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
     296       as_fn_append ac_file_inputs " '$ac_f'"
     297@@ -14950,7 +14953,7 @@
     298 
     299     case $ac_tag in
     300     *:-:* | *:-) cat >"$tmp/stdin" \
     301-      || as_fn_error $? "could not create $ac_file" "$LINENO" 5  ;;
     302+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
     303     esac
     304     ;;
     305   esac