[PyQt] PyQt5 install fails with parallelized make

Dmitry Shachnev mitya57 at ubuntu.com
Mon Jan 6 16:23:26 GMT 2020


Hi Phil!

Currently the top-level Makefile generated by qmake has the following line:

  install:install_subtargets install_init_py install_uic_package install_pylupdate install_pyrcc install_tools install_pep484_stubs install_distinfo  FORCE

With this code, make may attempt to run all dependencies of install target
simultaneously.

However, install_distinfo will fail if it is run before install_subtargets
is complete.

In my case, the Debian build tools ran “make -j4 install” and it failed with
this error. See how QtQml.so is installed just after mk_distinfo.py fails:

  Traceback (most recent call last):
    File "/home/mitya57/pyqt5/mk_distinfo.py", line 112, in <module>
      fn_f = open(fn, 'rb')
  FileNotFoundError: [Errno 2] No such file or directory: '/home/mitya57/pyqt5/debian/tmp/usr/lib/python3.8/dist-packages/PyQt5/QtQml.so'
  make[2]: *** [Makefile:2104: install_distinfo] Error 1
  make[2]: *** Waiting for unfinished jobs....
  make[3]: Entering directory '/home/mitya57/pyqt5/build-3.8/QtQml'
  /usr/lib/qt5/bin/qmake -install qinstall /home/mitya57/pyqt5/build-3.8/QtQml/QtQml.so /home/mitya57/pyqt5/debian/tmp/usr/lib/python3.8/dist-packages/PyQt5/QtQml.so
  make[3]: Leaving directory '/home/mitya57/pyqt5/build-3.8/QtQml'

I am attaching a patch that fixes this. Not sure if it is an elegant solution,
but forcing -j1 seemed even less elegant to me.

Or maybe mk_distinfo.py should open files from build directory, not from the
directory they will be installed into?

--
Dmitry Shachnev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: distinfo_dependencies.diff
Type: text/x-diff
Size: 2717 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20200106/37385b78/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20200106/37385b78/attachment.sig>


More information about the PyQt mailing list