Re: Unquoted Python LIBS path while building PyQt5 5.14.1 in Windows

Phil Thompson <[email protected]>
Newsgroups gmane.comp.python.pyqt-pykde
Message-ID <[email protected]>
On 10/02/2020 18:10, Kyle Altendorf wrote:
> I'm using sip-build as part of the pyqt5-tools build process (trying
> to catch it up...) and while it's running ok in GitHub Actions I am
> getting an error locally in Windows.  Cherry picking the part of
> interest (hopefully correctly):
> 
>     LINK : fatal error LNK1181: cannot open input file 
> 'Files\Python38\libs.obj'
> 
> That looks like an unquoted use of "Program Files".  I searched around
> in the build directory and found the following in three .pro files
> (I'm not building most of the modules).
> 
>     INCLUDEPATH += $$quote(C:/Program Files/Python38/include)
>     win32 {
>         LIBS += -LC:\Program Files\Python38\libs
>     }
> 
> This is part of SIP generation?  I'm guessing the LIBS should get
> $$quote()'ed as well?  Doing so seemed to fix the above error anyways,
> now time for me to dig into the rest.

It's PyQt-builder. The attached patch should fix it - or the current 
repo.

Thanks,
Phil

_______________________________________________
PyQt mailing list    [email protected]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
pyqt-builder.patch (text/x-diff, 581 B)
diff -r 4d9610c63267 pyqtbuild/builder.py
--- a/pyqtbuild/builder.py	Sun Feb 02 13:30:51 2020 +0000
+++ b/pyqtbuild/builder.py	Mon Feb 10 22:16:35 2020 +0000
@@ -407,7 +407,8 @@
         # TODO: is this still necessary for Python v3.8?
         if not buildable.static:
             pro_lines.extend(['win32 {',
-                    '    LIBS += -L{}'.format(project.py_pylib_dir),
+                    '    LIBS += -L{}'.format(
+                            self.qmake_quote(project.py_pylib_dir)),
                     '}'])
 
         # Add any installables from the buildable.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.