[PyQt] PyQt5 install fails with parallelized make

Phil Thompson phil at riverbankcomputing.com
Mon Jan 6 16:32:56 GMT 2020


On 06/01/2020 16:23, Dmitry Shachnev wrote:
> 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?

Sorry, I'm not changing configure.py now that it is deprecated.

Phil


More information about the PyQt mailing list