Skip to content

Commit f9f8d4b

Browse files
committed
Adding apt for libgeos to Travis
Using the APT binary versions of libgeos speed up Travis test times by eliminating some of the compiling. Also, dashes were added to install steps in order to show the time it takes to install dependent packages. In testing, the overall build time is about the same.
1 parent 5dcac8c commit f9f8d4b

File tree

1 file changed

+27
-11
lines changed

1 file changed

+27
-11
lines changed

.travis.yml

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,27 @@ language: python
1010

1111
matrix:
1212
include:
13+
# use libgeos binary from apt
1314
- python: 2.6
1415
env: NUMPY=numpy==1.6
1516
- python: 2.7
1617
- python: 3.3
1718
- python: 3.4
1819
- python: 3.5
20+
21+
# compile internal libgeos
22+
- python: 2.7
23+
env: BUILD_INTERNAL_GEOS=true
24+
- python: 3.5
25+
env: BUILD_INTERNAL_GEOS=true
1926
# - python: 2.7
2027
# env: TEST_ARGS=--pep8
2128

29+
addons:
30+
apt:
31+
packages:
32+
- libgeos-3.3.8
33+
2234
before_install:
2335
# Install into our own pristine virtualenv
2436
- virtualenv --python=python venv
@@ -27,24 +39,28 @@ before_install:
2739
install:
2840
# Upgrade pip and setuptools. Mock has issues with the default version of
2941
# setuptools
30-
- |
31-
pip install --upgrade pip
32-
pip install --upgrade setuptools
33-
pip install $NUMPY
34-
pip install $MPL
35-
pip install -r requirements.txt
42+
- pip install --upgrade pip
43+
- pip install --upgrade setuptools
44+
45+
- pip install $NUMPY
46+
- pip install $MPL
47+
- pip install -r requirements.txt
3648

3749
- if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then pip install -r .requirements-2.6.txt; fi
3850

3951
- |
40-
cd geos-3.3.3
41-
export GEOS_DIR=$HOME/.local/
42-
./configure --prefix=$GEOS_DIR
43-
make; make install
44-
cd ..
52+
if [[ $BUILD_INTERNAL_GEOS == 'true' ]]
53+
then
54+
cd geos-3.3.3
55+
export GEOS_DIR=$HOME/.local/
56+
./configure --prefix=$GEOS_DIR
57+
make; make install
58+
cd ..
59+
fi
4560
# - pip install pep8
4661
- python setup.py install
4762

4863
script:
4964
- python lib/mpl_toolkits/basemap/test.py --verbose
5065

66+

0 commit comments

Comments
 (0)