diff options
author | Matti Picus <matti.picus@gmail.com> | 2019-12-23 17:32:26 +0200 |
---|---|---|
committer | Matti Picus <matti.picus@gmail.com> | 2019-12-23 17:32:26 +0200 |
commit | 05799c544451f6e9fdee9b7a3be15204b00c489d (patch) | |
tree | 584914942c191756c7c4662ada02b12b5194bcb8 | |
parent | merge default into release (diff) | |
parent | add tcl8, tk8 to bundle; make sure so is writable (diff) | |
download | pypy-05799c544451f6e9fdee9b7a3be15204b00c489d.tar.gz pypy-05799c544451f6e9fdee9b7a3be15204b00c489d.tar.bz2 pypy-05799c544451f6e9fdee9b7a3be15204b00c489d.zip |
merge default into releaserelease-pypy2.7-v7.3.0rc4release-pypy2.7-v7.3.0
-rw-r--r-- | .hgtags | 5 | ||||
-rw-r--r-- | lib_pypy/_tkinter/app.py | 10 | ||||
-rw-r--r-- | pypy/tool/release/make_portable.py | 8 |
3 files changed, 21 insertions, 2 deletions
@@ -61,3 +61,8 @@ e6471221abc16f4584a07fbfeece7ebcaeb7fc38 release-pypy2.7-v7.3.0rc1 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 index 55bb99da3f..d54447844a 100644 --- a/lib_pypy/_tkinter/app.py +++ b/lib_pypy/_tkinter/app.py @@ -32,6 +32,16 @@ def varname_converter(input): 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 index 29a50d4eb7..59d3022806 100644 --- 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 @@ def rpath_binaries(binaries): 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 @@ def make_portable(): 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) |