Skip to content

Commit

Permalink
Implement mottosso#93
Browse files Browse the repository at this point in the history
  • Loading branch information
mottosso committed Aug 13, 2016
1 parent 80af414 commit 8f93223
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 52 deletions.
29 changes: 29 additions & 0 deletions .docker/Dockerfile-py2.7
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FROM ubuntu:16.04

RUN apt-get update && \
apt-get install -y \
software-properties-common && \
add-apt-repository -y ppa:thopiekar/pyside-git && \
apt-get update && apt-get install -y \
python \
python-dev \
python-pip \
python-qt4 \
python-pyqt5 \
python-pyside \
python-pyside2

# Nose is the Python test-runner
RUN pip install nose nosepipe

# Enable additional output from Qt.py
ENV QT_VERBOSE true

WORKDIR /workspace/Qt.py
ENTRYPOINT cp -r /Qt.py /workspace && \
python build_caveats_tests.py && \
nosetests \
--verbose \
--with-process-isolation \
--with-doctest \
--exe
29 changes: 29 additions & 0 deletions .docker/Dockerfile-py3.5
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FROM ubuntu:16.04

RUN apt-get update && \
apt-get install -y \
software-properties-common && \
add-apt-repository -y ppa:thopiekar/pyside-git && \
apt-get update && apt-get install -y \
python3 \
python3-dev \
python3-pip \
python3-pyqt4 \
python3-pyqt5 \
python3-pyside \
python3-pyside2

# Nose is the Python test-runner
RUN pip3 install nose nosepipe

# Enable additional output from Qt.py
ENV QT_VERBOSE true

WORKDIR /workspace/Qt.py
ENTRYPOINT cp -r /Qt.py /workspace && \
python3 build_caveats_tests.py && \
nosetests3 \
--verbose \
--with-process-isolation \
--with-doctest \
--exe
34 changes: 3 additions & 31 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,13 @@ dist: trusty

python:
- 2.7
- 3.4
- 3.5

services:
- docker

env:
QT_VERBOSE=true

virtualenv:
# apt-install ends up amongst system packages
system_site_packages: true

install:
# Based on http://stackoverflow.com/a/24545890/478949
- sudo apt-get install -y qt4-qmake libqt4-dev
- sudo apt-get install -y python-qt4 python-pyside
- sudo apt-get install -y python3-pyqt4 python3-pyside python3-pip
- sudo pip install nosepipe
- sudo pip3 install nosepipe

# Print version information
- python -c "import PySide;print('Path, %s' % PySide)"
- python -c "import PySide;print('Binding, %s' % PySide.__version__)"
- python -c "import PySide;print('Qt, %s' % PySide.QtCore.qVersion())"

- python -c "import PyQt4.QtCore;print('Binding, %s' % PyQt4.QtCore.PYQT_VERSION_STR)"
- python -c "import PyQt4.QtCore;print('Qt, %s' % PyQt4.QtCore.QT_VERSION_STR)"
- python -c "import PyQt4;print(PyQt4)"
- docker -f .docker/Dockerfile-py$TRAVIS_PYTHON_VERSION build -t mottosso/qt.py .

# Enable virtual framebuffer, this way we can instantiate
# a QApplication and create widgets.
Expand All @@ -43,14 +22,7 @@ before_script:
- sleep 3 # give xvfb some time to start

script:
- python build_caveats_tests.py
- nosetests --verbose --with-doctest --with-process-isolation --exe

# Test setup.py
- pip install file://$(pwd)

# Test Dockerfile
- docker build -t mottosso/qt.py .
- docker run --rm -v $(pwd):/Qt.py mottosso/qt.py

deploy:
provider: pypi
Expand Down
21 changes: 0 additions & 21 deletions Dockerfile

This file was deleted.

0 comments on commit 8f93223

Please sign in to comment.