Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
RF: remove build-time check of Tkinter
We don't need Tkinter at build time.

We could move this Tkinter version check to
`matplotlib/backends/tkagg.py` as a run-time check, but it's very
unlikely that any Python we support would be linked against Tcl / Tk <
8.4.  For example, the Python 2.5 Python.org OSX install links against
Tcl / Tk 8.5, and the default Tcl / Tk on CentOS 5.11 is 8.4.
  • Loading branch information
matthew-brett committed May 23, 2016
commit 626a1d276463faadc0268722335db093531d8efd
22 changes: 1 addition & 21 deletions setupext.py
Original file line number Diff line number Diff line change
Expand Up @@ -1525,28 +1525,8 @@ class BackendTkAgg(OptionalBackendPackage):
name = "tkagg"

def check_requirements(self):
try:
if PY3min:
import tkinter as Tkinter
else:
import Tkinter
except ImportError:
raise CheckFailed('TKAgg requires Tkinter.')
except RuntimeError:
raise CheckFailed('Tkinter present but import failed.')
else:
if Tkinter.TkVersion < 8.3:
raise CheckFailed("Tcl/Tk v8.3 or later required.")

try:
tk_v = Tkinter.__version__.split()[-2]
except (AttributeError, IndexError):
# Tkinter.__version__ has been removed in python 3
tk_v = 'not identified'

BackendAgg.force = True

return "version %s" % tk_v
return ""

def get_extension(self):
sources = [
Expand Down