Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a8dfcf2

Browse filesBrowse files
committed
Qt5 requires platform plugins also on Linux, update i686 Dockerfile
1 parent 49ed880 commit a8dfcf2
Copy full SHA for a8dfcf2

File tree

Expand file treeCollapse file tree

3 files changed

+12
-1
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+12
-1
lines changed

‎cv2/__init__.py

Copy file name to clipboardExpand all lines: cv2/__init__.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# this makes them available
1010
globals().update(importlib.import_module('cv2.cv2').__dict__)
1111

12-
if sys.platform == 'darwin':
12+
if sys.platform == 'darwin' or sys.platform.startswith("linux"):
1313
os.environ['QT_QPA_PLATFORM_PLUGIN_PATH'] = os.path.join(
1414
os.path.dirname(os.path.abspath(__file__)), 'qt', 'plugins'
1515
)

‎docker/manylinux2014/Dockerfile_i686

Copy file name to clipboardExpand all lines: docker/manylinux2014/Dockerfile_i686
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,10 @@ RUN curl -O -L https://github.com/Kitware/CMake/releases/download/v3.17.0/cmake-
6868

6969
ENV PKG_CONFIG_PATH /usr/local/lib/pkgconfig:/root/ffmpeg_build/lib/pkgconfig
7070
ENV LDFLAGS -L/root/ffmpeg_build/lib
71+
72+
# in i686, yum metadata ends up with slightly wrong timestamps
73+
# which inhibits its update
74+
# https://github.com/skvark/opencv-python/issues/148
75+
RUN yum clean all
76+
7177
ENV PATH "$HOME/bin:$PATH"

‎setup.py

Copy file name to clipboardExpand all lines: setup.py
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,11 @@ def main():
154154
(r"lib/qt/plugins/platforms/libqcocoa\.dylib")
155155
]
156156

157+
if sys.platform.startswith("linux") and not build_headless:
158+
rearrange_cmake_output_data["cv2.qt.plugins.platforms"] = [
159+
(r"lib/qt/plugins/platforms/libqxcb\.so")
160+
]
161+
157162
if build_headless:
158163
# it seems that cocoa cannot be disabled so on macOS the package is not truly headless
159164
cmake_args.append("-DWITH_WIN32UI=OFF")

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.