[Qgis-developer] Sip flag to generate docstrings

Gary Sherman gsherman at geoapt.com
Sun Feb 19 23:19:30 EST 2012


On Feb 19, 2012, at 6:46 PM, Larry Shaffer wrote:

> 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?
OS X and Ubuntu.
1.7 branch
Qt 4.8
Sip 4.12
> 
>> 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
> 
Yes, it has contents.

> 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.

Here you go:

http://geoapt.com/files/pyqgis.api

Let me know if it works for you.


> 
> 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

-gary

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Gary Sherman
GeoApt LLC
  http://geoapt.com
Founder, Quantum GIS
Chair, QGIS PSC
Book:
  http://geospatialdesktop.com
"We work virtually everywhere"
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=











More information about the Qgis-developer mailing list