forked from conda-archive/conda-recipes
/
osx-tk.patch
60 lines (57 loc) · 2.57 KB
/
osx-tk.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
diff --git setupext.py setupext.py
index 9219c88..e3a9653 100644
--- setupext.py
+++ setupext.py
@@ -1334,52 +1334,11 @@ class BackendTkAgg(OptionalBackendPackage):
ext.library_dirs.extend([os.path.join(sys.prefix, 'dlls')])
elif sys.platform == 'darwin':
- # this config section lifted directly from Imaging - thanks to
- # the effbot!
-
- # First test for a MacOSX/darwin framework install
from os.path import join, exists
- framework_dirs = [
- join(os.getenv('HOME'), '/Library/Frameworks'),
- '/Library/Frameworks',
- '/System/Library/Frameworks/',
- ]
-
- # Find the directory that contains the Tcl.framework and
- # Tk.framework bundles.
- tk_framework_found = 0
- for F in framework_dirs:
- # both Tcl.framework and Tk.framework should be present
- for fw in 'Tcl', 'Tk':
- if not exists(join(F, fw + '.framework')):
- break
- else:
- # ok, F is now directory with both frameworks. Continure
- # building
- tk_framework_found = 1
- break
- if tk_framework_found:
- # For 8.4a2, we must add -I options that point inside
- # the Tcl and Tk frameworks. In later release we
- # should hopefully be able to pass the -F option to
- # gcc, which specifies a framework lookup path.
-
- tk_include_dirs = [
- join(F, fw + '.framework', H)
- for fw in ('Tcl', 'Tk')
- for H in ('Headers', 'Versions/Current/PrivateHeaders')
- ]
-
- # For 8.4a2, the X11 headers are not included. Rather
- # than include a complicated search, this is a
- # hard-coded path. It could bail out if X11 libs are
- # not found...
- # tk_include_dirs.append('/usr/X11R6/include')
- frameworks = ['-framework', 'Tcl', '-framework', 'Tk']
- ext.include_dirs.extend(tk_include_dirs)
- ext.extra_link_args.extend(frameworks)
- ext.extra_compile_args.extend(frameworks)
+ ext.include_dirs.append(join(sys.prefix, 'include'))
+ ext.libraries.extend(['tk8.5', 'tcl8.5'])
+ ext.library_dirs.append(join(sys.prefix, 'lib'))
# you're still here? ok we'll try it this way...
else: