_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>
.. deprecated:: 4.18
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:: -B <TAG>
.. versionadded:: 4.16
The tag is added to the list of *backstops*. The option may be given more
than once if multiple timelines have been defined. See the
:directive:`%Timeline` directive for more details.
.. 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>
.. deprecated:: 4.12
Use the :option:`-X <sip -X>` option instead.
The name of the documentation file to generate. Documentation is included
.. 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:: -T
.. deprecated:: 4.16.6
This option is now ignored and timestamps are always disabled.
By default the generated C and C++ source and header files include a
timestamp specifying when they were generated. This option disables the
timestamp so that the contents of the generated files remain constant for a
particular version of SIP.
.. 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:: -X <ID:FILE>
.. versionadded:: 4.12
The extract (defined with the :directive:`%Extract` directive) with the
identifier ``ID`` is written to the file ``FILE``.
.. cmdoption:: -y <FILE>
.. versionadded:: 4.18
The name of the Python type hints stub file to generate. This file
contains a description of the module API that is compliant with PEP 484.