f394698114
failing detection on SLES11.
69 lines
2.5 KiB
Text
69 lines
2.5 KiB
Text
$NetBSD: patch-ab,v 1.8 2014/12/17 15:22:44 joerg 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:
|
|
@@ -228,20 +225,9 @@ class pil_build_ext(build_ext):
|
|
zlib = jpeg = tiff = freetype = tcl = tk = lcms = None
|
|
feature = feature()
|
|
|
|
- if find_include_file(self, "zlib.h"):
|
|
- if find_library_file(self, "z"):
|
|
- feature.zlib = "z"
|
|
- elif sys.platform == "win32" and find_library_file(self, "zlib"):
|
|
- feature.zlib = "zlib" # alternative name
|
|
-
|
|
- if find_include_file(self, "jpeglib.h"):
|
|
- if find_library_file(self, "jpeg"):
|
|
- feature.jpeg = "jpeg"
|
|
- elif sys.platform == "win32" and find_library_file(self, "libjpeg"):
|
|
- feature.jpeg = "libjpeg" # alternative name
|
|
-
|
|
- if find_library_file(self, "tiff"):
|
|
- feature.tiff = "tiff"
|
|
+ feature.zlib = "z"
|
|
+ feature.jpeg = "jpeg"
|
|
+ feature.tiff = "tiff"
|
|
|
|
if find_library_file(self, "freetype"):
|
|
# look for freetype2 include files
|
|
@@ -264,9 +250,7 @@ class pil_build_ext(build_ext):
|
|
if dir:
|
|
add_directory(self.compiler.include_dirs, dir, 0)
|
|
|
|
- if find_include_file(self, "lcms.h"):
|
|
- if find_library_file(self, "lcms"):
|
|
- feature.lcms = "lcms"
|
|
+ feature.lcms = "lcms"
|
|
|
|
if _tkinter and find_include_file(self, "tk.h"):
|
|
# the library names may vary somewhat (e.g. tcl84 or tcl8.4)
|
|
@@ -331,7 +315,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 +465,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,
|
|
)
|