Skip to content

Commit

Permalink
Merge pull request #5226 from radarhere/tk_version
Browse files Browse the repository at this point in the history
Added tk version to pilinfo
  • Loading branch information
hugovk committed Jan 26, 2021
2 parents baaa298 + bf7635a commit fd578a0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/reference/features.rst
Expand Up @@ -17,7 +17,7 @@ Modules
Support for the following modules can be checked:

* ``pil``: The Pillow core module, required for all functionality.
* ``tkinter``: Tkinter support. Version number not available.
* ``tkinter``: Tkinter support.
* ``freetype2``: FreeType font support via :py:func:`PIL.ImageFont.truetype`.
* ``littlecms2``: LittleCMS 2 support via :py:mod:`PIL.ImageCms`.
* ``webp``: WebP image support.
Expand Down
3 changes: 3 additions & 0 deletions src/PIL/_tkinter_finder.py
@@ -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)
2 changes: 1 addition & 1 deletion src/PIL/features.py
Expand Up @@ -9,7 +9,7 @@

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"),
Expand Down

0 comments on commit fd578a0

Please sign in to comment.