[issue3871] cross and native build of python for mingw32 with distutils

2011-02-10 Thread Scott Tsai

Changes by Scott Tsai scottt...@gmail.com:


--
nosy: +scott.tsai
versions:  -3rd party, Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3871
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3871] cross and native build of python for mingw32 with distutils

2011-02-10 Thread Scott Tsai

Scott Tsai scottt...@gmail.com added the comment:

I touched the version field by mistake while trying to add myself to the nosy 
list. My sincere apologies for the SPAM to all involved.

--
versions: +3rd party, Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3871
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4709] Mingw-w64 and python on windows x64

2011-02-10 Thread Scott Tsai

Changes by Scott Tsai scottt...@gmail.com:


--
nosy: +scott.tsai

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4709
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5639] Support TLS SNI extension in ssl module

2010-06-19 Thread Scott Tsai

Changes by Scott Tsai scottt...@gmail.com:


--
nosy: +scott.tsai

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5639
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8032] Add gdb7 hooks to make it easier to debug Python

2010-03-27 Thread Scott Tsai

Changes by Scott Tsai scottt...@gmail.com:


--
nosy: +scott.tsai

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8032
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1597850] Cross compiling patches for MINGW

2007-12-09 Thread Scott Tsai

Scott Tsai added the comment:

John,
set ac_cv_printf_zd_format.
In general, read the configure.in source.

On Dec 10, 2007 1:17 PM, John Stowers [EMAIL PROTECTED] wrote:

 John Stowers added the comment:

 Sorry, I should have clarified further in my last comment. Looking over
 the configure script I don't recognize the %zd test as one that could be
 circumvented by supplying a config.cache file with the appropriate values.

 How do I escape this limitation?


 _
 Tracker [EMAIL PROTECTED]
 http://bugs.python.org/issue1597850
 _


_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1597850
_
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1597850] Cross compiling patches for MINGW

2007-10-27 Thread Scott Tsai

Scott Tsai added the comment:

I messed up while generating cross-2.5.1.patch last time.
Added a hackish way to set disabled_module_list in setup.py from
corresponding environment variable.

Added file: http://bugs.python.org/file8628/cross-2.5.1.patch

_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1597850
_diff --exclude=configure -urN Python-2.5.1/configure.in Python-2.5.1-hacked/configure.in
--- Python-2.5.1/configure.in	2007-03-12 18:50:51.0 +0800
+++ Python-2.5.1-hacked/configure.in	2007-10-27 14:31:18.0 +0800
@@ -9,6 +9,11 @@
 AC_CONFIG_SRCDIR([Include/object.h])
 AC_CONFIG_HEADER(pyconfig.h)
 
