[pypy-commit] pypy windows-packaging: add dlls for Tkinter

mattip noreply at buildbot.pypy.org
Tue Nov 12 23:46:07 CET 2013


Author: Matti Picus <matti.picus at gmail.com>
Branch: windows-packaging
Changeset: r67996:9b968361f205
Date: 2013-11-13 00:41 +0200
http://bitbucket.org/pypy/pypy/changeset/9b968361f205/

Log:	add dlls for Tkinter

diff --git a/lib_pypy/_tkinter/tklib.py b/lib_pypy/_tkinter/tklib.py
--- a/lib_pypy/_tkinter/tklib.py
+++ b/lib_pypy/_tkinter/tklib.py
@@ -112,6 +112,10 @@
     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']
diff --git a/pypy/doc/windows.rst b/pypy/doc/windows.rst
--- a/pypy/doc/windows.rst
+++ b/pypy/doc/windows.rst
@@ -157,6 +157,21 @@
     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
 ------------------------
 
diff --git a/pypy/tool/release/package.py b/pypy/tool/release/package.py
--- a/pypy/tool/release/package.py
+++ b/pypy/tool/release/package.py
@@ -67,18 +67,22 @@
             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)]
@@ -101,9 +105,7 @@
 
         # 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)


More information about the pypy-commit mailing list