2016-05-29 10:29:01 +03:00
|
|
|
""" Find compiled module linking to Tcl / Tk libraries
|
|
|
|
"""
|
|
|
|
import sys
|
2021-01-26 00:01:26 +03:00
|
|
|
import tkinter
|
2021-01-26 10:14:28 +03:00
|
|
|
import warnings
|
2019-09-26 15:12:28 +03:00
|
|
|
from tkinter import _tkinter as tk
|
2016-05-29 10:29:01 +03:00
|
|
|
|
2019-03-21 16:28:20 +03:00
|
|
|
if hasattr(sys, "pypy_find_executable"):
|
2020-06-30 21:39:07 +03:00
|
|
|
TKINTER_LIB = tk.tklib_cffi.__file__
|
2016-05-29 10:29:01 +03:00
|
|
|
else:
|
|
|
|
TKINTER_LIB = tk.__file__
|
2021-01-26 00:01:26 +03:00
|
|
|
|
|
|
|
tk_version = str(tkinter.TkVersion)
|
2021-01-26 10:14:28 +03:00
|
|
|
if tk_version == "8.4":
|
|
|
|
warnings.warn(
|
|
|
|
"Support for Tk/Tcl 8.4 is deprecated and will be removed"
|
2021-10-18 15:48:49 +03:00
|
|
|
" in Pillow 10 (2023-07-01). Please upgrade to Tk/Tcl 8.5 "
|
2021-01-26 10:14:28 +03:00
|
|
|
"or newer.",
|
|
|
|
DeprecationWarning,
|
|
|
|
)
|