+# find compiler while respecting --host setting
+AC_CANONICAL_HOST()
+AC_CHECK_TOOLS(CC,gcc cc)
+AC_CHECK_TOOLS(CXX,g++ c++)
+
 dnl This is for stuff that absolutely must end up in pyconfig.h.
 dnl Please use pyport.h instead, if possible.
 AH_TOP([
@@ -163,8 +168,8 @@
 # Set name for machine-dependent library files
 AC_SUBST(MACHDEP)
 AC_MSG_CHECKING(MACHDEP)
-if test -z $MACHDEP
-then
+if test -z $MACHDEP; then
+if test $cross_compiling = no; then
 	ac_sys_system=`uname -s`
 	if test $ac_sys_system = AIX -o $ac_sys_system = Monterey64 \
 	-o $ac_sys_system = UnixWare -o $ac_sys_system = OpenUNIX; then
@@ -172,6 +177,23 @@
 	else
 		ac_sys_release=`uname -r`
 	fi
+else
+	m=`$CC -dumpmachine`
+ 	changequote(, )#dnl
+	ac_sys_system=`expr $m : [^-]*-\([^-]*\)`
+ 	changequote([, ])#dnl
+
+
+	case $ac_sys_system in
+	cygwin*) ac_sys_system=`echo $ac_sys_system | sed s/cygwin/CYGWIN/g `;;
+	darwin*) ac_sys_system=`echo $ac_sys_system | sed s/darwin/Darwin/g `;;
+	freebsd*) ac_sys_system=`echo $ac_sys_system | sed s/freebsd/FreeBSD/g `;;
+	linux*) ac_sys_system=`echo $ac_sys_system | sed s/linux/Linux/g `;;
+	esac
+	
+
+fi
+
 	ac_md_system=`echo $ac_sys_system |
 			   tr -d '[/ ]' | tr '[[A-Z]]' '[[a-z]]'`
 	ac_md_release=`echo $ac_sys_release |
@@ -419,8 +441,8 @@
 if test -z $CXX
 then
 case $CC in
-gcc)AC_PATH_PROG(CXX, [g++], [g++], [notfound]) ;;
-cc) AC_PATH_PROG(CXX, [c++], [c++], [notfound]) ;;
+gcc)AC_CHECK_TOOL(CXX, [g++], [notfound]) ;;
+cc) AC_CHECK_TOOL(CXX, [c++], [notfound]) ;;
 esac
 	if test $CXX = notfound
 	then
@@ -429,7 +451,7 @@
 fi
 if test -z $CXX
 then
-	AC_CHECK_PROGS(CXX, $CCC c++ g++ gcc CC cxx cc++ cl, notfound)
+	AC_CHECK_TOOLS(CXX, $CCC c++ g++ gcc CC cxx cc++ cl, notfound)
 	if test $CXX = notfound
 	then
 		CXX=
@@ -480,9 +502,11 @@
 then
 AC_MSG_RESULT(yes)
 BUILDEXEEXT=.exe
+case_sensitive=no
 else
-	AC_MSG_RESULT(no)
-	BUILDEXEEXT=$EXEEXT
+AC_MSG_RESULT(no)
+BUILDEXEEXT=$EXEEXT
+case_sensitive=yes
 fi
 rmdir CaseSensitiveTestDir
 
@@ -681,9 +705,9 @@
 
 AC_MSG_RESULT($LDLIBRARY)
 
-AC_PROG_RANLIB
-AC_SUBST(AR)
-AC_CHECK_PROGS(AR, ar aal, ar)
+# find tools while respecting --host setting
+AC_CHECK_TOOL(RANLIB,ranlib)
+AC_CHECK_TOOLS(AR,ar aal,ar)
 
 AC_SUBST(SVNVERSION)
 AC_CHECK_PROG(SVNVERSION, svnversion, found, not-found)
@@ -801,7 +825,7 @@
  AC_TRY_RUN([int main() { return 0; }],
  ac_cv_no_strict_aliasing_ok=yes,
  ac_cv_no_strict_aliasing_ok=no,
- ac_cv_no_strict_aliasing_ok=no)
+ ac_cv_no_strict_aliasing_ok=yes)
  CC=$ac_save_cc
 AC_MSG_RESULT($ac_cv_no_strict_aliasing_ok)
 if test $ac_cv_no_strict_aliasing_ok = yes
@@ -3345,30 +3369,19 @@
   AC_MSG_RESULT(no)
 )
 
-AC_MSG_CHECKING(for /dev/ptmx)
-
-if test -r /dev/ptmx
-then
-  AC_MSG_RESULT(yes)
-  AC_DEFINE(HAVE_DEV_PTMX, 1,
-  [Define if we have /dev/ptmx.])
-else
-  AC_MSG_RESULT(no)
-fi
-
-AC_MSG_CHECKING(for /dev/ptc)
-
-if test -r /dev/ptc
-then
-  AC_MSG_RESULT(yes)
-  AC_DEFINE(HAVE_DEV_PTC, 1,
-  [Define if we have /dev/ptc.])
-else
-  AC_MSG_RESULT(no)
-fi
+AC_CHECK_FILE(/dev/ptmx,
+	[AC_DEFINE(HAVE_DEV_PTMX, 1,
+	   [Define if we have /dev/ptmx.])],
+	[])
+
+AC_CHECK_FILE(/dev/ptc,
+	[AC_DEFINE(HAVE_DEV_PTC, 1,
+	   [Define if we have /dev/ptc.])],
+	[])
 
 AC_MSG_CHECKING(for %zd printf() format support)
-AC_TRY_RUN([#include stdio.h
+AC_CACHE_VAL(ac_cv_printf_zd_format,
+		AC_TRY_RUN([#include stdio.h
 #include stddef.h
 #include string.h
 
@@ -3400,7 +3413,7 @@
 }],
 [AC_MSG_RESULT(yes)
  AC_DEFINE(PY_FORMAT_SIZE_T, z, [Define to printf format modifier for Py_ssize_t])],
- AC_MSG_RESULT(no))
+ AC_MSG_RESULT(no)))
 
 AC_CHECK_TYPE(socklen_t,,
   AC_DEFINE(socklen_t,int,
@@ -3430,6 +3443,63 @@
 done
 AC_MSG_RESULT(done)
 
+# Cross compiling
+AC_SUBST(cross_compiling)
+
+if test $cross_compiling = yes; then
+AC_MSG_CHECKING(cc for build)
+CC_FOR_BUILD=${CC_FOR_BUILD-cc}
+else
+CC_FOR_BUILD=${CC_FOR_BUILD-$CC}
+fi   
+ 
+if test $cross_compiling = yes; then
+   AC_MSG_RESULT($CC_FOR_BUILD)
+fi
+
+AC_ARG_VAR(CC_FOR_BUILD,[build system C compiler (default: cc)])
+	
+if test $cross_compiling = yes; then
+AC_MSG_CHECKING(python for build

[issue1597850] Cross compiling patches for MINGW

2007-10-27 Thread Scott Tsai

Scott Tsai added the comment:

Grumble, uploaded wrong version of patch.

Added file: http://bugs.python.org/file8629/cross-2.5.1.patch

_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1597850
_diff -urN --exclude configure --exclude 'config.*' Python-2.5.1/configure.in Python-2.5.1-hacked/configure.in
--- Python-2.5.1/configure.in	2007-03-12 18:50:51.0 +0800
+++ Python-2.5.1-hacked/configure.in	2007-10-27 16:46:39.0 +0800
@@ -9,6 +9,11 @@
 AC_CONFIG_SRCDIR([Include/object.h])
 AC_CONFIG_HEADER(pyconfig.h)
 
+# find compiler while respecting --host setting
+AC_CANONICAL_HOST()
+AC_CHECK_TOOLS(CC,gcc cc)
+AC_CHECK_TOOLS(CXX,g++ c++)
+
 dnl This is for stuff that absolutely must end up in pyconfig.h.
 dnl Please use pyport.h instead, if possible.
 AH_TOP([
@@ -163,8 +168,8 @@
 # Set name for machine-dependent library files
 AC_SUBST(MACHDEP)
 AC_MSG_CHECKING(MACHDEP)
-if test -z $MACHDEP
-then
+if test -z $MACHDEP; then
+if test $cross_compiling = no; then
 	ac_sys_system=`uname -s`
 	if test $ac_sys_system = AIX -o $ac_sys_system = Monterey64 \
 	-o $ac_sys_system = UnixWare -o $ac_sys_system = OpenUNIX; then
@@ -172,6 +177,23 @@
 	else
 		ac_sys_release=`uname -r`
 	fi
+else
+	m=`$CC -dumpmachine`
+ 	changequote(, )#dnl
+	ac_sys_system=`expr $m : [^-]*-\([^-]*\)`
+ 	changequote([, ])#dnl
+
+
+	case $ac_sys_system in
+	cygwin*) ac_sys_system=`echo $ac_sys_system | sed s/cygwin/CYGWIN/g `;;
+	darwin*) ac_sys_system=`echo $ac_sys_system | sed s/darwin/Darwin/g `;;
+	freebsd*) ac_sys_system=`echo $ac_sys_system | sed s/freebsd/FreeBSD/g `;;
+	linux*) ac_sys_system=`echo $ac_sys_system | sed s/linux/Linux/g `;;
+	esac
+	
+
+fi
+
 	ac_md_system=`echo $ac_sys_system |
 			   tr -d '[/ ]' | tr '[[A-Z]]' '[[a-z]]'`
 	ac_md_release=`echo $ac_sys_release |
