File tree Expand file tree Collapse file tree 2 files changed +27
-13
lines changed Expand file tree Collapse file tree 2 files changed +27
-13
lines changed Original file line number Diff line number Diff line change 14
14
- PYTEST_VERSION=2.6.0 PYTEST_QT_FORCE_PYQT=false
15
15
16
16
install :
17
- # PySide
18
- - if [[ "$PYTEST_QT_FORCE_PYQT" == "false" && "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
19
- - sudo apt-get install -qq python-pyside;
20
- - elif [[ "$PYTEST_QT_FORCE_PYQT" == "false" && "$TRAVIS_PYTHON_VERSION" == "3.2" ]]; then
21
- - sudo apt-get install -qq python3-pyside;
22
- - fi
23
-
24
- # PyQt4
25
- - if [[ "$PYTEST_QT_FORCE_PYQT" == "true" && "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
26
- - sudo apt-get install -qq python-qt4
27
- - elif [[ "$PYTEST_QT_FORCE_PYQT" == "true" && "$TRAVIS_PYTHON_VERSION" == "3.2" ]]; then
28
- - sudo apt-get install -qq python3-pyqt4
29
- - fi
17
+ # Qt
18
+ - python install-qt.py
30
19
31
20
# PyTest
32
21
- pip uninstall -y pytest
Original file line number Diff line number Diff line change
1
+ '''
2
+ Simple script to install PyQt or PySide based on PYTEST_QT_FORCE_PYQT
3
+ and python version. Meant to be used in travis-ci.
4
+ '''
5
+ import os
6
+ import sys
7
+
8
+ def run (cmd ):
9
+ print (cmd )
10
+ r = os .system (cmd )
11
+ if r != 0 :
12
+ sys .exit ('command %s failed with status %s' % (cmd , r ))
13
+
14
+ py3k = sys .version_info [0 ] == 3
15
+ if os .environ ['PYTEST_QT_FORCE_PYQT' ] == "true" :
16
+ if py3k :
17
+ run ('sudo apt-get install -qq python3-pyqt4' )
18
+ else :
19
+ run ('sudo apt-get install -qq python-qt4' )
20
+ else :
21
+ if py3k :
22
+ run ('sudo apt-get install -qq python3-pyside' )
23
+ else :
24
+ run ('sudo apt-get install -qq python-pyside' )
25
+
You can’t perform that action at this time.
0 commit comments