mattip committed b8f8ed2

Package Tkinter runtime, update documentation to reflect "standard practice"

  • Participants
  • Parent commits a7edf60
  • Branches windows-packaging

Comments (0)

Files changed (2)

 Then expand it into the base directory (base_dir) and modify your environment to reflect this::
-    set PATH=<base_dir>\bin;%PATH%
-    set INCLUDE=<base_dir>\include;%INCLUDE%
-    set LIB=<base_dir>\lib;%LIB%
+    set PATH=<base_dir>\bin;<base_dir>\tcltk\bin;%PATH%
+    set INCLUDE=<base_dir>\include;<base_dir>\tcltk\include;%INCLUDE%
+    set LIB=<base_dir>\lib;<base_dir>\tcltk\lib;%LIB%
-Now you should be good to go. Read on for more information. Note that much of this is taken from
-the build process for version 2.7 
-( and
- ), and can be run automagically
-    cd <base_dir>
-    nmake -F <pypy-checkout>\pypy\tool\ all
+Now you should be good to go. Read on for more information. 
 The Boehm garbage collector
 TkInter module support
+Note that much of this is taken from the cpython build process.
+Tkinter is imported via cffi, so the module is optional. To recreate the tcltk
+directory found for the release script, create the dlls, libs, headers and
+runtime by running::
-    svn export
-    svn export
+	svn export tcl85 
+	svn export tk85
+	cd tcl85\win 
+	nmake -f COMPILERFLAGS=-DWINVER=0x0500 DEBUG=0 INSTALLDIR=..\..\tcltk clean all 
+	nmake -f DEBUG=0 INSTALLDIR=..\..\tcltk install
+	cd ..\..\tk85\win 
+	nmake -f COMPILERFLAGS=-DWINVER=0x0500 OPTS=noxp DEBUG=1 INSTALLDIR=..\..\tcltk TCLDIR=..\..\tcl85 clean all 
+	nmake -f COMPILERFLAGS=-DWINVER=0x0500 OPTS=noxp DEBUG=1 INSTALLDIR=..\..\tcltk TCLDIR=..\..\tcl85 install
+Now you should have a tcktk\bin, tcltk\lib, and tcltk\include directory ready
+for use. The release packaging script will pick up the tcltk runtime in the lib
+directory and put it in the archive.
 Using the mingw compiler


 add --without-tk option to skip packaging binary CFFI extension."""
         #Can the dependencies be found from cffi somehow?    
-        win_extras += ['tk85t.dll', 'tk85.dll', 'tcl85t.dll', 'tcl85.dll']    
+        win_extras += ['tcl85.dll', 'tk85.dll']    
     if sys.platform == 'win32' and not rename_pypy_c.lower().endswith('.exe'):
         rename_pypy_c += '.exe'
     binaries = [(pypy_c, rename_pypy_c)]
             # XXX users will complain that they cannot compile cpyext
             # modules for windows, has the lib moved or are there no
             # exported functions in the dll so no import library is created?
+        if not withouttk:
+            try:
+                p = pypy_c.dirpath().join('tck85.dll')
+                if not p.check():
+                    p = py.path.local.sysfind(extra)
+                tktcldir = p.dirpath().join('..').join('tcltk').join('_lib')
+                shutil.copytree(str(tktcldir), str(pypydir.join('tcl')))
+            except WindowsError:
+                print >>sys.stderr, """Packaging Tk runtime failed.
+tk85.dll and tcl85.dll found, expecting to find runtime in ..\\tcktk\\lib
+directory next to the dlls, as per build instructions."""
+                import traceback;traceback.print_exc()
+                sys.exit(1)
     # Careful: to copy lib_pypy, copying just the hg-tracked files
     # would not be enough: there are also ctypes_config_cache/_*