Author: Armin Rigo <[email protected]>
Branch: release-2.2.x
Changeset: r68207:1567dba349e6
Date: 2013-11-18 12:14 +0100
http://bitbucket.org/pypy/pypy/changeset/1567dba349e6/
Log: Merge the non-doc parts of the 'windows-packaging' branch here.
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/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 += ['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)]
@@ -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)
@@ -122,6 +124,19 @@
# 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('tcl85.dll')
+ if not p.check():
+ p = py.path.local.sysfind('tcl85.dll')
+ tktcldir = p.dirpath().join('..').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 ..\\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/_*_cache.py.
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit