Command Line Tools¶
Note that, for the build tools, the command line options described in this
section are the standard options. Any of these options could be removed, or
new options added, by build system extensions including project-specific
project.py files.
sip-build¶
sip-build builds a project but does not install it. This is useful when developing a set of bindings.
The syntax of the sip-build command line is:
sip-build [options]
The full set of command line options is:
-
-h,--help¶ Display a help message.
-
-V,--version¶ Display the SIP version number.
-
--quiet¶ All progress messages are disabled.
-
--verbose¶ Verbose progress messages are enabled.
-
--api-dirDIR¶ A QScintilla
.apifile is created inDIR.
-
--build-dirDIR¶ DIRis created as a build directory in which all generated files will be created. The build directory is not removed after the build has been completed. The default value isbuild.
-
--concatenateN¶ The generated code is split into
Nfiles. By default one file is generated for each C structure or C++ class. Specifying a low value ofNcan significantly speed up the build of large projects.
-
--disableNAME¶ The
NAMEbindings are disabled and will not be built. This option may be specified multiple times. It is only available if the project contains multiple sets of bindings.
-
--enableNAME¶ The
NAMEbindings are enabled and will be built. Any associated configuration tests that would normally be run to determine if the bindings should be built are suppressed. This option may be specified multiple times. It is only available if the project contains multiple sets of bindings.
-
--debug¶ A build with debugging symbols is performed.
-
--no-docstrings¶ The generation of docstrings that describe the signature of all functions, methods and constructors is disabled.
-
--pep484-pyi¶ The generation of Python type hints stub files is enabled. These files contain a description of a module’s API that is compliant with PEP 484.
-
--protected-is-public¶ SIP can generate code to provide access to protected C++ functions from Python. On non-Windows platforms this code can be avoided if the
protectedkeyword is redefined aspublicduring compilation. This can result in a significant reduction in the size of a generated Python module. This option enables the redefinition ofprotectedand is the default on all platforms except Windows.
-
--no-protected-is-public¶ This option disables the redefinition of
protectedto access protected C++ functions from Python and is the default on Windows.
-
--target-dirDIR¶ The project will eventually be installed in
DIR. By default it is thesite-packagesdirectory of the Python installation.
-
--tracing¶ Debugging statements that trace the execution of the bindings are automatically generated. By default the statements are not generated.
sip-distinfo¶
sip-distinfo creates and populates a .dist-info directory of
an installation or a wheel. It is provided for build systems that extend the
SIP build system and need to create the .dist-info directory from an
external tool such as make.
The syntax of the sip-distinfo command line is:
sip-distinfo [options] directory
directory is the full path name of the directory to create.
The full set of command line options is:
-
-h,--help¶ Display a help message.
-
-V,--version¶ Display the SIP version number.
-
--console-scriptENTRY-POINT¶ The console entry point
ENTRY-POINTis added to the wheel. It is ignored if the--wheel-tagoption is not specified. This option may be specified multiple times.
-
--generatorNAME¶ If the
--wheel-tagoption is specified thenNAMEis written as theGeneratorin theWHEELfile in the.dist-infodirectory. OtherwiseNAMEis written to theINSTALLERfile. By defaultsip-distinfois written.
-
--gui-scriptENTRY-POINT¶ The GUI entry point
ENTRY-POINTis added to the wheel. It is ignored if the--wheel-tagoption is not specified. This option may be specified multiple times.
-
--inventoryFILE¶ FILEcontains a list of the relative names of the files, one per line, that comprise the installation or wheel contents. This option must be specified.
-
--metadataNAME[=VALUE]¶ VALUEis used instead of any value specified forNAMEin the[tool.sip.metadata]section of thepyproject.tomlfile.
-
--prefixDIR¶ This option is provided as an aid to Linux package builders.
DIRis used to pass the commonly used values ofDESTDIRorINSTALL_ROOT. If specified it should have a trailing native path separator.
-
--project-rootDIR¶ The name of the directory containing the project’s
pyproject.tomlfile isDIR. This option must be specified.
-
--requires-distEXPR¶ EXPRis added to the list of prerequisites written to theMETADATAfile in the.dist-infodirectory. It is normally used to specify a particular version of a package project’ssipmodule. This option may be specified multiple times.
-
--wheel-tagTAG¶ TAGis written as theTagin theWHEELfile in the.dist-infodirectory.
sip-install¶
sip-install builds and installs a project.
The syntax of the sip-install command line is:
sip-install [options]
The full set of command line options is:
-
-h,--help¶ Display a help message.
-
-V,--version¶ Display the SIP version number.
-
--quiet¶ All progress messages are disabled.
-
--verbose¶ Verbose progress messages are enabled.
-
--api-dirDIR¶ A QScintilla
.apifile is created inDIR.
-
--build-dirDIR¶ DIRis created as a build directory in which all generated files will be created. This build directory is not removed after the build has been completed. By default a temporary build directory is created which is removed after the build has been completed.
-
--concatenateN¶ The generated code is split into
Nfiles. By default one file is generated for each C structure or C++ class. Specifying a low value ofNcan significantly speed up the build of large projects.
-
--disableNAME¶ The
NAMEbindings are disabled and will not be built. This option may be specified multiple times. It is only available if the project contains multiple sets of bindings.
-
--enableNAME¶ The
NAMEbindings are enabled and will be built. Any associated configuration tests that would normally be run to determine if the bindings should be built are suppressed. This option may be specified multiple times. It is only available if the project contains multiple sets of bindings.
-
--debug¶ A build with debugging symbols is performed.
-
--no-docstrings¶ The generation of docstrings that describe the signature of all functions, methods and constructors is disabled.
-
--no-distinfo¶ The creation of the
.dist-infodirectory is disabled.
-
--pep484-pyi¶ The generation of Python type hints stub files is enabled. These files contain a description of a module’s API that is compliant with PEP 484.
-
--protected-is-public¶ SIP can generate code to provide access to protected C++ functions from Python. On non-Windows platforms this code can be avoided if the
protectedkeyword is redefined aspublicduring compilation. This can result in a significant reduction in the size of a generated Python module. This option enables the redefinition ofprotectedand is the default on all platforms except Windows.
-
--no-protected-is-public¶ This option disables the redefinition of
protectedto access protected C++ functions from Python and is the default on Windows.
-
--target-dirDIR¶ The project will be installed in
DIR. By default it is thesite-packagesdirectory of the Python installation.
-
--tracing¶ Debugging statements that trace the execution of the bindings are automatically generated. By default the statements are not generated.
sip-module¶
sip-module builds one of more of the elements of the sip
module for a set of package projects.
The syntax of the sip-module command line is:
sip-module [options] name
name is the fully qualified name of the sip module (i.e. including
the package name).
The full set of command line options is:
-
-h,--help¶ Display a help message.
-
-V,--version¶ Display the SIP version number.
-
--abi-versionMAJOR[.MINOR]¶ The version number of the ABI implemented by the
sipmodule isMAJOR.MINOR. If only the major version number is specified then the latest minor version with that major version is used. By the default the very latest version is used.
-
--projectNAME¶ The name of the project as it would appear on PyPI is
NAME. By default the name is derived from the fully qualified name of thesipmodule.
-
--sdist¶ Create an sdist which can then be installed by pip or uploaded to PyPI.
-
--setup-cfgFILE¶ FILEis copied to the sdist assetup.cfginstead of the default version. This allows the meta-data included in the sdist to be customised. A number of macros may be specified in thesetup.cfgfile:@SIP_MODULE_FQ_NAME@is replaced by the fully qualified name of thesipmodule.@SIP_MODULE_PACKAGE_NAME@is replaced by the module’s project top-level package name.@SIP_MODULE_PROJECT_NAME@is replaced by the module’s project name as it would appear on PyPI.@SIP_MODULE_VERSION@is replaced by the version number of the module.
-
--sip-h¶ Create a
sip.hheader file that defines the C ABI implemented by thesipmodule.
-
--sip-rst¶ Create a
sip.rstfile that documents the Python API implemented by thesipmodule.
-
--target-dirDIR¶ Each of the module’s elements will be created in
DIR.
sip-sdist¶
sip-sdist creates an sdist (a source distribution) than be uploaded to PyPI.
The syntax of the sip-sdist command line is:
sip-sdist [options]
The full set of command line options is:
-
-h,--help¶ Display a help message.
-
-V,--version¶ Display the SIP version number.
-
--nameNAME¶ NAMEis used instead of the PyPI project name in thepyproject.tomlfile in the name of the sdist file.
sip-wheel¶
sip-wheel creates a wheel (a binary distribution) than be uploaded to PyPI.
The syntax of the sip-wheel command line is:
sip-wheel [options]
The full set of command line options is:
-
-h,--help¶ Display a help message.
-
-V,--version¶ Display the SIP version number.
-
--quiet¶ All progress messages are disabled.
-
--verbose¶ Verbose progress messages are enabled.
-
--api-dirDIR¶ A QScintilla
.apifile is created inDIR. This must be a name relative to the directory where the wheel will be installed.
-
--build-dirDIR¶ DIRis created as a build directory in which all generated files will be created. This build directory is not removed after the build has been completed. By default a temporary build directory is created which is removed after the build has been completed.
-
--build-tagTAG¶ TAGis the build tag to be used in the name of the wheel. By default the name of the wheel does not include a build tag.
-
--concatenateN¶ The generated code is split into
Nfiles. By default one file is generated for each C structure or C++ class. Specifying a low value ofNcan significantly speed up the build of large projects.
-
--disableNAME¶ The
NAMEbindings are disabled and will not be built. This option may be specified multiple times. It is only available if the project contains multiple sets of bindings.
-
--enableNAME¶ The
NAMEbindings are enabled and will be built. Any associated configuration tests that would normally be run to determine if the bindings should be built are suppressed. This option may be specified multiple times. It is only available if the project contains multiple sets of bindings.
-
--no-manylinux¶ Support for
manylinuxin the platform tag of a name of a wheel is disabled. It should only be used if support for older versions of pip is required.
-
--nameNAME¶ NAMEis used instead of the PyPI project name in thepyproject.tomlfile in the name of the wheel file.
-
--debug¶ A build with debugging symbols is performed.
-
--no-docstrings¶ The generation of docstrings that describe the signature of all functions, methods and constructors is disabled.
-
--pep484-pyi¶ The generation of Python type hints stub files is enabled. These files contain a description of a module’s API that is compliant with PEP 484.
-
--protected-is-public¶ SIP can generate code to provide access to protected C++ functions from Python. On non-Windows platforms this code can be avoided if the
protectedkeyword is redefined aspublicduring compilation. This can result in a significant reduction in the size of a generated Python module. This option enables the redefinition ofprotectedand is the default on all platforms except Windows.
-
--no-protected-is-public¶ This option disables the redefinition of
protectedto access protected C++ functions from Python and is the default on Windows.
-
--tracing¶ Debugging statements that trace the execution of the bindings are automatically generated. By default the statements are not generated.