Skip to content

Commit d5cdc09

Browse files
committed
switch to using conda-forge for slycot, with optional build against slycot source
1 parent 5fa1744 commit d5cdc09

File tree

1 file changed

+19
-11
lines changed

1 file changed

+19
-11
lines changed

.travis.yml

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,30 @@ python:
2424
#
2525
# We also want to test with and without slycot
2626
env:
27-
- SCIPY=scipy SLYCOT=slycot # default, with slycot
27+
- SCIPY=scipy SLYCOT=conda # default, with slycot via conda
2828
- SCIPY=scipy SLYCOT= # default, w/out slycot
2929
- SCIPY="scipy==0.19.1" SLYCOT= # legacy support, w/out slycot
3030

31-
# Exclude combinations that are very unlikely (and don't work)
3231
matrix:
32+
# Exclude combinations that are very unlikely (and don't work)
3333
exclude:
3434
- python: "3.7" # python3.7 should use latest scipy
3535
env: SCIPY="scipy==0.19.1" SLYCOT=
3636

37+
# Add optional builds that test against latest version of slycot
38+
allow_failures:
39+
- name: "linux, Python 3.7, slycot=source"
40+
os: linux
41+
dist: xenial
42+
services: xvfb
43+
env: SCIPY=scipy SLCOT=source
44+
3745
# install required system libraries
3846
before_install:
3947
# Install gfortran for testing slycot; use apt-get instead of conda in
4048
# order to include the proper CXXABI dependency (updated in GCC 4.9)
4149
# Note: these commands should match the slycot .travis.yml configuration
42-
- if [[ "$SLYCOT" != "" ]]; then
50+
- if [[ "$SLYCOT" = "source" ]]; then
4351
sudo apt-get update -qq;
4452
sudo apt-get install liblapack-dev libblas-dev;
4553
sudo apt-get install gfortran;
@@ -60,9 +68,8 @@ before_install:
6068
- conda info -a
6169
- conda create -q -n test-environment python="$TRAVIS_PYTHON_VERSION" pip coverage
6270
- source activate test-environment
63-
# Install openblas if slycot is being used
64-
# also install scikit-build for the build process
65-
- if [[ "$SLYCOT" != "" ]]; then
71+
# Install scikit-build for the build process if slycot is being used
72+
- if [[ "$SLYCOT" = "source" ]]; then
6673
conda install openblas;
6774
conda install -c conda-forge scikit-build;
6875
fi
@@ -75,13 +82,14 @@ before_install:
7582
install:
7683
# Install packages needed by python-control
7784
- conda install $SCIPY matplotlib
78-
# Build slycot from source
79-
# For python 3, need to provide pointer to python library
80-
# Use "Unix Makefiles" as generator, because Ninja cannot handle Fortran
81-
#! git clone https://github.com/repagh/Slycot.git slycot;
82-
- if [[ "$SLYCOT" != "" ]]; then
85+
- if [[ "$SLYCOT" = "source" ]]; then
86+
# Build slycot from source
87+
# Use "Unix Makefiles" as generator, because Ninja cannot handle Fortran
8388
git clone https://github.com/python-control/Slycot.git slycot;
8489
cd slycot; python setup.py install -G "Unix Makefiles"; cd ..;
90+
else if [[ "$SLYCOT" = "conda" ]]; then
91+
# Use version of slycot on conda-forge
92+
conda install -c conda-forge slycot;
8593
fi
8694

8795
# command to run tests

0 commit comments

Comments
 (0)