[PyQt] Building PyQtChart

Phil Thompson phil at riverbankcomputing.com
Thu Oct 17 15:36:40 BST 2013


On Thu, 17 Oct 2013 10:15:17 -0400, Mark Mordeca
<mark.mordeca at prosensus.ca> wrote:
> Hi Phil,
> 
> 
> 
> Thanks for your insight.  This has me in the right track however I am
> confused as to why the paths are turning out the way they are.  When I
do
> configure.py --help I get:
> 
> c:\QtEnterprise\PyQtCharts\PyQtChart-commercial-1.3>python configure.py
> --help
> 
> Usage: python configure.py [options]
> 
> 
> 
> Options:
> 
>   --version             show program's version number and exit
> 
>   -h, --help            show this help message and exit
> 
>   --spec=SPEC           win32-msvc2008
> 
>   --configuration=FILE  FILE defines the target configuration
> 
>   -d DIR, --destdir=DIR
> 
>                         install the QtChart module in DIR [default:
> 
>                        
*C:\Python27_64_UpgLibs\Lib\site-packages\PyQt4*]
> 
>   --protected-is-public
> 
>                         enable building with 'protected' redefined as
> 'public'
> 
>                         [default: False]
> 
>   --protected-not-public
> 
>                         disable building with 'protected' redefined as
> 
>                         'public'
> 
>   --pyqt=PyQtn          configure for PyQt4 or PyQt5 [default: PyQt4]
> 
>   --sip=FILE            the pathname of sip is FILE [default:
> 
>                         *C:\Python27_64_UpgLibs\sip.exe*]
> 
>   --sip-incdir=DIR      the directory containing the sip.h header file
file
> is
> 
>                         DIR [default: *C:\Python27_64_UpgLibs\Include*]
> 
>   --pyqt-sipdir=DIR     the directory containing the PyQt .sip files is
DIR
> 
>                         [default: *C:\Python27_64_UpgLibs\sip\PyQt4*]
> 
>   -v DIR, --qtchart-sipdir=DIR
> 
>                         the QtChart .sip files will be installed in DIR
> 
>                         [default: *C:\Python27_64_UpgLibs\sip\PyQt4*]
> 
>   -c, --concatenate     concatenate the C++ source files
> 
>   -j N, --concatenate-split=N
> 
>                         split the concatenated C++ source files into N
> pieces
> 
>                         [default: 1]
> 
>   -k, --static          build the QtChart module as a static library
> 
>   --no-docstrings       disable the generation of docstrings
> 
>   -r, --trace           build the QtChart module with tracing enabled
> 
>   -u, --debug           build the QtChart module with debugging symbols
> 
>   -w, --verbose         enable verbose output during configuration
> 
>   -T, --no-timestamp    suppress timestamps in the header comments of
> 
>                         generated code [default: include timestamps]
> 
> 
> 
> The default directories it picks up are the correct ones, however when I
> actually run configure.py:
> 
> 
> 
> c:\QtEnterprise\PyQtCharts\PyQtChart-commercial-1.3>python configure.py
> 
> PyQt 4.9.5 is being used.
> 
> Qt 4.8.3 is being used.
> 
> 
> 
> c:\QtEnterprise\PyQtCharts\PyQtChart-commercial-1.3>This is the
commercial
> versi
> 
> on of PyQtChart 1.3.
> 
> QtCommercialChart 1.3.0 is being used.
> 
> PyQt 4.9.5 is being used.
> 
> Qt v4.8.3 free edition is being used.
> 
> SIP 4.14.1 is being used.
> 
> The QtChart package will be installed in
> 
> *C:\Python27_64\Lib\site-packages\PyQt4*.
> 
> The QtChart .sip files will be installed in *C:\Python27_64\sip\PyQt4*.
> 
> The QtChart module is being built with generated docstrings.
> 
> Generating the C++ source for the QtChart module...
> 
> sip: Deprecation warning:
*C:\Python27_64\sip\PyQt4/QtGui/QtGuimod.sip*:17:
> %Modul
> 
> e version number should be specified using the 'version' argument
> 
> sip: Deprecation warning:
C:\Python27_64\sip\PyQt4/QtCore/QtCoremod.sip:17:
> %Mod
> 
> ule version number should be specified using the 'version' argument
> 
> sip: Deprecation warning:
C:\Python27_64\sip\PyQt4/QtCore/QtCoremod.sip:47:
> %Opt
> 
> ionalInclude is deprecated, use %Include and the 'optional' argument
> instead
> 
> sip: Deprecation warning:
C:\Python27_64\sip\PyQt4/QtCore/QtCoremod.sip:69:
> %Opt
> 
> ionalInclude is deprecated, use %Include and the 'optional' argument
> instead
> 
> sip: Deprecation warning:
C:\Python27_64\sip\PyQt4/QtCore/QtCoremod.sip:70:
> %Opt
> 
> ionalInclude is deprecated, use %Include and the 'optional' argument
> instead
> 
> sip: Deprecation warning:
C:\Python27_64\sip\PyQt4/QtCore/QtCoremod.sip:71:
> %Opt
> 
> ionalInclude is deprecated, use %Include and the 'optional' argument
> instead
> 
> sip: C:\Python27_64\sip\PyQt4/QtCore/QtCoremod.sip:73: syntax error
> 
> Error: Unable to create the C++ code.
> 
> 
> 
> It is grabbing completely different python directories.  C:\Python27_64
is
> not even on  my path, C:\Python27_64_UpgLibs is.  Any help would be
> appreciated.

Given the old versions of SIP and PyQt you are using it's probably less
confusing to ignore configure.py and use configure-old.py instead. In your
situation the former falls back to the latter anyway.

It also looks like your PyQt .sip files are from an earlier version than
v4.9.5.

Phil


More information about the PyQt mailing list