[PyQt] Exception with PyQt purchasing configure

Patrick Stinson patrickkidd at gmail.com
Tue Oct 15 14:54:08 BST 2019


Adding a check for "dir_name is not None” in _apply_sysroot() fixes it: 

    def _apply_sysroot(self, dir_name):
        """ Replace any leading sys.prefix of a directory name with sysroot.
        """

        if dir_name is not None and dir_name.startswith(sys.prefix):
            dir_name = self.sysroot + dir_name[len(sys.prefix):]

        return dir_name

> On Oct 14, 2019, at 6:31 PM, Patrick Stinson <patrickkidd at gmail.com> wrote:
> 
> Just following directions...
> 
> Qt-5.13.1
> Python-3.6.4
> sip-4.19.19
> PyQt5_gpl-5.13.1
> PyQtPurchasing_gpl-5.13.0
> 
> Building from source. Tried first without —sip-incdir.
> 
> 
> turin:PyQtPurchasing_gpl-5.13.0 patrick$ python configure.py --debug --sysroot=$SYSROOT --sip-incdir=/Users/patrick/dev/vendor/sysroot-dev/include/python3.6dm/
> An internal error occured.  Please report all the output from the program,
> including the following traceback, to support at riverbankcomputing.com <mailto:support at riverbankcomputing.com>.
> Traceback (most recent call last):
>   File "configure.py", line 1954, in <module>
>     _main(sys.argv, pkg_config)
>   File "configure.py", line 1785, in _main
>     target_config.apply_sysroot()
>   File "configure.py", line 867, in apply_sysroot
>     self.sip_inc_dir = self._apply_sysroot(self.sip_inc_dir)
>   File "configure.py", line 873, in _apply_sysroot
>     if dir_name.startswith(sys.prefix):
> AttributeError: 'NoneType' object has no attribute 'startswith'
> turin:PyQtPurchasing_gpl-5.13.0 Patrick$ 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20191015/d84ec590/attachment.html>


More information about the PyQt mailing list