]> granicus.if.org Git - python/commitdiff
Merged revisions 68468-68470 via svnmerge from
authorHirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp>
Sat, 10 Jan 2009 11:48:27 +0000 (11:48 +0000)
committerHirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp>
Sat, 10 Jan 2009 11:48:27 +0000 (11:48 +0000)
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r68468 | hirokazu.yamamoto | 2009-01-10 17:09:43 +0900 | 1 line

  Bump up Tcl/Tk version on VC6. (tcl8.4.12 -> tcl8.5.2, tk8.4.12 -> tk8.5.2, tix8.4.0 -> tix8.4.3)
........
  r68469 | hirokazu.yamamoto | 2009-01-10 17:12:09 +0900 | 1 line

  Link to debug version of Tcl/Tk when python is built as debug version.
........
  r68470 | hirokazu.yamamoto | 2009-01-10 18:18:16 +0900 | 1 line

  Added helper script to build Tcl/Tk.
........

Lib/tkinter/tix.py
PC/VC6/_tkinter.dsp
PC/VC6/build_tkinter.py [new file with mode: 0644]
PC/VC6/readme.txt
PC/VC6/tcl852.patch [new file with mode: 0644]

index eb566e2080cdc32d474b6b83a0b9d6d48cd0ac77..3bfa539475ef4d6c2b7ed26ac24ba68d4f3d4769 100755 (executable)
@@ -293,7 +293,7 @@ class TixWidget(tkinter.Widget):
         else:
             static_options = ['options']
 
-        for k,v in cnf.items()[:]:
+        for k,v in list(cnf.items()):
             if k in static_options:
                 extra = extra + ('-' + k, v)
                 del cnf[k]
@@ -448,7 +448,7 @@ class TixSubWidget(TixWidget):
         # we must be careful not to destroy the frame widget since this
         # also destroys the parent NoteBook thus leading to an exception
         # in Tkinter when it finally calls Tcl to destroy the NoteBook
-        for c in self.children.values(): c.destroy()
+        for c in list(self.children.values()): c.destroy()
         if self._name in self.master.children:
             del self.master.children[self._name]
         if self._name in self.master.subwidget_list:
index d06198c9b95e4ec16a7119e913ec1dab6e4befda..8cda83a93adc2c9efd051a593e3dd0e8d320f0f6 100644 (file)
@@ -54,7 +54,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo\r
 LINK32=link.exe\r
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept\r
-# ADD LINK32 ..\..\..\tcltk\lib\tk84.lib ..\..\..\tcltk\lib\tcl84.lib odbc32.lib odbccp32.lib user32.lib kernel32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /base:"0x1e190000" /subsystem:windows /dll /debug /machine:I386 /out:"./_tkinter_d.pyd" /pdbtype:sept /libpath:"C:\Program Files\Tcl\lib"\r
+# ADD LINK32 ..\..\..\tcltk\lib\tk85g.lib ..\..\..\tcltk\lib\tcl85g.lib odbc32.lib odbccp32.lib user32.lib kernel32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /base:"0x1e190000" /subsystem:windows /dll /debug /machine:I386 /out:"./_tkinter_d.pyd" /pdbtype:sept\r
 # SUBTRACT LINK32 /pdb:none\r
 \r
 !ELSEIF  "$(CFG)" == "_tkinter - Win32 Release"\r
@@ -82,7 +82,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo\r
 LINK32=link.exe\r
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386\r
-# ADD LINK32 ..\..\..\tcltk\lib\tk84.lib ..\..\..\tcltk\lib\tcl84.lib odbc32.lib odbccp32.lib user32.lib kernel32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /base:"0x1e190000" /subsystem:windows /dll /debug /machine:I386 /out:"./_tkinter.pyd" /libpath:"C:\Program Files\Tcl\lib"\r
+# ADD LINK32 ..\..\..\tcltk\lib\tk85.lib ..\..\..\tcltk\lib\tcl85.lib odbc32.lib odbccp32.lib user32.lib kernel32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /base:"0x1e190000" /subsystem:windows /dll /debug /machine:I386 /out:"./_tkinter.pyd"\r
 # SUBTRACT LINK32 /pdb:none\r
 \r
 !ENDIF \r
