Upgrade from PySide2 (Qt 5) to PySide6 (Qt 6)

PySide6 prebuilt binaries have support a wider range
of CPU architectures (namely Apple Silicon/M1).
This commit is contained in:
Guthrie McAfee Armstrong 2022-05-31 17:04:01 -04:00
parent c088951cd7
commit 851124e863
No known key found for this signature in database
GPG key ID: ED4DAE89F08242D2
6 changed files with 21 additions and 30 deletions

View file

@ -4,7 +4,7 @@ import signal
import platform import platform
import click import click
import uuid import uuid
from PySide2 import QtCore, QtWidgets from PySide6 import QtCore, QtWidgets
from .common import GuiCommon from .common import GuiCommon
from .main_window import MainWindow from .main_window import MainWindow
@ -46,9 +46,6 @@ class ApplicationWrapper(QtCore.QObject):
@click.argument("filename", required=False) @click.argument("filename", required=False)
def gui_main(filename): def gui_main(filename):
if platform.system() == "Darwin": if platform.system() == "Darwin":
# Required for macOS Big Sur: https://stackoverflow.com/a/64878899
os.environ["QT_MAC_WANTS_LAYER"] = "1"
# Make sure /usr/local/bin is in the path # Make sure /usr/local/bin is in the path
os.environ["PATH"] = "/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin" os.environ["PATH"] = "/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin"

View file

@ -3,7 +3,7 @@ import platform
import subprocess import subprocess
import shlex import shlex
import pipes import pipes
from PySide2 import QtCore, QtGui, QtWidgets from PySide6 import QtCore, QtGui, QtWidgets
from colorama import Fore from colorama import Fore
if platform.system() == "Darwin": if platform.system() == "Darwin":

View file

@ -4,7 +4,7 @@ import tempfile
import subprocess import subprocess
import json import json
import shutil import shutil
from PySide2 import QtCore, QtGui, QtWidgets from PySide6 import QtCore, QtGui, QtWidgets
from colorama import Style, Fore from colorama import Style, Fore
from ..common import Common from ..common import Common

View file

@ -1,5 +1,5 @@
import platform import platform
from PySide2 import QtWidgets from PySide6 import QtWidgets
class SysTray(QtWidgets.QSystemTrayIcon): class SysTray(QtWidgets.QSystemTrayIcon):

38
poetry.lock generated
View file

