Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hooks: update plugins and translations for qt 6.7 #2389

Merged
merged 1 commit into from
May 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 55 additions & 17 deletions cx_Freeze/hooks/_qthooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,36 +176,51 @@ def load_qt_qtgui(finder: ModuleFinder, module: Module) -> None:
"""
name = _qt_implementation(module)
copy_qt_files(finder, name, "PluginsPath", "accessiblebridge")
copy_qt_files(finder, name, "PluginsPath", "generic")
copy_qt_files(finder, name, "PluginsPath", "imageformats")
copy_qt_files(finder, name, "PluginsPath", "pictureformats") # obsolete
# For simplicity, we just copy the platform plugins that are installed.
copy_qt_files(finder, name, "PluginsPath", "platforminputcontexts")
copy_qt_files(finder, name, "PluginsPath", "platforms")
if IS_MACOS:
copy_qt_files(finder, name, "PluginsPath", "platforms/darwin")
copy_qt_files(finder, name, "PluginsPath", "xcbglintegrations")
copy_qt_files(finder, name, "PluginsPath", "platformthemes")
copy_qt_files(finder, name, "PluginsPath", "platforminputcontexts")
copy_qt_files(finder, name, "PluginsPath", "generic")
copy_qt_files(finder, name, "PluginsPath", "iconengines")
copy_qt_files(finder, name, "PluginsPath", "imageformats")
copy_qt_files(finder, name, "PluginsPath", "egldeviceintegrations")
copy_qt_files(finder, name, "TranslationsPath", "qt_??.qm")
copy_qt_files(finder, name, "TranslationsPath", "qt_??_??.qm")
copy_qt_files(finder, name, "TranslationsPath", "qtbase_*.qm")
# old names?
copy_qt_files(finder, name, "PluginsPath", "accessible")
copy_qt_files(finder, name, "PluginsPath", "pictureformats")


def load_qt_qtlocation(finder: ModuleFinder, module: Module) -> None:
"""Include plugins for the module."""
name = _qt_implementation(module)
copy_qt_files(finder, name, "PluginsPath", "geoservices")
copy_qt_files(finder, name, "TranslationsPath", "qtlocation_*.qm")


def load_qt_qtmultimedia(finder: ModuleFinder, module: Module) -> None:
"""Include plugins for the module."""
name = _qt_implementation(module)
copy_qt_files(finder, name, "PluginsPath", "multimedia")
copy_qt_files(finder, name, "TranslationsPath", "qtmultimedia_*.qm")
# ?
copy_qt_files(finder, name, "PluginsPath", "audio")
copy_qt_files(finder, name, "PluginsPath", "mediaservice")
copy_qt_files(finder, name, "PluginsPath", "multimedia")
copy_qt_files(finder, name, "PluginsPath", "playlistformats")
copy_qt_files(finder, name, "PluginsPath", "resourcepolicy")
copy_qt_files(finder, name, "PluginsPath", "video")
copy_qt_files(finder, name, "TranslationsPath", "qtmultimedia_*.qm")


def load_qt_qtnetwork(finder: ModuleFinder, module: Module) -> None:
"""Include plugins for the module."""
name = _qt_implementation(module)
copy_qt_files(finder, name, "PluginsPath", "bearer")
copy_qt_files(finder, name, "PluginsPath", "networkaccess")
copy_qt_files(finder, name, "PluginsPath", "networkinformation")
copy_qt_files(finder, name, "PluginsPath", "tls")
copy_qt_files(finder, name, "PluginsPath", "bearer") # ?


def load_qt_qtopengl(finder: ModuleFinder, module: Module) -> None:
Expand Down Expand Up @@ -237,12 +252,20 @@ def load_qt_qtqml(finder: ModuleFinder, module: Module) -> None:
"""Include plugins for the module."""
name = _qt_implementation(module)
copy_qt_files(finder, name, "PluginsPath", "qmltooling")
copy_qt_files(finder, name, "PluginsPath", "qmllint") # pyqt6


def load_qt_qtquick(finder: ModuleFinder, module: Module) -> None:
"""Include plugins for the module."""
name = _qt_implementation(module)
copy_qt_files(finder, name, "PluginsPath", "scenegraph")
copy_qt_files(finder, name, "PluginsPath", "sceneparsers") # pyqt6


def load_qt_qtquick3d(finder: ModuleFinder, module: Module) -> None:
"""Include plugins for the module."""
name = _qt_implementation(module)
copy_qt_files(finder, name, "PluginsPath", "assetimporters")


def load_qt_qtscript(finder: ModuleFinder, module: Module) -> None:
Expand All @@ -251,23 +274,35 @@ def load_qt_qtscript(finder: ModuleFinder, module: Module) -> None:
copy_qt_files(finder, name, "PluginsPath", "script")


def load_qt_qtscxml(finder: ModuleFinder, module: Module) -> None:
"""Include plugins for the module."""
name = _qt_implementation(module)
copy_qt_files(finder, name, "PluginsPath", "scxmldatamodel")


def load_qt_qtsensors(finder: ModuleFinder, module: Module) -> None:
"""Include plugins for the module."""
name = _qt_implementation(module)
copy_qt_files(finder, name, "PluginsPath", "sensorgestures")
copy_qt_files(finder, name, "PluginsPath", "sensors")
copy_qt_files(finder, name, "PluginsPath", "sensorgestures") # pyqt6


def load_qt_qtsql(finder: ModuleFinder, module: Module) -> None:
def load_qt_qtserialbus(finder: ModuleFinder, module: Module) -> None:
"""Include plugins for the module."""
name = _qt_implementation(module)
copy_qt_files(finder, name, "PluginsPath", "sqldrivers")
copy_qt_files(finder, name, "PluginsPath", "canbus")


def load_qt_qtserialport(finder: ModuleFinder, module: Module) -> None:
"""Include translations for the module."""
name = _qt_implementation(module)
copy_qt_files(finder, name, "TranslationsPath", "qtserialport_*.qm")


def load_qt_qtsvg(finder: ModuleFinder, module: Module) -> None:
def load_qt_qtsql(finder: ModuleFinder, module: Module) -> None:
"""Include plugins for the module."""
name = _qt_implementation(module)
copy_qt_files(finder, name, "PluginsPath", "iconengines")
copy_qt_files(finder, name, "PluginsPath", "sqldrivers")


def load_qt_qtwebenginecore(finder: ModuleFinder, module: Module) -> None:
Expand Down Expand Up @@ -328,22 +363,25 @@ def load_qt_qtwebenginecore(finder: ModuleFinder, module: Module) -> None:

copy_qt_files(finder, name, "DataPath", "resources")
copy_qt_files(finder, name, "TranslationsPath", "qtwebengine_*.qm")
copy_qt_files(finder, name, "TranslationsPath", "qtwebengine_locales")


def load_qt_qtwebenginewidgets(finder: ModuleFinder, module: Module) -> None:
"""Include data and plugins for the module."""
name = _qt_implementation(module)
copy_qt_files(finder, name, "LibrariesPath", "*WebEngineWidgets.*")
copy_qt_files(finder, name, "PluginsPath", "designer")
copy_qt_files(finder, name, "PluginsPath", "imageformats")
copy_qt_files(finder, name, "PluginsPath", "webview")
copy_qt_files(finder, name, "PluginsPath", "xcbglintegrations")


def load_qt_qtwebsockets(finder: ModuleFinder, module: Module) -> None:
"""Include translations for the module."""
name = _qt_implementation(module)
copy_qt_files(finder, name, "TranslationsPath", "qtwebsockets_*.qm")


def load_qt_qtwidgets(finder: ModuleFinder, module: Module) -> None:
"""Include plugins for the module."""
name = _qt_implementation(module)
copy_qt_files(finder, name, "PluginsPath", "accessible")
copy_qt_files(finder, name, "PluginsPath", "styles")


Expand Down
1 change: 0 additions & 1 deletion cx_Freeze/hooks/pyqt5/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
)
from cx_Freeze.hooks._qthooks import load_qt_qtqml as load_pyqt5_qtqml
from cx_Freeze.hooks._qthooks import load_qt_qtsql as load_pyqt5_qtsql
from cx_Freeze.hooks._qthooks import load_qt_qtsvg as load_pyqt5_qtsvg
from cx_Freeze.hooks._qthooks import (
load_qt_qtwebenginecore as _load_qt_qtwebenginecore,
)
Expand Down
21 changes: 20 additions & 1 deletion cx_Freeze/hooks/pyqt6/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
load_qt_qtdesigner as load_pyqt6_qtdesigner,
)
from cx_Freeze.hooks._qthooks import load_qt_qtgui as load_pyqt6_qtgui
from cx_Freeze.hooks._qthooks import (
load_qt_qtlocation as load_pyqt6_qtlocation,
)
from cx_Freeze.hooks._qthooks import (
load_qt_qtmultimedia as load_pyqt6_qtmultimedia,
)
Expand All @@ -31,14 +34,24 @@
)
from cx_Freeze.hooks._qthooks import load_qt_qtqml as load_pyqt6_qtqml
from cx_Freeze.hooks._qthooks import load_qt_qtquick as load_pyqt6_qtquick
from cx_Freeze.hooks._qthooks import load_qt_qtquick3d as load_pyqt6_qtquick3d
from cx_Freeze.hooks._qthooks import load_qt_qtscxml as load_pyqt6_qtscxml
from cx_Freeze.hooks._qthooks import (
load_qt_qtserialbus as load_pyqt6_qtserialbus,
)
from cx_Freeze.hooks._qthooks import (
load_qt_qtserialport as load_pyqt6_qtserialport,
)
from cx_Freeze.hooks._qthooks import load_qt_qtsql as load_pyqt6_qtsql
from cx_Freeze.hooks._qthooks import load_qt_qtsvg as load_pyqt6_qtsvg
from cx_Freeze.hooks._qthooks import (
load_qt_qtwebenginecore as load_pyqt6_qtwebenginecore,
)
from cx_Freeze.hooks._qthooks import (
load_qt_qtwebenginewidgets as load_pyqt6_qtwebenginewidgets,
)
from cx_Freeze.hooks._qthooks import (
load_qt_qtwebsockets as load_pyqt6_qtwebsockets,
)
from cx_Freeze.hooks._qthooks import (
load_qt_qtwidgets as load_pyqt6_qtwidgets_base,
)
Expand Down Expand Up @@ -119,17 +132,23 @@ def load_pyqt6_qtwidgets(finder: ModuleFinder, module: Module) -> None:
"load_pyqt6",
"load_pyqt6_qtdesigner",
"load_pyqt6_qtgui",
"load_pyqt6_qtlocation",
"load_pyqt6_qtmultimedia",
"load_pyqt6_qtnetwork",
"load_pyqt6_qtopengl",
"load_pyqt6_qtopenglwidgets",
"load_pyqt6_qtpositioning",
"load_pyqt6_qtprintsupport",
"load_pyqt6_qtquick",
"load_pyqt6_qtquick3d",
"load_pyqt6_qtscxml",
"load_pyqt6_qtserialbus",
"load_pyqt6_qtserialport",
"load_pyqt6_qtqml",
"load_pyqt6_qtsql",
"load_pyqt6_qtsvg",
"load_pyqt6_qtwebenginecore",
"load_pyqt6_qtwebenginewidgets",
"load_pyqt6_qtwebsockets",
"load_pyqt6_qtwidgets",
]
1 change: 0 additions & 1 deletion cx_Freeze/hooks/pyside2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
from cx_Freeze.hooks._qthooks import load_qt_qtqml as load_pyside2_qtqml
from cx_Freeze.hooks._qthooks import load_qt_qtscript as load_pyside2_qtscript
from cx_Freeze.hooks._qthooks import load_qt_qtsql as load_pyside2_qtsql
from cx_Freeze.hooks._qthooks import load_qt_qtsvg as load_pyside2_qtsvg
from cx_Freeze.hooks._qthooks import (
load_qt_qtwebenginecore as _load_qt_qtwebenginecore,
)
Expand Down
23 changes: 22 additions & 1 deletion cx_Freeze/hooks/pyside6/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
load_qt_qtdesigner as load_pyside6_qtdesigner,
)
from cx_Freeze.hooks._qthooks import load_qt_qtgui as load_pyside6_qtgui
from cx_Freeze.hooks._qthooks import (
load_qt_qtlocation as load_pyside6_qtlocation,
)
from cx_Freeze.hooks._qthooks import (
load_qt_qtmultimedia as load_pyside6_qtmultimedia,
)
Expand All @@ -34,14 +37,26 @@
)
from cx_Freeze.hooks._qthooks import load_qt_qtqml as load_pyside6_qtqml
from cx_Freeze.hooks._qthooks import load_qt_qtquick as load_pyside6_qtquick
from cx_Freeze.hooks._qthooks import (
load_qt_qtquick3d as load_pyside6_qtquick3d,
)
from cx_Freeze.hooks._qthooks import load_qt_qtscxml as load_pyside6_qtscxml
from cx_Freeze.hooks._qthooks import (
load_qt_qtserialbus as load_pyside6_qtserialbus,
)
from cx_Freeze.hooks._qthooks import (
load_qt_qtserialport as load_pyside6_qtserialport,
)
from cx_Freeze.hooks._qthooks import load_qt_qtsql as load_pyside6_qtsql
from cx_Freeze.hooks._qthooks import load_qt_qtsvg as load_pyside6_qtsvg
from cx_Freeze.hooks._qthooks import (
load_qt_qtwebenginecore as load_pyside6_qtwebenginecore,
)
from cx_Freeze.hooks._qthooks import (
load_qt_qtwebenginewidgets as load_pyside6_qtwebenginewidgets,
)
from cx_Freeze.hooks._qthooks import (
load_qt_qtwebsockets as load_pyside6_qtwebsockets,
)
from cx_Freeze.hooks._qthooks import (
load_qt_qtwidgets as load_pyside6_qtwidgets,
)
Expand Down Expand Up @@ -126,17 +141,23 @@ def {name}(package_dir):
"load_pyside6",
"load_pyside6_qtdesigner",
"load_pyside6_qtgui",
"load_pyside6_qtlocation",
"load_pyside6_qtmultimedia",
"load_pyside6_qtnetwork",
"load_pyside6_qtopengl",
"load_pyside6_qtopenglwidgets",
"load_pyside6_qtpositioning",
"load_pyside6_qtprintsupport",
"load_pyside6_qtquick",
"load_pyside6_qtquick3d",
"load_pyside6_qtscxml",
"load_pyside6_qtserialbus",
"load_pyside6_qtserialport",
"load_pyside6_qtqml",
"load_pyside6_qtsql",
"load_pyside6_qtsvg",
"load_pyside6_qtwebenginecore",
"load_pyside6_qtwebenginewidgets",
"load_pyside6_qtwebsockets",
"load_pyside6_qtwidgets",
]
1 change: 0 additions & 1 deletion cx_Freeze/importshed/PyQt6/QtMultimediaWidgets.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Generated by cx_Freeze

import enum
import PyQt6.sip
from PyQt6 import QtCore
from PyQt6 import QtGui
Expand Down
1 change: 0 additions & 1 deletion cx_Freeze/importshed/PyQt6/QtSvgWidgets.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Generated by cx_Freeze

import enum
import PyQt6.sip
from PyQt6 import QtCore
from PyQt6 import QtGui
Expand Down
1 change: 0 additions & 1 deletion cx_Freeze/importshed/PyQt6/QtWebChannel.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Generated by cx_Freeze

import enum
import PyQt6.sip
from PyQt6 import QtCore
import datetime
1 change: 0 additions & 1 deletion cx_Freeze/importshed/PyQt6/QtWebEngineWidgets.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Generated by cx_Freeze

import enum
import PyQt6.sip
from PyQt6 import QtCore
from PyQt6 import QtNetwork
Expand Down
1 change: 1 addition & 0 deletions cx_Freeze/importshed/PySide6/Qt3DRender.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import PySide6.Qt3DRender
import PySide6.QtCore
import PySide6.QtGui
import PySide6.QtOpenGL
import PySide6.Qt3DCore
import enum
from PySide6.QtCore import Signal
Expand Down
1 change: 0 additions & 1 deletion cx_Freeze/importshed/PySide6/QtConcurrent.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@
import PySide6.QtConcurrent
import PySide6.QtCore
import enum
from PySide6.QtCore import Signal
from shiboken6 import Shiboken
11 changes: 11 additions & 0 deletions cx_Freeze/importshed/PySide6/QtGraphs.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Generated by cx_Freeze

import PySide6.QtGraphs
import PySide6.QtCore
import PySide6.QtGui
import PySide6.QtQml
import PySide6.QtQuick
import PySide6.QtQuickWidgets
import enum
from PySide6.QtCore import Signal
from shiboken6 import Shiboken
1 change: 0 additions & 1 deletion cx_Freeze/importshed/PySide6/QtHttpServer.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ import PySide6.QtHttpServer
import PySide6.QtCore
import PySide6.QtNetwork
import enum
from PySide6.QtCore import Signal
from shiboken6 import Shiboken
3 changes: 3 additions & 0 deletions cx_Freeze/importshed/PySide6/QtQuickTest.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Generated by cx_Freeze

import PySide6.QtQuickTest
1 change: 1 addition & 0 deletions cx_Freeze/importshed/PySide6/QtSvg.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ import PySide6.QtCore
import PySide6.QtGui
import enum
from PySide6.QtCore import Signal
from shiboken6 import Shiboken
2 changes: 1 addition & 1 deletion cx_Freeze/importshed/PySide6/QtTest.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ import PySide6.QtCore
import PySide6.QtGui
import PySide6.QtWidgets
import enum
from PySide6.QtCore import Signal, SignalInstance
from PySide6.QtCore import SignalInstance
from shiboken6 import Shiboken
2 changes: 1 addition & 1 deletion cx_Freeze/importshed/PySide6/QtWidgets.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ import PySide6.QtWidgets
import PySide6.QtCore
import PySide6.QtGui
import enum
from PySide6.QtCore import Signal
from PySide6.QtCore import Signal, SignalInstance
from shiboken6 import Shiboken