diff --git a/PC/VC6/build_tkinter.py b/PC/VC6/build_tkinter.py
new file mode 100644 (file)
index 0000000..f2e3c41
--- /dev/null
@@ -0,0 +1,81 @@
+import os\r
+import sys\r
+import subprocess\r
+\r
+TCL_MAJOR = 8\r
+TCL_MINOR = 5\r
+TCL_PATCH = 2\r
+\r
+TIX_MAJOR = 8\r
+TIX_MINOR = 4\r
+TIX_PATCH = 3\r
+\r
+def abspath(name):\r
+    par = os.path.pardir\r
+    return os.path.abspath(os.path.join(__file__, par, par, par, par, name))\r
+\r
+TCL_DIR = abspath("tcl%d.%d.%d" % (TCL_MAJOR, TCL_MINOR, TCL_PATCH))\r
+TK_DIR  = abspath("tk%d.%d.%d"  % (TCL_MAJOR, TCL_MINOR, TCL_PATCH))\r
+TIX_DIR = abspath("tix%d.%d.%d" % (TIX_MAJOR, TIX_MINOR, TIX_PATCH))\r
+OUT_DIR = abspath("tcltk")\r
+\r
+def have_args(*a):\r
+    return any(s in sys.argv[1:] for s in a)\r
+\r
+def enter(dir):\r
+    os.chdir(os.path.join(dir, "win"))\r
+\r
+def main():\r
+    debug = have_args("-d", "--debug")\r
+    clean = have_args("clean")\r
+    install = have_args("install")\r
+    tcl = have_args("tcl")\r
+    tk = have_args("tk")\r
+    tix = have_args("tix")\r
+    if not(tcl) and not(tk) and not(tix):\r
+        tcl = tk = tix = True\r
+\r
+    def nmake(makefile, *a):\r
+        args = ["nmake", "/nologo", "/f", makefile, "DEBUG=%d" % debug]\r
+        args.extend(a)\r
+        subprocess.check_call(args)\r
+\r
+    if tcl:\r
+        enter(TCL_DIR)\r
+        def nmake_tcl(*a):\r
+            nmake("makefile.vc", *a)\r
+        if clean:\r
+            nmake_tcl("clean")\r
+        elif install:\r
+            nmake_tcl("install", "INSTALLDIR=" + OUT_DIR)\r
+        else:\r
+            nmake_tcl()\r
+\r
+    if tk:\r
+        enter(TK_DIR)\r
+        def nmake_tk(*a):\r
+            nmake("makefile.vc", "TCLDIR=" + TCL_DIR, *a)\r
+        if clean:\r
+            nmake_tk("clean")\r
+        elif install:\r
+            nmake_tk("install", "INSTALLDIR=" + OUT_DIR)\r
+        else:\r
+            nmake_tk()\r
+\r
+    if tix:\r
+        enter(TIX_DIR)\r
+        def nmake_tix(*a):\r
+            nmake("python.mak",\r
+                  "TCL_MAJOR=%d" % TCL_MAJOR,\r
+                  "TCL_MINOR=%d" % TCL_MINOR,\r
+                  "TCL_PATCH=%d" % TCL_PATCH,\r
+                  "MACHINE=IX86", *a)\r
+        if clean:\r
+            nmake_tix("clean")\r
+        elif install:\r
+            nmake_tix("install", "INSTALL_DIR=" + OUT_DIR)\r
+        else:\r
+            nmake_tix()\r
+\r
+if __name__ == '__main__':\r
+    main()\r
index b7e8783bd32a3e7fa9921e521d8d56c84092279a..5f4b9dba5f2f66620bb4089c00ff9746be185c8c 100644 (file)
@@ -64,18 +64,25 @@ unpack into new subdirectories of dist\.
 
 _tkinter
     Python wrapper for the Tk windowing system.  Requires building
-    Tcl/Tk first.  Following are instructions for Tcl/Tk 8.4.12.
+    Tcl/Tk first.  Following are instructions for Tcl/Tk 8.5.2.
 
     Get source
     ----------
     In the dist directory, run
-    svn export http://svn.python.org/projects/external/tcl8.4.12
-    svn export http://svn.python.org/projects/external/tk8.4.12
-    svn export http://svn.python.org/projects/external/tix-8.4.0
+    svn export http://svn.python.org/projects/external/tcl-8.5.2.1 tcl8.5.2
+    svn export http://svn.python.org/projects/external/tk-8.5.2.0 tk8.5.2
+    svn export http://svn.python.org/projects/external/tix-8.4.3.1 tix8.4.3
+
+    Debug Build
+    -----------
+    To build debug version, add DEBUG=1 to all nmake call bellow.
 
     Build Tcl first (done here w/ MSVC 6 on Win2K)
     ---------------
