Lines Matching +full:pybind11 +full:- +full:tests

6 This sections demonstrates the basic features of pybind11. Before getting
15 -----------
17 On Linux you'll need to install the **python-dev** or **python3-dev** packages as
23 .. code-block:: bash
28 make check -j 4
30 The last line will both compile and run the tests.
33 -------
35 On Windows, only **Visual Studio 2015** and newer are supported since pybind11 relies
40 To use the C++17 in Visual Studio 2017 (MSVC 14.1), pybind11 requires the flag
41 ``/permissive-`` to be passed to the compiler `to enforce standard conformance`_. When
44 … conformance`: https://docs.microsoft.com/en-us/cpp/build/reference/permissive-standards-conforman…
46 To compile and run the tests:
48 .. code-block:: batch
53 cmake --build . --config Release --target check
60 If all tests fail, make sure that the Python binary and the testcases are compiled
63 project using ``cmake -A x64 ..``.
68 the tutorial and look at the test cases in the :file:`tests` directory,
69 which exercise all features of pybind11.
76 .. code-block:: cpp
78 #include <pybind11/pybind11.h>
80 namespace py = pybind11;
92 .. code-block:: cpp
101 .. code-block:: cpp
103 #include <pybind11/pybind11.h>
110 m.doc() = "pybind11 example plugin"; // optional module docstring
133 pybind11 is a header-only library, hence it is not necessary to link against
137 .. code-block:: bash
139 …$ c++ -O3 -Wall -shared -std=c++11 -fPIC $(python3 -m pybind11 --includes) example.cpp -o example$…
143 If you used :ref:`include_as_a_submodule` to get the pybind11 source, then
144 use ``$(python3-config --includes) -Iextern/pybind11/include`` instead of
145 ``$(python3 -m pybind11 --includes)`` in the above compilation, as
149 :ref:`building_manually`. For complete cross-platform compilation instructions,
153 to start. They are both complete project examples with cross-platform build
166 .. code-block:: pycon
170 [GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.1)] on darwin
185 .. code-block:: cpp
195 .. code-block:: pycon
203 .. code-block:: pycon
211 Signature : (i: int, j: int) -> int
217 .. code-block:: cpp
222 using namespace pybind11::literals;
227 ``using namespace pybind11::literals``. This does not bring in anything else
228 from the ``pybind11`` namespace except for literals.
237 .. code-block:: cpp
243 Unfortunately, pybind11 cannot automatically extract these parameters, since they
247 .. code-block:: cpp
254 .. code-block:: pycon
262 Signature : (i: int = 1, j: int = 2) -> int
268 .. code-block:: cpp
279 module as shown below. Built-in types and general objects (more on that later)
283 .. code-block:: cpp
293 .. code-block:: pycon