Commits

mattip  committed 9b96836

add dlls for Tkinter

  • Participants
  • Parent commits 9c9132e
  • Branches windows-packaging

Comments (0)

Files changed (3)

File lib_pypy/_tkinter/tklib.py

     incdirs = ['/usr/local/include/tcl8.5', '/usr/local/include/tk8.5', '/usr/X11R6/include']
     linklibs = ['tk85', 'tcl85']
     libdirs = ['/usr/local/lib', '/usr/X11R6/lib']
+elif sys.platform == 'win32':
+    incdirs = []
+    linklibs = ['tcl85', 'tk85']
+    libdirs = []
 else:
     incdirs=['/usr/include/tcl']
     linklibs=['tcl', 'tk']

File pypy/doc/windows.rst

     ms\do_ms.bat
     nmake -f ms\nt.mak install
 
+TkInter module support
+~~~~~~~~~~~~~~~~~~~~~~
+
+Download tcl from http:://http://www.tcl.tk/software/tcltk/download.html
+Extract tcl85. cd into the ``win`` directory and compile::
+
+    nmake -nologo -f makefile.vc release OPTS=symbols,threads
+
+Download tcl from http:://http://www.tcl.tk/software/tcltk/download.html
+Extract tcl85. cd into the ``win`` directory and compile::
+
+    set TCLDIR=<tcl85_dir>
+    nmake -nologo -f makefile.vc release OPTS=symbols,threads
+
+
 Using the mingw compiler
 ------------------------
 

File pypy/tool/release/package.py

             raise PyPyCNotFound(
                 'Bogus path: %r does not exist (see docstring for more info)'
                 % (os.path.dirname(str(pypy_c)),))
+    win_extras = ['libpypy-c.dll', 'libexpat.dll', 'sqlite3.dll',
+                      'libeay32.dll', 'ssleay32.dll']
     subprocess.check_call([str(pypy_c), '-c', 'import _sqlite3'])
     if not sys.platform == 'win32':
         subprocess.check_call([str(pypy_c), '-c', 'import _curses'])
         subprocess.check_call([str(pypy_c), '-c', 'import syslog'])
-        if not withouttk:
-            try:
-                subprocess.check_call([str(pypy_c), '-c', 'import _tkinter'])
-            except subprocess.CalledProcessError:
-                print >>sys.stderr, """Building Tk bindings failed.
+    if not withouttk:
+        try:
+            subprocess.check_call([str(pypy_c), '-c', 'import _tkinter'])
+        except subprocess.CalledProcessError:
+            print >>sys.stderr, """Building Tk bindings failed.
 You can either install Tk development headers package or
 add --without-tk option to skip packaging binary CFFI extension."""
-                sys.exit(1)
+            sys.exit(1)
+        #Can the dependencies be found from cffi somehow?    
+        win_extras += ['tk85t.dll', 'tk85.dll', 'tcl85t.dll', 'tcl85.dll']    
     if sys.platform == 'win32' and not rename_pypy_c.lower().endswith('.exe'):
         rename_pypy_c += '.exe'
     binaries = [(pypy_c, rename_pypy_c)]
 
         # Can't rename a DLL: it is always called 'libpypy-c.dll'
 
-        for extra in ['libpypy-c.dll',
-                      'libexpat.dll', 'sqlite3.dll',
-                      'libeay32.dll', 'ssleay32.dll']:
+        for extra in win_extras:
             p = pypy_c.dirpath().join(extra)
             if not p.check():
                 p = py.path.local.sysfind(extra)