[PyQt] How to build pyqt sources to provide the same content than official wheel?

Scener Spanish spscener84 at gmail.com
Sat Jul 20 11:58:02 BST 2019


Hello everyone (specially Phil :))

I've recently subscribed to the pyqt mailing list so it seems I can't reply
to existing threads when using gmail. I'm the user from #pyqt who was
having issues when building pyqt from sources who's mentioned here
https://www.riverbankcomputing.com/pipermail/pyqt/2019-July/041953.html

Anyway, I'm really interested to get a qt bug fix who's already living in
upstream https://bugreports.qt.io/browse/QTBUG-74492 , as you can see that
fix is living in both 5.12.5, 5.13.1 and dev branches.

The current pypi wheel https://pypi.org/project/PyQt5/5.13.0/ at this
moment still contains that annoying bug so I've tried to build
https://www.riverbankcomputing.com/static/Downloads/PyQt5/PyQt5_gpl-5.13.1.dev1907191722.zip
but
the result has been not good. Here'a the steps I've followed:

1) I've built https://github.com/qt/qtbase 5.13.0-394-g69ef6e8212 (you can
check the commit hash by doing git rev-parse). Why did I choose this one?
Mainly because this specific commit had the bug fix I was really interested
with and also because the MODULE_VERSION = 5.13.1.

2) To build it I've had to add openssl support otherwise pyqt would crash
when building (for more info you can check the other Florian's thread where
he also proposes a pyqt fix in one of the sip files), here's the
configuration I've used:

configure.bat -prefix "d:/qt/5.13.0-394-g69ef6e8212" -opensource
-confirm-license -nomake examples -nomake tests -opengl dynamic -ssl -L
D:/software/vcpkg/installed/x86-windows/lib -I
D:/software/vcpkg/installed/x86-windows/include -v


3) Then, I've just run this little batch file:

%echo off
setlocal
set SIP_PATH=D:\virtual_envs\packages_sources\3rdparty\sip-4.19.18
set QMAKE_PATH=D:\qt\5.13.0-394-g69ef6e8212\bin
rem set QMAKE_PATH=D:\qt\5.13.0-941-g56fb2266f2\bin
set PYQT_PATH=PyQt5_gpl-5.13.1.dev1907171931
set PATH=%QMAKE_PATH%;%SIP_PATH%\sipgen;%PATH%
where qmake
if ERRORLEVEL 1 (
    echo qmake.exe not found in %QMAKE_PATH%
    exit /b
)
where sip
if ERRORLEVEL 1 (
    echo sip.exe not found in %SIP_PATH%
    exit /b
)
pushd %PYQT_PATH%
python configure.py --sip-incdir=%SIP_PATH%\siplib --confirm-license
nmake
popd


4) Finally, I've just installed all the generated content doing `nmake
install`

Anyway, the result has been really bad and the experience quite
frustrating... I've ended up with an installation that doesn't look at all
like the nice installation from the official pypi wheels, a lot of missing
content and also a lot of additional sip files copied to the virtualenv...
the installation at this this point is basically unusable :'(

So my questions are:

- What'd be the right procedure to get a nice wheel that looks like the
official pypi ones?
- I've been told eventually you'll be providing a proper setup.py in the
source packages that will allow to build nice wheels instead this
non-standard bizarre way to build pyqt, is that true? That'd be extremely
awesome!
- Is there any release date where a new pyqt wheel will be landing at pypi
that contains the bug fix of https://bugreports.qt.io/browse/QTBUG-74492 ?

Thanks in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20190720/dc2ee1d0/attachment.html>


More information about the PyQt mailing list