Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 56fd5b8

Browse filesBrowse files
jkseppanQuLogic
authored andcommitted
Backport PR matplotlib#18134: Build on xcode9
1 parent 6010948 commit 56fd5b8
Copy full SHA for 56fd5b8

File tree

2 files changed

+71
-16
lines changed
Filter options

2 files changed

+71
-16
lines changed

‎.travis.yml

Copy file name to clipboardExpand all lines: .travis.yml
+6-16Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ 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
9192
only: master
9293
cache:
@@ -101,26 +102,15 @@ matrix:
101102
allow_failures:
102103
- python: "nightly"
103104

104-
before_install: |
105+
before_install:
106+
- |
107+
# Install OS dependencies and set up ccache
105108
case "$TRAVIS_OS_NAME" in
106109
linux)
107110
export PATH=/usr/lib/ccache:$PATH
108111
;;
109112
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
113+
ci/osx-deps
124114
;;
125115
esac
126116
@@ -169,7 +159,7 @@ install:
169159
export CPPFLAGS=--coverage
170160
fi
171161
- |
172-
python -mpip install -ve . # Install Matplotlib.
162+
python -mpip install -e . # Install Matplotlib.
173163
- |
174164
if [[ $TRAVIS_OS_NAME != 'osx' ]]; then
175165
unset CPPFLAGS

‎ci/osx-deps

Copy file name to clipboard
+65Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
#!/bin/bash
2+
3+
set -euo pipefail
4+
cache="$HOME"/.cache/matplotlib
5+
6+
fold_start() {
7+
key=$1
8+
title=$2
9+
echo -e "travis_fold:start:$key\e[2K"
10+
echo -e "travis_time:start:$key\e[2K"
11+
tick="$(date +%s)"
12+
echo "$title"
13+
}
14+
15+
fold_end() {
16+
key=$1
17+
tock="$(date +%s)"
18+
nano=000000000
19+
echo -e "travis_time:end:$key:start=$tick$nano,finish=$tock$nano,duration=$((tock - tick))$nano\e[2K"
20+
echo -e "travis_fold:end:$key\e[2K"
21+
}
22+
23+
cached_download() {
24+
file=$1
25+
url=$2
26+
shasum=$3
27+
path="$cache/$file"
28+
if [[ ! -f "$path"
29+
|| "$(shasum -a 256 "$path" | awk '{print $1}')" != "$shasum" ]]
30+
then
31+
curl -L -o "$path" "$url"
32+
fi
33+
}
34+
35+
fold_start Python "Install Python 3.8 from python.org"
36+
cached_download python-3.8.5-macosx10.9.pkg \
37+
https://www.python.org/ftp/python/3.8.5/python-3.8.5-macosx10.9.pkg \
38+
e27c5a510c10f830084fb9c60b9e9aa8719d92e4537a80e6b4252c02396f0d29
39+
sudo installer -package "$cache"/python-3.8.5-macosx10.9.pkg -target /
40+
sudo ln -s /usr/local/bin/python3 /usr/local/bin/python
41+
hash -r
42+
fold_end Python
43+
44+
fold_start ccache 'Install ccache (compile it ourselves)'
45+
cached_download ccache-3.7.11.tar.xz \
46+
https://github.com/ccache/ccache/releases/download/v3.7.11/ccache-3.7.11.tar.xz \
47+
8d450208099a4d202bd7df87caaec81baee20ce9dd62da91e9ea7b95a9072f68
48+
tar xf "$cache"/ccache-3.7.11.tar.xz
49+
pushd ccache-3.7.11
50+
./configure --prefix=/usr/local
51+
make -j2
52+
make install
53+
popd
54+
for compiler in clang clang++ cc gcc c++ g++; do
55+
ln -sf ccache /usr/local/bin/$compiler
56+
done
57+
fold_end ccache
58+
59+
fold_start freetype 'Install freetype (just unpack into the build directory)'
60+
cached_download freetype-2.6.1.tar.gz \
61+
https://download.savannah.gnu.org/releases/freetype/freetype-2.6.1.tar.gz \
62+
0a3c7dfbda6da1e8fce29232e8e96d987ababbbf71ebc8c75659e4132c367014
63+
mkdir -p build
64+
tar -x -C build -f "$cache"/freetype-2.6.1.tar.gz
65+
fold_end freetype

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.