summaryrefslogtreecommitdiff
path: root/.travis.yml
diff options
context:
space:
mode:
authorJames R. Barlow <jim@purplerock.ca>2018-03-22 23:44:09 -0700
committerJames R. Barlow <jim@purplerock.ca>2018-03-22 23:44:09 -0700
commit56f7fabfc13e88013354249b053099186dd00fa3 (patch)
treed87df69c7d8593318a12eedd2f3345b87153ef8d /.travis.yml
parent1302eff2e343dc8639bc32530f051d85c98376f6 (diff)
Revised to work around macOS wheel issue
Running cibuildwheel inside a virtualenv is not a good idea.
Diffstat (limited to '.travis.yml')
-rw-r--r--.travis.yml35
1 files changed, 15 insertions, 20 deletions
diff --git a/.travis.yml b/.travis.yml
index 759258f..b7c7e8e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -51,12 +51,11 @@ matrix:
osx_image: xcode8.3
language: cpp # osx + language: python is broken
install:
- - brew install qpdf
+ - python3 -m pip install --user cibuildwheel==0.7.0
script:
- clang --version
- echo "CC=$CC CXX=$CXX"
- - |
- pip3 install pybind11 cibuildwheel
+ - |
python3 setup.py sdist -d wheelhouse
export CCACHE_BASEDIR=`python3 -c "import tempfile; import os; print(os.path.realpath(tempfile.gettempdir()))"`
export CIBW_BEFORE_BUILD='{pip} install pybind11'
@@ -64,7 +63,7 @@ matrix:
- cibuildwheel --output-dir wheelhouse
- |
if [[ $TRAVIS_TAG ]]; then
- pip3 install twine
+ python3 -m pip install --user twine
python3 -m twine upload wheelhouse/*.whl wheelhouse/*.tar.gz
fi
@@ -75,8 +74,7 @@ matrix:
services:
- docker
install:
- - pip install pybind11
- - pip install cibuildwheel # https://github.com/jbarlow83/cibuildwheel/archive/master.zip
+ - python3 -m pip install --user cibuildwheel==0.7.0
#- mkdir gcc-x86_64 && wget -q https://github.com/Noctem/pogeo-toolchain/releases/download/v1.4/gcc-7.2-binutils-2.29-centos5-x86-64.tar.bz2 -O - | tar xj -C gcc-x86_64 --strip-components=1
#- mkdir ccache && wget -q https://www.samba.org/ftp/ccache/ccache-3.3.4.tar.bz2 -O - | tar xj -C ccache --strip-components=1
- mkdir qpdf && wget -q $QPDF_RELEASE -O - | tar xz -C qpdf --strip-components=1
@@ -89,7 +87,7 @@ matrix:
- cibuildwheel --output-dir wheelhouse
- |
if [[ $TRAVIS_TAG ]]; then
- pip3 install twine
+ python3 -m pip install --user twine
python3 -m twine upload wheelhouse/*.whl
fi
@@ -98,7 +96,7 @@ stages:
- name: wheels
-before_install:
+before_install: # runs for all stages
- set -e
- eval "${MATRIX_EVAL}"
- |
@@ -114,15 +112,18 @@ before_install:
export CXXFLAGS="-Qunused-arguments -stdlib=libc++"
fi
elif [ "$TRAVIS_OS_NAME" == "osx" ]; then
+ unset -f cd; # Workaround for weird 'shell_session_update' issue: https://github.com/travis-ci/travis-ci/issues/8703
brew update -q
- brew bundle --file=.travis/Brewfile
+ brew install ccache qpdf
+ brew upgrade python
export PATH=/usr/local/opt/ccache/libexec:$PATH
CC=clang
CXX=clang++
fi
+- python3 -m pip install --user --upgrade pip wheel setuptools
-install:
+install: # runs for test stage only
- |
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
mkdir qpdf
@@ -132,19 +133,13 @@ install:
make -j 2
sudo make install
cd ..
- pip install --upgrade pip setuptools
- PIP=pip
elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
- PIP=pip3
- python3 -m venv venv
- $PIP --version
- source venv/bin/activate
- $PIP --version
+ :
fi
- python3 setup.py sdist
-- $PIP install pybind11
-- $PIP install --verbose dist/*.tar.gz
-- $PIP install -r test_requirements.txt
+- python3 -m pip install --user pybind11
+- python3 -m pip install --user --verbose dist/*.tar.gz
+- python3 -m pip install --user --upgrade -r test_requirements.txt
script:
- python3 -m pytest