diff -Nru pyqt-builder-1.10.3+dfsg/ChangeLog pyqt-builder-1.12.1+dfsg/ChangeLog --- pyqt-builder-1.10.3+dfsg/ChangeLog 2021-07-04 11:38:37.000000000 +0000 +++ pyqt-builder-1.12.1+dfsg/ChangeLog 2021-10-12 15:05:46.000000000 +0000 @@ -1,8 +1,125 @@ +2021-10-12 Phil Thompson + + * NEWS, pyqtbuild/bundle/bundle.py: + Fixed a syntax error in pyqt-bundle. + [1b94d1df9598] [1.12.1] <1.12-maint> + + * .hgtags: + Added tag 1.12.0 for changeset a8e714b1af6a + [fdaf18dae011] + +2021-10-11 Phil Thompson + + * NEWS, doc/pyqtbundle.rst, pyqtbuild/bundle/abstract_package.py, + pyqtbuild/bundle/bundle.py, pyqtbuild/bundle/bundle_main.py, + pyqtbuild/bundle/packages/pyqt.py, pyqtbuild/bundle/qt_metadata.py, + pyqtbuild/bundle/qt_wheel.py, pyqtbuild/bundle/qt_wheel_main.py: + Added support for the --arch option to pyqt-bundle and pyqt-qt- + wheel. + [a8e714b1af6a] [1.12.0] + +2021-10-05 Phil Thompson + + * NEWS, pyqtbuild/builder.py, pyqtbuild/project.py, setup.py: + Build universal2 binaries when using Python 3.10 and Qt v6.2. + [2cbfd9cfac73] + +2021-09-30 Phil Thompson + + * .hgtags: + Added tag 1.11.0 for changeset 128fd244a822 + [543a47e6bc23] + +2021-09-25 Phil Thompson + + * NEWS, pyqtbuild/bundle/packages/pyqt6_webengine.py: + Fixed a native path inconsistency. + [128fd244a822] [1.11.0] + +2021-09-22 Phil Thompson + + * pyqtbuild/bundle/packages/pyqt6.py: + Enable QtBluetooth and QtNfc. + [a67741107958] + + * NEWS, pyqtbuild/bundle/packages/pyqt6.py: + Added support for bundling QAxContainer. + [d30022bc29ee] + +2021-09-21 Phil Thompson + + * NEWS, pyqtbuild/bundle/packages/pyqt6_webengine.py: + Fixed the PyQt6-WebEngine-Qt wheel so that QtWebEngineProcess can + find its resources on Windows. + [59e15a25db3d] + +2021-09-19 Phil Thompson + + * pyqtbuild/bundle/qt_metadata.py: + Fixes for Python v3.6. + [c0ad44be7b76] + + * NEWS, pyqtbuild/bundle/qt_metadata.py, pyqtbuild/bundle/verbose.py: + Qt libraries have the arm64 code removed when bundling or creating + Qt wheels. + [7b6bfb3c29d4] + +2021-09-18 Phil Thompson + + * pyqtbuild/bundle/packages/pyqt.py: + Don't bundle the OpenSSL libraries for Qt v6.2.0 and later. + [eb435cbe95e9] + + * NEWS, pyqtbuild/bundle/qt_metadata.py: + Fixed the bundling of non-debug DLLs that end with a 'd' (ie. the + TLS plugins). + [533def3bd075] + +2021-09-15 Phil Thompson + + * NEWS, pyqtbuild/builder.py: + Fixes for MinGW support. + [24f5bfc4de7a] + +2021-08-25 Phil Thompson + + * NEWS, pyqtbuild/bundle/packages/__init__.py, + pyqtbuild/bundle/packages/pyqt6_webengine.py: + Added support for PyQt6-WebEngine. + [1075fbb452ce] + +2021-08-02 Phil Thompson + + * pyqtbuild/bundle/packages/pyqt6.py: + More Qt metadata fixes. + [517e02292b51] + + * pyqtbuild/bundle/packages/pyqt6.py: + Further updates to the Qt metadata for Qt v6.2.0beta2. + [eaa269cc0b01] + +2021-08-01 Phil Thompson + + * NEWS, pyqtbuild/bundle/packages/pyqt6.py: + Updated the Qt metadata for v6.2.0. + [8aa4f13e15fb] + +2021-07-16 Phil Thompson + + * NEWS, pyqtbuild/bundle/packages/pyqt6.py: + Fixed the changed Qt library names in v6.2.0. + [e1ac73ff29ce] + +2021-07-12 Phil Thompson + + * Merged the 1.10-maint branch. + [9ca728c89b53] + 2021-07-04 Phil Thompson * .hgtags: Added tag 1.10.3 for changeset a5437106d445 - [8b4126f4e0c2] [tip] <1.10-maint> + [8b4126f4e0c2] <1.10-maint> * NEWS, pyqtbuild/bundle/qt_wheel.py: Handle the change in the name of the Qt architecture for macOS in Qt diff -Nru pyqt-builder-1.10.3+dfsg/debian/changelog pyqt-builder-1.12.1+dfsg/debian/changelog --- pyqt-builder-1.10.3+dfsg/debian/changelog 2021-07-06 16:49:04.000000000 +0000 +++ pyqt-builder-1.12.1+dfsg/debian/changelog 2021-10-17 14:20:40.000000000 +0000 @@ -1,3 +1,23 @@ +pyqt-builder (1.12.1+dfsg-1) unstable; urgency=medium + + * New upstream release. + * Bump python3-sipbuild Build-Depends and Depends to 6.3. + + -- Dmitry Shachnev Sun, 17 Oct 2021 17:20:40 +0300 + +pyqt-builder (1.11.0+dfsg-1) unstable; urgency=medium + + * New upstream release. + + -- Dmitry Shachnev Wed, 06 Oct 2021 00:07:00 +0300 + +pyqt-builder (1.10.3+dfsg-2) unstable; urgency=medium + + * Bump Standards-Version to 4.6.0, no changes needed. + * Upload to unstable. + + -- Dmitry Shachnev Sat, 21 Aug 2021 22:02:22 +0300 + pyqt-builder (1.10.3+dfsg-1) experimental; urgency=medium * New upstream release. diff -Nru pyqt-builder-1.10.3+dfsg/debian/control pyqt-builder-1.12.1+dfsg/debian/control --- pyqt-builder-1.10.3+dfsg/debian/control 2021-07-06 16:49:04.000000000 +0000 +++ pyqt-builder-1.12.1+dfsg/debian/control 2021-10-17 14:20:40.000000000 +0000 @@ -7,10 +7,10 @@ dh-python, python3-all, python3-setuptools, - python3-sipbuild (>= 5.5), + python3-sipbuild (>= 6.3), python3-sphinx Rules-Requires-Root: no -Standards-Version: 4.5.1 +Standards-Version: 4.6.0 Homepage: https://riverbankcomputing.com/software/pyqt-builder/intro Vcs-Git: https://salsa.debian.org/python-team/packages/pyqt-builder.git Vcs-Browser: https://salsa.debian.org/python-team/packages/pyqt-builder @@ -18,7 +18,7 @@ Package: python3-pyqtbuild Architecture: all Depends: python3-packaging, - python3-sipbuild (>= 5.5), + python3-sipbuild (>= 6.3), ${misc:Depends}, ${python3:Depends} Recommends: qt5-qmake diff -Nru pyqt-builder-1.10.3+dfsg/doc/pyqtbundle.rst pyqt-builder-1.12.1+dfsg/doc/pyqtbundle.rst --- pyqt-builder-1.10.3+dfsg/doc/pyqtbundle.rst 2021-04-10 09:08:32.000000000 +0000 +++ pyqt-builder-1.12.1+dfsg/doc/pyqtbundle.rst 2021-10-12 15:05:44.000000000 +0000 @@ -66,6 +66,11 @@ ``SUFFIX`` is appended to the build tag in the name of the updated wheel. The build tag is the version number of the copy of Qt being bundled. +.. option:: --arch ARCH + + On macOS, when bundling Qt v6.2 or later, support for the ``ARCH`` + architecture (either ``x86_64`` or ``arm64``) only is included. + .. option:: --exclude NAME The ``NAME`` bindings are excluded from the wheel. This option may be diff -Nru pyqt-builder-1.10.3+dfsg/NEWS pyqt-builder-1.12.1+dfsg/NEWS --- pyqt-builder-1.10.3+dfsg/NEWS 2021-07-04 11:32:11.000000000 +0000 +++ pyqt-builder-1.12.1+dfsg/NEWS 2021-10-12 15:05:45.000000000 +0000 @@ -1,3 +1,16 @@ +v1.12.1 11th October 2021 + - A bug fix release. + +v1.12.0 11th October 2021 + - Build universal2 wheels for Qt v6.2 and later when using Python v3.10 and + later. + - Added the '--arch' command line option to pyqt-bundle to specify a + particular architecture (x86_64 or arm64) to bundle on macOS. + +v1.11.0 25th September 2021 + - Added support for bundling Qt v6.2. + - Added support for PyQt6-WebEngine to pyqt-bundle. + v1.10.3 4th July 2021 - A bug fix release. diff -Nru pyqt-builder-1.10.3+dfsg/PKG-INFO pyqt-builder-1.12.1+dfsg/PKG-INFO --- pyqt-builder-1.10.3+dfsg/PKG-INFO 2021-07-04 11:38:38.200380600 +0000 +++ pyqt-builder-1.12.1+dfsg/PKG-INFO 2021-10-12 15:05:47.133417800 +0000 @@ -1,61 +1,66 @@ -Metadata-Version: 1.2 +Metadata-Version: 2.1 Name: PyQt-builder -Version: 1.10.3 +Version: 1.12.1 Summary: The PEP 517 compliant PyQt build system Home-page: https://www.riverbankcomputing.com/software/pyqt-builder/ Author: Riverbank Computing Limited Author-email: info@riverbankcomputing.com License: SIP -Description: PyQt-builder - The PEP 517 Compliant PyQt Build System - ====================================================== - - What is PyQt-builder? - --------------------- - - PyQt-builder is the PEP 517 compliant build system for PyQt and projects that - extend PyQt. It extends the SIP build system and uses Qt's ``qmake`` to - perform the actual compilation and installation of extension modules. - - Projects that use PyQt-builder provide an appropriate ``pyproject.toml`` file - and an optional ``project.py`` script. Any PEP 517 compliant frontend, for - example ``sip-install`` or ``pip`` can then be used to build and install the - project. - - - Author - ------ - - PyQt-builder is copyright (c) Riverbank Computing Limited. Its homepage is - https://www.riverbankcomputing.com/software/pyqt-builder/. - - Support may be obtained from the PyQt mailing list at - https://www.riverbankcomputing.com/mailman/listinfo/pyqt/. - - - License - ------- - - PyQt-builder is released under the same licenses as SIP. - - - Installation - ------------ - - PyQt-builder can be installed from PyPI:: - - pip install PyQt-builder - - However you do not normally need to explicitly install it. It will be - installed automatically when it is needed. - - - Documentation - ------------- - - The documentation for the latest release can be found - `here `__. - Platform: X11 Platform: macOS Platform: Windows Requires-Python: >=3.5 +License-File: LICENSE +License-File: LICENSE-GPL3 +License-File: LICENSE-GPL2 + +PyQt-builder - The PEP 517 Compliant PyQt Build System +====================================================== + +What is PyQt-builder? +--------------------- + +PyQt-builder is the PEP 517 compliant build system for PyQt and projects that +extend PyQt. It extends the SIP build system and uses Qt's ``qmake`` to +perform the actual compilation and installation of extension modules. + +Projects that use PyQt-builder provide an appropriate ``pyproject.toml`` file +and an optional ``project.py`` script. Any PEP 517 compliant frontend, for +example ``sip-install`` or ``pip`` can then be used to build and install the +project. + + +Author +------ + +PyQt-builder is copyright (c) Riverbank Computing Limited. Its homepage is +https://www.riverbankcomputing.com/software/pyqt-builder/. + +Support may be obtained from the PyQt mailing list at +https://www.riverbankcomputing.com/mailman/listinfo/pyqt/. + + +License +------- + +PyQt-builder is released under the same licenses as SIP. + + +Installation +------------ + +PyQt-builder can be installed from PyPI:: + + pip install PyQt-builder + +However you do not normally need to explicitly install it. It will be +installed automatically when it is needed. + + +Documentation +------------- + +The documentation for the latest release can be found +`here `__. + + diff -Nru pyqt-builder-1.10.3+dfsg/pyqtbuild/builder.py pyqt-builder-1.12.1+dfsg/pyqtbuild/builder.py --- pyqt-builder-1.10.3+dfsg/pyqtbuild/builder.py 2021-05-13 17:31:21.000000000 +0000 +++ pyqt-builder-1.12.1+dfsg/pyqtbuild/builder.py 2021-10-12 15:05:44.000000000 +0000 @@ -1,4 +1,4 @@ -# Copyright (c) 2020, Riverbank Computing Limited +# Copyright (c) 2021, Riverbank Computing Limited # All rights reserved. # # This copy of PyQt-builder is licensed for use under the terms of the SIP @@ -24,6 +24,7 @@ import os import sys +import sysconfig from sipbuild import (Buildable, BuildableModule, Builder, Option, Project, PyProjectOptionException, UserException) @@ -103,6 +104,8 @@ py_platform = 'wasm' elif 'win32' in xspec: py_platform = 'win32' + elif 'mingw-w64' in xspec: + py_platform = 'win32' else: # Treat everything else as Linux. py_platform = 'linux' @@ -336,8 +339,8 @@ """ Return the name of a valid make program. """ if self.project.py_platform == 'win32': - if self.spec == 'win32-g++': - make = 'mingw32-make' + if 'g++' in self.spec: + make = 'make' else: make = 'nmake' else: @@ -677,6 +680,13 @@ buildable.make_names_relative() + # Handle the target architecture(s). The way that Python handles + # 'universal2' seems broken as it is determined by what versions of + # macOS and the SDK the interpreter was built against rather than the + # versions that are being used now. + if self.project.get_platform_tag().endswith('_universal2'): + pro_lines.append('QMAKE_APPLE_DEVICE_ARCHS = x86_64 arm64') + # Handle debugging. pro_lines.append( 'CONFIG += {}'.format( diff -Nru pyqt-builder-1.10.3+dfsg/pyqtbuild/bundle/abstract_package.py pyqt-builder-1.12.1+dfsg/pyqtbuild/bundle/abstract_package.py --- pyqt-builder-1.10.3+dfsg/pyqtbuild/bundle/abstract_package.py 2021-03-29 11:00:32.000000000 +0000 +++ pyqt-builder-1.12.1+dfsg/pyqtbuild/bundle/abstract_package.py 2021-10-12 15:05:44.000000000 +0000 @@ -62,34 +62,32 @@ else: self._version = None - def bundle_msvc_runtime(self, target_qt_dir, arch): + def bundle_msvc_runtime(self, target_qt_dir, platform_tag): """ Bundle the MSVC runtime. """ # This default implementation does nothing. - def bundle_openssl(self, target_qt_dir, openssl_dir, arch): + def bundle_openssl(self, target_qt_dir, openssl_dir, platform_tag): """ Bundle the OpenSSL DLLs. """ # This default implementation does nothing. - def bundle_qt(self, target_qt_dir, arch, exclude, ignore_missing, + def bundle_qt(self, target_qt_dir, platform_tag, exclude, ignore_missing, bindings=True): """ Bundle the relevant parts of the Qt installation. Returns True if the LGPL applies to all bundled parts. """ # Architecture-specific values. - if arch.startswith('manylinux'): - metadata_arch = 'linux' + if platform_tag.startswith('manylinux'): module_extensions = ['.abi3.so', '.so'] - elif arch.startswith('macosx'): - metadata_arch = 'macos' + elif platform_tag.startswith('macosx'): module_extensions = ['.abi3.so', '.so'] - elif arch.startswith('win'): - metadata_arch = 'win' + elif platform_tag.startswith('win'): module_extensions = ['.pyd'] else: - raise UserException("Unsupported platform tag '{0}'".format(arch)) + raise UserException( + "Unsupported platform tag '{0}'".format(platform_tag)) package_dir = os.path.dirname(target_qt_dir) lgpl = True @@ -123,9 +121,9 @@ # '--target-qt-dir' but we still have to handle # older wheels (ie. using versions of Qt released # before '--target-qt-dir' was added. - if metadata_arch == 'linux': + if platform_tag.startswith('manylinux'): self._fix_linux_rpath(bindings) - elif metadata_arch == 'macos': + elif platform_tag.startswith('macosx'): self._fix_macos_rpath(bindings) break @@ -140,7 +138,7 @@ lgpl = lgpl and metadata.lgpl - metadata.bundle(name, target_qt_dir, self._qt_dir, metadata_arch, + metadata.bundle(name, target_qt_dir, self._qt_dir, platform_tag, self.qt_version, ignore_missing) return lgpl @@ -169,6 +167,18 @@ return os.path.join('PyQt{}'.format(qt_major_version), 'Qt{}'.format(qt_major_version)) + @staticmethod + def missing_executable(exe): + """ Return True if an executable cannot be found on PATH. """ + + for p in os.environ.get('PATH', '').split(os.pathsep): + exe_path = os.path.join(p, exe) + + if os.access(exe_path, os.X_OK): + return False + + return True + @property def qt_version_str(self): """ The version number of the Qt installation as a string. """ @@ -179,7 +189,7 @@ def _fix_linux_rpath(cls, bindings): """ Fix the rpath for Linux bindings. """ - if cls._missing_executable('chrpath'): + if cls.missing_executable('chrpath'): raise UserException("'chrpath' must be installed on your system") subprocess.run(['chrpath', '--replace', '$ORIGIN/Qt/lib', bindings]) @@ -188,7 +198,7 @@ def _fix_macos_rpath(cls, bindings): """ Fix the rpath for macOS bindings. """ - if cls._missing_executable('otool') or cls._missing_executable('install_name_tool'): + if cls.missing_executable('otool') or cls.missing_executable('install_name_tool'): raise UserException( "'otool' and 'install_name_tool' from Xcode must be " "installed on your system") @@ -230,18 +240,6 @@ subprocess.run(args) @staticmethod - def _missing_executable(exe): - """ Return True if an executable cannot be found on PATH. """ - - for p in os.environ.get('PATH', '').split(os.pathsep): - exe_path = os.path.join(p, exe) - - if os.access(exe_path, os.X_OK): - return False - - return True - - @staticmethod def _parse_version(version_str): """ Parse a version string as a 3-tuple of major, minor and maintenance versions. diff -Nru pyqt-builder-1.10.3+dfsg/pyqtbuild/bundle/bundle_main.py pyqt-builder-1.12.1+dfsg/pyqtbuild/bundle/bundle_main.py --- pyqt-builder-1.10.3+dfsg/pyqtbuild/bundle/bundle_main.py 2021-03-10 15:37:37.000000000 +0000 +++ pyqt-builder-1.12.1+dfsg/pyqtbuild/bundle/bundle_main.py 2021-10-12 15:05:44.000000000 +0000 @@ -1,4 +1,4 @@ -# Copyright (c) 2020, Riverbank Computing Limited +# Copyright (c) 2021, Riverbank Computing Limited # All rights reserved. # # This copy of PyQt-builder is licensed for use under the terms of the SIP @@ -23,6 +23,7 @@ from argparse import ArgumentParser +import sys from sipbuild import handle_exception @@ -45,6 +46,10 @@ parser.add_argument('--verbose', default=False, action='store_true', help="enable verbose progress messages") + if sys.platform == 'darwin': + parser.add_argument('--arch', choices=('x86_64', 'arm64'), + help="the architecture to bundle") + parser.add_argument('--build-tag-suffix', metavar='SUFFIX', help="append SUFFIX to the build tag in the wheel name") @@ -77,11 +82,16 @@ try: set_verbose(args.verbose) + try: + arch = args.arch + except AttributeError: + arch = None + bundle(wheel_path=args.wheels[0], qt_dir=args.qt_dir, build_tag_suffix=args.build_tag_suffix, msvc_runtime=args.msvc_runtime, openssl=args.openssl, openssl_dir=args.openssl_dir, exclude=args.exclude, - ignore_missing=args.ignore_missing) + ignore_missing=args.ignore_missing, arch=arch) except Exception as e: handle_exception(e) diff -Nru pyqt-builder-1.10.3+dfsg/pyqtbuild/bundle/bundle.py pyqt-builder-1.12.1+dfsg/pyqtbuild/bundle/bundle.py --- pyqt-builder-1.10.3+dfsg/pyqtbuild/bundle/bundle.py 2021-03-10 15:37:37.000000000 +0000 +++ pyqt-builder-1.12.1+dfsg/pyqtbuild/bundle/bundle.py 2021-10-12 15:05:45.000000000 +0000 @@ -34,7 +34,7 @@ def bundle(wheel_path, qt_dir, build_tag_suffix, msvc_runtime, openssl, - openssl_dir, exclude, ignore_missing): + openssl_dir, exclude, ignore_missing, arch): """ Bundle a Qt installation with a PyQt wheel. """ wheel_path = os.path.abspath(wheel_path) @@ -58,6 +58,16 @@ raise UserException( "Unable to recognise '{0}' as a wheel name".format(wheel_name)) + # If an architecture is specified then it must be supported by the wheel. + if arch: + if arch in parts[-1]: + pass + elif 'universal2' in parts[-1]: + parts[-1] = parts[-1].replace('universal2', arch) + else: + raise UserException( + "'{0}' is not supported by {1}".format(arch, wheel_name)) + # Get the package object. sub_parts = parts[0].split('_') if sub_parts[-1] == 'commercial': @@ -89,7 +99,7 @@ if bundled_wheel_dir.endswith(tail): bundled_wheel_dir = bundled_wheel_dir[:-len(tail)] - arch = bundled_wheel_dir.split('-')[-1] + platform_tag = bundled_wheel_dir.split('-')[-1] # Create the directory to contain the existing wheel contents. shutil.rmtree(bundled_wheel_dir, ignore_errors=True) @@ -114,16 +124,16 @@ ignore_errors=True) # Bundle the relevant parts of the Qt installation. - package.bundle_qt(target_qt_dir, arch, exclude, ignore_missing) + package.bundle_qt(target_qt_dir, platform_tag, exclude, ignore_missing) - if arch in ('win32', 'win_amd64'): + if platform_tag in ('win32', 'win_amd64'): # Bundle the MSVC runtime if required. if msvc_runtime: - package.bundle_msvc_runtime(target_qt_dir, arch) + package.bundle_msvc_runtime(target_qt_dir, platform_tag) # Bundle OpenSSL if required. if openssl: - package.bundle_openssl(target_qt_dir, openssl_dir, arch) + package.bundle_openssl(target_qt_dir, openssl_dir, platform_tag) # Find the .dist-info directory. for distinfo_dir in os.listdir('.'): diff -Nru pyqt-builder-1.10.3+dfsg/pyqtbuild/bundle/packages/__init__.py pyqt-builder-1.12.1+dfsg/pyqtbuild/bundle/packages/__init__.py --- pyqt-builder-1.10.3+dfsg/pyqtbuild/bundle/packages/__init__.py 2021-04-10 14:57:24.000000000 +0000 +++ pyqt-builder-1.12.1+dfsg/pyqtbuild/bundle/packages/__init__.py 2021-10-12 15:05:44.000000000 +0000 @@ -28,6 +28,7 @@ from .pyqt6_charts import PyQt6_Charts from .pyqt6_datavisualization import PyQt6_DataVisualization from .pyqt6_networkauth import PyQt6_NetworkAuth +from .pyqt6_webengine import PyQt6_WebEngine from .pyqt5 import PyQt5 from .pyqt3d import PyQt3D diff -Nru pyqt-builder-1.10.3+dfsg/pyqtbuild/bundle/packages/pyqt6.py pyqt-builder-1.12.1+dfsg/pyqtbuild/bundle/packages/pyqt6.py --- pyqt-builder-1.10.3+dfsg/pyqtbuild/bundle/packages/pyqt6.py 2021-06-23 13:53:22.000000000 +0000 +++ pyqt-builder-1.12.1+dfsg/pyqtbuild/bundle/packages/pyqt6.py 2021-10-12 15:05:44.000000000 +0000 @@ -29,28 +29,28 @@ # The Qt meta-data for this package. _QT_METADATA = { - #'QAxContainer': - # VersionedMetadata(dll=False), + 'QAxContainer': + VersionedMetadata(dll=False), - #'QtBluetooth': - # VersionedMetadata( - # lib_deps={ - # 'linux': ('QtConcurrent', ), - # 'macos': ('QtConcurrent', )}, - # qml=True), + 'QtBluetooth': + VersionedMetadata(version=(6, 2, 0), qml=True), - 'QtCore': - VersionedMetadata( + 'QtCore': ( + VersionedMetadata(version=(6, 2, 0), other_lib_deps={ 'linux': ('libicui18n.so.56', 'libicuuc.so.56', 'libicudata.so.56')}, - translations=('qt_help', 'qtbase', 'qtdeclarative', - 'qtquickcontrols2', 'qt_'), - #translations=('qt_help', 'qtbase', 'qtconnectivity', - # 'qtdeclarative', 'qtlocation', 'qtmultimedia', - # 'qtquickcontrols2', 'qtserialport', 'qtwebsockets', - # 'qtxmlpatterns', 'qt_'), + translations=('qt_', 'qt_help', 'qtbase', 'qtdeclarative', + 'qtlocation', 'qtmultimedia', 'qtquickcontrols2', + 'qtserialport', 'qtwebsockets'), excluded_plugins=('designer', 'qmltooling')), + VersionedMetadata( + other_lib_deps={ + 'linux': ('libicui18n.so.56', 'libicuuc.so.56', + 'libicudata.so.56')}, + translations=('qt_', 'qt_help', 'qtbase', 'qtdeclarative', + 'qtquickcontrols2'), + excluded_plugins=('designer', 'qmltooling'))), 'QtDBus': VersionedMetadata(), @@ -58,32 +58,34 @@ 'QtDesigner': VersionedMetadata(), - 'QtGui': - VersionedMetadata(lib_deps={'linux': ('QtWaylandClient', 'QtXcbQpa')}, + 'QtGui': ( + VersionedMetadata(version=(6, 2, 0), + lib_deps={'linux': ('QtWaylandClient', 'QtXcbQpa')}, other_lib_deps={ 'win': ('d3dcompiler_47.dll', 'opengl32sw.dll')}), + VersionedMetadata(lib_deps={'linux': ('QtWaylandClient', 'QtXcbQpa')}, + other_lib_deps={ + 'win': ('d3dcompiler_47.dll', 'opengl32sw.dll')})), 'QtHelp': VersionedMetadata(), #'QtLocation': - # VersionedMetadata( - # lib_deps={'': ('QtPositioningQuick', )}, - # qml=True), - - #'QtMultimedia': - # VersionedMetadata( - # lib_deps={'linux': ('QtMultimediaGstTools', )}, - # qml=True, qml_names=('QtAudioEngine', 'QtMultimedia')), + # VersionedMetadata(qml=True), - #'QtMultimediaWidgets': - # VersionedMetadata(), + 'QtMultimedia': + VersionedMetadata(version=(6, 2, 0), + lib_deps={'': ('QtMultimediaQuick', )}, + qml=True), + + 'QtMultimediaWidgets': + VersionedMetadata(version=(6, 2, 0)), 'QtNetwork': VersionedMetadata(), - #'QtNfc': - # VersionedMetadata(qml=True), + 'QtNfc': + VersionedMetadata(version=(6, 2, 0), qml=True), 'QtOpenGL': VersionedMetadata(), @@ -91,8 +93,10 @@ 'QtOpenGLWidgets': VersionedMetadata(), - #'QtPositioning': - # VersionedMetadata(qml=True), + 'QtPositioning': + VersionedMetadata(version=(6, 2, 0), + lib_deps={'': ('QtPositioningQuick', )}, + qml=True), 'QtPrintSupport': VersionedMetadata(), @@ -102,19 +106,29 @@ lib_deps={'': ('QtQmlModels', 'QtQmlWorkerScript')}, qml=True), - 'QtQuick': + 'QtQuick': ( + VersionedMetadata(version=(6, 2, 0), + lib_deps={'': ('QtQuickControls2', 'QtQuickControls2Impl', + 'QtQuickDialogs2', 'QtQuickDialogs2QuickImpl', + 'QtQuickDialogs2Utils', 'QtQuickLayouts', + 'QtQuickParticles', 'QtQuickShapes', + 'QtQuickTemplates2', 'QtQuickTest', + 'QtQuickTimeline')}, + qml=True), VersionedMetadata( lib_deps={'': ('QtQuickControls2', 'QtQuickControls2Impl', 'QtQuickLayouts', 'QtQuickParticles', 'QtQuickShapes', 'QtQuickTemplates2', 'QtQuickTest')}, - qml=True), + qml=True)), 'QtQuick3D': ( VersionedMetadata(version=(6, 1, 0), lib_deps={ - '': ('QtQuick3DAssetImport', 'QtQuick3DIblBaker', - 'QtQuick3DParticles', 'QtQuick3DRuntimeRender', - 'QtQuick3DUtils', 'QtShaderTools')}, + '': ('QtQuick3DAssetImport', 'QtQuick3DAssetUtils', + 'QtQuick3DEffects', 'QtQuick3DHelpers', + 'QtQuick3DIblBaker', 'QtQuick3DParticles', + 'QtQuick3DRuntimeRender', 'QtQuick3DUtils', + 'QtShaderTools')}, qml=True), VersionedMetadata( lib_deps={ @@ -125,14 +139,18 @@ 'QtQuickWidgets': VersionedMetadata(), - #'QtRemoteObjects': - # VersionedMetadata(qml=True), + 'QtRemoteObjects': + VersionedMetadata(version=(6, 2, 0), + lib_deps={'': ('QtRemoteObjectsQml', )}, + qml=True), - #'QtSensors': - # VersionedMetadata(qml=True), + 'QtSensors': + VersionedMetadata(version=(6, 2, 0), + lib_deps={'': ('QtSensorsQuick', )}, + qml=True), - #'QtSerialPort': - # VersionedMetadata(), + 'QtSerialPort': + VersionedMetadata(version=(6, 2, 0)), 'QtSql': VersionedMetadata(), @@ -149,11 +167,11 @@ #'QtTextToSpeech': # VersionedMetadata(), - #'QtWebChannel': - # VersionedMetadata(qml=True), + 'QtWebChannel': + VersionedMetadata(version=(6, 2, 0), qml=True), - #'QtWebSockets': - # VersionedMetadata(qml=True), + 'QtWebSockets': + VersionedMetadata(version=(6, 2, 0), qml=True), 'QtWidgets': VersionedMetadata(), diff -Nru pyqt-builder-1.10.3+dfsg/pyqtbuild/bundle/packages/pyqt6_webengine.py pyqt-builder-1.12.1+dfsg/pyqtbuild/bundle/packages/pyqt6_webengine.py --- pyqt-builder-1.10.3+dfsg/pyqtbuild/bundle/packages/pyqt6_webengine.py 1970-01-01 00:00:00.000000000 +0000 +++ pyqt-builder-1.12.1+dfsg/pyqtbuild/bundle/packages/pyqt6_webengine.py 2021-10-12 15:05:44.000000000 +0000 @@ -0,0 +1,64 @@ +# Copyright (c) 2021, Riverbank Computing Limited +# All rights reserved. +# +# This copy of PyQt-builder is licensed for use under the terms of the SIP +# License Agreement. See the file LICENSE for more details. +# +# This copy of PyQt-builder may also used under the terms of the GNU General +# Public License v2 or v3 as published by the Free Software Foundation which +# can be found in the files LICENSE-GPL2 and LICENSE-GPL3 included in this +# package. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. + + +from ..abstract_package import AbstractPackage +from ..qt_metadata import VersionedMetadata + + +# The Qt meta-data for this package. +_QT_METADATA = { + 'QtWebEngineCore': + VersionedMetadata(version=(6, 2, 0), + other_lib_deps={ + 'macos': ('QtWebEngineCore.framework/Helpers/QtWebEngineProcess.app/Contents/Info.plist', )}, + exes={ + 'linux': ('libexec/QtWebEngineProcess', ), + 'macos': ('lib/QtWebEngineCore.framework/Helpers/QtWebEngineProcess.app/Contents/MacOS/QtWebEngineProcess', ), + 'win': ('bin\\QtWebEngineProcess.exe', )}, + files={ + 'win': (('lib\\Qt6Core.lib', + "Enable QtWebEngineProcess to find it's resources.\n"), )}, + others={ + 'linux': ('resources', 'translations/qtwebengine_locales'), + 'win': ('resources', 'translations\\qtwebengine_locales')}), + + 'QtWebEngineQuick': + VersionedMetadata(version=(6, 2, 0), + lib_deps={'': ('QtWebEngineQuickDelegatesQml', )}, + qml=True, qml_names=['QtWebEngine']), + + 'QtWebEngineWidgets': + VersionedMetadata(version=(6, 2, 0)), +} + + +class PyQt6_WebEngine(AbstractPackage): + """ The PyQt6-WebEngine package. """ + + def get_qt_metadata(self): + """ Return the package-specific meta-data describing the parts of Qt to + install. + """ + + return _QT_METADATA diff -Nru pyqt-builder-1.10.3+dfsg/pyqtbuild/bundle/packages/pyqt.py pyqt-builder-1.12.1+dfsg/pyqtbuild/bundle/packages/pyqt.py --- pyqt-builder-1.10.3+dfsg/pyqtbuild/bundle/packages/pyqt.py 2021-03-10 15:37:37.000000000 +0000 +++ pyqt-builder-1.12.1+dfsg/pyqtbuild/bundle/packages/pyqt.py 2021-10-12 15:05:44.000000000 +0000 @@ -1,4 +1,4 @@ -# Copyright (c) 2020, Riverbank Computing Limited +# Copyright (c) 2021, Riverbank Computing Limited # All rights reserved. # # This copy of PyQt-builder is licensed for use under the terms of the SIP @@ -36,18 +36,24 @@ class PyQt(AbstractPackage): """ The base PyQt package. """ - def bundle_msvc_runtime(self, target_qt_dir, arch): + def bundle_msvc_runtime(self, target_qt_dir, platform_tag): """ Bundle the MSVC runtime. """ verbose("Bundling the MSVC runtime") self._bundle_dlls(target_qt_dir, os.path.join(_DLLS_DIR, - 'msvc-64' if arch == 'win_amd64' else 'msvc-32')) + 'msvc-64' if platform_tag == 'win_amd64' else 'msvc-32')) - def bundle_openssl(self, target_qt_dir, openssl_dir, arch): + def bundle_openssl(self, target_qt_dir, openssl_dir, platform_tag): """ Bundle the OpenSSL DLLs. """ + # Qt v6.2.0 and later include appropriate backends. + if self.qt_version >= (6, 2, 0): + verbose( + "OpenSSL libraries are not required for Qt v6.2.0 and later") + return + if openssl_dir: verbose( "Bundling the OpenSSL libraries from '{0}'".format( @@ -56,7 +62,7 @@ verbose("Bundling the default OpenSSL libraries") openssl_dir = os.path.join(_DLLS_DIR, - 'openssl-64' if arch == 'win_amd64' else 'openssl-32') + 'openssl-64' if platform_tag == 'win_amd64' else 'openssl-32') self._bundle_dlls(target_qt_dir, openssl_dir) diff -Nru pyqt-builder-1.10.3+dfsg/pyqtbuild/bundle/qt_metadata.py pyqt-builder-1.12.1+dfsg/pyqtbuild/bundle/qt_metadata.py --- pyqt-builder-1.10.3+dfsg/pyqtbuild/bundle/qt_metadata.py 2021-03-10 15:37:37.000000000 +0000 +++ pyqt-builder-1.12.1+dfsg/pyqtbuild/bundle/qt_metadata.py 2021-10-12 15:05:44.000000000 +0000 @@ -1,4 +1,4 @@ -# Copyright (c) 2020, Riverbank Computing Limited +# Copyright (c) 2021, Riverbank Computing Limited # All rights reserved. # # This copy of PyQt-builder is licensed for use under the terms of the SIP @@ -29,7 +29,7 @@ from sipbuild import UserException -from .verbose import verbose +from .verbose import is_verbose, verbose class VersionedMetadata: @@ -59,7 +59,7 @@ self.lgpl = lgpl self.legacy = legacy - def bundle(self, name, target_qt_dir, qt_dir, arch, qt_version, + def bundle(self, name, target_qt_dir, qt_dir, platform_tag, qt_version, ignore_missing): """ Bundle part of Qt as defined by the meta-data. """ @@ -68,52 +68,68 @@ if self._name is None: self._name = name + # See if a particular macOS architecture has been specified but only + # for versions of Qt that support universal libraries. + macos_thin_arch = self._get_macos_thin_arch(platform_tag) + if qt_version < (6, 2, 0): + macos_thin_arch = None + + if macos_thin_arch is not None: + from .abstract_package import AbstractPackage + + if AbstractPackage.missing_executable('lipo'): + raise UserException( + "'lipo' from Xcode must be installed on your system") + # Bundle the Qt library that has been wrapped (if there is one). if self._dll: - self._bundle_qt_library(self._name, target_qt_dir, qt_dir, arch, - qt_version, ignore_missing) + self._bundle_qt_library(self._name, target_qt_dir, qt_dir, + qt_version, platform_tag, macos_thin_arch, ignore_missing) # Bundle any other dependent Qt libraries. - for lib_arch, libs in self._lib_deps.items(): - if lib_arch == '' or lib_arch == arch: + for metadata_arch, libs in self._lib_deps.items(): + if self._is_platform(metadata_arch, platform_tag): for lib in libs: - self._bundle_qt_library(lib, target_qt_dir, qt_dir, arch, - qt_version, ignore_missing) + self._bundle_qt_library(lib, target_qt_dir, qt_dir, + qt_version, platform_tag, macos_thin_arch, + ignore_missing) # Bundle any other libraries. lib_contents = None - for lib_arch, libs in self._other_lib_deps.items(): - if lib_arch == '' or lib_arch == arch: + for metadata_arch, libs in self._other_lib_deps.items(): + if self._is_platform(metadata_arch, platform_tag): for lib in libs: if '*' in lib: # A wildcard implies the dependency is optional. This # is mainly to (historically) deal with ICU on Windows. if lib_contents is None: lib_contents = os.listdir( - self._get_qt_library_dir(qt_dir, arch)) + self._get_qt_library_dir(qt_dir, + platform_tag)) for qt_lib in lib_contents: if fnmatch.fnmatch(qt_lib, lib): self._bundle_library(qt_lib, target_qt_dir, - qt_dir, arch, ignore_missing) + qt_dir, platform_tag, macos_thin_arch, + ignore_missing) else: - self._bundle_library(lib, target_qt_dir, qt_dir, arch, - ignore_missing) + self._bundle_library(lib, target_qt_dir, qt_dir, + platform_tag, macos_thin_arch, ignore_missing) # Bundle any executables. - for exe_arch, exes in self._exes.items(): - if exe_arch == '' or exe_arch == arch: + for metadata_arch, exes in self._exes.items(): + if self._is_platform(metadata_arch, platform_tag): for exe in exes: bundled_exe = self._bundle_file(exe, target_qt_dir, qt_dir, - ignore_missing) + platform_tag, macos_thin_arch, ignore_missing) if bundled_exe is not None: - if arch == 'linux': + if self._is_platform('linux', platform_tag): self._fix_linux_executable(bundled_exe, qt_version) - elif arch == 'macos': + elif self._is_platform('macos', platform_tag): self._fix_macos_executable(bundled_exe, qt_version) - elif arch == 'win': + elif self._is_platform('win', platform_tag): self._fix_win_executable(bundled_exe) # Bundle any QML files. @@ -124,14 +140,16 @@ for qml_subdir in qml_names: self._bundle_nondebug(os.path.join('qml', qml_subdir), - target_qt_dir, qt_dir, arch, ignore_missing) + target_qt_dir, qt_dir, platform_tag, macos_thin_arch, + ignore_missing) # Bundle any plugins. We haven't done the analysis of which plugins # belong to which package so we assume that only the QtCore package # will specify any to exclude and we bundle all of them with that. if self._excluded_plugins is not None: - self._bundle_nondebug('plugins', target_qt_dir, qt_dir, arch, - ignore_missing, exclude=self._excluded_plugins) + self._bundle_nondebug('plugins', target_qt_dir, qt_dir, + platform_tag, macos_thin_arch, ignore_missing, + exclude=self._excluded_plugins) # Bundle any translations: if self._translations: @@ -143,11 +161,13 @@ for prefix in self._translations: if qm.startswith(prefix): self._bundle_file(qm, target_tr_dir, tr_dir, - ignore_missing) + platform_tag, macos_thin_arch, + ignore_missing, + might_be_code=False) # Bundle any dynamically created files. - for files_arch, files in self._files.items(): - if files_arch == '' or files_arch == arch: + for metadata_arch, files in self._files.items(): + if self._is_platform(metadata_arch, platform_tag): for fn, content in files: fn = os.path.join(target_qt_dir, fn) os.makedirs(os.path.dirname(fn), exist_ok=True) @@ -156,11 +176,12 @@ f.write(content) # Bundle anything else. - for oth_arch, others in self._others.items(): - if oth_arch == '' or oth_arch == arch: + for metadata_arch, others in self._others.items(): + if self._is_platform(metadata_arch, platform_tag): for oth in others: self._bundle_file(oth, target_qt_dir, qt_dir, - ignore_missing) + platform_tag, macos_thin_arch, ignore_missing, + might_be_code=False) def is_applicable(self, qt_version): """ Returns True if this meta-data is applicable for a particular Qt @@ -170,8 +191,8 @@ return self._version is None or qt_version >= self._version @classmethod - def _bundle_nondebug(cls, src_dir, target_qt_dir, qt_dir, arch, - ignore_missing, exclude=None): + def _bundle_nondebug(cls, src_dir, target_qt_dir, qt_dir, platform_tag, + macos_thin_arch, ignore_missing, exclude=None): """ Bundle the non-debug contents of a directory. """ if exclude is None: @@ -185,19 +206,21 @@ pass for name in list(dirnames): - if cls._is_debug(name, arch): + if cls._is_debug(name, platform_tag): dirnames.remove(name) for name in filenames: - if cls._is_debug(name, arch): + if cls._is_debug(name, platform_tag): continue cls._bundle_file( os.path.relpath(os.path.join(dirpath, name), qt_dir), - target_qt_dir, qt_dir, ignore_missing) + target_qt_dir, qt_dir, platform_tag, macos_thin_arch, + ignore_missing) @staticmethod - def _bundle_file(name, target_dir, src_dir, ignore_missing, ignore=None): + def _bundle_file(name, target_dir, src_dir, platform_tag, macos_thin_arch, + ignore_missing, ignore=None, might_be_code=True): """ Bundle a file (or directory) and return the name of the installed file (or directory) or None if it was missing. """ @@ -210,7 +233,19 @@ if os.path.isdir(src): shutil.copytree(src, dst, ignore=ignore) elif os.path.isfile(src): - shutil.copy2(src, dst) + if macos_thin_arch is not None and might_be_code: + stderr = None if is_verbose() else subprocess.DEVNULL + + try: + subprocess.run( + ['lipo', '-thin', macos_thin_arch, '-output', dst, + src], + stderr=stderr, check=True) + except: + # If there is any sort of error then just copy it. + shutil.copy2(src, dst) + else: + shutil.copy2(src, dst) elif ignore_missing: verbose("Ignoring missing '{0}'".format(name)) dst = None @@ -221,27 +256,31 @@ return dst @classmethod - def _bundle_library(cls, name, target_qt_dir, qt_dir, arch, ignore_missing, - ignore=None): + def _bundle_library(cls, name, target_qt_dir, qt_dir, platform_tag, + macos_thin_arch, ignore_missing, ignore=None): """ Bundle a library. """ cls._bundle_file(name, - os.path.join(target_qt_dir, cls._get_qt_library_subdir(arch)), - cls._get_qt_library_dir(qt_dir, arch), ignore_missing, - ignore=ignore) + os.path.join(target_qt_dir, + cls._get_qt_library_subdir(platform_tag)), + cls._get_qt_library_dir(qt_dir, platform_tag), platform_tag, + macos_thin_arch, ignore_missing, ignore=ignore) @classmethod - def _bundle_qt_library(cls, name, target_qt_dir, qt_dir, arch, qt_version, - ignore_missing): + def _bundle_qt_library(cls, name, target_qt_dir, qt_dir, qt_version, + platform_tag, macos_thin_arch, ignore_missing): """ Bundle a Qt library. """ - cls._bundle_library(cls._impl_from_library(name, arch, qt_version), - target_qt_dir, qt_dir, arch, ignore_missing) + cls._bundle_library( + cls._impl_from_library(name, platform_tag, qt_version), + target_qt_dir, qt_dir, platform_tag, macos_thin_arch, + ignore_missing) - if arch == 'macos': + if cls._is_platform('macos', platform_tag): # Copy the Resources directory without the unnecessary .prl files. cls._bundle_library('{}.framework/Resources'.format(name), - target_qt_dir, qt_dir, arch, ignore_missing, + target_qt_dir, qt_dir, platform_tag, macos_thin_arch, + ignore_missing, ignore=lambda d, c: [f for f in c if f.endswith('.prl')]) @staticmethod @@ -305,49 +344,85 @@ cls._create_qt_conf(exe) @classmethod - def _get_qt_library_dir(cls, qt_dir, arch): + def _get_macos_thin_arch(cls, platform_tag): + """ Return the single macOS architecture, or None if the platform is + not macOS or is universal. + """ + + if cls._is_platform('macos', platform_tag): + if platform_tag.endswith('_intel') or platform_tag.endswith('_x86_64'): + return 'x86_64' + + if platform_tag.endswith('_arm64'): + return 'arm64' + + return None + + @classmethod + def _get_qt_library_dir(cls, qt_dir, platform_tag): """ Return the name of the directory in the Qt installation containing the libraries. """ - return os.path.join(qt_dir, cls._get_qt_library_subdir(arch)) + return os.path.join(qt_dir, cls._get_qt_library_subdir(platform_tag)) - @staticmethod - def _get_qt_library_subdir(arch): + @classmethod + def _get_qt_library_subdir(cls, platform_tag): """ Return the name of the sub-directory in the Qt installation containing the libraries. """ - return 'bin' if arch == 'win' else 'lib' + return 'bin' if cls._is_platform('win', platform_tag) else 'lib' - @staticmethod - def _impl_from_library(name, arch, qt_version): + @classmethod + def _impl_from_library(cls, name, platform_tag, qt_version): """ Return the architecture-specific name of a Qt library. """ qt_major = qt_version[0] - if arch == 'linux': + if cls._is_platform('linux', platform_tag): return 'libQt{}{}.so.{}'.format(qt_major, name[2:], qt_major) - if arch == 'macos': + if cls._is_platform('macos', platform_tag): framework = '5' if qt_major == 5 else 'A' return '{}.framework/Versions/{}/{}'.format(name, framework, name) - if arch == 'win': + if cls._is_platform('win', platform_tag): return 'Qt{}{}.dll'.format(qt_major, name[2:]) - @staticmethod - def _is_debug(name, arch): + @classmethod + def _is_debug(cls, name, platform_tag): """ Return True if a name implies a debug version. """ - if arch == 'linux': + if cls._is_platform('linux', platform_tag): return name.endswith('.debug') - if arch == 'macos': + if cls._is_platform('macos', platform_tag): return name.endswith('_debug.dylib') or name.endswith('.dSYM') - if arch == 'win': - # This is a bit flakely as we could have a non-debug DLL that ends - # with a 'd'. + if cls._is_platform('win', platform_tag): + # Special case known non-debug DLLs that end with a 'd'. + if name.endswith('backend.dll'): + return False + return name.endswith('.pdb') or name.endswith('d.dll') + + @staticmethod + def _is_platform(metadata_arch, platform_tag): + """ Return True if a metadata archtitecture matches a platform tag. """ + + # See if it applies to all architectures. + if metadata_arch == '': + return True + + if metadata_arch == 'linux' and platform_tag.startswith('manylinux'): + return True + + if metadata_arch == 'macos' and platform_tag.startswith('macosx'): + return True + + if metadata_arch == 'win' and platform_tag.startswith('win'): + return True + + return False diff -Nru pyqt-builder-1.10.3+dfsg/pyqtbuild/bundle/qt_wheel_main.py pyqt-builder-1.12.1+dfsg/pyqtbuild/bundle/qt_wheel_main.py --- pyqt-builder-1.10.3+dfsg/pyqtbuild/bundle/qt_wheel_main.py 2021-04-10 10:49:09.000000000 +0000 +++ pyqt-builder-1.12.1+dfsg/pyqtbuild/bundle/qt_wheel_main.py 2021-10-12 15:05:44.000000000 +0000 @@ -23,6 +23,7 @@ from argparse import ArgumentParser +import sys from sipbuild import handle_exception @@ -45,6 +46,10 @@ parser.add_argument('--verbose', default=False, action='store_true', help="enable verbose progress messages") + if sys.platform == 'darwin': + parser.add_argument('--arch', choices=('x86_64', 'arm64'), + help="the architecture to create the wheel for") + parser.add_argument('--build-tag', metavar='TAG', help="use TAG as the build tag in the wheel name") @@ -77,10 +82,15 @@ try: set_verbose(args.verbose) + try: + arch = args.arch + except AttributeError: + arch = None + qt_wheel(package=args.packages[0], qt_dir=args.qt_dir, build_tag=args.build_tag, suffix=args.suffix, msvc_runtime=args.msvc_runtime, openssl=args.openssl, - openssl_dir=args.openssl_dir, exclude=args.exclude) + openssl_dir=args.openssl_dir, exclude=args.exclude, arch=arch) except Exception as e: handle_exception(e) diff -Nru pyqt-builder-1.10.3+dfsg/pyqtbuild/bundle/qt_wheel.py pyqt-builder-1.12.1+dfsg/pyqtbuild/bundle/qt_wheel.py --- pyqt-builder-1.10.3+dfsg/pyqtbuild/bundle/qt_wheel.py 2021-07-04 11:31:45.000000000 +0000 +++ pyqt-builder-1.12.1+dfsg/pyqtbuild/bundle/qt_wheel.py 2021-10-12 15:05:44.000000000 +0000 @@ -33,7 +33,7 @@ def qt_wheel(package, qt_dir, build_tag, suffix, msvc_runtime, openssl, - openssl_dir, exclude): + openssl_dir, exclude, arch): """ Create a wheel containing the subset of a Qt installation required for a particular PyQt package. """ @@ -61,18 +61,29 @@ # Construct the tag. qt_arch = os.path.basename(qt_dir) if qt_arch == 'gcc_64': - arch = 'manylinux{}_x86_64'.format( + platform_tag = 'manylinux{}_x86_64'.format( '_2_28' if package.qt_version[0] == 6 else '2014') elif qt_arch in ('macos', 'clang_64'): - arch = 'macosx_{}_intel'.format( - '10_14' if package.qt_version[0] == 6 else '10_13') + if package.qt_version < (6, 2, 0): + if arch is not None: + raise UserException( + "'--arch' may only be specified for Qt v6.2 and later") + + subarch = 'x86_64' + elif arch is None: + subarch = 'universal2' + else: + subarch = arch + + platform_tag = 'macosx_{}_{}'.format( + '10_14' if package.qt_version[0] == 6 else '10_13', subarch) elif qt_arch.startswith('msvc'): - arch = 'win_amd64' if qt_arch.endswith('_64') else 'win32' + platform_tag = 'win_amd64' if qt_arch.endswith('_64') else 'win32' else: raise UserException( "Qt architecture '{0}' is unsupported".format(qt_arch)) - tag_parts = ['py3', 'none', arch] + tag_parts = ['py3', 'none', platform_tag] tag = '-'.join(tag_parts) # Construct the name of the wheel. @@ -98,17 +109,17 @@ # Bundle the relevant parts of the Qt installation. target_qt_dir = package.get_target_qt_dir() - lgpl = package.bundle_qt(target_qt_dir, arch, exclude, ignore_missing=True, - bindings=False) + lgpl = package.bundle_qt(target_qt_dir, platform_tag, exclude, + ignore_missing=True, bindings=False) - if arch in ('win32', 'win_amd64'): + if platform_tag in ('win32', 'win_amd64'): # Bundle the MSVC runtime if required. if msvc_runtime: - package.bundle_msvc_runtime(target_qt_dir, arch) + package.bundle_msvc_runtime(target_qt_dir, platform_tag) # Bundle OpenSSL if required. if openssl: - package.bundle_openssl(target_qt_dir, openssl_dir, arch) + package.bundle_openssl(target_qt_dir, openssl_dir, platform_tag) # Create the .dist-info directory and populate it from the prototypes. os.mkdir(distinfo_dir) diff -Nru pyqt-builder-1.10.3+dfsg/pyqtbuild/bundle/verbose.py pyqt-builder-1.12.1+dfsg/pyqtbuild/bundle/verbose.py --- pyqt-builder-1.10.3+dfsg/pyqtbuild/bundle/verbose.py 2021-03-10 15:37:37.000000000 +0000 +++ pyqt-builder-1.12.1+dfsg/pyqtbuild/bundle/verbose.py 2021-10-12 15:05:44.000000000 +0000 @@ -1,4 +1,4 @@ -# Copyright (c) 2020, Riverbank Computing Limited +# Copyright (c) 2021, Riverbank Computing Limited # All rights reserved. # # This copy of PyQt-builder is licensed for use under the terms of the SIP @@ -26,6 +26,12 @@ _verbose = False +def is_verbose(): + """ Return True if verbose progress messages are enabled. """ + + return _verbose + + def set_verbose(verbose): """ Enable or disable verbose progress messages. """ diff -Nru pyqt-builder-1.10.3+dfsg/pyqtbuild/project.py pyqt-builder-1.12.1+dfsg/pyqtbuild/project.py --- pyqt-builder-1.10.3+dfsg/pyqtbuild/project.py 2021-03-10 15:37:37.000000000 +0000 +++ pyqt-builder-1.12.1+dfsg/pyqtbuild/project.py 2021-10-12 15:05:44.000000000 +0000 @@ -129,6 +129,19 @@ if self.py_pylib_shlib == '': self.py_pylib_shlib = pylib_shlib + def get_platform_tag(self): + """ Return the platform tag to use in a wheel name. This calls the + default implementation and replaces 'universal2' with 'x86_64' for + versions of Qt that don't support Apple silicon. + """ + + platform_tag = super().get_platform_tag().split('_') + + if platform_tag[-1] == 'universal2' and self.builder.qt_version < 0x060200: + platform_tag[-1] = 'x86_64' + + return '_'.join(platform_tag) + def get_options(self): """ Return the list of configurable options. """ diff -Nru pyqt-builder-1.10.3+dfsg/pyqtbuild/version.py pyqt-builder-1.12.1+dfsg/pyqtbuild/version.py --- pyqt-builder-1.10.3+dfsg/pyqtbuild/version.py 2021-07-04 11:38:36.000000000 +0000 +++ pyqt-builder-1.12.1+dfsg/pyqtbuild/version.py 2021-10-12 15:05:45.000000000 +0000 @@ -1,2 +1,2 @@ -PYQTBUILD_VERSION = 0x010a03 -PYQTBUILD_VERSION_STR = '1.10.3' +PYQTBUILD_VERSION = 0x010c01 +PYQTBUILD_VERSION_STR = '1.12.1' diff -Nru pyqt-builder-1.10.3+dfsg/PyQt_builder.egg-info/PKG-INFO pyqt-builder-1.12.1+dfsg/PyQt_builder.egg-info/PKG-INFO --- pyqt-builder-1.10.3+dfsg/PyQt_builder.egg-info/PKG-INFO 2021-07-04 11:38:37.000000000 +0000 +++ pyqt-builder-1.12.1+dfsg/PyQt_builder.egg-info/PKG-INFO 2021-10-12 15:05:47.000000000 +0000 @@ -1,61 +1,66 @@ -Metadata-Version: 1.2 +Metadata-Version: 2.1 Name: PyQt-builder -Version: 1.10.3 +Version: 1.12.1 Summary: The PEP 517 compliant PyQt build system Home-page: https://www.riverbankcomputing.com/software/pyqt-builder/ Author: Riverbank Computing Limited Author-email: info@riverbankcomputing.com License: SIP -Description: PyQt-builder - The PEP 517 Compliant PyQt Build System - ====================================================== - - What is PyQt-builder? - --------------------- - - PyQt-builder is the PEP 517 compliant build system for PyQt and projects that - extend PyQt. It extends the SIP build system and uses Qt's ``qmake`` to - perform the actual compilation and installation of extension modules. - - Projects that use PyQt-builder provide an appropriate ``pyproject.toml`` file - and an optional ``project.py`` script. Any PEP 517 compliant frontend, for - example ``sip-install`` or ``pip`` can then be used to build and install the - project. - - - Author - ------ - - PyQt-builder is copyright (c) Riverbank Computing Limited. Its homepage is - https://www.riverbankcomputing.com/software/pyqt-builder/. - - Support may be obtained from the PyQt mailing list at - https://www.riverbankcomputing.com/mailman/listinfo/pyqt/. - - - License - ------- - - PyQt-builder is released under the same licenses as SIP. - - - Installation - ------------ - - PyQt-builder can be installed from PyPI:: - - pip install PyQt-builder - - However you do not normally need to explicitly install it. It will be - installed automatically when it is needed. - - - Documentation - ------------- - - The documentation for the latest release can be found - `here `__. - Platform: X11 Platform: macOS Platform: Windows Requires-Python: >=3.5 +License-File: LICENSE +License-File: LICENSE-GPL3 +License-File: LICENSE-GPL2 + +PyQt-builder - The PEP 517 Compliant PyQt Build System +====================================================== + +What is PyQt-builder? +--------------------- + +PyQt-builder is the PEP 517 compliant build system for PyQt and projects that +extend PyQt. It extends the SIP build system and uses Qt's ``qmake`` to +perform the actual compilation and installation of extension modules. + +Projects that use PyQt-builder provide an appropriate ``pyproject.toml`` file +and an optional ``project.py`` script. Any PEP 517 compliant frontend, for +example ``sip-install`` or ``pip`` can then be used to build and install the +project. + + +Author +------ + +PyQt-builder is copyright (c) Riverbank Computing Limited. Its homepage is +https://www.riverbankcomputing.com/software/pyqt-builder/. + +Support may be obtained from the PyQt mailing list at +https://www.riverbankcomputing.com/mailman/listinfo/pyqt/. + + +License +------- + +PyQt-builder is released under the same licenses as SIP. + + +Installation +------------ + +PyQt-builder can be installed from PyPI:: + + pip install PyQt-builder + +However you do not normally need to explicitly install it. It will be +installed automatically when it is needed. + + +Documentation +------------- + +The documentation for the latest release can be found +`here `__. + + diff -Nru pyqt-builder-1.10.3+dfsg/PyQt_builder.egg-info/requires.txt pyqt-builder-1.12.1+dfsg/PyQt_builder.egg-info/requires.txt --- pyqt-builder-1.10.3+dfsg/PyQt_builder.egg-info/requires.txt 2021-07-04 11:38:37.000000000 +0000 +++ pyqt-builder-1.12.1+dfsg/PyQt_builder.egg-info/requires.txt 2021-10-12 15:05:47.000000000 +0000 @@ -1,2 +1,2 @@ packaging -sip<7,>=5.5 +sip<7,>=6.3 diff -Nru pyqt-builder-1.10.3+dfsg/PyQt_builder.egg-info/SOURCES.txt pyqt-builder-1.12.1+dfsg/PyQt_builder.egg-info/SOURCES.txt --- pyqt-builder-1.10.3+dfsg/PyQt_builder.egg-info/SOURCES.txt 2021-07-04 11:38:37.000000000 +0000 +++ pyqt-builder-1.12.1+dfsg/PyQt_builder.egg-info/SOURCES.txt 2021-10-12 15:05:47.000000000 +0000 @@ -109,6 +109,7 @@ pyqtbuild/bundle/packages/pyqt6_charts.py pyqtbuild/bundle/packages/pyqt6_datavisualization.py pyqtbuild/bundle/packages/pyqt6_networkauth.py +pyqtbuild/bundle/packages/pyqt6_webengine.py pyqtbuild/bundle/packages/pyqtchart.py pyqtbuild/bundle/packages/pyqtdatavisualization.py pyqtbuild/bundle/packages/pyqtnetworkauth.py diff -Nru pyqt-builder-1.10.3+dfsg/setup.py pyqt-builder-1.12.1+dfsg/setup.py --- pyqt-builder-1.10.3+dfsg/setup.py 2021-03-10 15:37:37.000000000 +0000 +++ pyqt-builder-1.12.1+dfsg/setup.py 2021-10-12 15:05:44.000000000 +0000 @@ -49,7 +49,7 @@ version=version, license='SIP', python_requires='>=3.5', - install_requires=['packaging', 'sip >=5.5, <7'], + install_requires=['packaging', 'sip >=6.3, <7'], packages=find_packages(), package_data={ 'pyqtbuild.bundle': ['dlls/*/*', 'qt_wheel_distinfo/*'],