[pypy-commit] pypy py3.6: merge default into py3.6

mattip pypy.commits at gmail.com
Mon Dec 23 05:48:06 EST 2019


Author: Matti Picus <matti.picus at gmail.com>
Branch: py3.6
Changeset: r98355:bad589e6fe76
Date: 2019-12-23 12:46 +0200
http://bitbucket.org/pypy/pypy/changeset/bad589e6fe76/

Log:	merge default into py3.6

diff --git a/.hgtags b/.hgtags
--- a/.hgtags
+++ b/.hgtags
@@ -61,3 +61,8 @@
 533398cfd64e5146a07c4824e90a1b629c8b6523 release-pypy3.6-v7.3.0rc1
 285307a0f5a77ffa46781b5c54c52eb1c385081d release-pypy2.7-v7.3.0rc2
 008914050baeedb6d3ca30fe26ef43b78bb63841 release-pypy3.6-v7.3.0rc2
+c124c11a5921bf12797b08a696753a12ae82595a release-pypy3.6-v7.2.0rc3
+e7e02dccbd8c14fa2d4880f6bd4c47362a8952f5 release-pypy3.6-v7.3.0rc3
+c124c11a5921bf12797b08a696753a12ae82595a release-pypy2.7-v7.3.0rc3
+c124c11a5921bf12797b08a696753a12ae82595a release-pypy3.6-v7.2.0rc3
+0000000000000000000000000000000000000000 release-pypy3.6-v7.2.0rc3
diff --git a/lib_pypy/_tkinter/app.py b/lib_pypy/_tkinter/app.py
--- a/lib_pypy/_tkinter/app.py
+++ b/lib_pypy/_tkinter/app.py
@@ -35,6 +35,16 @@
 
 
 def Tcl_AppInit(app):
+    # For portable builds, try to load a local version of the libraries
+    from os.path import join, dirname, exists
+    lib_path = join(dirname(dirname(dirname(__file__))), 'lib')
+    tcl_path = join(lib_path, 'tcl')
+    tk_path = join(lib_path, 'tk')
+    if exists(tcl_path):
+        tklib.Tcl_Eval(app.interp, 'set tcl_library "{0}"'.format(tcl_path).encode('utf-8'))
+    if exists(tk_path):    
+        tklib.Tcl_Eval(app.interp, 'set tk_library "{0}"'.format(tk_path).encode('utf-8'))
+
     if tklib.Tcl_Init(app.interp) == tklib.TCL_ERROR:
         app.raiseTclError()
     skip_tk_init = tklib.Tcl_GetVar(
diff --git a/pypy/tool/release/make_portable.py b/pypy/tool/release/make_portable.py
--- a/pypy/tool/release/make_portable.py
+++ b/pypy/tool/release/make_portable.py
@@ -1,11 +1,11 @@
 #!/usr/bin/env python
 
-bundle = ['sqlite3', 'ssl', 'crypto', 'ffi', 'expat', 'tcl', 'tk', 'gdbm',
+bundle = ['sqlite3', 'ssl', 'crypto', 'ffi', 'expat', 'tcl8', 'tk8', 'gdbm',
           'lzma', 'tinfo', 'tinfow', 'ncursesw', 'panelw', 'ncurses', 'panel', 'panelw']
 
 import os
 from os.path import dirname, relpath, join, exists, basename, realpath
-from shutil import copy2
+from shutil import copy2, copytree
 import sys
 from glob import glob
 from subprocess import check_output, check_call
@@ -62,6 +62,7 @@
     rpaths = {}
 
     for binary in binaries:
+        check_call(['chmod', 'a+w', binary])
         rpath = join('$ORIGIN', relpath('lib', dirname(binary)))
         check_call(['patchelf', '--set-rpath', rpath, binary])
 
@@ -85,6 +86,9 @@
     for path, item in copied.items():
         print('Copied {0} to {1}'.format(path, item))
 
+    copytree('/usr/share/tcl8.5', 'lib/tcl')
+    copytree('/usr/share/tk8.5', 'lib/tk')
+
     binaries.extend(copied.values())
 
     rpaths = rpath_binaries(binaries)


More information about the pypy-commit mailing list