Pybind11 is a C++ header-only library that provides seamless interoperability between C++ and Python, enabling the creation of Python bindings for C++ code and vice versa. The `pybind11-global` PyPI package, version 3.0.3, typically serves as a marker or a convenient way to ensure the necessary pybind11 C++ headers are discoverable for projects building Python extensions. Pybind11 maintains an active release cadence, with major versions introducing significant features and ABI bumps, followed by patch releases for bug fixes and compatibility updates.
pip install pybind11-globalVerified import paths — ran on the pinned version, not inferred.
This quickstart provides a `setup.py` script that defines a simple Python extension module written in C++ using pybind11. To run it, save the code as `setup.py` in a directory, then open a terminal in that directory and execute `python setup.py install`. This will compile the C++ code and install the `my_module` package into your Python environment. After installation, you can open a Python interpreter and import `my_module` to use its `add` and `square_list` functions.
All existing C++ extensions built with pybind11 2.x must be recompiled when upgrading to pybind11 3.x or later. Ensure all dependencies using pybind11 are also updated and recompiled if they link against pybind11.
Focus on C++ development for defining your bindings. Use `import pybind11` only in your build scripts (`setup.py` or similar) to locate the necessary include directories.
When writing build scripts, import `pybind11` (not `pybind11_global`) to access functions like `pybind11.get_include()`.
Ensure your project targets Python 3.8 or newer when using pybind11 3.x. If you need to support older Python versions, you must use a pybind11 2.x release (e.g., `pip install pybind11<3`).
Ensure your build system (e.g., `CMakeLists.txt` or `setup.py` `extra_compile_args`) specifies a C++ standard of C++11 or higher (e.g., `-std=c++17` for GCC/Clang, `/std:c++17` for MSVC).
No dependency data recorded yet.