[PyQt] pyqtconfig.sipconfig._config_stack has wrong paths

Josh jknox at irobot.com
Thu Mar 11 15:28:53 GMT 2010


Phil Thompson wrote:
> On Thu, 11 Mar 2010 09:13:27 -0500, Josh <jknox at irobot.com> wrote:
>   
>> Phil Thompson wrote:
>>     
>>> On Wed, 10 Mar 2010 16:49:13 -0500, Josh <jknox at irobot.com> wrote:
>>>   
>>>       
>>>> Hi,
>>>>
>>>> In my dev environment we build packages of Qt, PyQt, SIP, etc on a 
>>>> "central" build machine. Developers use these packages as dependencies 
>>>> for their projects on their own machines. The packages are always 
>>>> installed in different locations than where they were originally built.
>>>>         
>
>   
>>>> This leads to a problem where the plethora of paths specified in 
>>>> pyqtconfig.sipconfig._config_stack all refer to the original build 
>>>> machine. So, without some customization, its impossible to build 
>>>> PyQt/SIP wrappers for our Qt C++ widgets.
>>>>
>>>>
>>>> My question is this: Is it correct to just pilfer through the elements 
>>>> of pyqtconfig.sipconfig._config_stack and set things up for my system 
>>>> (ie. string replace)?
>>>>     
>>>>         
>>> No - _config_stack is an internal implementation detail.
>>>
>>>   
>>>       
>>>> Doing that just feels wrong. Is there a better way 
>>>> to go about this?
>>>>     
>>>>         
>>> No - what you are doing is simply unsupported.
>>>
>>> Phil
>>>   
>>>       
>> OK, that's fine. I faced similar issues integrating Qt with our build 
>> system. Just so I understand, are the official PyQt releases 
>> built/installed into the exact same paths that are expected to be used 
>> by end users?
>>     
>
> Of course, why would it be otherwise? Or have I misunderstood the question?
>
> Phil
>   
I realize that my situation is not typical, so this being unsupported is 
OK. This isn't the first tool to require some massaging to work with our 
system. Our build system packages numerous 3rd party/open source tools 
into separate runtime & development packages, for various target 
platforms. During development we may have projects with dependencies on 
different versions of tools, so all compile time stuff is installed 
locally in a sandbox. This gives us a clearly delineated tool-chain for 
each specific project and target.

This is fine for strictly header/library stuff, but with Qt/PyQt there 
are tools that need to be run during development (qmake, sip, moc, etc). 
Since these are initially built and packaged on one machine and 
installed on another in different locations, the "hard coded" paths are 
problematic. For instance, I cant just set the PATH, PYTHONPATH, etc to 
point to the tools in a sandbox since the sipconfig module references 
paths to the original build system.

Qt provides support for this type of customization with qmake.conf, 
overriding the original build paths embedded in qmake. Their package 
installer even uses a patch mechanism (qpatch) to rummage through the 
installed binaries and replace their build system paths with the paths 
where Qt gets installed the end users' systems. I was hoping there was 
something like that for PyQt, like "sipconfig.conf" or something, that 
would allow me to customize the paths used by sip when generating makefiles.

That make sense?

I'll gladly hack away to make it work for our environment, but any ideas 
or suggestions are welcome.

Thanks,

Josh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20100311/01e0396c/attachment.html>


More information about the PyQt mailing list