skbuild.utils package¶
This module defines functions generally useful in scikit-build.
- class skbuild.utils.Distribution(script_name)[source]¶
Bases:
NamedTuple- script_name: str¶
Alias for field number 0
- class skbuild.utils.PythonModuleFinder(packages: Sequence[str], package_dir: Mapping[str, str], py_modules: Sequence[str], alternative_build_base: Optional[str] = None)[source]¶
Bases:
build_pyConvenience class to search for python modules.
This class is based on
distutils.command.build_py.build_byand provides a specialized version offind_all_modules().- check_module(module: str, module_file: str) bool[source]¶
Return True if
module_filebelongs tomodule.
- find_all_modules(project_dir: Optional[str] = None) List[Union[Any, Tuple[str, str, str]]][source]¶
Compute the list of all modules that would be built by project located in current directory, whether they are specified one-module-at-a-time
py_modulesor by whole packagespackages.By default, the function will search for modules in the current directory. Specifying
project_dirparameter allow to change this.Return a list of tuples
(package, module, module_file).
- skbuild.utils.distribution_hide_listing(distribution: Distribution) Iterator[Union[bool, int]][source]¶
Given a
distribution, this context manager temporarily sets distutils threshold to WARN if--hide-listingargument was provided.It yields True if
--hide-listingargument was provided.
- skbuild.utils.mkdir_p(path: str) None[source]¶
Ensure directory
pathexists. If needed, parent directories are created.
- skbuild.utils.parse_manifestin(template: str) List[str][source]¶
This function parses template file (usually MANIFEST.in)
- class skbuild.utils.push_dir(directory: Optional[str] = None, make_directory: bool = False)[source]¶
Bases:
ContextDecoratorContext manager to change current directory.