$NetBSD: patch-ab,v 1.7 2011/01/03 12:17:31 adam Exp $ --- setup.py.orig 2009-11-15 17:06:10.000000000 +0100 +++ setup.py @@ -86,10 +86,7 @@ from distutils import sysconfig from distutils.core import Extension, setup from distutils.command.build_ext import build_ext -try: - import _tkinter -except ImportError: - _tkinter = None +_tkinter = None def add_directory(path, dir, where=None): if dir and os.path.isdir(dir) and dir not in path: @@ -331,7 +328,7 @@ class pil_build_ext(build_ext): "_imagingcms", ["_imagingcms.c"], libraries=["lcms"] + extra )) - if sys.platform == "darwin": + if _tkinter and sys.platform == "darwin": # locate Tcl/Tk frameworks frameworks = [] framework_roots = [ @@ -481,7 +478,7 @@ if __name__ == "__main__": package_dir={"": "PIL"}, packages=[""], platforms="Python 1.5.2 and later.", - scripts = glob.glob("Scripts/pil*.py"), +# scripts = glob.glob("Scripts/pil*.py"), url=HOMEPAGE, version=VERSION, )