| @@ -1,38 +1,37 @@ | | | @@ -1,38 +1,37 @@ |
1 | $NetBSD: patch-setup.py,v 1.3 2014/07/06 12:15:53 obache Exp $ | | 1 | $NetBSD: patch-setup.py,v 1.4 2015/04/17 15:10:02 adam Exp $ |
2 | | | 2 | |
3 | * Prevent to detect optional tkinter. | | 3 | * Prevent to detect optional tkinter. |
4 | * Disable demo programs. | | 4 | * Disable demo programs. |
5 | | | 5 | |
6 | --- setup.py.orig 2014-06-30 22:42:26.000000000 +0000 | | 6 | --- setup.py.orig 2015-04-02 09:05:22.000000000 +0000 |
7 | +++ setup.py | | 7 | +++ setup.py |
8 | @@ -82,11 +82,7 @@ def _lib_include(root): | | 8 | @@ -82,11 +82,7 @@ def _lib_include(root): |
9 | def _read(file): | | 9 | def _read(file): |
10 | return open(file, 'rb').read() | | 10 | return open(file, 'rb').read() |
11 | | | 11 | |
12 | -try: | | 12 | -try: |
13 | - import _tkinter | | 13 | - import _tkinter |
14 | -except (ImportError, OSError): | | 14 | -except (ImportError, OSError): |
15 | - # pypy emits an oserror | | 15 | - # pypy emits an oserror |
16 | - _tkinter = None | | 16 | - _tkinter = None |
17 | +_tkinter = None | | 17 | +_tkinter = None |
18 | | | 18 | |
19 | | | 19 | |
20 | NAME = 'Pillow' | | 20 | NAME = 'Pillow' |
21 | @@ -570,7 +566,7 @@ class pil_build_ext(build_ext): | | 21 | @@ -575,7 +571,7 @@ class pil_build_ext(build_ext): |
22 | exts.append(Extension( | | 22 | exts.append(Extension( |
23 | "PIL._webp", ["_webp.c"], libraries=libs, define_macros=defs)) | | 23 | "PIL._webp", ["_webp.c"], libraries=libs, define_macros=defs)) |
24 | | | 24 | |
25 | - if sys.platform == "darwin": | | 25 | - if sys.platform == "darwin": |
26 | + if _tkinter and sys.platform == "darwin": | | 26 | + if _tkinter and sys.platform == "darwin": |
27 | # locate Tcl/Tk frameworks | | 27 | # locate Tcl/Tk frameworks |
28 | frameworks = [] | | 28 | frameworks = [] |
29 | framework_roots = [ | | 29 | framework_roots = [ |
30 | @@ -746,7 +742,7 @@ setup( | | 30 | @@ -753,7 +749,6 @@ setup( |
31 | ext_modules=[Extension("PIL._imaging", ["_imaging.c"])], | | 31 | ext_modules=[Extension("PIL._imaging", ["_imaging.c"])], |
32 | include_package_data=True, | | 32 | include_package_data=True, |
33 | packages=find_packages(), | | 33 | packages=find_packages(), |
34 | - scripts=glob.glob("Scripts/pil*.py"), | | 34 | - scripts=glob.glob("Scripts/pil*.py"), |
35 | +# scripts=glob.glob("Scripts/pil*.py"), | | 35 | test_suite='nose.collector', |
36 | test_suite='PIL.tests', | | | |
37 | keywords=["Imaging", ], | | 36 | keywords=["Imaging", ], |
38 | license='Standard PIL License', | | 37 | license='Standard PIL License', |