[QGIS-Developer] Let (C)Make run sipify?

Denis Rouzaud denis.rouzaud at gmail.com
Wed Jun 14 23:19:46 PDT 2017

Dear all

I would like to discuss the way we want the sip files to be built in QGIS.

Main things to know for those not familiar with recent changes:
- A perl scrit takes care of updating the sip files. It is either run
manually (sipdiff or sipify_all.sh) or automatically (prepare-commit.sh). A
test (qgis_sip_uptodate) takes care of controlling that files are up to
date in the source.
- The file saying which file has to be sipified is updated manually
(auto_sip.blacklist). If one adds a new header, he has to add the sip files
to corresponding include file (core.sip,gui.sip, etc.).
- There are two configurations running on Travis in parallel:
  * the main build for compilation and running the core and application test
  * code_layout which takes care of running static tests (spelling,
indentation, documentation, sipify)

The sip coverage test is still running on the main build because it
requires the python bindings. To remove it (and save some time on Travis),
the missing bit in code_layout configuration is checking that a new header
got his sip file too (or was explicitly marked as non being exposed to the
python bindings).

To achieves this, I was thinking at letting cmake create the include sip
file lists (core.sip, gui.sip, …) to get a compile error whenever someone
adds a cpp header without its corresponding sip file. I gave it a try and
it works well.

Anyway I wonder if it’s really coherent to have:
* cmake creating the include files
* prepare-commit or manual trigger of a perl script to build the sip files

The choices I see:

1) scripts to create both the include and the sip files
    - need to create a new test to check that all headers have sip files
(would be run in code_layout config)

2) cmake for the include + script for the sip files
    - not really coherent to me
    - no need to add new test

3) cmake for the include + make (compile time) for the sip files
    - use CMake add_custom_command to add sipify to the compile process
    - this would require perl to build the project
    - one would have to build before pushing (or run sipify manually)
    - is it fine to push built files to source?

4) cmake for both without sip in source
    - similar to above
    - is sipify stable enough? not sure.

None of these solutions is really complicate to implement. It’s more a
matter of coherence and prevision.
I would tend to go for 3 (and 4 in a later step). My main reason to this is
to avoid relying on standalone scripts to build QGIS.

What are your thoughts on this?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20170615/4d77d50e/attachment.html>

More information about the QGIS-Developer mailing list