Skip to content

Commit

Permalink
fix SDK dir selection
Browse files Browse the repository at this point in the history
  • Loading branch information
bnavigator committed Feb 7, 2020
1 parent 49055a3 commit db51c18
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 22 deletions.
36 changes: 15 additions & 21 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
os: osx
language: shell
env: TEST_PKG="conda" BLA_VENDOR="Apple"
- name: "MacOSX, default Python 3"
- name: "MacOSX, System Python 3"
os: osx
language: shell
env: TEST_PKG="dist" BLA_VENDOR="Apple"
Expand All @@ -33,20 +33,17 @@ jobs:
os: osx
language: shell
env: TEST_PKG="dist" BLA_VENDOR="Apple" SLYCOT_PYTHON_VERSION=3.8.0
# additional Linux builds using defaults from above
# only one build per old python version
- name: "Linux, Py2.7"
- name: "Linux, Ubuntu 16.04 Python 2.7"
python: "2.7"
env: TEST_PKG="conda" BLA_VENDOR="OpenBLAS"
- name: "Linux, Py3.5"
dist: xenial
env: TEST_PKG="dist" BLA_VENDOR="OpenBLAS"
- name: "Linux, Conda Py3.5"
python: "3.5"
env: TEST_PKG="conda" BLA_VENDOR="OpenBLAS"
- name: "Linux, Py3.6"
- name: "Linux, Conda Py3.6"
python: "3.6"
env: TEST_PKG="conda" BLA_VENDOR="OpenBLAS"
allowed_failures:
- os: osx
env: TEST_PKG="conda" BLA_VENDOR="Apple"


before_install:
- |
Expand All @@ -65,7 +62,7 @@ before_install:
fi
- |
# Install MacOSX packages
if [[ $TEST_PKG == "dist" && $TRAVIS_OS_NAME == osx ]]; then
if [[ $TEST_PKG == "dist" && $TRAVIS_OS_NAME == osx ]]; then
if [ -n "$SLYCOT_PYTHON_VERSION" ]; then
pyenv install $SLYCOT_PYTHON_VERSION
pyenv global $SLYCOT_PYTHON_VERSION
Expand All @@ -77,25 +74,23 @@ before_install:
ln -s $(which pip3) ~/.local/bin/pip
fi
fi
install:
- if [[ $TRAVIS_OS_NAME == linux ]]; then
export SLYCOT_PYTHON_VERSION="$TRAVIS_PYTHON_VERSION";
fi
install:
- |
# compile using conda environment or distribution libraries
echo "Python Version: ${SLYCOT_PYTHON_VERSION:=${TRAVIS_PYTHON_VERSION:-3.8}}"
if [[ $TEST_PKG == conda ]]; then
#
# Install miniconda to allow quicker installation of dependencies
# See https://conda.io/projects/conda/en/latest/user-guide/tasks/use-conda-with-travis-ci.html
#
pymajor=${SLYCOT_PYTHON_VERSION:0:1}
if [[ $TRAVIS_OS_NAME == linux ]]; then
wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
wget https://repo.continuum.io/miniconda/Miniconda${pymajor}-latest-Linux-x86_64.sh -O miniconda.sh
elif [[ $TRAVIS_OS_NAME == osx ]]; then
wget http://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh
wget https://repo.continuum.io/miniconda/Miniconda${pymajor}-latest-MacOSX-x86_64.sh -O miniconda.sh
wget https://github.com/phracker/MacOSX-SDKs/releases/download/10.15/MacOSX10.9.sdk.tar.xz
sudo mkdir -p /opt/MacOSX10.9.sdk
sudo tar -C /opt/MacOSX10.9.sdk -xJf MacOSX10.9.sdk.tar.xz
sudo tar -C /opt -xJf MacOSX10.9.sdk.tar.xz
else
echo "Unsupported OS for conda builds: TRAVIS_OS_NAME"
exit 4
Expand Down Expand Up @@ -141,10 +136,10 @@ install:
# coveralls not in ubuntu or conda repos
pip install coveralls
script:
# slycots own unit tests as installed, not from source dir
- cd ..
- python -V # print python version for debugging
- slycot_dir=$(python -c "import slycot; print(slycot.__path__[0])")
- pytest --pyargs slycot --cov=$slycot_dir --cov-config=Slycot/.coveragerc
#
Expand All @@ -155,6 +150,5 @@ script:
- cd control
- python setup.py test


after_success:
- coveralls
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from skbuild import setup
from skbuild.command.sdist import sdist
except ImportError:
raise ImportError('sckit-build must be installed before running setup.py')
raise ImportError('scikit-build must be installed before running setup.py')

if sys.version_info[:2] < (2, 7) or (3, 0) <= sys.version_info[0:2] < (3, 5):
raise RuntimeError("Python version 2.7 or >= 3.5 required.")
Expand Down

0 comments on commit db51c18

Please sign in to comment.