{"id":13815173,"url":"https://github.com/pybind/cmake_example","last_synced_at":"2026-04-05T17:44:29.136Z","repository":{"id":37382037,"uuid":"59435671","full_name":"pybind/cmake_example","owner":"pybind","description":"Example pybind11 module built with a CMake-based build system","archived":false,"fork":false,"pushed_at":"2026-03-30T21:32:09.000Z","size":137,"stargazers_count":669,"open_issues_count":25,"forks_count":219,"subscribers_count":9,"default_branch":"master","last_synced_at":"2026-04-05T17:44:25.810Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pybind.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2016-05-22T21:41:04.000Z","updated_at":"2026-03-16T12:02:53.000Z","dependencies_parsed_at":"2023-11-13T06:28:07.784Z","dependency_job_id":"525ce77a-6132-4dfc-83e9-7f2706786515","html_url":"https://github.com/pybind/cmake_example","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/pybind/cmake_example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pybind%2Fcmake_example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pybind%2Fcmake_example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pybind%2Fcmake_example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pybind%2Fcmake_example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pybind","download_url":"https://codeload.github.com/pybind/cmake_example/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pybind%2Fcmake_example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31444702,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T15:22:31.103Z","status":"ssl_error","status_checked_at":"2026-04-05T15:22:00.205Z","response_time":75,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-04T04:03:04.262Z","updated_at":"2026-04-05T17:44:28.997Z","avatar_url":"https://github.com/pybind.png","language":"Python","readme":"# cmake_example for pybind11\n\n[![Gitter][gitter-badge]][gitter-link]\n\n|      CI              | status |\n|----------------------|--------|\n| MSVC 2019            | [![AppVeyor][appveyor-badge]][appveyor-link] |\n| conda.recipe         | [![Conda Actions Status][actions-conda-badge]][actions-conda-link] |\n| pip builds           | [![Pip Actions Status][actions-pip-badge]][actions-pip-link] |\n| [`cibuildwheel`][]   | [![Wheels Actions Status][actions-wheels-badge]][actions-wheels-link] |\n\n[gitter-badge]:            https://badges.gitter.im/pybind/Lobby.svg\n[gitter-link]:             https://gitter.im/pybind/Lobby\n[actions-badge]:           https://github.com/pybind/cmake_example/workflows/Tests/badge.svg\n[actions-conda-link]:      https://github.com/pybind/cmake_example/actions?query=workflow%3A%22Conda\n[actions-conda-badge]:     https://github.com/pybind/cmake_example/workflows/Conda/badge.svg\n[actions-pip-link]:        https://github.com/pybind/cmake_example/actions?query=workflow%3A%22Pip\n[actions-pip-badge]:       https://github.com/pybind/cmake_example/workflows/Pip/badge.svg\n[actions-wheels-link]:     https://github.com/pybind/cmake_example/actions?query=workflow%3AWheels\n[actions-wheels-badge]:    https://github.com/pybind/cmake_example/workflows/Wheels/badge.svg\n[appveyor-link]:           https://ci.appveyor.com/project/dean0x7d/cmake-example/branch/master\n[appveyor-badge]:          https://ci.appveyor.com/api/projects/status/57nnxfm4subeug43/branch/master?svg=true\n\nAn example [pybind11](https://github.com/pybind/pybind11) module built with a\nCMake-based build system. This is useful for C++ codebases that have an\nexisting CMake project structure. This is being replaced by\n[`scikit_build_example`](https://github.com/pybind/scikit_build_example), which uses\n[scikit-build-core][], which is designed to allow Python\npackages to be driven from CMake without depending on setuptools. The approach here has\nsome trade-offs not present in a pure setuptools build (see\n[`python_example`](https://github.com/pybind/python_example)) or scikit-build-core. Python 3.7+ required;\nsee the commit history for older versions of Python.\n\nProblems vs. scikit-build-core based example:\n\n- You have to manually copy fixes/additions when they get added to this example (like when Apple Silicon support was added)\n- Modern editable installs are not supported (scikit-build-core doesn't support them either yet, but probably will soon)\n- You are depending on setuptools, which can and will change\n- You are stuck with an all-or-nothing approach to adding cmake/ninja via wheels (scikit-build-core adds these only as needed, so it can be used on BSD, Cygwin, Pyodide, Android, etc)\n- You are stuck with whatever CMake ships with (scikit-build-core backports FindPython for you)\n\n\n## Prerequisites\n\n* A compiler with C++11 support\n* Pip 10+ or CMake \u003e= 3.4 (or 3.14+ on Windows, which was the first version to support VS 2019)\n* Ninja or Pip 10+\n\n\n## Installation\n\nJust clone this repository and pip install. Note the `--recursive` option which is\nneeded for the pybind11 submodule:\n\n```bash\ngit clone --recursive https://github.com/pybind/cmake_example.git\npip install ./cmake_example\n```\n\nWith the `setup.py` file included in this example, the `pip install` command will\ninvoke CMake and build the pybind11 module as specified in `CMakeLists.txt`.\n\n\n\n## Building the documentation\n\nDocumentation for the example project is generated using Sphinx. Sphinx has the\nability to automatically inspect the signatures and documentation strings in\nthe extension module to generate beautiful documentation in a variety formats.\nThe following command generates HTML-based reference documentation; for other\nformats please refer to the Sphinx manual:\n\n - `cd cmake_example/docs`\n - `make html`\n\n\n## License\n\nPybind11 is provided under a BSD-style license that can be found in the LICENSE\nfile. By using, distributing, or contributing to this project, you agree to the\nterms and conditions of this license.\n\n\n## Test call\n\n```python\nimport cmake_example\ncmake_example.add(1, 2)\n```\n\n[`cibuildwheel`]:    https://cibuildwheel.readthedocs.io\n[scikit-build-core]: https://github.com/scikit-build/scikit-build-core\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpybind%2Fcmake_example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpybind%2Fcmake_example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpybind%2Fcmake_example/lists"}