Skip to content

Commit e993baf

Browse files
committed
Build on xcode9
Homebrew doesn't support 10.12 any more, so build the dependencies without homebrew.
1 parent 7f0ff04 commit e993baf

File tree

2 files changed

+57
-17
lines changed

2 files changed

+57
-17
lines changed

.travis.yml

+6-17
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,9 @@ matrix:
8787
env:
8888
- PRE=--pre
8989
- os: osx
90+
osx_image: xcode9
9091
language: generic # https://github.com/travis-ci/travis-ci/issues/2312
91-
only: master
92+
#only: master
9293
cache:
9394
# As for now travis caches only "$HOME/.cache/pip"
9495
# https://docs.travis-ci.com/user/caching/#pip-cache
@@ -101,26 +102,14 @@ matrix:
101102
allow_failures:
102103
- python: "nightly"
103104

104-
before_install: |
105+
before_install:
106+
- |
105107
case "$TRAVIS_OS_NAME" in
106108
linux)
107109
export PATH=/usr/lib/ccache:$PATH
108110
;;
109111
osx)
110-
set -e
111-
ci/silence brew update
112-
brew uninstall numpy gdal postgis
113-
brew unlink python@2
114-
brew install python || brew upgrade python
115-
brew install ffmpeg imagemagick mplayer ccache
116-
hash -r
117-
which python
118-
python --version
119-
set +e
120-
# We could install ghostscript and inkscape here to test svg and pdf
121-
# but this makes the test time really long.
122-
# brew install ghostscript inkscape
123-
export PATH=/usr/local/opt/python/libexec/bin:/usr/local/opt/ccache/libexec:$PATH
112+
ci/osx-deps
124113
;;
125114
esac
126115
@@ -169,7 +158,7 @@ install:
169158
export CPPFLAGS=--coverage
170159
fi
171160
- |
172-
python -mpip install -ve . # Install Matplotlib.
161+
python -mpip install -e . # Install Matplotlib.
173162
- |
174163
if [[ $TRAVIS_OS_NAME != 'osx' ]]; then
175164
unset CPPFLAGS

ci/osx-deps

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
#!/bin/bash
2+
3+
set -euo pipefail
4+
5+
echo travis_fold:start:Python
6+
curl -O https://www.python.org/ftp/python/3.8.5/python-3.8.5-macosx10.9.pkg
7+
sudo installer -package python-3.8.5-macosx10.9.pkg -target /
8+
sudo ln -s /usr/local/bin/python3 /usr/local/bin/python
9+
hash -r
10+
echo travis_fold:end:Python
11+
12+
echo travis_fold:start:ccache
13+
curl -O -L https://github.com/ccache/ccache/releases/download/v3.7.11/ccache-3.7.11.tar.xz
14+
tar xf ccache-3.7.11.tar.xz
15+
pushd ccache-3.7.11
16+
./configure --prefix=/usr/local
17+
make
18+
make install
19+
popd
20+
for compiler in clang clang++ cc gcc c++ g++; do
21+
ln -sf ccache /usr/local/bin/$compiler
22+
done
23+
echo travis_fold:end:ccache
24+
25+
echo travis_fold:start:pkg-config
26+
curl -O -L https://dl.bintray.com/homebrew/mirror/pkg-config-0.29.2.tar.gz
27+
tar xf pkg-config-0.29.2.tar.gz
28+
pushd pkg-config-0.29.2
29+
./configure --disable-debug --prefix=/usr/local --disable-host-tool \
30+
--with-internal-glib --with-pc-path=/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/local/pkgconfig \
31+
--with-system-include-path=/usr/include
32+
make
33+
make install
34+
popd
35+
echo travis_fold:end:pkg-config
36+
37+
echo travis_fold:start:libpng
38+
curl -O -L https://downloads.sourceforge.net/libpng/libpng-1.6.37.tar.xz
39+
tar xf libpng-1.6.37.tar.xz
40+
pushd libpng-1.6.37
41+
./configure --disable-dependency-tracking --disable-silent-rules --prefix=/usr/local
42+
make
43+
make install
44+
popd
45+
echo travis_fold:end:libpng
46+
47+
echo travis_fold:start:freetype
48+
curl -O -L https://download.savannah.gnu.org/releases/freetype/freetype-2.6.1.tar.gz
49+
mkdir -p build
50+
tar -x -C build -f freetype-2.6.1.tar.gz
51+
echo travis_fold:end:freetype

0 commit comments

Comments
 (0)