ALBA-Synchrotron / IcepapOSC

GNU General Public License v3.0
0 stars 8 forks source link

Missing PyQt5 dependency #24

Closed marceloalcocer closed 2 years ago

marceloalcocer commented 2 years ago

The dependencies defined in setup.py omit the PyQt5 package, which is a necessary requirement for running the application.

IcepapOSC versions >= 0.6.1 are affected.

Minimum working example (remove --quiet flag to see build output);

user@host:~$ docker image build --tag icepaposc --build-arg VER_ICEPAPOSC=0.8.0 --quiet - << EOF
FROM python:3-slim-bullseye
ARG VER_ICEPAPOSC
RUN \
    apt-get update \
    && apt-get install --yes \
        libgl-dev \
        libglib2.0-dev \
        libxcb-icccm4 \
        libxcb-image0 \
        libxcb-keysyms1 \
        libxcb-render-util0 \
        libxcb-shape0 \
        libxcb-xinerama0 \
        libxcb-xkb1 \
        libxkbcommon-x11-0 \
        libdbus-1-3 \
    && pip install \
        --no-cache-dir \
        icepaposc==\$VER_ICEPAPOSC
ENTRYPOINT ["icepaposc"]

EOF

user@host:~$ docker run --rm -it icepaposc --help

Traceback (most recent call last):
  File "/usr/local/bin/icepaposc", line 5, in <module>
    from icepaposc.__main__ import main
  File "/usr/local/lib/python3.10/site-packages/icepaposc/__main__.py", line 21, in <module>
    from PyQt5.QtWidgets import QApplication
ModuleNotFoundError: No module named 'PyQt5.QtWidgets'

Example of success for IcepapOSC < 0.6.1;

user@host:~$ docker image build --tag icepaposc --build-arg VER_ICEPAPOSC=0.5.2 --quiet - << EOF
FROM python:3-slim-bullseye
ARG VER_ICEPAPOSC
RUN \
    apt-get update \
    && apt-get install --yes \
        libgl-dev \
        libglib2.0-dev \
        libxcb-icccm4 \
        libxcb-image0 \
        libxcb-keysyms1 \
        libxcb-render-util0 \
        libxcb-shape0 \
        libxcb-xinerama0 \
        libxcb-xkb1 \
        libxkbcommon-x11-0 \
        libdbus-1-3 \
    && pip install \
        --no-cache-dir \
        icepaposc==\$VER_ICEPAPOSC
ENTRYPOINT ["icepaposc"]

EOF

user@host:~$ docker run --rm -it icepaposc --help

usage: icepaposc [-h] [--version] [--axis AXIS] [-p PORT] [-t TIMEOUT] [-s [SIG ...]] host

IcePAP Oscilloscope Application, base on ethernet communication
Version: 0.5.2.

positional arguments:
  host                  IcePAP Host

options:
  -h, --help            show this help message and exit
  --version             show program's version number and exit
  --axis AXIS           Selected axis
  -p PORT, --port PORT  IcePAP port
  -t TIMEOUT, --timeout TIMEOUT
                        Socket timeout
  -s [SIG ...], --sig [SIG ...]
                        Preselected signals <driver>:<signal name>:<Y-axis>

Documentation: https://alba-synchrotron.github.io/pyIcePAP-doc/
Copyright 2017:
   MAX IV Laboratory, Lund, Sweden
   CELLS / ALBA Synchrotron, Bellaterra, Spain.