@ -207,15 +207,15 @@ optional = false
python-versions = ">=3.7" python-versions = ">=3.7"
[[package]] [[package]]
name = "pyside2" name = "pyside6"
version = "5.15.2.1" version = "6.2.4"
description = "Python bindings for the Qt cross-platform application and UI framework" description = "Python bindings for the Qt cross-platform application and UI framework"
category = "main" category = "main"
optional = false optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <3.11" python-versions = ">=3.6, <3.11"
[package.dependencies] [package.dependencies]
shiboken2 = "5.15.2.1" shiboken6 = "6.2.4"
[[package]] [[package]]
name = "pywin32" name = "pywin32"
@ -252,12 +252,12 @@ socks = ["PySocks (>=1.5.6,!=1.5.7)", "win-inet-pton"]
use_chardet_on_py3 = ["chardet (>=3.0.2,<5)"] use_chardet_on_py3 = ["chardet (>=3.0.2,<5)"]
[[package]] [[package]]
name = "shiboken2" name = "shiboken6"
version = "5.15.2.1" version = "6.2.4"
description = "Python / C++ bindings helper module" description = "Python / C++ bindings helper module"
category = "main" category = "main"
optional = false optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <3.11" python-versions = ">=3.6, <3.11"
[[package]] [[package]]
name = "strip-ansi" name = "strip-ansi"
@ -345,7 +345,7 @@ testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-
[metadata] [metadata]
lock-version = "1.1" lock-version = "1.1"
python-versions = ">=3.7,<3.11" python-versions = ">=3.7,<3.11"
content-hash = "fc18f36198c3f56ae4470b7d99759ae9d46f42deb90c4606ac2688fbdec75e89" content-hash = "e90cfa70e7a6f0df277cb8d8a5eccdf10c65c26f21b51e46d4d98dcd2a17f712"
[metadata.files] [metadata.files]
altgraph = [ altgraph = [
@ -526,13 +526,10 @@ pyinstaller-hooks-contrib = [
{file = "pyinstaller-hooks-contrib-2022.6.tar.gz", hash = "sha256:9dc611cf6667301e95384b4a0631b032bbffa16a0688f4cfa014d0c1e751d276"}, {file = "pyinstaller-hooks-contrib-2022.6.tar.gz", hash = "sha256:9dc611cf6667301e95384b4a0631b032bbffa16a0688f4cfa014d0c1e751d276"},
{file = "pyinstaller_hooks_contrib-2022.6-py2.py3-none-any.whl", hash = "sha256:e38bf9266c57be19647762ee63b012683beb6919c6bc2ecdc66ca174edec44a0"}, {file = "pyinstaller_hooks_contrib-2022.6-py2.py3-none-any.whl", hash = "sha256:e38bf9266c57be19647762ee63b012683beb6919c6bc2ecdc66ca174edec44a0"},
] ]
pyside2 = [ pyside6 = [
{file = "PySide2-5.15.2.1-5.15.2-cp27-cp27m-macosx_10_13_intel.whl", hash = "sha256:b5e1d92f26b0bbaefff67727ccbb2e1b577f2c0164b349b3d6e80febb4c5bde2"}, {file = "PySide6-6.2.4-6.2.4-cp36.cp37.cp38.cp39.cp310-abi3-macosx_10_14_universal2.whl", hash = "sha256:d18f4d5ad2d4921dbb47166d3fce11a2eca1c83b670e210f983d60871d2e6bdb"},
{file = "PySide2-5.15.2.1-5.15.2-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:235240b6ec8206d9fdf0232472c6ef3241783d480425e5b54796f06e39ed23da"}, {file = "PySide6-6.2.4-6.2.4-cp36.cp37.cp38.cp39.cp310-abi3-manylinux1_x86_64.whl", hash = "sha256:4656853a34bea096bb0a1f74e22607f99cca6e68d55a4f86a73770c5ec74565e"},
{file = "PySide2-5.15.2.1-5.15.2-cp35.cp36.cp37.cp38.cp39.cp310-abi3-macosx_10_13_intel.whl", hash = "sha256:a9e2e6bbcb5d2ebb421e46e72244a0f4fe0943b2288115f80a863aacc1de1f06"}, {file = "PySide6-6.2.4-6.2.4-cp36.cp37.cp38.cp39.cp310-none-win_amd64.whl", hash = "sha256:5e79a476fe05f303c1aadf6be7d31c486e6064319393ad1519f1f3f114296571"},
{file = "PySide2-5.15.2.1-5.15.2-cp35.cp36.cp37.cp38.cp39.cp310-abi3-manylinux1_x86_64.whl", hash = "sha256:23886c6391ebd916e835fa1b5ae66938048504fd3a2934ae3189a96cd5ac0b46"},
{file = "PySide2-5.15.2.1-5.15.2-cp35.cp36.cp37.cp38.cp39.cp310-none-win32.whl", hash = "sha256:439509e53cfe05abbf9a99422a2cbad086408b0f9bf5e6f642ff1b13b1f8b055"},
{file = "PySide2-5.15.2.1-5.15.2-cp35.cp36.cp37.cp38.cp39.cp310-none-win_amd64.whl", hash = "sha256:af6b263fe63ba6dea7eaebae80aa7b291491fe66f4f0057c0aafe780cc83da9d"},
] ]
pywin32 = [ pywin32 = [
{file = "pywin32-304-cp310-cp310-win32.whl", hash = "sha256:3c7bacf5e24298c86314f03fa20e16558a4e4138fc34615d7de4070c23e65af3"}, {file = "pywin32-304-cp310-cp310-win32.whl", hash = "sha256:3c7bacf5e24298c86314f03fa20e16558a4e4138fc34615d7de4070c23e65af3"},
@ -558,13 +555,10 @@ requests = [
{file = "requests-2.27.1-py2.py3-none-any.whl", hash = "sha256:f22fa1e554c9ddfd16e6e41ac79759e17be9e492b3587efa038054674760e72d"}, {file = "requests-2.27.1-py2.py3-none-any.whl", hash = "sha256:f22fa1e554c9ddfd16e6e41ac79759e17be9e492b3587efa038054674760e72d"},
{file = "requests-2.27.1.tar.gz", hash = "sha256:68d7c56fd5a8999887728ef304a6d12edc7be74f1cfa47714fc8b414525c9a61"}, {file = "requests-2.27.1.tar.gz", hash = "sha256:68d7c56fd5a8999887728ef304a6d12edc7be74f1cfa47714fc8b414525c9a61"},
] ]
shiboken2 = [ shiboken6 = [
{file = "shiboken2-5.15.2.1-5.15.2-cp27-cp27m-macosx_10_13_intel.whl", hash = "sha256:f890f5611ab8f48b88cfecb716da2ac55aef99e2923198cefcf781842888ea65"}, {file = "shiboken6-6.2.4-6.2.4-cp36.cp37.cp38.cp39.cp310-abi3-macosx_10_14_universal2.whl", hash = "sha256:5030b6314ef504cc5d93d272aaef4e0ccb256324caa2de965c88d32c994d98b2"},
{file = "shiboken2-5.15.2.1-5.15.2-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:87079c07587859a525b9800d60b1be971338ce9b371d6ead81f15ee5a46d448b"}, {file = "shiboken6-6.2.4-6.2.4-cp36.cp37.cp38.cp39.cp310-abi3-manylinux1_x86_64.whl", hash = "sha256:05f4652dda7043b1a04265cabc1709c22d643d204fac2c4b0ccf7d0044092c62"},
{file = "shiboken2-5.15.2.1-5.15.2-cp35.cp36.cp37.cp38.cp39.cp310-abi3-macosx_10_13_intel.whl", hash = "sha256:ffd3d0ec3d508e592d7ee3885d27fee1f279a49989f734eb130f46d9501273a9"}, {file = "shiboken6-6.2.4-6.2.4-cp36.cp37.cp38.cp39.cp310-none-win_amd64.whl", hash = "sha256:8eb2ed2ba8ec3f6505cf80b81c7e85d996165a9e4664f99675ecc8a82b7b3c36"},
{file = "shiboken2-5.15.2.1-5.15.2-cp35.cp36.cp37.cp38.cp39.cp310-abi3-manylinux1_x86_64.whl", hash = "sha256:63debfcc531b6a2b4985aa9b71433d2ad3bac542acffc729cc0ecaa3854390c0"},
{file = "shiboken2-5.15.2.1-5.15.2-cp35.cp36.cp37.cp38.cp39.cp310-none-win32.whl", hash = "sha256:eb0da44b6fa60c6bd317b8f219e500595e94e0322b33ec5b4e9f406bedaee555"},
{file = "shiboken2-5.15.2.1-5.15.2-cp35.cp36.cp37.cp38.cp39.cp310-none-win_amd64.whl", hash = "sha256:a0d0fdeb12b72c8af349b9642ccc67afd783dca449309f45e78cda50272fd6b7"},
] ]
strip-ansi = [ strip-ansi = [
{file = "strip-ansi-0.1.1.tar.gz", hash = "sha256:5d60f239cc8a37fdd52b43c3e66e893d45ba0423115db59eca0d2eef83b07729"}, {file = "strip-ansi-0.1.1.tar.gz", hash = "sha256:5d60f239cc8a37fdd52b43c3e66e893d45ba0423115db59eca0d2eef83b07729"},

View file

@ -12,7 +12,7 @@ appdirs = "*"
requests = "*" requests = "*"
macholib = "*" macholib = "*"
termcolor = "*" termcolor = "*"
PySide2 = "5.15.2.1" PySide6 = "6.2.*" # 6.2 is LTS
colorama = "*" colorama = "*"
psutil = "*" psutil = "*"
cx_freeze = {version = "*", platform = "win32"} cx_freeze = {version = "*", platform = "win32"}