Re: Exception with PyQt purchasing configure

Patrick Stinson <[email protected]>
Newsgroups gmane.comp.python.pyqt-pykde
Message-ID <[email protected]>
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 <[email protected]> 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 [email protected] <mailto:[email protected]>.
> 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$ 
>

_______________________________________________
PyQt mailing list    [email protected]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
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.