[PyQt] Deploying PyQt in a C++ Application

Ferguson, Eric W (397B) Eric.W.Ferguson at jpl.nasa.gov
Thu Aug 6 23:52:35 BST 2015


This may be a stupid question, but what directory is considered the
“source” directory of python. I downloaded a tarball from python.org for
2.7.10, and it has numerous directories with source code. There is a
“Modules” directory, which probably refers to standard library code. There
is also a Python directory, which looks more like what I want...



On 8/6/15, 3:40 PM, "Phil Thompson" <phil at riverbankcomputing.com> wrote:

>On 06/08/2015 11:22 pm, Ferguson, Eric W (397B) wrote:
>> Phil,
>> 
>> 
>> Thanks for answering my questions so quickly. Again, pardon my
>> ignorance
>> since I am new to python deployment.
>> 
>> Since you said using pydeployqt was possible, I had a few additional
>> questions regarding that tool:
>> 
>> 1.The first tab of the pydeployqt GUI is for your application source.
>> Since I am embedding python into my C++ application, I don¹t really
>> think
>> I have an application source. It seems like something has to be
>> specified
>> on this tab though and I am not sure what to include.
>
>Your Python code that you want to embed in your application. You might
>have a problem if there isn't any - that particular corner case won't
>have been tested - but that can be fixed.
>
>> 2. I definitely know which PyQt modules and standard library modules I
>> want to include, so those tabs were easy. However, the location tab is
>> a
>> bit confusing for me as well. I want to use python2.7 as the
>> interpreter.
>> The next tab requests the source location for python. Python 2.7 came
>> preinstalled on my mac - does that include the python source code or do
>> I
>> need to get a tarballed source from python.org?
>
>You need to get the source.
>
>> 3. For the target python locations, I know where to find the python
>> include directory for 2.7 on my machine. In the tutorial for the python
>> library, it looks like you are pointing to a static library (.a). Does
>> this mean I need to statically build the python library before using
>> this
>> tool, or will the tool do that for me? Do I give it the path to a
>> library
>> that already exists or is this a path to the library that will be
>> built?
>
>Whether you embed a static version of the library with your application,
>or distribute a copy of the dynamic version with your application is up
>to you.
>
>The path is to a library that already exists.
>
>> I also noticed your static build section after the pyqtdeploy tutorial
>> using the command line interface tool. Perhaps I shouldn¹t be using the
>> pydeployqt GUI and instead should be using that tool instead? If so,
>> how
>> can I include more than a small sub-set of the standard libraries in my
>> static build of python?
>
>You can't. pyqtdeploycli is intended to be used by build systems - it
>never modifies a .pdy project file.
>
>Phil



More information about the PyQt mailing list