@@ -419,8 +441,8 @@
 if test -z $CXX
 then
 case $CC in
-gcc)AC_PATH_PROG(CXX, [g++], [g++], [notfound]) ;;
-cc) AC_PATH_PROG(CXX, [c++], [c++], [notfound]) ;;
+gcc)AC_CHECK_TOOL(CXX, [g++], [notfound]) ;;
+cc) AC_CHECK_TOOL(CXX, [c++], [notfound]) ;;
 esac
 	if test $CXX = notfound
 	then
@@ -429,7 +451,7 @@
 fi
 if test -z $CXX
 then
-	AC_CHECK_PROGS(CXX, $CCC c++ g++ gcc CC cxx cc++ cl, notfound)
+	AC_CHECK_TOOLS(CXX, $CCC c++ g++ gcc CC cxx cc++ cl, notfound)
 	if test $CXX = notfound
 	then
 		CXX=
@@ -480,9 +502,11 @@
 then
 AC_MSG_RESULT(yes)
 BUILDEXEEXT=.exe
+case_sensitive=no
 else
-	AC_MSG_RESULT(no)
-	BUILDEXEEXT=$EXEEXT
+AC_MSG_RESULT(no)
+BUILDEXEEXT=$EXEEXT
+case_sensitive=yes
 fi
 rmdir CaseSensitiveTestDir
 
