提交 a8dfcf21 编写于 作者: O Olli-Pekka Heinisuo

Qt5 requires platform plugins also on Linux, update i686 Dockerfile

上级 49ed880f
......@@ -9,7 +9,7 @@ from .data import *
# this makes them available
globals().update(importlib.import_module('cv2.cv2').__dict__)
if sys.platform == 'darwin':
if sys.platform == 'darwin' or sys.platform.startswith("linux"):
os.environ['QT_QPA_PLATFORM_PLUGIN_PATH'] = os.path.join(
os.path.dirname(os.path.abspath(__file__)), 'qt', 'plugins'
)
......@@ -68,4 +68,10 @@ RUN curl -O -L https://github.com/Kitware/CMake/releases/download/v3.17.0/cmake-
ENV PKG_CONFIG_PATH /usr/local/lib/pkgconfig:/root/ffmpeg_build/lib/pkgconfig
ENV LDFLAGS -L/root/ffmpeg_build/lib
# in i686, yum metadata ends up with slightly wrong timestamps
# which inhibits its update
# https://github.com/skvark/opencv-python/issues/148
RUN yum clean all
ENV PATH "$HOME/bin:$PATH"
......@@ -154,6 +154,11 @@ def main():
(r"lib/qt/plugins/platforms/libqcocoa\.dylib")
]
if sys.platform.startswith("linux") and not build_headless:
rearrange_cmake_output_data["cv2.qt.plugins.platforms"] = [
(r"lib/qt/plugins/platforms/libqxcb\.so")
]
if build_headless:
# it seems that cocoa cannot be disabled so on macOS the package is not truly headless
cmake_args.append("-DWITH_WIN32UI=OFF")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册