From b13f2eb4485b03cf237ab699da88620ba88e7b4c Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Thu, 26 Aug 2021 16:44:25 +0200 Subject: Blanket PyQt5 -> PyQt6 --- scripts/dev/build_pyqt_wheel.py | 4 ++-- scripts/dev/build_release.py | 2 +- scripts/dev/recompile_requirements.py | 10 +++++----- scripts/dev/run_pylint_on_tests.py | 2 +- scripts/dev/run_vulture.py | 12 ++++++------ scripts/dev/standardpaths_tester.py | 2 +- scripts/keytester.py | 2 +- scripts/link_pyqt.py | 8 ++++---- scripts/mkvenv.py | 16 ++++++++-------- scripts/opengl_info.py | 2 +- scripts/testbrowser/testbrowser_webengine.py | 6 +++--- scripts/testbrowser/testbrowser_webkit.py | 8 ++++---- 12 files changed, 37 insertions(+), 37 deletions(-) (limited to 'scripts') diff --git a/scripts/dev/build_pyqt_wheel.py b/scripts/dev/build_pyqt_wheel.py index b63331341..36fc9cbe4 100644 --- a/scripts/dev/build_pyqt_wheel.py +++ b/scripts/dev/build_pyqt_wheel.py @@ -78,8 +78,8 @@ def main(): utils.print_title("Downloading wheels") subprocess.run([sys.executable, '-m', 'pip', 'download', - '--no-deps', '--only-binary', 'PyQt5,PyQtWebEngine', - 'PyQt5', 'PyQtWebEngine'], check=True) + '--no-deps', '--only-binary', 'PyQt6,PyQtWebEngine', + 'PyQt6', 'PyQtWebEngine'], check=True) utils.print_title("Patching wheels") input_files = wheels_dir.glob('*.whl') diff --git a/scripts/dev/build_release.py b/scripts/dev/build_release.py index a1c6646eb..b849bc666 100755 --- a/scripts/dev/build_release.py +++ b/scripts/dev/build_release.py @@ -226,7 +226,7 @@ def patch_mac_app(): plistlib.dump(plist_data, f) # Replace some duplicate files by symlinks - framework_path = os.path.join(app_path, 'Contents', 'MacOS', 'PyQt5', + framework_path = os.path.join(app_path, 'Contents', 'MacOS', 'PyQt6', 'Qt', 'lib', 'QtWebEngineCore.framework') core_lib = os.path.join(framework_path, 'Versions', '5', 'QtWebEngineCore') diff --git a/scripts/dev/recompile_requirements.py b/scripts/dev/recompile_requirements.py index d8ed9974b..133735644 100644 --- a/scripts/dev/recompile_requirements.py +++ b/scripts/dev/recompile_requirements.py @@ -138,15 +138,15 @@ CHANGELOG_URLS = { 'cryptography': 'https://cryptography.io/en/latest/changelog.html', 'toml': 'https://github.com/uiri/toml/releases', 'tomli': 'https://github.com/hukkin/tomli/blob/master/CHANGELOG.md', - 'PyQt5': 'https://www.riverbankcomputing.com/news', - 'PyQt5-Qt': 'https://www.riverbankcomputing.com/news', - 'PyQt5-Qt5': 'https://www.riverbankcomputing.com/news', + 'PyQt6': 'https://www.riverbankcomputing.com/news', + 'PyQt6-Qt': 'https://www.riverbankcomputing.com/news', + 'PyQt6-Qt5': 'https://www.riverbankcomputing.com/news', 'PyQtWebEngine': 'https://www.riverbankcomputing.com/news', 'PyQtWebEngine-Qt': 'https://www.riverbankcomputing.com/news', 'PyQtWebEngine-Qt5': 'https://www.riverbankcomputing.com/news', 'PyQt-builder': 'https://www.riverbankcomputing.com/news', - 'PyQt5-sip': 'https://www.riverbankcomputing.com/news', - 'PyQt5-stubs': 'https://github.com/stlehmann/PyQt5-stubs/blob/master/CHANGELOG.md', + 'PyQt6-sip': 'https://www.riverbankcomputing.com/news', + 'PyQt6-stubs': 'https://github.com/stlehmann/PyQt6-stubs/blob/master/CHANGELOG.md', 'sip': 'https://www.riverbankcomputing.com/news', 'Pygments': 'https://pygments.org/docs/changelog/', 'vulture': 'https://github.com/jendrikseipp/vulture/blob/master/CHANGELOG.md', diff --git a/scripts/dev/run_pylint_on_tests.py b/scripts/dev/run_pylint_on_tests.py index d0385bd17..657f6ca33 100644 --- a/scripts/dev/run_pylint_on_tests.py +++ b/scripts/dev/run_pylint_on_tests.py @@ -70,7 +70,7 @@ def main(): args = [ '--disable={}'.format(','.join(disabled)), - '--ignored-modules=helpers,pytest,PyQt5', + '--ignored-modules=helpers,pytest,PyQt6', r'--ignore-long-lines=( None: 'darwin': {'x86_64'}, } if sys.platform not in supported_archs: - utils.print_error(f"{sys.platform} is not a supported platform by PyQt5 binary " + utils.print_error(f"{sys.platform} is not a supported platform by PyQt6 binary " "packages, this will most likely fail.") elif platform.machine() not in supported_archs[sys.platform]: utils.print_error( - f"{platform.machine()} is not a supported architecture for PyQt5 binaries " + f"{platform.machine()} is not a supported architecture for PyQt6 binaries " f"on {sys.platform}, this will most likely fail.") elif sys.platform == 'linux' and platform.libc_ver()[0] != 'glibc': - utils.print_error("Non-glibc Linux is not a supported platform for PyQt5 " + utils.print_error("Non-glibc Linux is not a supported platform for PyQt6 " "binaries, this will most likely fail.") pip_install(venv_dir, '-r', pyqt_requirements_file(version), - '--only-binary', 'PyQt5,PyQtWebEngine') + '--only-binary', 'PyQt6,PyQtWebEngine') def install_pyqt_source(venv_dir: pathlib.Path, version: str) -> None: """Install PyQt from the source tarball.""" utils.print_title("Installing PyQt from sources") pip_install(venv_dir, '-r', pyqt_requirements_file(version), - '--verbose', '--no-binary', 'PyQt5,PyQtWebEngine') + '--verbose', '--no-binary', 'PyQt6,PyQtWebEngine') def install_pyqt_link(venv_dir: pathlib.Path) -> None: @@ -317,7 +317,7 @@ def apply_xcb_util_workaround( libxcb_util_path = pathlib.Path(libxcb_util_libs[0]) code = [ - 'from PyQt5.QtCore import QLibraryInfo', + 'from PyQt6.QtCore import QLibraryInfo', 'print(QLibraryInfo.location(QLibraryInfo.LibrariesPath))', ] proc = run_venv(venv_dir, 'python', '-c', '; '.join(code), capture_output=True) @@ -371,8 +371,8 @@ def run_qt_smoke_test(venv_dir: pathlib.Path) -> None: utils.print_title("Running Qt smoke test") code = [ 'import sys', - 'from PyQt5.QtWidgets import QApplication', - 'from PyQt5.QtCore import qVersion, QT_VERSION_STR, PYQT_VERSION_STR', + 'from PyQt6.QtWidgets import QApplication', + 'from PyQt6.QtCore import qVersion, QT_VERSION_STR, PYQT_VERSION_STR', 'print(f"Python: {sys.version}")', 'print(f"qVersion: {qVersion()}")', 'print(f"QT_VERSION_STR: {QT_VERSION_STR}")', diff --git a/scripts/opengl_info.py b/scripts/opengl_info.py index 1bfdf22aa..bfd57ef8d 100644 --- a/scripts/opengl_info.py +++ b/scripts/opengl_info.py @@ -20,7 +20,7 @@ """Show information about the OpenGL setup.""" -from PyQt5.QtGui import (QOpenGLContext, QOpenGLVersionProfile, +from PyQt6.QtGui import (QOpenGLContext, QOpenGLVersionProfile, QOffscreenSurface, QGuiApplication) app = QGuiApplication([]) diff --git a/scripts/testbrowser/testbrowser_webengine.py b/scripts/testbrowser/testbrowser_webengine.py index 73fa6828e..16c9739cb 100755 --- a/scripts/testbrowser/testbrowser_webengine.py +++ b/scripts/testbrowser/testbrowser_webengine.py @@ -23,9 +23,9 @@ import sys import argparse -from PyQt5.QtCore import QUrl -from PyQt5.QtWidgets import QApplication -from PyQt5.QtWebEngineWidgets import QWebEngineView +from PyQt6.QtCore import QUrl +from PyQt6.QtWidgets import QApplication +from PyQt6.QtWebEngineWidgets import QWebEngineView def parse_args(): diff --git a/scripts/testbrowser/testbrowser_webkit.py b/scripts/testbrowser/testbrowser_webkit.py index 40938d06b..c148c76f1 100755 --- a/scripts/testbrowser/testbrowser_webkit.py +++ b/scripts/testbrowser/testbrowser_webkit.py @@ -23,10 +23,10 @@ import sys import argparse -from PyQt5.QtCore import QUrl -from PyQt5.QtWidgets import QApplication -from PyQt5.QtWebKit import QWebSettings -from PyQt5.QtWebKitWidgets import QWebView +from PyQt6.QtCore import QUrl +from PyQt6.QtWidgets import QApplication +from PyQt6.QtWebKit import QWebSettings +from PyQt6.QtWebKitWidgets import QWebView def parse_args(): -- cgit v1.2.3-54-g00ecf