skbuild.utils package¶
This module defines functions generally useful in scikit-build.
-
class
skbuild.utils.
ContextDecorator
(**kwargs)[source]¶ Bases:
object
A base class or mixin that enables context managers to work as decorators.
-
class
skbuild.utils.
PythonModuleFinder
(packages, package_dir, py_modules, alternative_build_base=None)[source]¶ Bases:
skbuild.utils.NewStyleClass
Convenience class to search for python modules.
This class is based on
distutils.command.build_py.build_by
and provides a specialized version offind_all_modules()
.-
find_all_modules
(project_dir=None)[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_modules
or by whole packagespackages
.By default, the function will search for modules in the current directory. Specifying
project_dir
parameter allow to change this.Return a list of tuples
(package, module, module_file)
.
-
-
skbuild.utils.
distribution_hide_listing
(distribution)[source]¶ Given a
distribution
, this context manager temporarily sets distutils threshold to WARN if--hide-listing
argument was provided.It yields True if
--hide-listing
argument was provided.
-
skbuild.utils.
mkdir_p
(path)[source]¶ Ensure directory
path
exists. If needed, parent directories are created.Adapted from http://stackoverflow.com/a/600612/1539918
-
skbuild.utils.
new_style
(klass)[source]¶ distutils/setuptools command classes are old-style classes, which won’t work with mixins.
To work around this limitation, we dynamically convert them to new style classes by creating a new class that inherits from them and also <object>. This ensures that <object> is always at the end of the MRO, even after being mixed in with other classes.
-
skbuild.utils.
parse_manifestin
(template)[source]¶ This function parses template file (usually MANIFEST.in)
-
class
skbuild.utils.
push_dir
(directory=None, make_directory=False)[source]¶ Bases:
skbuild.utils.ContextDecorator
Context manager to change current directory.