forked from mottosso/Qt.py
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-py2.7
81 lines (72 loc) · 2.26 KB
/
Dockerfile-py2.7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
FROM ubuntu:16.04
# Needed to install pyside2-tools without issues
ENV DEBIAN_FRONTEND noninteractive
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 \
nano \
python \
python-dev \
python-pip \
python-qt4 \
python-pyqt5 \
python-pyside \
python-pyside2 \
pyside2-tools \
libshiboken2-dev \
xvfb
# Build shiboken
RUN apt-get install -y \
wget \
libqt4-dev \
cmake && \
wget https://pypi.python.org/packages/source/S/Shiboken/Shiboken-1.2.2.tar.gz && \
tar -xvzf Shiboken-1.2.2.tar.gz && \
cd Shiboken-1.2.2 && \
python setup.py bdist_wheel --qmake=/usr/bin/qmake-qt4 && \
pip install dist/Shiboken-1.2.2-cp27-cp27mu-linux_x86_64.whl && \
python shiboken_postinstall.py -install
# Make pyside2uic availble for Python 2.x
RUN cp -avr /usr/lib/python3/dist-packages/pyside2uic /usr/local/lib/python2.7/dist-packages
# Nose is the Python test-runner
RUN pip install \
nose \
nosepipe \
six
# Enable additional output from Qt.py
ENV QT_VERBOSE true
ENV QT_TESTING true
# Xvfb
ENV DISPLAY :99
# Warnings are exceptions
ENV PYTHONPATH=/Shiboken-1.2.2/shiboken_package/Shiboken
ENV PYTHONWARNINGS="ignore"
WORKDIR /workspace/Qt.py
ENTRYPOINT cp -r /Qt.py /workspace && \
Xvfb :99 -screen 0 1024x768x16 2>/dev/null & \
while ! ps aux | grep -q '[0]:00 Xvfb :99 -screen 0 1024x768x16'; \
do echo "Waiting for Xvfb..."; sleep 1; done && \
echo "#\n# Testing implementation.." && \
python -u run_tests.py && \
echo "#\n# Testing caveats..\n#" && \
python build_caveats.py && \
nosetests \
--verbose \
--with-doctest \
--with-process-isolation \
test_caveats.py && \
echo "#\n# Testing membership..\n#" && \
python build_membership.py && \
nosetests \
--verbose \
test_membership.py && \
echo "#\n# Testing examples..\n#" && \
nosetests \
--verbose \
--with-process-isolation \
--with-doctest \
--exe \
examples/*/*.py && \
echo Done