blob: 5d428448a881b5428dfff1bcfc65e6e960d9f739 (
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>The SIP Command Line — SIP 4.10.5 Reference Guide</title>
<link rel="stylesheet" href="_static/default.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '#',
VERSION: '4.10.5',
COLLAPSE_MODINDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="top" title="SIP 4.10.5 Reference Guide" href="index.html" />
<link rel="next" title="SIP Specification Files" href="specification_files.html" />
<link rel="prev" title="Using SIP" href="using.html" />
</head>
<body>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="modindex.html" title="Global Module Index"
accesskey="M">modules</a> |</li>
<li class="right" >
<a href="specification_files.html" title="SIP Specification Files"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="using.html" title="Using SIP"
accesskey="P">previous</a> |</li>
<li><a href="index.html">SIP 4.10.5 Reference Guide</a> »</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="the-sip-command-line">
<span id="ref-command-line"></span><h1>The SIP Command Line<a class="headerlink" href="#the-sip-command-line" title="Permalink to this headline">¶</a></h1>
<p>The syntax of the SIP command line is:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">sip</span> <span class="p">[</span><span class="n">options</span><span class="p">]</span> <span class="p">[</span><span class="n">specification</span><span class="p">]</span>
</pre></div>
</div>
<p><tt class="docutils literal"><span class="pre">specification</span></tt> is the name of the specification file for the module. If it
is omitted then <tt class="docutils literal"><span class="pre">stdin</span></tt> is used.</p>
<p>The full set of command line options is:</p>
<dl class="cmdoption">
<dt id="cmdoption-sip-h">
<tt class="descname">-h</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-sip-h" title="Permalink to this definition">¶</a></dt>
<dd>Display a help message.</dd></dl>
<dl class="cmdoption">
<dt id="cmdoption-sip-V">
<tt class="descname">-V</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-sip-V" title="Permalink to this definition">¶</a></dt>
<dd>Display the SIP version number.</dd></dl>
<dl class="cmdoption">
<dt id="cmdoption-sip-a">
<tt class="descname">-a</tt><tt class="descclassname"> <FILE></tt><a class="headerlink" href="#cmdoption-sip-a" title="Permalink to this definition">¶</a></dt>
<dd>The name of the TQScintilla API file to generate. This file contains a
description of the module API in a form that the TQScintilla 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.</dd></dl>
<dl class="cmdoption">
<dt id="cmdoption-sip-b">
<tt class="descname">-b</tt><tt class="descclassname"> <FILE></tt><a class="headerlink" href="#cmdoption-sip-b" title="Permalink to this definition">¶</a></dt>
<dd>The name of the build file to generate. This file contains the information
about the module needed by the <a class="reference external" href="build_system.html#ref-build-system"><em>SIP build system</em></a>
to generate a platform and compiler specific Makefile for the module. By
default the file is not generated.</dd></dl>
<dl class="cmdoption">
<dt id="cmdoption-sip-c">
<tt class="descname">-c</tt><tt class="descclassname"> <DIR></tt><a class="headerlink" href="#cmdoption-sip-c" title="Permalink to this definition">¶</a></dt>
<dd>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.</dd></dl>
<dl class="cmdoption">
<dt id="cmdoption-sip-d">
<tt class="descname">-d</tt><tt class="descclassname"> <FILE></tt><a class="headerlink" href="#cmdoption-sip-d" title="Permalink to this definition">¶</a></dt>
<dd>The name of the documentation file to generate. Documentation is included
in specification files using the <a class="reference external" href="directives.html#directive-%Doc"><tt class="xref docutils literal"><span class="pre">%Doc</span></tt></a> and
<a class="reference external" href="directives.html#directive-%ExportedDoc"><tt class="xref docutils literal"><span class="pre">%ExportedDoc</span></tt></a> directives. By default the file is not
generated.</dd></dl>
<dl class="cmdoption">
<dt id="cmdoption-sip-e">
<tt class="descname">-e</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-sip-e" title="Permalink to this definition">¶</a></dt>
<dd>Support for C++ exceptions is enabled. This causes all calls to C++ code
to be enclosed in <tt class="docutils literal"><span class="pre">try</span></tt>/<tt class="docutils literal"><span class="pre">catch</span></tt> blocks and C++ exceptions to be
converted to Python exceptions. By default exception support is disabled.</dd></dl>
<dl class="cmdoption">
<dt id="cmdoption-sip-g">
<tt class="descname">-g</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-sip-g" title="Permalink to this definition">¶</a></dt>
<dd>The Python GIL is released before making any calls to the C/C++ library
being wrapped and reacquired afterwards. See <a class="reference external" href="using.html#ref-gil"><em>The Python Global Interpreter Lock</em></a> and the
<a class="reference external" href="annotations.html#fanno-ReleaseGIL"><tt class="xref docutils literal"><span class="pre">ReleaseGIL</span></tt></a> and <a class="reference external" href="annotations.html#fanno-HoldGIL"><tt class="xref docutils literal"><span class="pre">HoldGIL</span></tt></a> annotations.</dd></dl>
<dl class="cmdoption">
<dt id="cmdoption-sip-I">
<tt class="descname">-I</tt><tt class="descclassname"> <DIR></tt><a class="headerlink" href="#cmdoption-sip-I" title="Permalink to this definition">¶</a></dt>
<dd>The directory is added to the list of directories searched when looking for
a specification file given in an <a class="reference external" href="directives.html#directive-%Include"><tt class="xref docutils literal"><span class="pre">%Include</span></tt></a> or
<a class="reference external" href="directives.html#directive-%Import"><tt class="xref docutils literal"><span class="pre">%Import</span></tt></a> directive. This option may be given any number of
times.</dd></dl>
<dl class="cmdoption">
<dt id="cmdoption-sip-j">
<tt class="descname">-j</tt><tt class="descclassname"> <NUMBER></tt><a class="headerlink" href="#cmdoption-sip-j" title="Permalink to this definition">¶</a></dt>
<dd>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
<tt class="docutils literal"><span class="pre">make</span></tt>. By default 1 file is generated for each C structure or C++
class.</dd></dl>
<dl class="cmdoption">
<dt id="cmdoption-sip-k">
<tt class="descname">-k</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-sip-k" title="Permalink to this definition">¶</a></dt>
<dd><p>
<span class="versionmodified">New in version 4.10.</span></p>
<p>All functions and methods will, by default, support passing parameters
using the Python keyword argument syntax.</p>
</dd></dl>
<dl class="cmdoption">
<dt id="cmdoption-sip-o">
<tt class="descname">-o</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-sip-o" title="Permalink to this definition">¶</a></dt>
<dd><p>
<span class="versionmodified">New in version 4.10.</span></p>
<p>Docstrings will be automatically generated that describe the signature of
all functions, methods and constructors.</p>
</dd></dl>
<dl class="cmdoption">
<dt id="cmdoption-sip-p">
<tt class="descname">-p</tt><tt class="descclassname"> <MODULE></tt><a class="headerlink" href="#cmdoption-sip-p" title="Permalink to this definition">¶</a></dt>
<dd>The name of the <a class="reference external" href="directives.html#directive-%ConsolidatedModule"><tt class="xref docutils literal"><span class="pre">%ConsolidatedModule</span></tt></a> which will contain the
wrapper code for this component module.</dd></dl>
<dl class="cmdoption">
<dt id="cmdoption-sip-P">
<tt class="descname">-P</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-sip-P" title="Permalink to this definition">¶</a></dt>
<dd><p>
<span class="versionmodified">New in version 4.10.</span></p>
<p>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 <tt class="docutils literal"><span class="pre">protected</span></tt> keyword is redefined as <tt class="docutils literal"><span class="pre">public</span></tt>
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.</p>
</dd></dl>
<dl class="cmdoption">
<dt id="cmdoption-sip-r">
<tt class="descname">-r</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-sip-r" title="Permalink to this definition">¶</a></dt>
<dd>Debugging statements that trace the execution of the bindings are
automatically generated. By default the statements are not generated.</dd></dl>
<dl class="cmdoption">
<dt id="cmdoption-sip-s">
<tt class="descname">-s</tt><tt class="descclassname"> <SUFFIX></tt><a class="headerlink" href="#cmdoption-sip-s" title="Permalink to this definition">¶</a></dt>
<dd>The suffix to use for generated C or C++ source files. By default <tt class="docutils literal"><span class="pre">.c</span></tt>
is used for C and <tt class="docutils literal"><span class="pre">.cpp</span></tt> for C++.</dd></dl>
<dl class="cmdoption">
<dt id="cmdoption-sip-t">
<tt class="descname">-t</tt><tt class="descclassname"> <TAG></tt><a class="headerlink" href="#cmdoption-sip-t" title="Permalink to this definition">¶</a></dt>
<dd>The SIP version tag (declared using a <a class="reference external" href="directives.html#directive-%Timeline"><tt class="xref docutils literal"><span class="pre">%Timeline</span></tt></a> directive) or
the SIP platform tag (declared using the <a class="reference external" href="directives.html#directive-%Platforms"><tt class="xref docutils literal"><span class="pre">%Platforms</span></tt></a> directive)
to generate code for. This option may be given any number of times so long
as the tags do not conflict.</dd></dl>
<dl class="cmdoption">
<dt id="cmdoption-sip-w">
<tt class="descname">-w</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-sip-w" title="Permalink to this definition">¶</a></dt>
<dd>The display of warning messages is enabled. By default warning messages
are disabled.</dd></dl>
<dl class="cmdoption">
<dt id="cmdoption-sip-x">
<tt class="descname">-x</tt><tt class="descclassname"> <FEATURE></tt><a class="headerlink" href="#cmdoption-sip-x" title="Permalink to this definition">¶</a></dt>
<dd>The feature (declared using the <a class="reference external" href="directives.html#directive-%Feature"><tt class="xref docutils literal"><span class="pre">%Feature</span></tt></a> directive) is
disabled.</dd></dl>
<dl class="cmdoption">
<dt id="cmdoption-sip-z">
<tt class="descname">-z</tt><tt class="descclassname"> <FILE></tt><a class="headerlink" href="#cmdoption-sip-z" title="Permalink to this definition">¶</a></dt>
<dd>The name of a file containing more command line options.</dd></dl>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h4>Previous topic</h4>
<p class="topless"><a href="using.html"
title="previous chapter">Using SIP</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="specification_files.html"
title="next chapter">SIP Specification Files</a></p>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<input type="text" name="q" size="18" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
<p class="searchtip" style="font-size: 90%">
Enter search terms or a module, class or function name.
</p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="modindex.html" title="Global Module Index"
>modules</a> |</li>
<li class="right" >
<a href="specification_files.html" title="SIP Specification Files"
>next</a> |</li>
<li class="right" >
<a href="using.html" title="Using SIP"
>previous</a> |</li>
<li><a href="index.html">SIP 4.10.5 Reference Guide</a> »</li>
</ul>
</div>
<div class="footer">
© Copyright 2010 Riverbank Computing Limited.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.4.
</div>
</body>
</html>
|