@@ -9,6 +9,9 @@ PNG_BASE_URL=http://downloads.sourceforge.net/project/libpng/libpng16
9
9
PNG_VERSION=" 1.6.10"
10
10
XQ_BASE_URL=http://xquartz.macosforge.org/downloads/SL
11
11
XQUARTZ_VERSION=" 2.7.4"
12
+ # Compiler defaults
13
+ CC=clang
14
+ CXX=clang++
12
15
13
16
function require_success {
14
17
STATUS=$?
@@ -29,7 +32,7 @@ function install_macports {
29
32
tar -xzf $MACPORTS .tar.gz
30
33
31
34
cd $MACPORTS
32
- ./configure --prefix=$PREFIX
35
+ CC= ${CC} CXX= ${CXX} ./configure --prefix=$PREFIX
33
36
make
34
37
sudo make install
35
38
cd ..
@@ -42,9 +45,13 @@ function install_macports {
42
45
43
46
44
47
function install_matplotlib {
48
+ # Accept c and c++ compilers, default to cc, c++
49
+ MPL_CC=${1:- " cc" }
50
+ MPL_CXX=${2:- " c++" }
51
+
45
52
cd matplotlib
46
53
47
- $SUDO $PYTHON setup.py install
54
+ $SUDO CC= $MPL_CC CXX= $MPL_CXX $PYTHON setup.py install
48
55
require_success " Failed to install matplotlib"
49
56
50
57
cd ..
@@ -129,7 +136,8 @@ function install_freetype {
129
136
tar -xjf freetype.tar.bz2
130
137
cd freetype-$FT_VERSION
131
138
require_success " Failed to cd to freetype directory"
132
- ./configure --enable-shared=no --enable-static=true
139
+
140
+ CC=${CC} CXX=${CXX} ./configure --enable-shared=no --enable-static=true
133
141
make
134
142
sudo make install
135
143
require_success " Failed to install freetype $FT_VERSION "
@@ -259,7 +267,6 @@ elif [ "$TEST" == "brew_py3" ] ; then
259
267
fi
260
268
261
269
$PIP install numpy
262
-
263
270
install_matplotlib
264
271
265
272
elif [ " $TEST " == " macports" ] ; then
282
289
283
290
install_macports
284
291
install_macports_python $PY noforce $VENV
285
-
286
292
install_matplotlib
287
293
288
294
elif [ " $TEST " == " macpython27_10.9" ] ; then
@@ -308,7 +314,7 @@ elif [ "$TEST" == "macpython27_10.9" ] ; then
308
314
install_mac_numpy $NUMPY $PY $OS
309
315
fi
310
316
311
- install_matplotlib
317
+ install_matplotlib $CC $CXX
312
318
313
319
elif [ " $TEST " == " macpython33_10.9" ] ; then
314
320
@@ -328,7 +334,7 @@ elif [ "$TEST" == "macpython33_10.9" ] ; then
328
334
exit " numpy does not distribute python 3 binaries, yet"
329
335
fi
330
336
331
- install_matplotlib
337
+ install_matplotlib $CC $CXX
332
338
333
339
else
334
340
echo " Unknown test setting ($TEST )"
0 commit comments