Use system packages on Py2.7

Use system packages on python 2.7

Try and fix PyQt4 and use wheelhouse astropy

Fix version requirements
This commit is contained in:
Steven Silvester
2014-12-02 05:39:56 -06:00
parent 40d6a51779
commit 043721aa24
4 changed files with 30 additions and 12 deletions
+2 -4
View File
@@ -20,13 +20,11 @@ before_install:
- export WHEELHOUSE="--no-index --find-links=http://travis-wheels.scikit-image.org/"
- sudo apt-get update
- virtualenv -p python ~/venv
- travis_retry tools/travis_setup.sh
- source ~/venv/bin/activate
- which python
- python --version
- travis_retry tools/travis_setup.sh
- python check_bento_build.py
- tools/header.py "Dependency versions"
+2 -2
View File
@@ -1,6 +1,6 @@
cython>=0.19.2
matplotlib>=1.1.1
numpy>=1.6.0
matplotlib>=1.1.0
numpy>=1.6.1
scipy>=0.9
six>=1.3
networkx>=1.8
+16 -1
View File
@@ -7,6 +7,21 @@ tools/header.py "Install optional dependencies"
if [[ $TRAVIS_PYTHON_VERSION == 2.7* ]]; then
sudo apt-get install -q python-qt4
# http://stackoverflow.com/a/9716100
LIBS=( PyQt4 sip.so )
PYTHON_VERSION=python$(python -c "import sys; print (str(sys.version_info[0])+'.'+str(sys.version_info[1]))")
VAR=( $(which -a $PYTHON_VERSION) )
GET_PYTHON_LIB_CMD="from distutils.sysconfig import get_python_lib; print (get_python_lib())"
LIB_VIRTUALENV_PATH=$(python -c "$GET_PYTHON_LIB_CMD")
LIB_SYSTEM_PATH=$(${VAR[-1]} -c "$GET_PYTHON_LIB_CMD")
for LIB in ${LIBS[@]}
do
ln -s $LIB_SYSTEM_PATH/$LIB $LIB_VIRTUALENV_PATH/$LIB
done
else
sudo apt-get install -q libqt4-dev
pip install -q PySide $WHEELHOUSE
@@ -25,7 +40,7 @@ if [[ $TRAVIS_PYTHON_VERSION != 3.4 ]]; then
fi
sudo apt-get install -q libfreeimage3
pip install -q astropy
pip install -q astropy $WHEELHOUSE
if [[ $TRAVIS_PYTHON_VERSION == 2.* ]]; then
pip install -q pyamg
+10 -5
View File
@@ -3,19 +3,24 @@ set -ex
sh -e /etc/init.d/xvfb start
pip install wheel flake8 coveralls nose
# install system tk
sudo apt-get install python-tk
# on Python 2.7, use the system versions of numpy, scipy, and matplotlib
# and the minimum version of cython and networkx
if [[ $TRAVIS_PYTHON_VERSION == 2.7* ]]; then
virtualenv -p python --system-site-packages ~/venv
sudo apt-get install python-scipy python-matplotlib
sed -i 's/cython>=/cython==/g' requirements.txt
sed -i 's/networkx>=/networkx==/g' requirements.txt
else
virtualenv -p python --system-site-packages ~/venv
fi
source ~/venv/bin/activate
pip install wheel flake8 coveralls nose
# install system tk for matplotlib
sudo apt-get install python-tk
# on Python 3.2, use matplotlib 1.3.1
if [[ $TRAVIS_PYTHON_VERSION == 2.7* ]]; then
sed -i 's/matplotlib>=*.*.*/matplotlib==1.3.1/g' requirements.txt