[PyQt] PyQt 5.13.2 build error: module 'sipbuild.api' has no attribute ‘prepare_metadata_for_build_wheel'
Phil Thompson
phil at riverbankcomputing.com
Sun Nov 10 15:03:48 GMT 2019
On 10/11/2019 14:31, FX wrote:
>> The documentation does not have anything pyqtbuild. It does have
>> something about PyQt-builder, but it’s not clear it is the same as
>> pyqtbuild? And even so, it’s only mentioned in the "Bundling Qt Using
>> pyqt-bundle”, which is not what I am trying to do.
>
> Documenting my progress: apparently this is it. Installing
> PyQt-builder allows sip-install to progress further.
>
> Now the build fails with:
>
> Generating the pyrcc5 script...
> Generating the pyuic5 script...
> Generating the .pro file for the Qt module...
> sip-install: An internal error occurred...
> Traceback (most recent call last):
> File "/usr/local/opt/sip/bin/sip-install", line 11, in <module>
> load_entry_point('sip==5.0.0', 'console_scripts', 'sip-install')()
> File
> "/usr/local/Cellar/sip/5.0.0/libexec/lib/python3.7/site-packages/sipbuild/tools/install.py",
> line 37, in main
> handle_exception(e)
> File
> "/usr/local/Cellar/sip/5.0.0/libexec/lib/python3.7/site-packages/sipbuild/exceptions.py",
> line 81, in handle_exception
> raise e
> File
> "/usr/local/Cellar/sip/5.0.0/libexec/lib/python3.7/site-packages/sipbuild/tools/install.py",
> line 34, in main
> project.install()
> File
> "/usr/local/Cellar/sip/5.0.0/libexec/lib/python3.7/site-packages/sipbuild/project.py",
> line 287, in install
> self.builder.install()
> File
> "/usr/local/Cellar/sip/5.0.0/libexec/lib/python3.7/site-packages/sipbuild/builder.py",
> line 214, in install
> self.build_project(target_dir)
> File
> "/usr/local/Cellar/pyqt/5.13.2/libexec/lib/python3.7/site-packages/pyqtbuild/builder.py",
> line 122, in build_project
> installed)
> File
> "/usr/local/Cellar/pyqt/5.13.2/libexec/lib/python3.7/site-packages/pyqtbuild/builder.py",
> line 389, in _generate_module_pro_file
> self._install(pro_lines, installed, installable, target_dir)
> File
> "/usr/local/Cellar/pyqt/5.13.2/libexec/lib/python3.7/site-packages/pyqtbuild/builder.py",
> line 458, in _install
> installable.install(target_dir, installed, do_install=False)
> File
> "/usr/local/Cellar/sip/5.0.0/libexec/lib/python3.7/site-packages/sipbuild/installable.py",
> line 61, in install
> os.makedirs(target_dir, exist_ok=True)
> File
> "/usr/local/Cellar/sip/5.0.0/libexec/bin/../lib/python3.7/os.py", line
> 221, in makedirs
> mkdir(name, mode)
> PermissionError: [Errno 1] Operation not permitted:
> '/usr/local/Cellar/sip/5.0.0/libexec/lib/python3.7/site-packages/PyQt5’
>
> It is trying to write to the sip installation directory, to which it
> does not have access (in Homebrew, packages are not allowed to write
> to other packages’ folders).
>
> Previously we configured with:
>
> - args = ["--confirm-license",
> - "--bindir=#{bin}",
> - "--destdir=#{lib}/python#{version}/site-packages",
> - "--stubsdir=#{lib}/python#{version}/site-packages/PyQt5",
> - "--sipdir=#{share}/sip/Qt5",
> - # sip.h could not be found automatically
> - "--sip-incdir=#{Formula["sip"].opt_include}",
> - "--qmake=#{Formula["qt"].bin}/qmake",
> - # Force deployment target to avoid libc++ issues
> - "QMAKE_MACOSX_DEPLOYMENT_TARGET=#{MacOS.version}",
> - "--qml-plugindir=#{pkgshare}/plugins",
> - "--verbose”]
>
> Could you advice what would be the closest options for this? Many of
> these options do no exist anymore…
I don't know what you mean by the sip installation directory. PyQt
packages (eg. PyQt3D, PyQtChart) have always written to "other"
packages' folders (ie. PyQt5).
Phil
More information about the PyQt
mailing list