diff options
author | Hirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp> | 2009-01-10 11:48:27 (GMT) |
---|---|---|
committer | Hirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp> | 2009-01-10 11:48:27 (GMT) |
commit | 6c7e56231093f3554df0fd1bc09906f5100f5633 (patch) | |
tree | 2894fd09e3fdda79d301699dd094d4714b3f76be /PC/VC6/build_tkinter.py | |
parent | 5ec09599469fecf810e95a044e44f407d13b4bb6 (diff) | |
download | cpython-6c7e56231093f3554df0fd1bc09906f5100f5633.zip cpython-6c7e56231093f3554df0fd1bc09906f5100f5633.tar.gz cpython-6c7e56231093f3554df0fd1bc09906f5100f5633.tar.bz2 |
Merged revisions 68468-68470 via svnmerge from
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.
........
Diffstat (limited to 'PC/VC6/build_tkinter.py')
-rw-r--r-- | PC/VC6/build_tkinter.py | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/PC/VC6/build_tkinter.py b/PC/VC6/build_tkinter.py new file mode 100644 index 0000000..f2e3c41 --- /dev/null +++ b/PC/VC6/build_tkinter.py @@ -0,0 +1,81 @@ +import os
+import sys
+import subprocess
+
+TCL_MAJOR = 8
+TCL_MINOR = 5
+TCL_PATCH = 2
+
+TIX_MAJOR = 8
+TIX_MINOR = 4
+TIX_PATCH = 3
+
+def abspath(name):
+ par = os.path.pardir
+ return os.path.abspath(os.path.join(__file__, par, par, par, par, name))
+
+TCL_DIR = abspath("tcl%d.%d.%d" % (TCL_MAJOR, TCL_MINOR, TCL_PATCH))
+TK_DIR = abspath("tk%d.%d.%d" % (TCL_MAJOR, TCL_MINOR, TCL_PATCH))
+TIX_DIR = abspath("tix%d.%d.%d" % (TIX_MAJOR, TIX_MINOR, TIX_PATCH))
+OUT_DIR = abspath("tcltk")
+
+def have_args(*a):
+ return any(s in sys.argv[1:] for s in a)
+
+def enter(dir):
+ os.chdir(os.path.join(dir, "win"))
+
+def main():
+ debug = have_args("-d", "--debug")
+ clean = have_args("clean")
+ install = have_args("install")
+ tcl = have_args("tcl")
+ tk = have_args("tk")
+ tix = have_args("tix")
+ if not(tcl) and not(tk) and not(tix):
+ tcl = tk = tix = True
+
+ def nmake(makefile, *a):
+ args = ["nmake", "/nologo", "/f", makefile, "DEBUG=%d" % debug]
+ args.extend(a)
+ subprocess.check_call(args)
+
+ if tcl:
+ enter(TCL_DIR)
+ def nmake_tcl(*a):
+ nmake("makefile.vc", *a)
+ if clean:
+ nmake_tcl("clean")
+ elif install:
+ nmake_tcl("install", "INSTALLDIR=" + OUT_DIR)
+ else:
+ nmake_tcl()
+
+ if tk:
+ enter(TK_DIR)
+ def nmake_tk(*a):
+ nmake("makefile.vc", "TCLDIR=" + TCL_DIR, *a)
+ if clean:
+ nmake_tk("clean")
+ elif install:
+ nmake_tk("install", "INSTALLDIR=" + OUT_DIR)
+ else:
+ nmake_tk()
+
+ if tix:
+ enter(TIX_DIR)
+ def nmake_tix(*a):
+ nmake("python.mak",
+ "TCL_MAJOR=%d" % TCL_MAJOR,
+ "TCL_MINOR=%d" % TCL_MINOR,
+ "TCL_PATCH=%d" % TCL_PATCH,
+ "MACHINE=IX86", *a)
+ if clean:
+ nmake_tix("clean")
+ elif install:
+ nmake_tix("install", "INSTALL_DIR=" + OUT_DIR)
+ else:
+ nmake_tix()
+
+if __name__ == '__main__':
+ main()
|