skbuild.command package¶
Collection of objects allowing to customize behavior of standard distutils and setuptools commands.
- class skbuild.command.CommandMixinProtocol(*args, **kwargs)[source]¶
Bases:
ProtocolProtocol for commands that use CMake.
- build_base: str¶
- distribution: Distribution¶
- install_lib: str | None¶
- install_platlib: str¶
- outfiles: list[str]¶
- class skbuild.command.set_build_base_mixin[source]¶
Bases:
objectMixin allowing to override distutils and setuptools commands.
Submodules¶
skbuild.command.bdist module¶
This module defines custom implementation of bdist setuptools command.
- class skbuild.command.bdist.bdist(dist: Distribution)[source]¶
Bases:
set_build_base_mixin,bdistCustom implementation of
bdistsetuptools command.
skbuild.command.bdist_wheel module¶
This module defines custom implementation of bdist_wheel setuptools
command.
- class skbuild.command.bdist_wheel.bdist_wheel(dist: Distribution, **kw)[source]¶
Bases:
set_build_base_mixin,bdist_wheelCustom implementation of
bdist_wheelsetuptools command.
skbuild.command.build module¶
This module defines custom implementation of build setuptools command.
- class skbuild.command.build.build(dist: Distribution, **kw)[source]¶
Bases:
set_build_base_mixin,buildCustom implementation of
buildsetuptools command.
skbuild.command.build_ext module¶
This module defines custom implementation of build_ext setuptools command.
- class skbuild.command.build_ext.build_ext(dist: Distribution, **kw)[source]¶
Bases:
set_build_base_mixin,build_extCustom implementation of
build_extsetuptools command.- copy_extensions_to_source() None[source]¶
This function is only-called when doing inplace build.
It is customized to ensure the extensions compiled using distutils are copied back to the source tree instead of the
skbuild.constants.CMAKE_INSTALL_DIR().
skbuild.command.build_py module¶
This module defines custom implementation of build_py setuptools
command.
- class skbuild.command.build_py.build_py(dist: Distribution, **kw)[source]¶
Bases:
set_build_base_mixin,build_pyCustom implementation of
build_pysetuptools command.- build_module(module: str | list[str] | tuple[str, ...], module_file: str, package: str) None[source]¶
Handle –hide-listing option.
Increments
outfiles_count.
- find_modules() list[tuple[str, str, str]][source]¶
Finds individually-specified Python modules, ie. those listed by module name in ‘self.py_modules’. Returns a list of tuples (package, module_base, filename): ‘package’ is a tuple of the path through package-space to the module; ‘module_base’ is the bare (no packages, no dots) module name, and ‘filename’ is the path to the “.py” file (relative to the distribution root) that implements the module.
skbuild.command.clean module¶
This module defines custom implementation of clean setuptools command.
- class skbuild.command.clean.clean(dist: Distribution, **kw)[source]¶
Bases:
set_build_base_mixin,cleanCustom implementation of
cleansetuptools command.
skbuild.command.egg_info module¶
This module defines custom implementation of egg_info setuptools
command.
- class skbuild.command.egg_info.egg_info(dist: Distribution, **kw)[source]¶
Bases:
set_build_base_mixin,egg_infoCustom implementation of
egg_infosetuptools command.
skbuild.command.generate_source_manifest module¶
This module defines custom generate_source_manifest setuptools
command.
- class skbuild.command.generate_source_manifest.generate_source_manifest(dist: Distribution)[source]¶
Bases:
set_build_base_mixin,CommandCustom setuptools command generating a MANIFEST file if not already provided.
- description = 'generate source MANIFEST'¶
- finalize_options(*args: object, **kwargs: object) None[source]¶
Set final values for all the options that this command supports.
- initialize_options() None[source]¶
Set default values for all the options that this command supports.
- run() None[source]¶
If neither a MANIFEST, nor a MANIFEST.in file is provided, and we are in a git repo, try to create a MANIFEST.in file from the output of git ls-tree –name-only -r HEAD.
We need a reliable way to tell if an existing MANIFEST file is one we’ve generated. distutils already uses a first-line comment to tell if the MANIFEST file was generated from MANIFEST.in, so we use a dummy file, _skbuild_MANIFEST, to avoid confusing distutils.
skbuild.command.install module¶
This module defines custom implementation of install setuptools
command.
- class skbuild.command.install.install(dist: Distribution)[source]¶
Bases:
set_build_base_mixin,installCustom implementation of
installsetuptools command.
skbuild.command.install_lib module¶
This module defines custom implementation of install_lib setuptools
command.
- class skbuild.command.install_lib.install_lib(dist: Distribution, **kw)[source]¶
Bases:
set_build_base_mixin,install_libCustom implementation of
install_libsetuptools command.
skbuild.command.install_scripts module¶
This module defines custom implementation of install_scripts setuptools
command.
- class skbuild.command.install_scripts.install_scripts(dist: Distribution, **kw)[source]¶
Bases:
set_build_base_mixin,install_scriptsCustom implementation of
install_scriptssetuptools command.
skbuild.command.sdist module¶
This module defines custom implementation of sdist setuptools command.
- class skbuild.command.sdist.sdist(dist: Distribution, **kw)[source]¶
Bases:
set_build_base_mixin,sdistCustom implementation of
sdistsetuptools command.- make_archive(base_name: str, format: str, root_dir: str | None = None, base_dir: str | None = None, owner: str | None = None, group: str | None = None) str[source]¶
Handle –hide-listing option.
- run(*args: object, **kwargs: object) None[source]¶
Force
egg_info.egg_infocommand to run.