$npx skillfedfor your agent

pytest-cmake

Provide CMake module for Pytest

With conditionsPyPI Build ToolsReleased Jan 2026269.7K downloads / mopermissive licensePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — pytest_cmake-1.3.0-py3-none-any.whl
v1.3.0 · released 2026-01-03 · Python <4,>=3.7 · 1 runtime deps: pytest

Yes, if you maintain a CMake project with Python tests or C++ code with Python bindings. The package has low install friction, permissive licensing, and no known vulnerabilities. The aging maintenance status is a minor concern for a stable, narrowly-scoped integration tool, but the repository remains active and supports current Python versions.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires CMake and pytest to be installed; pytest-cmake is a CMake module, not a standalone Python tool
  • Low friction install with a single runtime dependency on pytest.
  • Last release was 223 days ago; repository is active but aging.

License · maintenance · safety

permissive license (permissive) — MIT License permits unrestricted use, modification, and distribution with minimal restrictions—suitable for both open-source and proprietary projects.

last release 2026-01-03 (223 days) · last repo commit 2026-01-03 · 32 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 269,703 downloads/mo, #8,252 on PyPI

Verify before relying

pip install pytest-cmake

In CMakeLists.txt:
find_package(Pytest 8.2.1 REQUIRED)
pytest_discover_tests(PythonTest LIBRARY_PATH_PREPEND $<TARGET_FILE_DIR:MyLibrary>)
  • Whether the package works with pytest versions outside the range shown in the description example (8.2.1)
  • Performance characteristics when discovering large numbers of Python tests in a single CMake project
Same gist for agents: .md · .json

What it is and what it does

pytest-cmake is a CMake module that bridges Pytest and CMake, allowing Python tests to be discovered and run as part of a C++ project's build system. It provides a find_package function to locate Pytest and a pytest_discover_tests function that automatically converts Python tests into CTest entries, which can then be executed and reported alongside native C++ tests.

The package is designed for mixed-language projects—particularly those with C++ libraries that expose Python bindings. Instead of running Python tests separately, developers can integrate them into their CMake workflow, controlling test environment variables like library and Python paths, filtering test names, and declaring dependencies on compiled targets.

Use it for

  • Integrate Python unit tests for C++ extension modules into a unified CMake test suite
  • Automatically discover and register Python tests as CTest entries without manual configuration
  • Set up controlled test environments by prepending library and Python paths before test execution
  • Run mixed C++ and Python tests in a single CI/CD pipeline using ctest

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you maintain a CMake project with Python tests or C++ code with Python bindings.

The package has low install friction, permissive licensing, and no known vulnerabilities. The aging maintenance status is a minor concern for a stable, narrowly-scoped integration tool, but the repository remains active and supports current Python versions.

Install

pytest-cmake on PyPI

Before you install

Low friction install with a single runtime dependency on pytest. Last release was 223 days ago; repository is active but aging.

Requires CMake and pytest to be installed; pytest-cmake is a CMake module, not a standalone Python tool

License in practice

MIT License permits unrestricted use, modification, and distribution with minimal restrictions—suitable for both open-source and proprietary projects.

Quickstart

pip install pytest-cmake

In CMakeLists.txt:
find_package(Pytest 8.2.1 REQUIRED)
pytest_discover_tests(PythonTest LIBRARY_PATH_PREPEND $<TARGET_FILE_DIR:MyLibrary>)

Verify before relying

  • Whether the package works with pytest versions outside the range shown in the description example (8.2.1)
  • Performance characteristics when discovering large numbers of Python tests in a single CMake project

Package facts

Licensepermissive license permissive
Python supportSupports the current Python release <4,>=3.7
Install frictionLow. Pure-Python wheel
Runtime dependencies
1 package
pytest
MaintenanceAging 223 days since the last release
Last repo commit
First released
Downloads269,703 / month, #8,252 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Build Tools

Evidence: pytest_cmake-1.3.0-py3-none-any.whl

Tags

Capabilities
cmake pytest integrationpython testing in cmakectest pytest discoverycmake find_package pytestc++ python test automationcmake python bindings testing
Topics
cmake-integrationmixed-language-testing
PyPI keywords
cmakedevelopmentpytest

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “cmake pytest integration”

  • pytest-cmakeIntegrates Pytest with CMake build systems, enabling automatic…
  • colcon-cmakecolcon-cmake is a plugin for colcon that adds support for building…
  • scikit-buildscikit-build bridges setuptools and CMake to compile CPython…

Give your agent the search over MCP, or paste the wish link into any chat.

More Build Tools packages

packaging Worth it
PyPI · Build Tools · released Aug 2026

Provides reusable utilities for Python packaging interoperability, including version handling, specifiers, markers, requirements, tags, and metadata parsing according to standards like PEP 440 and PEP 425.

Apache-2.0 OR BSD-2-Clausepure Python · 3.9+
2.2Bdownloads / mo
tqdm Worth it
PyPI · Libraries · released Jul 2026

Wraps any iterable to display a real-time progress bar in the terminal or Jupyter notebook, showing iteration count, elapsed time, and estimated time remaining.

copyleftpure Python · 3.8+
648.6Mdownloads / mo
pip Worth it
PyPI · Build Tools · released Aug 2026

pip is the standard installer for Python packages, enabling you to download and install packages from the Python Package Index and other indexes into your Python environment.

MITpure Python · 3.10+
617.5Mdownloads / mo
hatchling Worth it
PyPI · Python Modules · released Aug 2026

Hatchling is a standards-compliant Python build backend that handles packaging, metadata, and distribution of Python projects when configured in a project's pyproject.toml file.

MITpure Python · 3.10+
484.2Mdownloads / mo
grpcio-tools Worth it
PyPI · Build Tools · released Jul 2026

Generates Python gRPC service stubs and message classes from Protocol Buffer definitions, enabling developers to build gRPC clients and servers.

Apache-2.0compiled wheel · 3.10+
278.2Mdownloads / mo
pre-commit Worth it
PyPI · Build Tools · released Aug 2026

pre-commit is a framework for installing and running git hooks written in any language before commits are made, automating code quality and validation checks across multi-language projects.

Install it if your team needs consistent, automated validation at commit time.

permissive licensepure Python · 3.10+
179.9Mdownloads / mo

See also cmake · google-benchmark · fckitlib · cmakelang · colcon-cmake · scikit-build-core · cmake-format · scikit-build · pytest-mypy · cmakelint