[Qgis-developer] Sip flag to generate docstrings

Larry Shaffer larrys at dakotacarto.com
Sun Feb 19 22:46:42 EST 2012


Hi Gary,

On Sun, Feb 19, 2012 at 3:30 PM, Gary Sherman <gsherman at geoapt.com> wrote:
>
> On Feb 19, 2012, at 8:50 AM, Larry Shaffer wrote:
...
>> However, I have not been able to get the -a option to work when adding to the SIP_EXTRA_OPTIONS, fails on compile. Have you (or anyone else) tried this in addtion to the -o flag?
>>
>>
>
> This line in CMakeLists.txt (top-level of source tree) works for me:
> SET(SIP_EXTRA_OPTIONS ${PYQT4_SIP_FLAGS} -o -a ${CMAKE_BINARY_DIR}/python/qscintilla_api)

That's good to hear! Thank you for trying it out. Was that on Mac or
Linux? Master or 1_7_x branch? Qt 4.7.4 or 4.8? What version of sip?

> Not sure where to place the resulting file though...

Does the resultant file have contents? Like (from PyQt's api file):

PyQt4.QtCore.qInstallMsgHandler?4(callable) -> callable
PyQt4.QtCore.qRegisterResourceData?4(int, str, str, str) -> bool
PyQt4.QtCore.qUnregisterResourceData?4(int, str, str, str) -> bool

I have gotten empty files before. If yours is OK, then, on the Mac, it goes in:

/usr/local/Qt4.[7|8]/qsci/api/python/

as per default open source Qt install. For Eric to use the API files
they need to be statically linked in by compiling via the Eric API
preference dialog (which should automatically compile the APIs in that
default directory) [1]. Other options for Eric4's use of the API files
are in the Autocompletion and Call Tips dialogs.

Could you post a link to the generated PyQGIS API file? (In case I
miserably fail at compiling it again.) Like to test it out.

The other APIs you may notice in my prefs are from a custom
out-of-sys.path Eric4 install that I do for testing QGIS plugins with
the copied mini editor, so the test plugin doesn't accidentally
reference some installed Eric4 module. My notes on doing that [2].

Regards,

Larry Shaffer
Dakota Cartography
Black Hills, South Dakota

[1] http://dl.dropbox.com/u/4058089/qgis/eric4-api-dialog.png
[2] http://dl.dropbox.com/u/4058089/qgis/Latest-eric4-install.txt


More information about the Qgis-developer mailing list