bundle.pybind.services ====================== .. py:module:: bundle.pybind.services Submodules ---------- .. toctree:: :maxdepth: 1 /autoapi/bundle/pybind/services/cmake/index /autoapi/bundle/pybind/services/pkgconfig/index Classes ------- .. autoapisummary:: bundle.pybind.services.CMakeService bundle.pybind.services.PkgConfigService Package Contents ---------------- .. py:class:: CMakeService A utility class for running CMake commands. .. py:class:: BuildType(*args, **kwds) Bases: :py:obj:`enum.Enum` Enum-like class for CMake build types. .. py:attribute:: DEBUG :value: 'Debug' .. py:attribute:: RELEASE :value: 'Release' .. py:attribute:: RELWITHDEBINFO :value: 'RelWithDebInfo' .. py:attribute:: MINSIZEREL :value: 'MinSizeRel' .. py:method:: configure(source_dir: pathlib.Path, build_dir_name: str, install_prefix: pathlib.Path | None = None, build_type: BuildType = BuildType.RELEASE, extra_args: list[str] | None = None) -> None :staticmethod: :async: Configures a CMake project. :param source_dir: The root directory of the source code (contains CMakeLists.txt). :param build_dir_name: The name of the build directory, relative to source_dir. :param install_prefix: Optional path for CMAKE_INSTALL_PREFIX. :param extra_args: Optional list of extra arguments to pass to cmake. .. py:method:: build(source_dir: pathlib.Path, build_dir_name: str, target: str | None = None, build_type: BuildType = BuildType.RELEASE, extra_args: list[str] | None = None) -> None :staticmethod: :async: Builds a CMake project. :param source_dir: The root directory of the source code (used as CWD for the command). :param build_dir_name: The name of the build directory, relative to source_dir. :param target: Optional build target (e.g., "install"). :param extra_args: Optional list of extra arguments to pass to cmake --build. .. py:class:: PkgConfigService(executable: str = 'pkg-config') .. py:attribute:: executable :value: 'pkg-config' .. py:method:: query(package_name: str, option: str, extra_dirs: list[str] | None = None) -> list[str] :async: Runs pkg-config for a single package with the given option. Returns the output as a list of strings. .. py:method:: resolve_pkgconfig(pkg_name: str, extra_dirs: list[str] | None = None) -> bundle.pybind.resolved.PkgConfigResult :async: .. py:method:: resolve(spec: bundle.pybind.specs.PkgConfigSpec) -> bundle.pybind.resolved.PkgConfigResolved :async: Resolves PkgConfigSpec to PkgConfigResolved by calling pkg-config for each package.