-    cd dist\tcl8.4.12\win
+    If your environment doesn't have struct _stat64, you need to apply
+    tcl852.patch in this directory to dist\tcl8.5.2\generic\tcl.h.
+
+    cd dist\tcl8.5.2\win
     run vcvars32.bat
     nmake -f makefile.vc
     nmake -f makefile.vc INSTALLDIR=..\..\tcltk install
@@ -85,16 +92,16 @@ _tkinter
     Optional:  run tests, via
         nmake -f makefile.vc test
 
-        all.tcl:        Total   10835   Passed  10096   Skipped 732     Failed  7
-        Sourced 129 Test Files.
-        Files with failing tests: exec.test expr.test io.test main.test string.test stri
+        all.tcl:        Total   24242   Passed  23358   Skipped 877     Failed  7
+        Sourced 137 Test Files.
+        Files with failing tests: exec.test http.test io.test main.test string.test stri
         ngObj.test
 
     Build Tk
     --------
-    cd dist\tk8.4.12\win
-    nmake -f makefile.vc TCLDIR=..\..\tcl8.4.12
-    nmake -f makefile.vc TCLDIR=..\..\tcl8.4.12 INSTALLDIR=..\..\tcltk install
+    cd dist\tk8.5.2\win
+    nmake -f makefile.vc TCLDIR=..\..\tcl8.5.2
+    nmake -f makefile.vc TCLDIR=..\..\tcl8.5.2 INSTALLDIR=..\..\tcltk install
 
     XXX Should we compile with OPTS=threads?
 
@@ -102,11 +109,11 @@ _tkinter
     XXX failed.  It popped up tons of little windows, and did lots of
     XXX stuff, and nothing blew up.
 
-   Built Tix
-   ---------
-   cd dist\tix-8.4.0\win
-   nmake -f python.mak
-   nmake -f python.mak install
+    Build Tix
+    ---------
+    cd dist\tix8.4.3\win
+    nmake -f python.mak TCL_MAJOR=8 TCL_MINOR=5 TCL_PATCH=2 MACHINE=IX86 DEBUG=0
+    nmake -f python.mak TCL_MAJOR=8 TCL_MINOR=5 TCL_PATCH=2 MACHINE=IX86 DEBUG=0 INSTALL_DIR=..\..\tcltk install
 
 bz2
     Python wrapper for the libbz2 compression library.  Homepage
diff --git a/PC/VC6/tcl852.patch b/PC/VC6/tcl852.patch
new file mode 100644 (file)
index 0000000..b8071e4
--- /dev/null
@@ -0,0 +1,22 @@
+--- tcl8.5.2\generic\tcl.h     Fri Jun 13 03:35:39 2008\r
++++ tcl8.5.2\generic\tcl.h     Sun Jan  4 16:52:30 2009\r
+@@ -367,7 +367,7 @@\r
+ typedef struct stati64 Tcl_StatBuf;\r
+ #         define TCL_LL_MODIFIER      "L"\r
+ #      else /* __BORLANDC__ */\r
+-#         if _MSC_VER < 1400 && !defined(_M_IX86)\r
++#         if _MSC_VER < 1400 /*&& !defined(_M_IX86)*/\r
+ typedef struct _stati64       Tcl_StatBuf;\r
+ #         else\r
+ typedef struct _stat64        Tcl_StatBuf;\r
+--- tcl8.5.2\generic\tcl.h     Fri Jun 13 03:35:39 2008\r
++++ tcl8.5.2\generic\tcl.h     Sun Jan  4 16:52:30 2009\r
+@@ -367,7 +367,7 @@\r
+ typedef struct stati64 Tcl_StatBuf;\r
+ #         define TCL_LL_MODIFIER      "L"\r
+ #      else /* __BORLANDC__ */\r
+-#         if _MSC_VER < 1400 && !defined(_M_IX86)\r
++#         if _MSC_VER < 1400 /*&& !defined(_M_IX86)*/\r
+ typedef struct _stati64       Tcl_StatBuf;\r
+ #         else\r
+ typedef struct _stat64        Tcl_StatBuf;\r