Added tk version

This commit is contained in:
Andrew Murray 2021-01-26 08:01:26 +11:00
parent baaa298e00
commit cf98f178ad
2 changed files with 4 additions and 1 deletions

View File

@ -1,9 +1,12 @@
""" Find compiled module linking to Tcl / Tk libraries
"""
import sys
import tkinter
from tkinter import _tkinter as tk
if hasattr(sys, "pypy_find_executable"):
TKINTER_LIB = tk.tklib_cffi.__file__
else:
TKINTER_LIB = tk.__file__
tk_version = str(tkinter.TkVersion)

View File

@ -9,7 +9,7 @@ from . import Image
modules = {
"pil": ("PIL._imaging", "PILLOW_VERSION"),
"tkinter": ("PIL._tkinter_finder", None),
"tkinter": ("PIL._tkinter_finder", "tk_version"),
"freetype2": ("PIL._imagingft", "freetype2_version"),
"littlecms2": ("PIL._imagingcms", "littlecms_version"),
"webp": ("PIL._webp", "webpdecoder_version"),