-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
RF: run-time loading of Tcl / Tk functions #1932
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RF: run-time loading of Tcl / Tk functions #1932
Conversation
398e673 to
659e294
Compare
Discover Tcl / Tk functions at run-time by looking in libs loaded by Tkinter Python module. Use header excerpts from Tcl / Tk so we don't need an installed Tcl / Tk to build.
|
I've tested on OSX Python 2, 3; Linux Python 2, 3 and Windows Python 2. |
|
Changes Unknown when pulling 659e294 on matthew-brett:run-time-tcl-tk into * on python-pillow:master*. |
|
pypy builds failing - any suggestions what to do about these? |
Make sure that tkinter package is loaded before checking for symbols in process (Windows).
|
Changes Unknown when pulling 6968c0c on matthew-brett:run-time-tcl-tk into * on python-pillow:master*. |
|
Changes Unknown when pulling 746dd52 on matthew-brett:run-time-tcl-tk into * on python-pillow:master*. |
746dd52 to
6968c0c
Compare
|
I looked for a while, but I can't see any reasonable way of locating the built tkinter interface So, unless someone has a good idea, I think this approach doesn't work for pypi3. |
|
It's not too hard to solve this for PyPy 5.1 (Python 2 version, that has a recent https://groups.google.com/d/msg/python-cffi/gkPqq1u52E4/ReKJWJiPCgAJ Will you be supporting Python 3.2 for much longer? How about PyPy3 (which is an implementation of Python 3.2)? |
|
Changes Unknown when pulling 5b22239 on matthew-brett:run-time-tcl-tk into * on python-pillow:master*. |
5b22239 to
0385ac9
Compare
|
Changes Unknown when pulling 0385ac9 on matthew-brett:run-time-tcl-tk into * on python-pillow:master*. |
|
It looks like there hasn't been a pypy3 release in almost 2 years. I'm guessing that it's likely that the improvements from pypy will make it in on the next release, and then this will likely work. Is it possible that a newer version of cffi would be installable alongside pypy3? As for 3.2 support, I believe that there are still LTS distros where 3.2 is the python3 version. I'd rather not drop support for them without a good reason, though paring down the build matrix is something that might happen first. 3.2 is probably the first to go when it does, as it's the least like the others. |
0385ac9 to
03f3166
Compare
|
I think I've got this working for PyPy3 and other old PyPies. I've tested lots of PyPy and PyPy3 versions from https://bitbucket.org/pypy/pypy/downloads and the finder works for all versions that have a compiled tkinter. I'll check on the cffi mailing list that this is likely to work for future cffi versions. |
03f3166 to
7fb40a6
Compare
|
Changes Unknown when pulling 7fb40a6 on matthew-brett:run-time-tcl-tk into * on python-pillow:master*. |
Use imported module to find tkinter. Should find tkinter module for all available versions of PyPy that have tkinter compiled, as well as CPython.
7fb40a6 to
4bc75e4
Compare
|
Changes Unknown when pulling 4bc75e4 on matthew-brett:run-time-tcl-tk into * on python-pillow:master*. |
|
Tests all passing - from my point of view, this one is ready to merge. |
|
From discussion at https://groups.google.com/forum/#!msg/python-cffi/gkPqq1u52E4/ReKJWJiPCgAJ - algorithm for finding Tcl / Tk libraries should continue to work for future pypi versions. This branch also works with pypi3 5.2.0-alpha1 (released a few days ago). |
|
@cjrh @ddale @jakirkham -- Can you check this PR without using the |
Discover Tcl / Tk functions at run-time by looking in libs loaded by
Tkinter Python module.
Use header excerpts from Tcl / Tk so we don't need an installed Tcl / Tk
to build.