1man(sip) sip man(sip)
2
3
4
6 sip - The SIP command line
7
9 sip [option] [specification]
10
12 SIP is a tool for automatically generating Python bindings for C and
13 C++ libraries. SIP was originally developed in 1998 for PyQt - the
14 Python bindings for the Qt GUI toolkit - but is suitable for generating
15 bindings for any C or C++ library.
16
18 specification is the name of the specification file for the module. If
19 it is omitted then stdin is used. The full set of command line options
20 is:
21
22
23 -h Display a help message.
24
25 -V Display the SIP version number.
26
27 -a <FILE>
28 The name of the QScintilla API file to generate. This file con‐
29 tains a description of the module API in a form that the QScin‐
30 tilla editor component can use for auto-completion and call
31 tips. (The file may also be used by the SciTE editor but must
32 be sorted first.) By default the file is not generated.
33
34 -b <FILE>
35 The name of the build file to generate. This file contains the
36 information about the module needed by the SIP build system to
37 generate a platform and compiler specific Makefile for the mod‐
38 ule. By default the file is not generated.
39
40 -c <DIR>
41 The name of the directory (which must exist) into which all of
42 the generated C or C++ code is placed. By default no code is
43 generated.
44
45 -d <FILE>
46 Deprecated since version 4.12: Use the -X option instead. The
47 name of the documentation file to generate. Documentation is
48 included in specification files using the %Doc and %ExportedDoc
49 directives. By default the file is not generated.
50
51 -e Support for C++ exceptions is enabled. This causes all calls to
52 C++ code to be enclosed in try/catch blocks and C++ exceptions
53 to be converted to Python exceptions. By default exception sup‐
54 port is disabled.
55
56 -g The Python GIL is released before making any calls to the C/C++
57 library being wrapped and reacquired afterwards. See The Python
58 Global Interpreter Lock and the ReleaseGIL and HoldGIL annota‐
59 tions.
60
61 -I <DIR>
62 The directory is added to the list of directories searched when
63 looking for a specification file given in an %Include or %Import
64 directive. Directory separators must always be /. This option
65 may be given any number of times.
66
67 -j <NUMBER>
68 The generated code is split into the given number of files. This
69 makes it easier to use the parallel build facility of most mod‐
70 ern implementations of make. By default 1 file is generated for
71 each C structure or C++ class.
72
73 -k New in version 4.10. Deprecated since version 4.12: Use the
74 keyword_arguments="All" %Module directive argument instead. All
75 functions and methods will, by default, support passing parame‐
76 ters using the Python keyword argument syntax.
77
78 -o New in version 4.10. Docstrings will be automatically generated
79 that describe the signature of all functions, methods and con‐
80 structors.
81
82 -p <MODULE>
83 The name of the %ConsolidatedModule which will contain the wrap‐
84 per code for this component module.
85
86 -P New in version 4.10. By default SIP generates code to provide
87 access to protected C++ functions from Python. On some platforms
88 (notably Linux, but not Windows) this code can be avoided if the
89 protected keyword is redefined as public during compilation.
90 This can result in a significant reduction in the size of a gen‐
91 erated Python module. This option disables the generation of the
92 extra code.
93
94 -r Debugging statements that trace the execution of the bindings
95 are automatically generated. By default the statements are not
96 generated.
97
98 -s <SUFFIX>
99 The suffix to use for generated C or C++ source files. By
100 default .c is used for C and .cpp for C++.
101
102 -t <TAG>
103 The SIP version tag (declared using a %Timeline directive) or
104 the SIP platform tag (declared using the %Platforms directive)
105 to generate code for. This option may be given any number of
106 times so long as the tags do not conflict.
107
108 -T By default the generated C and C++ source and header files
109 include a timestamp specifying when they were generated. This
110 option disables the timestamp so that the contents of the gener‐
111 ated files remain constant for a particular version of SIP.
112
113 -w The display of warning messages is enabled. By default warning
114 messages are disabled.
115
116 -x <FEATURE>
117 The feature (declared using the %Feature directive) is disabled.
118
119 -X <ID:FILE>
120 New in version 4.12. The extract (defined with the %Extract
121 directive) with the identifier ID is written to the file FILE.
122
123 -z <FILE>
124 The name of a file containing more command line options.
125
127 Phil Thompson <phil@riverbankcomputing.com>
128
129 Than Ngo <than@redhat.com>, create this manpage
130
131
132
133sip 20 Jan 2014 man(sip)