8000 Anaconda fixes (aka using sys.prefix). · pelson/matplotlib@3d6a21e · GitHub
[go: up one dir, main page]

Skip to content

Commit 3d6a21e

Browse files
committed
Anaconda fixes (aka using sys.prefix).
1 parent df3530d commit 3d6a21e

File tree

3 files changed

+16
-3
lines changed

setupext.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def get_base_dirs():
147147

148148
basedir_map = {
149149
'win32': ['win32_static', ],
150-
'darwin': ['/usr/local/', '/usr', '/usr/X11',
150+
'darwin': [sys.prefix, '/usr/local/', '/usr', '/usr/X11',
151151
'/opt/X11', '/opt/local'],
152152
'sunos5': [os.getenv('MPLIB_BASE') or '/usr/local', ],
153153
'gnu0': ['/usr'],
@@ -203,6 +203,13 @@ def print_line(*args, **kwargs):
203203
customize_compiler = sysconfig.customize_compiler
204204
def my_customize_compiler(compiler):
205205
retval = customize_compiler(compiler)
206+
print(compiler.compiler_so)
207+
print(compiler.linker_so)
208+
dl_kwd_index = compiler.linker_so.index('dynamic_lookup')
209+
compiler.linker_so.pop(dl_kwd_index)
210+
compiler.linker_so.pop(dl_kwd_index - 1)
211+
compiler.linker_so.extend(['-Bstatic', '-lstdc++', '-lpython2.7'])
212+
print(compiler.linker_so)
206213
try:
207214
compiler.compiler_so.remove('-Wstrict-prototypes')
208215
except (ValueError, AttributeError):
@@ -1467,6 +1474,12 @@ def add_flags(self, ext):
14671474
ext.library_dirs.extend([os.path.join(sys.prefix, 'dlls')])
14681475

14691476
elif sys.platform == 'darwin':
1477+
if os.path.exists(os.path.join(sys.prefix, 'include', 'tcl.h')):
1478+
ext.libraries.extend(['tk8.5'])
1479+
ext.libraries.extend(['tcl8.5'])
1480+
# ext.include_dirs.append(os.path.join(sys.prefix, 'include'))
1481+
return
1482+
14701483
# this config section lifted directly from Imaging - thanks to
14711484
# the effbot!
14721485

@@ -1492,6 +1505,7 @@ def add_flags(self, ext):
14921505
tk_framework_found = 1
14931506
break
14941507
if tk_framework_found:
1508+
print('FRAMEWORK FOUND')
14951509
# For 8.4a2, we must add -I options that point inside
14961510
# the Tcl and Tk frameworks. In later release we
14971511
# should hopefully be able to pass the -F option to

src/ft2font.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
#define NO_IMPORT_ARRAY
44

5-
#include <string>
6-
75
#include "ft2font.h"
86
#include "mplutils.h"
97

src/ft2font.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#define _FT2FONT_H
66
#include <vector>
77
#include <stdint.h>
8+
#include <string>
89

910
extern "C" {
1011
#include <ft2build.h>

0 commit comments

Comments
 (0)
0