Adding custom sip module to pyqtdeploy

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Adding custom sip module to pyqtdeploy

Patrick Stinson-3
Iam inferring from the pyqt docs that the correct way to add a custom sip module to a pyqtdeploy project is to manually generate the .cpp source with the sip exe and then add the .cpp under the Other Extension Modules tab? Or is there a better way to have pyqtdeploy generate/build/link the .cpp file into the project?

Thanks!
-P
_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Adding custom sip module to pyqtdeploy

Phil Thompson-5
On 20 Mar 2017, at 5:00 am, Patrick Stinson <[hidden email]> wrote:
>
> Iam inferring from the pyqt docs that the correct way to add a custom sip module to a pyqtdeploy project is to manually generate the .cpp source with the sip exe and then add the .cpp under the Other Extension Modules tab? Or is there a better way to have pyqtdeploy generate/build/link the .cpp file into the project?

You infer correctly.

Phil
_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Adding custom sip module to pyqtdeploy

Patrick Stinson-3
The sip docs still point to pyqtconfig which seems to have been removed in PyQt5. I checked out configure.py from QScintilla for a current example and got a little lost in the TargetConfig class. How does one achieve the following with sip and PyQt5?

# Create the Makefile.  The QtGuiModuleMakefile class provided by the                                                              
# pyqtconfig module takes care of all the extra preprocessor, compiler and                                                        
# linker flags needed by the Qt library.                                                                                          
makefile = pyqtconfig.QtGuiModuleMakefile(
    configuration=config,
    build_file=build_file,
    installs=installs
)


> On Mar 20, 2017, at 12:14 PM, Phil Thompson <[hidden email]> wrote:
>
> On 20 Mar 2017, at 5:00 am, Patrick Stinson <[hidden email]> wrote:
>>
>> Iam inferring from the pyqt docs that the correct way to add a custom sip module to a pyqtdeploy project is to manually generate the .cpp source with the sip exe and then add the .cpp under the Other Extension Modules tab? Or is there a better way to have pyqtdeploy generate/build/link the .cpp file into the project?
>
> You infer correctly.
>
> Phil

_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Adding custom sip module to pyqtdeploy

Phil Thompson-5
On 20 Mar 2017, at 10:14 pm, Patrick Stinson <[hidden email]> wrote:
>
> The sip docs still point to pyqtconfig which seems to have been removed in PyQt5. I checked out configure.py from QScintilla for a current example and got a little lost in the TargetConfig class.

You only need to modify the ModuleConfiguration class, the rest is generic. The configure.py from PyQtPurchasing is probably the simplest.

> How does one achieve the following with sip and PyQt5?
>
> # Create the Makefile.  The QtGuiModuleMakefile class provided by the                                                              
> # pyqtconfig module takes care of all the extra preprocessor, compiler and                                                        
> # linker flags needed by the Qt library.                                                                                          
> makefile = pyqtconfig.QtGuiModuleMakefile(
>    configuration=config,
>    build_file=build_file,
>    installs=installs
> )

The new and old build systems are completely different - there is no equivalent.

Phil
_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Adding custom sip module to pyqtdeploy

Patrick Stinson-3
Thanks. I modified the qtr configure.py which generates and runs the following command, which exist with error code 0, but does not generate a .cpp file:

/Users/patrick/dev/vendor/pyqt-sysroot-ios-64/bin/sip -D -t _cutil_5_8_1 -D -t WS_MACX -t Qt_5_8_0 -B Qt_6_0_0 -I /Users/patrick/dev/vendor/pyqt-sysroot-ios-64/bin/../../pyqt-sysroot-dev/share/sip/PyQt5 -P -o -c /Users/patrick/dev/pkdiagram/pkdiagram/_cutil/_cutil _cutil.sip

This of course spits out the following error from configure.py:

"Unable to create the C++ code.”

Other places to check? I don’t see a verbose option on the sip exe

> On Mar 20, 2017, at 4:44 PM, Phil Thompson <[hidden email]> wrote:
>
> On 20 Mar 2017, at 10:14 pm, Patrick Stinson <[hidden email]> wrote:
>>
>> The sip docs still point to pyqtconfig which seems to have been removed in PyQt5. I checked out configure.py from QScintilla for a current example and got a little lost in the TargetConfig class.
>
> You only need to modify the ModuleConfiguration class, the rest is generic. The configure.py from PyQtPurchasing is probably the simplest.
>
>> How does one achieve the following with sip and PyQt5?
>>
>> # Create the Makefile.  The QtGuiModuleMakefile class provided by the                                                              
>> # pyqtconfig module takes care of all the extra preprocessor, compiler and                                                        
>> # linker flags needed by the Qt library.                                                                                          
>> makefile = pyqtconfig.QtGuiModuleMakefile(
>>   configuration=config,
>>   build_file=build_file,
>>   installs=installs
>> )
>
> The new and old build systems are completely different - there is no equivalent.
>
> Phil

_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Adding custom sip module to pyqtdeploy

Patrick Stinson-3
Scratch that. It’s important that all of the values that are somewhat like the module name in configure.py match the module name. makes sense.

All imported at working here.

-P

> On Mar 20, 2017, at 7:44 PM, Patrick Stinson <[hidden email]> wrote:
>
> Thanks. I modified the qtr configure.py which generates and runs the following command, which exist with error code 0, but does not generate a .cpp file:
>
> /Users/patrick/dev/vendor/pyqt-sysroot-ios-64/bin/sip -D -t _cutil_5_8_1 -D -t WS_MACX -t Qt_5_8_0 -B Qt_6_0_0 -I /Users/patrick/dev/vendor/pyqt-sysroot-ios-64/bin/../../pyqt-sysroot-dev/share/sip/PyQt5 -P -o -c /Users/patrick/dev/pkdiagram/pkdiagram/_cutil/_cutil _cutil.sip
>
> This of course spits out the following error from configure.py:
>
> "Unable to create the C++ code.”
>
> Other places to check? I don’t see a verbose option on the sip exe
>
>> On Mar 20, 2017, at 4:44 PM, Phil Thompson <[hidden email]> wrote:
>>
>> On 20 Mar 2017, at 10:14 pm, Patrick Stinson <[hidden email]> wrote:
>>>
>>> The sip docs still point to pyqtconfig which seems to have been removed in PyQt5. I checked out configure.py from QScintilla for a current example and got a little lost in the TargetConfig class.
>>
>> You only need to modify the ModuleConfiguration class, the rest is generic. The configure.py from PyQtPurchasing is probably the simplest.
>>
>>> How does one achieve the following with sip and PyQt5?
>>>
>>> # Create the Makefile.  The QtGuiModuleMakefile class provided by the                                                              
>>> # pyqtconfig module takes care of all the extra preprocessor, compiler and                                                        
>>> # linker flags needed by the Qt library.                                                                                          
>>> makefile = pyqtconfig.QtGuiModuleMakefile(
>>>  configuration=config,
>>>  build_file=build_file,
>>>  installs=installs
>>> )
>>
>> The new and old build systems are completely different - there is no equivalent.
>>
>> Phil
>

_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
Loading...