Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6c7e562

Browse files
author
Hirokazu Yamamoto
committed
Merged revisions 68468-68470 via svnmerge from
svn+ssh://[email protected]/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. ........
1 parent 5ec0959 commit 6c7e562

5 files changed

Lines changed: 130 additions & 20 deletions

File tree

Lib/tkinter/tix.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ def __init__ (self, master=None, widgetName=None,
293293
else:
294294
static_options = ['options']
295295

296-
for k,v in cnf.items()[:]:
296+
for k,v in list(cnf.items()):
297297
if k in static_options:
298298
extra = extra + ('-' + k, v)
299299
del cnf[k]
@@ -448,7 +448,7 @@ def destroy(self):
448448
# we must be careful not to destroy the frame widget since this
449449
# also destroys the parent NoteBook thus leading to an exception
450450
# in Tkinter when it finally calls Tcl to destroy the NoteBook
451-
for c in self.children.values(): c.destroy()
451+
for c in list(self.children.values()): c.destroy()
452452
if self._name in self.master.children:
453453
del self.master.children[self._name]
454454
if self._name in self.master.subwidget_list:

PC/VC6/_tkinter.dsp

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

PC/VC6/build_tkinter.py

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
import os
2+
import sys
3+
import subprocess
4+
5+
TCL_MAJOR = 8
6+
TCL_MINOR = 5
7+
TCL_PATCH = 2
8+
9+
TIX_MAJOR = 8
10+
TIX_MINOR = 4
11+
TIX_PATCH = 3
12+
13+
def abspath(name):
14+
par = os.path.pardir
15+
return os.path.abspath(os.path.join(__file__, par, par, par, par, name))
16+
17+
TCL_DIR = abspath("tcl%d.%d.%d" % (TCL_MAJOR, TCL_MINOR, TCL_PATCH))
18+
TK_DIR = abspath("tk%d.%d.%d" % (TCL_MAJOR, TCL_MINOR, TCL_PATCH))
19+
TIX_DIR = abspath("tix%d.%d.%d" % (TIX_MAJOR, TIX_MINOR, TIX_PATCH))
20+
OUT_DIR = abspath("tcltk")
21+
22+
def have_args(*a):
23+
return any(s in sys.argv[1:] for s in a)
24+
25+
def enter(dir):
26+
os.chdir(os.path.join(dir, "win"))
27+
28+
def main():
29+
debug = have_args("-d", "--debug")
30+
clean = have_args("clean")
31+
install = have_args("install")
32+
tcl = have_args("tcl")
33+
tk = have_args("tk")
34+
tix = have_args("tix")
35+
if not(tcl) and not(tk) and not(tix):
36+
tcl = tk = tix = True
37+
38+
def nmake(makefile, *a):
39+
args = ["nmake", "/nologo", "/f", makefile, "DEBUG=%d" % debug]
40+
args.extend(a)
41+
subprocess.check_call(args)
42+
43+
if tcl:
44+
enter(TCL_DIR)
45+
def nmake_tcl(*a):
46+
nmake("makefile.vc", *a)
47+
if clean:
48+
nmake_tcl("clean")
49+
elif install:
50+
nmake_tcl("install", "INSTALLDIR=" + OUT_DIR)
51+
else:
52+
nmake_tcl()
53+
54+
if tk:
55+
enter(TK_DIR)
56+
def nmake_tk(*a):
57+
nmake("makefile.vc", "TCLDIR=" + TCL_DIR, *a)
58+
if clean:
59+
nmake_tk("clean")
60+
elif install:
61+
nmake_tk("install", "INSTALLDIR=" + OUT_DIR)
62+
else:
63+
nmake_tk()
64+
65+
if tix:
66+
enter(TIX_DIR)
67+
def nmake_tix(*a):
68+
nmake("python.mak",
69+
"TCL_MAJOR=%d" % TCL_MAJOR,
70+
"TCL_MINOR=%d" % TCL_MINOR,
71+
"TCL_PATCH=%d" % TCL_PATCH,
72+
"MACHINE=IX86", *a)
73+
if clean:
74+
nmake_tix("clean")
75+
elif install:
76+
nmake_tix("install", "INSTALL_DIR=" + OUT_DIR)
77+
else:
78+
nmake_tix()
79+
80+
if __name__ == '__main__':
81+
main()

PC/VC6/readme.txt

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -64,18 +64,25 @@ unpack into new subdirectories of dist\.
6464

6565
_tkinter
6666
Python wrapper for the Tk windowing system. Requires building
67-
Tcl/Tk first. Following are instructions for Tcl/Tk 8.4.12.
67+
Tcl/Tk first. Following are instructions for Tcl/Tk 8.5.2.
6868

6969
Get source
7070
----------
7171
In the dist directory, run
72-
svn export http://svn.python.org/projects/external/tcl8.4.12
73-
svn export http://svn.python.org/projects/external/tk8.4.12
74-
svn export http://svn.python.org/projects/external/tix-8.4.0
72+
svn export http://svn.python.org/projects/external/tcl-8.5.2.1 tcl8.5.2
73+
svn export http://svn.python.org/projects/external/tk-8.5.2.0 tk8.5.2
74+
svn export http://svn.python.org/projects/external/tix-8.4.3.1 tix8.4.3
75+
76+
Debug Build
77+
-----------
78+
To build debug version, add DEBUG=1 to all nmake call bellow.
7579

7680
Build Tcl first (done here w/ MSVC 6 on Win2K)
7781
---------------
78-
cd dist\tcl8.4.12\win
82+
If your environment doesn't have struct _stat64, you need to apply
83+
tcl852.patch in this directory to dist\tcl8.5.2\generic\tcl.h.
84+
85+
cd dist\tcl8.5.2\win
7986
run vcvars32.bat
8087
nmake -f makefile.vc
8188
nmake -f makefile.vc INSTALLDIR=..\..\tcltk install
@@ -85,28 +92,28 @@ _tkinter
8592
Optional: run tests, via
8693
nmake -f makefile.vc test
8794

88-
all.tcl: Total 10835 Passed 10096 Skipped 732 Failed 7
89-
Sourced 129 Test Files.
90-
Files with failing tests: exec.test expr.test io.test main.test string.test stri
95+
all.tcl: Total 24242 Passed 23358 Skipped 877 Failed 7
96+
Sourced 137 Test Files.
97+
Files with failing tests: exec.test http.test io.test main.test string.test stri
9198
ngObj.test
9299

93100
Build Tk
94101
--------
95-
cd dist\tk8.4.12\win
96-
nmake -f makefile.vc TCLDIR=..\..\tcl8.4.12
97-
nmake -f makefile.vc TCLDIR=..\..\tcl8.4.12 INSTALLDIR=..\..\tcltk install
102+
cd dist\tk8.5.2\win
103+
nmake -f makefile.vc TCLDIR=..\..\tcl8.5.2
104+
nmake -f makefile.vc TCLDIR=..\..\tcl8.5.2 INSTALLDIR=..\..\tcltk install
98105

99106
XXX Should we compile with OPTS=threads?
100107

101108
XXX I have no idea whether "nmake -f makefile.vc test" passed or
102109
XXX failed. It popped up tons of little windows, and did lots of
103110
XXX stuff, and nothing blew up.
104111

105-
Built Tix
106-
---------
107-
cd dist\tix-8.4.0\win
108-
nmake -f python.mak
109-
nmake -f python.mak install
112+
Build Tix
113+
---------
114+
cd dist\tix8.4.3\win
115+
nmake -f python.mak TCL_MAJOR=8 TCL_MINOR=5 TCL_PATCH=2 MACHINE=IX86 DEBUG=0
116+
nmake -f python.mak TCL_MAJOR=8 TCL_MINOR=5 TCL_PATCH=2 MACHINE=IX86 DEBUG=0 INSTALL_DIR=..\..\tcltk install
110117

111118
bz2
112119
Python wrapper for the libbz2 compression library. Homepage

PC/VC6/tcl852.patch

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
--- tcl8.5.2\generic\tcl.h Fri Jun 13 03:35:39 2008
2+
+++ tcl8.5.2\generic\tcl.h Sun Jan 4 16:52:30 2009
3+
@@ -367,7 +367,7 @@
4+
typedef struct stati64 Tcl_StatBuf;
5+
# define TCL_LL_MODIFIER "L"
6+
# else /* __BORLANDC__ */
7+
-# if _MSC_VER < 1400 && !defined(_M_IX86)
8+
+# if _MSC_VER < 1400 /*&& !defined(_M_IX86)*/
9+
typedef struct _stati64 Tcl_StatBuf;
10+
# else
11+
typedef struct _stat64 Tcl_StatBuf;
12+
--- tcl8.5.2\generic\tcl.h Fri Jun 13 03:35:39 2008
13+
+++ tcl8.5.2\generic\tcl.h Sun Jan 4 16:52:30 2009
14+
@@ -367,7 +367,7 @@
15+
typedef struct stati64 Tcl_StatBuf;
16+
# define TCL_LL_MODIFIER "L"
17+
# else /* __BORLANDC__ */
18+
-# if _MSC_VER < 1400 && !defined(_M_IX86)
19+
+# if _MSC_VER < 1400 /*&& !defined(_M_IX86)*/
20+
typedef struct _stati64 Tcl_StatBuf;
21+
# else
22+
typedef struct _stat64 Tcl_StatBuf;

0 commit comments

Comments
 (0)