@@ -681,9 +705,9 @@
 
 AC_MSG_RESULT($LDLIBRARY)
 
-AC_PROG_RANLIB
-AC_SUBST(AR)
-AC_CHECK_PROGS(AR, ar aal, ar)
+# find tools while respecting --host setting
+AC_CHECK_TOOL(RANLIB,ranlib)
+AC_CHECK_TOOLS(AR,ar aal,ar)
 
 AC_SUBST(SVNVERSION)
 AC_CHECK_PROG(SVNVERSION, svnversion, found, not-found)
@@ -801,7 +825,7 @@
  AC_TRY_RUN([int main() { return 0; }],
  ac_cv_no_strict_aliasing_ok=yes,
  ac_cv_no_strict_aliasing_ok=no,
- ac_cv_no_strict_aliasing_ok=no)
+ ac_cv_no_strict_aliasing_ok=yes)
  CC=$ac_save_cc
 AC_MSG_RESULT($ac_cv_no_strict_aliasing_ok)
 if test $ac_cv_no_strict_aliasing_ok = yes
@@ -3345,30 +3369,19 @@
   AC_MSG_RESULT(no)
 )
 
-AC_MSG_CHECKING(for /dev/ptmx)
-
-if test -r /dev/ptmx
-then
-  AC_MSG_RESULT(yes)
-  AC_DEFINE(HAVE_DEV_PTMX, 1,
-  [Define if we have /dev/ptmx.])
-else
-  AC_MSG_RESULT(no)
-fi
-
-AC_MSG_CHECKING(for /dev/ptc)
-
-if test -r /dev/ptc
-then
-  AC_MSG_RESULT(yes)
-  AC_DEFINE(HAVE_DEV_PTC, 1,
-  [Define if we have /dev/ptc.])
-else
-  AC_MSG_RESULT(no)
-fi
+AC_CHECK_FILE(/dev/ptmx,
+	[AC_DEFINE(HAVE_DEV_PTMX, 1,
+	   [Define if we have /dev/ptmx.])],
+	[])
+
+AC_CHECK_FILE(/dev/ptc,
+	[AC_DEFINE(HAVE_DEV_PTC, 1,
+	   [Define if we have /dev/ptc.])],
+	[])
 
 AC_MSG_CHECKING(for %zd printf() format support)
-AC_TRY_RUN([#include stdio.h
+AC_CACHE_VAL(ac_cv_printf_zd_format,
+		AC_TRY_RUN([#include stdio.h
 #include stddef.h
 #include string.h
 
@@ -3400,7 +3413,7 @@
 }],
 [AC_MSG_RESULT(yes)
  AC_DEFINE(PY_FORMAT_SIZE_T, z, [Define to printf format modifier for Py_ssize_t])],
- AC_MSG_RESULT(no))
+ AC_MSG_RESULT(no)))
 
 AC_CHECK_TYPE(socklen_t,,
   AC_DEFINE(socklen_t,int,
@@ -3430,6 +3443,63 @@
 done
 AC_MSG_RESULT(done)
 
+# Cross compiling
+AC_SUBST(cross_compiling)
+
+if test $cross_compiling = yes; then
+AC_MSG_CHECKING(cc for build)
+CC_FOR_BUILD=${CC_FOR_BUILD-cc}
+else
+CC_FOR_BUILD=${CC_FOR_BUILD-$CC}
+fi   
+ 
+if test $cross_compiling = yes; then
+   AC_MSG_RESULT($CC_FOR_BUILD)
+fi
+
+AC_ARG_VAR(CC_FOR_BUILD,[build system C compiler (default: cc)])
+	
+if test $cross_compiling = yes; then
+AC_MSG_CHECKING(python for build)
+PYTHON_FOR_BUILD=${PYTHON_FOR_BUILD-python}
+PYTHON_FOR_BUILD=`which $PYTHON_FOR_BUILD`
+else