blob: 9c50cf48b544609f014e77d1e6b1401ab8639ce3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
|
.. _ref-command-line:
The SIP Command Line
====================
The syntax of the SIP command line is::
sip [options] [specification]
``specification`` is the name of the specification file for the module. If it
is omitted then ``stdin`` is used.
The full set of command line options is:
.. program:: sip
.. cmdoption:: -h
Display a help message.
.. cmdoption:: -V
Display the SIP version number.
.. cmdoption:: -a <FILE>
The name of the QScintilla API file to generate. This file contains a
description of the module API in a form that the QScintilla editor
component can use for auto-completion and call tips. (The file may also be
used by the SciTE editor but must be sorted first.) By default the file is
not generated.
.. cmdoption:: -b <FILE>
The name of the build file to generate. This file contains the information
about the module needed by the :ref:`SIP build system <ref-build-system>`
to generate a platform and compiler specific Makefile for the module. By
default the file is not generated.
.. cmdoption:: -c <DIR>
The name of the directory (which must exist) into which all of the
generated C or C++ code is placed. By default no code is generated.
.. cmdoption:: -d <FILE>
The name of the documentation file to generate. Documentation is included
in specification files using the :directive:`%Doc` and
:directive:`%ExportedDoc` directives. By default the file is not
generated.
.. cmdoption:: -e
Support for C++ exceptions is enabled. This causes all calls to C++ code
to be enclosed in ``try``/``catch`` blocks and C++ exceptions to be
converted to Python exceptions. By default exception support is disabled.
.. cmdoption:: -g
The Python GIL is released before making any calls to the C/C++ library
being wrapped and reacquired afterwards. See :ref:`ref-gil` and the
:fanno:`ReleaseGIL` and :fanno:`HoldGIL` annotations.
.. cmdoption:: -I <DIR>
The directory is added to the list of directories searched when looking for
a specification file given in an :directive:`%Include` or
:directive:`%Import` directive. This option may be given any number of
times.
.. cmdoption:: -j <NUMBER>
The generated code is split into the given number of files. This makes it
easier to use the parallel build facility of most modern implementations of
``make``. By default 1 file is generated for each C structure or C++
class.
.. cmdoption:: -k
.. versionadded:: 4.10
All functions and methods will, by default, support passing parameters
using the Python keyword argument syntax.
.. cmdoption:: -o
.. versionadded:: 4.10
Docstrings will be automatically generated that describe the signature of
all functions, methods and constructors.
.. cmdoption:: -p <MODULE>
The name of the :directive:`%ConsolidatedModule` which will contain the
wrapper code for this component module.
.. cmdoption:: -P
.. versionadded:: 4.10
By default SIP generates code to provide access to protected C++ functions
from Python. On some platforms (notably Linux, but not Windows) this code
can be avoided if the ``protected`` keyword is redefined as ``public``
during compilation. This can result in a significant reduction in the size
of a generated Python module. This option disables the generation of the
extra code.
.. cmdoption:: -r
Debugging statements that trace the execution of the bindings are
automatically generated. By default the statements are not generated.
.. cmdoption:: -s <SUFFIX>
The suffix to use for generated C or C++ source files. By default ``.c``
is used for C and ``.cpp`` for C++.
.. cmdoption:: -t <TAG>
The SIP version tag (declared using a :directive:`%Timeline` directive) or
the SIP platform tag (declared using the :directive:`%Platforms` directive)
to generate code for. This option may be given any number of times so long
as the tags do not conflict.
.. cmdoption:: -w
The display of warning messages is enabled. By default warning messages
are disabled.
.. cmdoption:: -x <FEATURE>
The feature (declared using the :directive:`%Feature` directive) is
disabled.
.. cmdoption:: -z <FILE>
The name of a file containing more command line options.
|