From bed0d2bcfc90b435a10702810e884a41efdf4906 Mon Sep 17 00:00:00 2001 From: Greg Hope Date: Wed, 3 May 2023 21:32:32 +0100 Subject: [PATCH] Fixes for CI system Switch builds to PyQt6 Include resources folder in distribution Remove extra MANIFEST.in entries to silence warnings Pin PyQt6-Qt6 - https://github.com/googlefonts/fontra-pak/pull/27 Add pyqt6rc to test requirements --- MANIFEST.in | 7 ---- linux/appimage/blacklist.txt | 33 +++++++++---------- osx/app_resources/dist_blacklist.txt | 48 +++++++++++++--------------- plover_build_utils/setup.py | 2 +- reqs/constraints.txt | 1 + reqs/dist_extra_gui_qt.txt | 1 + setup.cfg | 2 +- windows/dist_blacklist.txt | 21 ++++++------ 8 files changed, 51 insertions(+), 64 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index e2095bb7a..58967e279 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -28,10 +28,3 @@ include test/*.py include test/gui_qt/*.py include tox.ini include windows/* -# Exclude: CI/Git/GitHub specific files, -# as well as generated Python files (UI). -exclude .gitignore -exclude plover/gui_qt/*_rc.py -exclude plover/gui_qt/*_ui.py -exclude plover/gui_qt/.gitignore -prune .github diff --git a/linux/appimage/blacklist.txt b/linux/appimage/blacklist.txt index c89a7376a..14b7a9dfe 100644 --- a/linux/appimage/blacklist.txt +++ b/linux/appimage/blacklist.txt @@ -31,16 +31,14 @@ # Plover. :usr/lib/python${pyversion}/site-packages/plover gui_qt/*.ui - gui_qt/resources messages/**/*.po messages/plover.pot -# PyQt5. +# PyQt6. :usr/bin - pylupdate5 - pyrcc5 - pyuic5 -:usr/lib/python${pyversion}/site-packages/PyQt5 + pylupdate6 + pyuic6 +:usr/lib/python${pyversion}/site-packages/PyQt6 **/*Designer* **/*[Hh]elp* **/*[Qq]ml* @@ -49,19 +47,18 @@ **/*[Ww]ayland* **/*[Ww]eb[Ee]ngine* bindings - Qt5/plugins/egldeviceintegrations - Qt5/plugins/geoservices - Qt5/plugins/platforms/libqeglfs.so - Qt5/plugins/platforms/libqlinuxfb.so - Qt5/plugins/platforms/libqminimal.so - Qt5/plugins/platforms/libqminimalegl.so - Qt5/plugins/platforms/libqoffscreen.so - Qt5/plugins/platforms/libqvnc.so - Qt5/plugins/platforms/libqwebgl.so - Qt5/plugins/sceneparsers - Qt5/plugins/webview + Qt6/plugins/egldeviceintegrations + Qt6/plugins/geoservices + Qt6/plugins/platforms/libqeglfs.so + Qt6/plugins/platforms/libqlinuxfb.so + Qt6/plugins/platforms/libqminimal.so + Qt6/plugins/platforms/libqminimalegl.so + Qt6/plugins/platforms/libqoffscreen.so + Qt6/plugins/platforms/libqvnc.so + Qt6/plugins/platforms/libqwebgl.so + Qt6/plugins/sceneparsers + Qt6/plugins/webview pylupdate* - pyrcc* uic # vim: ft=config diff --git a/osx/app_resources/dist_blacklist.txt b/osx/app_resources/dist_blacklist.txt index c96eb6fe0..5d47ced4d 100644 --- a/osx/app_resources/dist_blacklist.txt +++ b/osx/app_resources/dist_blacklist.txt @@ -23,8 +23,8 @@ turtle* **/*.exe */test* -# PyQt5. -:lib/python$python_base_version/site-packages/PyQt5 +# PyQt6. +:lib/python$python_base_version/site-packages/PyQt6 **/*AxContainer* **/*Bluetooth* **/*CLucene* @@ -35,34 +35,32 @@ **/*Serial* **/*Sql* **/*Test* - Qt5/plugins/audio - Qt5/plugins/bearer - Qt5/plugins/generic - Qt5/plugins/geoservices - Qt5/plugins/mediaservice - Qt5/plugins/playlistformats - Qt5/plugins/position - Qt5/plugins/printsupport - Qt5/plugins/sceneparsers - Qt5/plugins/sensor* - Qt5/plugins/sqldrivers - Qt5/qml - Qt5/resources - Qt5/translations/qt_help_* - Qt5/translations/qtconnectivity_* - Qt5/translations/qtdeclarative_* - Qt5/translations/qtlocation_* - Qt5/translations/qtmultimedia_* - Qt5/translations/qtquick* - Qt5/translations/qtserialport_* - Qt5/translations/qtwebsockets_* + Qt6/plugins/audio + Qt6/plugins/bearer + Qt6/plugins/generic + Qt6/plugins/geoservices + Qt6/plugins/mediaservice + Qt6/plugins/playlistformats + Qt6/plugins/position + Qt6/plugins/printsupport + Qt6/plugins/sceneparsers + Qt6/plugins/sensor* + Qt6/plugins/sqldrivers + Qt6/qml + Qt6/resources + Qt6/translations/qt_help_* + Qt6/translations/qtconnectivity_* + Qt6/translations/qtdeclarative_* + Qt6/translations/qtlocation_* + Qt6/translations/qtmultimedia_* + Qt6/translations/qtquick* + Qt6/translations/qtserialport_* + Qt6/translations/qtwebsockets_* pylupdate* - pyrcc* uic # Plover. :lib/python$python_base_version/site-packages/plover gui_qt/*.ui - gui_qt/resources messages/**/*.po messages/plover.pot diff --git a/plover_build_utils/setup.py b/plover_build_utils/setup.py index 64309cc42..63c35e2ff 100644 --- a/plover_build_utils/setup.py +++ b/plover_build_utils/setup.py @@ -110,7 +110,7 @@ def _build_ui(self, src): resources = {} resources_found = convert_tools.update_resources(src, resources) - contents = convert_tools.ui_to_py(src) + contents = os.popen(f"python -m PyQt6.uic.pyuic {src}").read() if resources_found is not None: contents = convert_tools.modify_py(contents, resources) diff --git a/reqs/constraints.txt b/reqs/constraints.txt index 1c09e4c67..0e076c758 100644 --- a/reqs/constraints.txt +++ b/reqs/constraints.txt @@ -45,6 +45,7 @@ pyobjc-framework-Cocoa==9.0 pyobjc-framework-Quartz==9.0 pyparsing==3.0.3 PyQt6==6.4.2 +PyQt6-Qt6==6.4.3 pyqt6rc==0.5.2 pyserial==3.5 pytest==6.2.5 diff --git a/reqs/dist_extra_gui_qt.txt b/reqs/dist_extra_gui_qt.txt index 2d3254e6c..294e4a5f0 100644 --- a/reqs/dist_extra_gui_qt.txt +++ b/reqs/dist_extra_gui_qt.txt @@ -1,3 +1,4 @@ PyQt6>=6.4 +pyqt6rc>=0.5.2 # vim: ft=cfg commentstring=#\ %s list diff --git a/setup.cfg b/setup.cfg index 8a1ef9c3e..52a68e4a5 100644 --- a/setup.cfg +++ b/setup.cfg @@ -40,6 +40,7 @@ packages = plover.dictionary plover.gui_none plover.gui_qt + plover.gui_qt.resources plover.machine plover.machine.keyboard_capture plover.macro @@ -116,6 +117,5 @@ plover = messages/plover.pot plover.gui_qt = *.ui - resources/* # vim: commentstring=#\ %s list diff --git a/windows/dist_blacklist.txt b/windows/dist_blacklist.txt index 6faaf7da8..3d7c601df 100644 --- a/windows/dist_blacklist.txt +++ b/windows/dist_blacklist.txt @@ -1,7 +1,7 @@ # Python. Scripts -# PyQt5. -:Lib/site-packages/PyQt5 +# PyQt6. +:Lib/site-packages/PyQt6 **/*Designer* **/*[Hh]elp* **/*Test* @@ -9,21 +9,18 @@ **/*[Qq]uick* **/*[Ww]eb[Ee]ngine* bindings - Qt5/bin/libeay32.dll - Qt5/bin/ssleay32.dll - Qt5/plugins/platforms/qminimal.dll - Qt5/plugins/platforms/qoffscreen.dll - Qt5/plugins/platforms/qwebgl.dll - Qt5/plugins/sceneparsers - Qt5/qml + Qt6/bin/libeay32.dll + Qt6/bin/ssleay32.dll + Qt6/plugins/platforms/qminimal.dll + Qt6/plugins/platforms/qoffscreen.dll + Qt6/plugins/platforms/qwebgl.dll + Qt6/plugins/sceneparsers + Qt6/qml pylupdate* - pyrcc* uic # Plover. :Lib/site-packages/plover gui_qt/*.ui - gui_qt/*.ui - gui_qt/resources messages/**/*.po messages/plover.pot