pybind11 2.14.0.dev1__tar.gz → 3.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pybind11-3.0.0/CMakeLists.txt +423 -0
- pybind11-3.0.0/CMakePresets.json +93 -0
- {pybind11-2.14.0.dev1/pybind11.egg-info → pybind11-3.0.0}/PKG-INFO +65 -32
- {pybind11-2.14.0.dev1 → pybind11-3.0.0}/README.rst +51 -16
- {pybind11-2.14.0.dev1/pybind11 → pybind11-3.0.0}/include/pybind11/attr.h +40 -8
- {pybind11-2.14.0.dev1/pybind11 → pybind11-3.0.0}/include/pybind11/cast.h +524 -23
- {pybind11-2.14.0.dev1/pybind11 → pybind11-3.0.0}/include/pybind11/chrono.h +4 -1
- pybind11-3.0.0/include/pybind11/conduit/README.txt +15 -0
- pybind11-3.0.0/include/pybind11/conduit/pybind11_conduit_v1.h +116 -0
- pybind11-3.0.0/include/pybind11/conduit/pybind11_platform_abi_id.h +87 -0
- pybind11-3.0.0/include/pybind11/conduit/wrap_include_python_h.h +72 -0
- pybind11-3.0.0/include/pybind11/critical_section.h +56 -0
- {pybind11-2.14.0.dev1/pybind11 → pybind11-3.0.0}/include/pybind11/detail/class.h +101 -22
- {pybind11-2.14.0.dev1/pybind11 → pybind11-3.0.0}/include/pybind11/detail/common.h +216 -190
- pybind11-3.0.0/include/pybind11/detail/cpp_conduit.h +75 -0
- {pybind11-2.14.0.dev1/pybind11 → pybind11-3.0.0}/include/pybind11/detail/descr.h +57 -3
- pybind11-3.0.0/include/pybind11/detail/dynamic_raw_ptr_cast_if_possible.h +39 -0
- pybind11-3.0.0/include/pybind11/detail/exception_translation.h +71 -0
- pybind11-3.0.0/include/pybind11/detail/function_record_pyobject.h +208 -0
- {pybind11-2.14.0.dev1/pybind11 → pybind11-3.0.0}/include/pybind11/detail/init.h +109 -7
- {pybind11-2.14.0.dev1/pybind11 → pybind11-3.0.0}/include/pybind11/detail/internals.h +345 -323
- pybind11-3.0.0/include/pybind11/detail/native_enum_data.h +209 -0
- pybind11-3.0.0/include/pybind11/detail/pybind11_namespace_macros.h +82 -0
- pybind11-3.0.0/include/pybind11/detail/struct_smart_holder.h +378 -0
- {pybind11-2.14.0.dev1/pybind11 → pybind11-3.0.0}/include/pybind11/detail/type_caster_base.h +480 -43
- pybind11-3.0.0/include/pybind11/detail/using_smart_holder.h +22 -0
- {pybind11-2.14.0.dev1/pybind11 → pybind11-3.0.0}/include/pybind11/detail/value_and_holder.h +13 -0
- {pybind11-2.14.0.dev1/pybind11 → pybind11-3.0.0}/include/pybind11/eigen/matrix.h +19 -10
- {pybind11-2.14.0.dev1/pybind11 → pybind11-3.0.0}/include/pybind11/eigen/tensor.h +15 -8
- {pybind11-2.14.0.dev1/pybind11 → pybind11-3.0.0}/include/pybind11/embed.h +49 -32
- {pybind11-2.14.0.dev1/pybind11 → pybind11-3.0.0}/include/pybind11/eval.h +10 -5
- {pybind11-2.14.0.dev1/pybind11 → pybind11-3.0.0}/include/pybind11/functional.h +16 -18
- {pybind11-2.14.0.dev1/pybind11 → pybind11-3.0.0}/include/pybind11/gil.h +28 -44
- {pybind11-2.14.0.dev1/pybind11 → pybind11-3.0.0}/include/pybind11/gil_safe_call_once.h +2 -0
- pybind11-3.0.0/include/pybind11/gil_simple.h +37 -0
- pybind11-3.0.0/include/pybind11/native_enum.h +67 -0
- {pybind11-2.14.0.dev1/pybind11 → pybind11-3.0.0}/include/pybind11/numpy.h +263 -90
- {pybind11-2.14.0.dev1/pybind11 → pybind11-3.0.0}/include/pybind11/pybind11.h +804 -246
- {pybind11-2.14.0.dev1/pybind11 → pybind11-3.0.0}/include/pybind11/pytypes.h +96 -20
- {pybind11-2.14.0.dev1/pybind11 → pybind11-3.0.0}/include/pybind11/stl/filesystem.h +12 -22
- {pybind11-2.14.0.dev1/pybind11 → pybind11-3.0.0}/include/pybind11/stl.h +131 -57
- {pybind11-2.14.0.dev1/pybind11 → pybind11-3.0.0}/include/pybind11/stl_bind.h +40 -4
- pybind11-3.0.0/include/pybind11/subinterpreter.h +305 -0
- pybind11-3.0.0/include/pybind11/trampoline_self_life_support.h +65 -0
- {pybind11-2.14.0.dev1/pybind11 → pybind11-3.0.0}/include/pybind11/typing.h +76 -22
- pybind11-3.0.0/include/pybind11/warnings.h +75 -0
- pybind11-3.0.0/noxfile.py +151 -0
- {pybind11-2.14.0.dev1 → pybind11-3.0.0}/pybind11/__main__.py +12 -1
- pybind11-3.0.0/pybind11/_version.py +34 -0
- pybind11-3.0.0/pyproject.toml +183 -0
- pybind11-3.0.0/tests/CMakeLists.txt +657 -0
- pybind11-3.0.0/tests/conftest.py +269 -0
- pybind11-3.0.0/tests/constructor_stats.h +330 -0
- pybind11-3.0.0/tests/cross_module_gil_utils.cpp +111 -0
- pybind11-3.0.0/tests/cross_module_interleaved_error_already_set.cpp +54 -0
- pybind11-3.0.0/tests/custom_exceptions.py +10 -0
- pybind11-3.0.0/tests/eigen_tensor_avoid_stl_array.cpp +16 -0
- pybind11-3.0.0/tests/env.py +36 -0
- pybind11-3.0.0/tests/exo_planet_c_api.cpp +76 -0
- pybind11-3.0.0/tests/exo_planet_pybind11.cpp +19 -0
- pybind11-3.0.0/tests/extra_python_package/pytest.ini +0 -0
- pybind11-3.0.0/tests/extra_python_package/test_files.py +383 -0
- pybind11-3.0.0/tests/extra_setuptools/pytest.ini +0 -0
- pybind11-3.0.0/tests/extra_setuptools/test_setuphelper.py +153 -0
- pybind11-3.0.0/tests/home_planet_very_lonely_traveler.cpp +13 -0
- pybind11-3.0.0/tests/local_bindings.h +92 -0
- pybind11-3.0.0/tests/mod_per_interpreter_gil.cpp +20 -0
- pybind11-3.0.0/tests/mod_shared_interpreter_gil.cpp +17 -0
- pybind11-3.0.0/tests/object.h +205 -0
- pybind11-3.0.0/tests/pure_cpp/CMakeLists.txt +20 -0
- pybind11-3.0.0/tests/pure_cpp/smart_holder_poc.h +56 -0
- pybind11-3.0.0/tests/pure_cpp/smart_holder_poc_test.cpp +427 -0
- pybind11-3.0.0/tests/pybind11_cross_module_tests.cpp +149 -0
- pybind11-3.0.0/tests/pybind11_tests.cpp +129 -0
- pybind11-3.0.0/tests/pybind11_tests.h +119 -0
- pybind11-3.0.0/tests/pyproject.toml +35 -0
- pybind11-3.0.0/tests/pytest.ini +22 -0
- pybind11-3.0.0/tests/requirements.txt +18 -0
- pybind11-3.0.0/tests/test_async.cpp +25 -0
- pybind11-3.0.0/tests/test_async.py +31 -0
- pybind11-3.0.0/tests/test_buffers.cpp +442 -0
- pybind11-3.0.0/tests/test_buffers.py +401 -0
- pybind11-3.0.0/tests/test_builtin_casters.cpp +391 -0
- pybind11-3.0.0/tests/test_builtin_casters.py +551 -0
- pybind11-3.0.0/tests/test_call_policies.cpp +113 -0
- pybind11-3.0.0/tests/test_call_policies.py +256 -0
- pybind11-3.0.0/tests/test_callbacks.cpp +308 -0
- pybind11-3.0.0/tests/test_callbacks.py +247 -0
- pybind11-3.0.0/tests/test_chrono.cpp +81 -0
- pybind11-3.0.0/tests/test_chrono.py +207 -0
- pybind11-3.0.0/tests/test_class.cpp +681 -0
- pybind11-3.0.0/tests/test_class.py +557 -0
- pybind11-3.0.0/tests/test_class_release_gil_before_calling_cpp_dtor.cpp +53 -0
- pybind11-3.0.0/tests/test_class_release_gil_before_calling_cpp_dtor.py +21 -0
- pybind11-3.0.0/tests/test_class_sh_basic.cpp +248 -0
- pybind11-3.0.0/tests/test_class_sh_basic.py +246 -0
- pybind11-3.0.0/tests/test_class_sh_disowning.cpp +41 -0
- pybind11-3.0.0/tests/test_class_sh_disowning.py +78 -0
- pybind11-3.0.0/tests/test_class_sh_disowning_mi.cpp +85 -0
- pybind11-3.0.0/tests/test_class_sh_disowning_mi.py +246 -0
- pybind11-3.0.0/tests/test_class_sh_factory_constructors.cpp +156 -0
- pybind11-3.0.0/tests/test_class_sh_factory_constructors.py +53 -0
- pybind11-3.0.0/tests/test_class_sh_inheritance.cpp +90 -0
- pybind11-3.0.0/tests/test_class_sh_inheritance.py +63 -0
- pybind11-3.0.0/tests/test_class_sh_mi_thunks.cpp +93 -0
- pybind11-3.0.0/tests/test_class_sh_mi_thunks.py +53 -0
- pybind11-3.0.0/tests/test_class_sh_property.cpp +94 -0
- pybind11-3.0.0/tests/test_class_sh_property.py +166 -0
- pybind11-3.0.0/tests/test_class_sh_property_non_owning.cpp +63 -0
- pybind11-3.0.0/tests/test_class_sh_property_non_owning.py +30 -0
- pybind11-3.0.0/tests/test_class_sh_shared_ptr_copy_move.cpp +103 -0
- pybind11-3.0.0/tests/test_class_sh_shared_ptr_copy_move.py +41 -0
- pybind11-3.0.0/tests/test_class_sh_trampoline_basic.cpp +57 -0
- pybind11-3.0.0/tests/test_class_sh_trampoline_basic.py +35 -0
- pybind11-3.0.0/tests/test_class_sh_trampoline_self_life_support.cpp +86 -0
- pybind11-3.0.0/tests/test_class_sh_trampoline_self_life_support.py +38 -0
- pybind11-3.0.0/tests/test_class_sh_trampoline_shared_from_this.cpp +137 -0
- pybind11-3.0.0/tests/test_class_sh_trampoline_shared_from_this.py +247 -0
- pybind11-3.0.0/tests/test_class_sh_trampoline_shared_ptr_cpp_arg.cpp +92 -0
- pybind11-3.0.0/tests/test_class_sh_trampoline_shared_ptr_cpp_arg.py +154 -0
- pybind11-3.0.0/tests/test_class_sh_trampoline_unique_ptr.cpp +63 -0
- pybind11-3.0.0/tests/test_class_sh_trampoline_unique_ptr.py +31 -0
- pybind11-3.0.0/tests/test_class_sh_unique_ptr_custom_deleter.cpp +30 -0
- pybind11-3.0.0/tests/test_class_sh_unique_ptr_custom_deleter.py +8 -0
- pybind11-3.0.0/tests/test_class_sh_unique_ptr_member.cpp +50 -0
- pybind11-3.0.0/tests/test_class_sh_unique_ptr_member.py +26 -0
- pybind11-3.0.0/tests/test_class_sh_virtual_py_cpp_mix.cpp +58 -0
- pybind11-3.0.0/tests/test_class_sh_virtual_py_cpp_mix.py +66 -0
- pybind11-3.0.0/tests/test_cmake_build/CMakeLists.txt +91 -0
- pybind11-3.0.0/tests/test_cmake_build/embed.cpp +23 -0
- pybind11-3.0.0/tests/test_cmake_build/installed_embed/CMakeLists.txt +19 -0
- pybind11-3.0.0/tests/test_cmake_build/installed_function/CMakeLists.txt +29 -0
- pybind11-3.0.0/tests/test_cmake_build/installed_target/CMakeLists.txt +37 -0
- pybind11-3.0.0/tests/test_cmake_build/main.cpp +6 -0
- pybind11-3.0.0/tests/test_cmake_build/subdirectory_embed/CMakeLists.txt +38 -0
- pybind11-3.0.0/tests/test_cmake_build/subdirectory_function/CMakeLists.txt +32 -0
- pybind11-3.0.0/tests/test_cmake_build/subdirectory_target/CMakeLists.txt +38 -0
- pybind11-3.0.0/tests/test_cmake_build/test.py +10 -0
- pybind11-3.0.0/tests/test_const_name.cpp +55 -0
- pybind11-3.0.0/tests/test_const_name.py +31 -0
- pybind11-3.0.0/tests/test_constants_and_functions.cpp +158 -0
- pybind11-3.0.0/tests/test_constants_and_functions.py +58 -0
- pybind11-3.0.0/tests/test_copy_move.cpp +548 -0
- pybind11-3.0.0/tests/test_copy_move.py +144 -0
- pybind11-3.0.0/tests/test_cpp_conduit.cpp +22 -0
- pybind11-3.0.0/tests/test_cpp_conduit.py +183 -0
- pybind11-3.0.0/tests/test_cpp_conduit_traveler_bindings.h +47 -0
- pybind11-3.0.0/tests/test_cpp_conduit_traveler_types.h +25 -0
- pybind11-3.0.0/tests/test_cross_module_rtti/CMakeLists.txt +68 -0
- pybind11-3.0.0/tests/test_cross_module_rtti/bindings.cpp +20 -0
- pybind11-3.0.0/tests/test_cross_module_rtti/catch.cpp +22 -0
- pybind11-3.0.0/tests/test_cross_module_rtti/lib.cpp +13 -0
- pybind11-3.0.0/tests/test_cross_module_rtti/lib.h +30 -0
- pybind11-3.0.0/tests/test_cross_module_rtti/test_cross_module_rtti.cpp +50 -0
- pybind11-3.0.0/tests/test_custom_type_casters.cpp +217 -0
- pybind11-3.0.0/tests/test_custom_type_casters.py +126 -0
- pybind11-3.0.0/tests/test_custom_type_setup.cpp +49 -0
- pybind11-3.0.0/tests/test_custom_type_setup.py +50 -0
- pybind11-3.0.0/tests/test_docs_advanced_cast_custom.cpp +69 -0
- pybind11-3.0.0/tests/test_docs_advanced_cast_custom.py +40 -0
- pybind11-3.0.0/tests/test_docstring_options.cpp +129 -0
- pybind11-3.0.0/tests/test_docstring_options.py +72 -0
- pybind11-3.0.0/tests/test_eigen_matrix.cpp +447 -0
- pybind11-3.0.0/tests/test_eigen_matrix.py +839 -0
- pybind11-3.0.0/tests/test_eigen_tensor.cpp +18 -0
- pybind11-3.0.0/tests/test_eigen_tensor.inl +338 -0
- pybind11-3.0.0/tests/test_eigen_tensor.py +316 -0
- pybind11-3.0.0/tests/test_embed/CMakeLists.txt +61 -0
- pybind11-3.0.0/tests/test_embed/catch.cpp +43 -0
- pybind11-3.0.0/tests/test_embed/external_module.cpp +24 -0
- pybind11-3.0.0/tests/test_embed/test_interpreter.cpp +467 -0
- pybind11-3.0.0/tests/test_embed/test_interpreter.py +16 -0
- pybind11-3.0.0/tests/test_embed/test_subinterpreter.cpp +442 -0
- pybind11-3.0.0/tests/test_embed/test_trampoline.py +18 -0
- pybind11-3.0.0/tests/test_enum.cpp +149 -0
- pybind11-3.0.0/tests/test_enum.py +344 -0
- pybind11-3.0.0/tests/test_eval.cpp +118 -0
- pybind11-3.0.0/tests/test_eval.py +52 -0
- pybind11-3.0.0/tests/test_eval_call.py +5 -0
- pybind11-3.0.0/tests/test_exceptions.cpp +427 -0
- pybind11-3.0.0/tests/test_exceptions.h +13 -0
- pybind11-3.0.0/tests/test_exceptions.py +439 -0
- pybind11-3.0.0/tests/test_factory_constructors.cpp +430 -0
- pybind11-3.0.0/tests/test_factory_constructors.py +531 -0
- pybind11-3.0.0/tests/test_gil_scoped.cpp +144 -0
- pybind11-3.0.0/tests/test_gil_scoped.py +285 -0
- pybind11-3.0.0/tests/test_iostream.cpp +126 -0
- pybind11-3.0.0/tests/test_iostream.py +297 -0
- pybind11-3.0.0/tests/test_kwargs_and_defaults.cpp +331 -0
- pybind11-3.0.0/tests/test_kwargs_and_defaults.py +471 -0
- pybind11-3.0.0/tests/test_local_bindings.cpp +106 -0
- pybind11-3.0.0/tests/test_local_bindings.py +257 -0
- pybind11-3.0.0/tests/test_methods_and_attributes.cpp +492 -0
- pybind11-3.0.0/tests/test_methods_and_attributes.py +568 -0
- pybind11-3.0.0/tests/test_modules.cpp +124 -0
- pybind11-3.0.0/tests/test_modules.py +129 -0
- pybind11-3.0.0/tests/test_multiple_inheritance.cpp +341 -0
- pybind11-3.0.0/tests/test_multiple_inheritance.py +500 -0
- pybind11-3.0.0/tests/test_multiple_interpreters.py +200 -0
- pybind11-3.0.0/tests/test_native_enum.cpp +249 -0
- pybind11-3.0.0/tests/test_native_enum.py +317 -0
- pybind11-3.0.0/tests/test_numpy_array.cpp +598 -0
- pybind11-3.0.0/tests/test_numpy_array.py +710 -0
- pybind11-3.0.0/tests/test_numpy_dtypes.cpp +745 -0
- pybind11-3.0.0/tests/test_numpy_dtypes.py +464 -0
- pybind11-3.0.0/tests/test_numpy_scalars.cpp +63 -0
- pybind11-3.0.0/tests/test_numpy_scalars.py +54 -0
- pybind11-3.0.0/tests/test_numpy_vectorize.cpp +107 -0
- pybind11-3.0.0/tests/test_numpy_vectorize.py +268 -0
- pybind11-3.0.0/tests/test_opaque_types.cpp +77 -0
- pybind11-3.0.0/tests/test_opaque_types.py +64 -0
- pybind11-3.0.0/tests/test_operator_overloading.cpp +281 -0
- pybind11-3.0.0/tests/test_operator_overloading.py +161 -0
- pybind11-3.0.0/tests/test_pickling.cpp +191 -0
- pybind11-3.0.0/tests/test_pickling.py +149 -0
- pybind11-3.0.0/tests/test_potentially_slicing_weak_ptr.cpp +168 -0
- pybind11-3.0.0/tests/test_potentially_slicing_weak_ptr.py +174 -0
- pybind11-3.0.0/tests/test_python_multiple_inheritance.cpp +45 -0
- pybind11-3.0.0/tests/test_python_multiple_inheritance.py +36 -0
- pybind11-3.0.0/tests/test_pytypes.cpp +1213 -0
- pybind11-3.0.0/tests/test_pytypes.py +1349 -0
- pybind11-3.0.0/tests/test_scoped_critical_section.cpp +275 -0
- pybind11-3.0.0/tests/test_scoped_critical_section.py +30 -0
- pybind11-3.0.0/tests/test_sequences_and_iterators.cpp +600 -0
- pybind11-3.0.0/tests/test_sequences_and_iterators.py +307 -0
- pybind11-3.0.0/tests/test_smart_ptr.cpp +587 -0
- pybind11-3.0.0/tests/test_smart_ptr.py +357 -0
- pybind11-3.0.0/tests/test_stl.cpp +666 -0
- pybind11-3.0.0/tests/test_stl.py +735 -0
- pybind11-3.0.0/tests/test_stl_binders.cpp +275 -0
- pybind11-3.0.0/tests/test_stl_binders.py +414 -0
- pybind11-3.0.0/tests/test_tagbased_polymorphic.cpp +148 -0
- pybind11-3.0.0/tests/test_tagbased_polymorphic.py +30 -0
- pybind11-3.0.0/tests/test_thread.cpp +72 -0
- pybind11-3.0.0/tests/test_thread.py +68 -0
- pybind11-3.0.0/tests/test_type_caster_pyobject_ptr.cpp +168 -0
- pybind11-3.0.0/tests/test_type_caster_pyobject_ptr.py +124 -0
- pybind11-3.0.0/tests/test_type_caster_std_function_specializations.cpp +46 -0
- pybind11-3.0.0/tests/test_type_caster_std_function_specializations.py +15 -0
- pybind11-3.0.0/tests/test_union.cpp +22 -0
- pybind11-3.0.0/tests/test_union.py +10 -0
- pybind11-3.0.0/tests/test_unnamed_namespace_a.cpp +37 -0
- pybind11-3.0.0/tests/test_unnamed_namespace_a.py +30 -0
- pybind11-3.0.0/tests/test_unnamed_namespace_b.cpp +13 -0
- pybind11-3.0.0/tests/test_unnamed_namespace_b.py +7 -0
- pybind11-3.0.0/tests/test_vector_unique_ptr_member.cpp +54 -0
- pybind11-3.0.0/tests/test_vector_unique_ptr_member.py +16 -0
- pybind11-3.0.0/tests/test_virtual_functions.cpp +592 -0
- pybind11-3.0.0/tests/test_virtual_functions.py +468 -0
- pybind11-3.0.0/tests/test_warnings.cpp +46 -0
- pybind11-3.0.0/tests/test_warnings.py +68 -0
- pybind11-3.0.0/tests/valgrind-numpy-scipy.supp +140 -0
- pybind11-3.0.0/tests/valgrind-python.supp +117 -0
- pybind11-3.0.0/tools/FindCatch.cmake +76 -0
- pybind11-3.0.0/tools/FindEigen3.cmake +86 -0
- {pybind11-2.14.0.dev1/pybind11/share/cmake/pybind11 → pybind11-3.0.0/tools}/FindPythonLibsNew.cmake +10 -0
- pybind11-3.0.0/tools/JoinPaths.cmake +23 -0
- pybind11-3.0.0/tools/check-style.sh +44 -0
- pybind11-3.0.0/tools/cmake_uninstall.cmake.in +23 -0
- pybind11-3.0.0/tools/codespell_ignore_lines_from_errors.py +40 -0
- pybind11-3.0.0/tools/libsize.py +38 -0
- pybind11-3.0.0/tools/make_changelog.py +115 -0
- pybind11-3.0.0/tools/make_global.py +33 -0
- pybind11-3.0.0/tools/pybind11.pc.in +7 -0
- {pybind11-2.14.0.dev1/pybind11/share/cmake/pybind11 → pybind11-3.0.0/tools}/pybind11Common.cmake +30 -4
- pybind11-2.14.0.dev1/pybind11/share/cmake/pybind11/pybind11Config.cmake → pybind11-3.0.0/tools/pybind11Config.cmake.in +12 -29
- {pybind11-2.14.0.dev1/pybind11/share/cmake/pybind11 → pybind11-3.0.0/tools}/pybind11GuessPythonExtSuffix.cmake +1 -1
- {pybind11-2.14.0.dev1/pybind11/share/cmake/pybind11 → pybind11-3.0.0/tools}/pybind11NewTools.cmake +22 -5
- {pybind11-2.14.0.dev1/pybind11/share/cmake/pybind11 → pybind11-3.0.0/tools}/pybind11Tools.cmake +4 -3
- pybind11-3.0.0/tools/test-pybind11GuessPythonExtSuffix.cmake +161 -0
- pybind11-2.14.0.dev1/MANIFEST.in +0 -6
- pybind11-2.14.0.dev1/PKG-INFO +0 -219
- pybind11-2.14.0.dev1/pybind11/_version.py +0 -12
- pybind11-2.14.0.dev1/pybind11/share/cmake/pybind11/pybind11ConfigVersion.cmake +0 -32
- pybind11-2.14.0.dev1/pybind11/share/cmake/pybind11/pybind11Targets.cmake +0 -107
- pybind11-2.14.0.dev1/pybind11/share/pkgconfig/pybind11.pc +0 -7
- pybind11-2.14.0.dev1/pybind11.egg-info/SOURCES.txt +0 -63
- pybind11-2.14.0.dev1/pybind11.egg-info/dependency_links.txt +0 -1
- pybind11-2.14.0.dev1/pybind11.egg-info/entry_points.txt +0 -5
- pybind11-2.14.0.dev1/pybind11.egg-info/not-zip-safe +0 -1
- pybind11-2.14.0.dev1/pybind11.egg-info/requires.txt +0 -3
- pybind11-2.14.0.dev1/pybind11.egg-info/top_level.txt +0 -1
- pybind11-2.14.0.dev1/pyproject.toml +0 -3
- pybind11-2.14.0.dev1/setup.cfg +0 -44
- pybind11-2.14.0.dev1/setup.py +0 -44
- {pybind11-2.14.0.dev1 → pybind11-3.0.0}/LICENSE +0 -0
- {pybind11-2.14.0.dev1 → pybind11-3.0.0}/SECURITY.md +0 -0
- {pybind11-2.14.0.dev1/pybind11 → pybind11-3.0.0}/include/pybind11/buffer_info.h +0 -0
- {pybind11-2.14.0.dev1/pybind11 → pybind11-3.0.0}/include/pybind11/common.h +0 -0
- {pybind11-2.14.0.dev1/pybind11 → pybind11-3.0.0}/include/pybind11/complex.h +0 -0
- {pybind11-2.14.0.dev1/pybind11 → pybind11-3.0.0}/include/pybind11/detail/typeid.h +0 -0
- {pybind11-2.14.0.dev1/pybind11 → pybind11-3.0.0}/include/pybind11/eigen/common.h +0 -0
- {pybind11-2.14.0.dev1/pybind11 → pybind11-3.0.0}/include/pybind11/eigen.h +0 -0
- {pybind11-2.14.0.dev1/pybind11 → pybind11-3.0.0}/include/pybind11/iostream.h +0 -0
- {pybind11-2.14.0.dev1/pybind11 → pybind11-3.0.0}/include/pybind11/operators.h +0 -0
- {pybind11-2.14.0.dev1/pybind11 → pybind11-3.0.0}/include/pybind11/options.h +0 -0
- {pybind11-2.14.0.dev1/pybind11 → pybind11-3.0.0}/include/pybind11/type_caster_pyobject_ptr.h +0 -0
- {pybind11-2.14.0.dev1 → pybind11-3.0.0}/pybind11/__init__.py +0 -0
- {pybind11-2.14.0.dev1 → pybind11-3.0.0}/pybind11/commands.py +0 -0
- {pybind11-2.14.0.dev1 → pybind11-3.0.0}/pybind11/py.typed +0 -0
- {pybind11-2.14.0.dev1 → pybind11-3.0.0}/pybind11/setup_helpers.py +0 -0
|
@@ -0,0 +1,423 @@
|
|
|
1
|
+
# CMakeLists.txt -- Build system for the pybind11 modules
|
|
2
|
+
#
|
|
3
|
+
# Copyright (c) 2015 Wenzel Jakob <wenzel@inf.ethz.ch>
|
|
4
|
+
#
|
|
5
|
+
# All rights reserved. Use of this source code is governed by a
|
|
6
|
+
# BSD-style license that can be found in the LICENSE file.
|
|
7
|
+
|
|
8
|
+
# Propagate this policy (FindPythonInterp removal) so it can be detected later
|
|
9
|
+
if(NOT CMAKE_VERSION VERSION_LESS "3.27")
|
|
10
|
+
cmake_policy(GET CMP0148 _pybind11_cmp0148)
|
|
11
|
+
endif()
|
|
12
|
+
|
|
13
|
+
cmake_minimum_required(VERSION 3.15...4.0)
|
|
14
|
+
|
|
15
|
+
if(_pybind11_cmp0148)
|
|
16
|
+
cmake_policy(SET CMP0148 ${_pybind11_cmp0148})
|
|
17
|
+
unset(_pybind11_cmp0148)
|
|
18
|
+
endif()
|
|
19
|
+
|
|
20
|
+
# Avoid infinite recursion if tests include this as a subdirectory
|
|
21
|
+
include_guard(GLOBAL)
|
|
22
|
+
|
|
23
|
+
# Extract project version from source
|
|
24
|
+
file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/include/pybind11/detail/common.h"
|
|
25
|
+
pybind11_version_defines REGEX "#define PYBIND11_VERSION_(MAJOR|MINOR|PATCH) ")
|
|
26
|
+
|
|
27
|
+
foreach(ver ${pybind11_version_defines})
|
|
28
|
+
if(ver MATCHES [[#define PYBIND11_VERSION_(MAJOR|MINOR|PATCH) +([^ ]+)$]])
|
|
29
|
+
set(PYBIND11_VERSION_${CMAKE_MATCH_1} "${CMAKE_MATCH_2}")
|
|
30
|
+
endif()
|
|
31
|
+
endforeach()
|
|
32
|
+
|
|
33
|
+
if(PYBIND11_VERSION_PATCH MATCHES [[\.([a-zA-Z0-9]+)$]])
|
|
34
|
+
set(pybind11_VERSION_TYPE "${CMAKE_MATCH_1}")
|
|
35
|
+
endif()
|
|
36
|
+
string(REGEX MATCH "^[0-9]+" PYBIND11_VERSION_PATCH "${PYBIND11_VERSION_PATCH}")
|
|
37
|
+
|
|
38
|
+
project(
|
|
39
|
+
pybind11
|
|
40
|
+
LANGUAGES CXX
|
|
41
|
+
VERSION "${PYBIND11_VERSION_MAJOR}.${PYBIND11_VERSION_MINOR}.${PYBIND11_VERSION_PATCH}")
|
|
42
|
+
|
|
43
|
+
# Standard includes
|
|
44
|
+
include(GNUInstallDirs)
|
|
45
|
+
include(CMakePackageConfigHelpers)
|
|
46
|
+
include(CMakeDependentOption)
|
|
47
|
+
|
|
48
|
+
if(NOT pybind11_FIND_QUIETLY)
|
|
49
|
+
message(STATUS "pybind11 v${pybind11_VERSION} ${pybind11_VERSION_TYPE}")
|
|
50
|
+
endif()
|
|
51
|
+
|
|
52
|
+
# Check if pybind11 is being used directly or via add_subdirectory
|
|
53
|
+
if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
|
|
54
|
+
### Warn if not an out-of-source builds
|
|
55
|
+
if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR)
|
|
56
|
+
set(lines
|
|
57
|
+
"You are building in-place. If that is not what you intended to "
|
|
58
|
+
"do, you can clean the source directory with:\n"
|
|
59
|
+
"rm -r CMakeCache.txt CMakeFiles/ cmake_uninstall.cmake pybind11Config.cmake "
|
|
60
|
+
"pybind11ConfigVersion.cmake tests/CMakeFiles/\n")
|
|
61
|
+
message(AUTHOR_WARNING ${lines})
|
|
62
|
+
endif()
|
|
63
|
+
|
|
64
|
+
set(PYBIND11_MASTER_PROJECT ON)
|
|
65
|
+
|
|
66
|
+
message(STATUS "CMake ${CMAKE_VERSION}")
|
|
67
|
+
|
|
68
|
+
if(DEFINED SKBUILD AND DEFINED ENV{PYBIND11_GLOBAL_SDIST})
|
|
69
|
+
message(
|
|
70
|
+
FATAL_ERROR
|
|
71
|
+
"PYBIND11_GLOBAL_SDIST is not supported, use nox -s build_global or a pybind11-global SDist instead."
|
|
72
|
+
)
|
|
73
|
+
endif()
|
|
74
|
+
|
|
75
|
+
if(CMAKE_CXX_STANDARD)
|
|
76
|
+
set(CMAKE_CXX_EXTENSIONS OFF)
|
|
77
|
+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
78
|
+
endif()
|
|
79
|
+
|
|
80
|
+
set(pybind11_system "")
|
|
81
|
+
|
|
82
|
+
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
|
83
|
+
if(CMAKE_VERSION VERSION_LESS "3.18")
|
|
84
|
+
set(_pybind11_findpython_default OFF)
|
|
85
|
+
else()
|
|
86
|
+
set(_pybind11_findpython_default ON)
|
|
87
|
+
endif()
|
|
88
|
+
else()
|
|
89
|
+
set(PYBIND11_MASTER_PROJECT OFF)
|
|
90
|
+
set(pybind11_system SYSTEM)
|
|
91
|
+
set(_pybind11_findpython_default COMPAT)
|
|
92
|
+
endif()
|
|
93
|
+
|
|
94
|
+
# Options
|
|
95
|
+
option(PYBIND11_INSTALL "Install pybind11 header files?" ${PYBIND11_MASTER_PROJECT})
|
|
96
|
+
option(PYBIND11_TEST "Build pybind11 test suite?" ${PYBIND11_MASTER_PROJECT})
|
|
97
|
+
option(PYBIND11_NOPYTHON "Disable search for Python" OFF)
|
|
98
|
+
option(PYBIND11_DISABLE_HANDLE_TYPE_NAME_DEFAULT_IMPLEMENTATION
|
|
99
|
+
"To enforce that a handle_type_name<> specialization exists" OFF)
|
|
100
|
+
option(PYBIND11_SIMPLE_GIL_MANAGEMENT
|
|
101
|
+
"Use simpler GIL management logic that does not support disassociation" OFF)
|
|
102
|
+
set(PYBIND11_INTERNALS_VERSION
|
|
103
|
+
""
|
|
104
|
+
CACHE STRING "Override the ABI version, may be used to enable the unstable ABI.")
|
|
105
|
+
option(PYBIND11_USE_CROSSCOMPILING "Respect CMAKE_CROSSCOMPILING" OFF)
|
|
106
|
+
|
|
107
|
+
if(PYBIND11_DISABLE_HANDLE_TYPE_NAME_DEFAULT_IMPLEMENTATION)
|
|
108
|
+
add_compile_definitions(PYBIND11_DISABLE_HANDLE_TYPE_NAME_DEFAULT_IMPLEMENTATION)
|
|
109
|
+
endif()
|
|
110
|
+
if(PYBIND11_SIMPLE_GIL_MANAGEMENT)
|
|
111
|
+
add_compile_definitions(PYBIND11_SIMPLE_GIL_MANAGEMENT)
|
|
112
|
+
endif()
|
|
113
|
+
|
|
114
|
+
cmake_dependent_option(
|
|
115
|
+
USE_PYTHON_INCLUDE_DIR
|
|
116
|
+
"Install pybind11 headers in Python include directory instead of default installation prefix"
|
|
117
|
+
OFF "PYBIND11_INSTALL" OFF)
|
|
118
|
+
|
|
119
|
+
set(PYBIND11_FINDPYTHON
|
|
120
|
+
${_pybind11_findpython_default}
|
|
121
|
+
CACHE STRING "Force new FindPython - NEW, OLD, COMPAT")
|
|
122
|
+
|
|
123
|
+
if(PYBIND11_MASTER_PROJECT)
|
|
124
|
+
|
|
125
|
+
# Allow PYTHON_EXECUTABLE if in FINDPYTHON mode and building pybind11's tests
|
|
126
|
+
# (makes transition easier while we support both modes).
|
|
127
|
+
if(PYBIND11_FINDPYTHON
|
|
128
|
+
AND DEFINED PYTHON_EXECUTABLE
|
|
129
|
+
AND NOT DEFINED Python_EXECUTABLE)
|
|
130
|
+
set(Python_EXECUTABLE "${PYTHON_EXECUTABLE}")
|
|
131
|
+
endif()
|
|
132
|
+
|
|
133
|
+
# This is a shortcut that is primarily for the venv cmake preset,
|
|
134
|
+
# but can be used to quickly setup tests manually, too
|
|
135
|
+
set(PYBIND11_CREATE_WITH_UV
|
|
136
|
+
""
|
|
137
|
+
CACHE STRING "Create a virtualenv if it doesn't exist")
|
|
138
|
+
|
|
139
|
+
if(NOT PYBIND11_CREATE_WITH_UV STREQUAL "")
|
|
140
|
+
set(Python_ROOT_DIR "${CMAKE_CURRENT_BINARY_DIR}/.venv")
|
|
141
|
+
if(EXISTS "${Python_ROOT_DIR}")
|
|
142
|
+
if(EXISTS "${CMAKE_BINARY_DIR}/CMakeCache.txt")
|
|
143
|
+
message(STATUS "Using existing venv at ${Python_ROOT_DIR}, remove or --fresh to recreate")
|
|
144
|
+
else()
|
|
145
|
+
# --fresh used to remove the cache
|
|
146
|
+
file(REMOVE_RECURSE "${CMAKE_CURRENT_BINARY_DIR}/.venv")
|
|
147
|
+
endif()
|
|
148
|
+
endif()
|
|
149
|
+
if(NOT EXISTS "${Python_ROOT_DIR}")
|
|
150
|
+
find_program(UV uv REQUIRED)
|
|
151
|
+
# CMake 3.19+ would be able to use COMMAND_ERROR_IS_FATAL
|
|
152
|
+
message(
|
|
153
|
+
STATUS "Creating venv with ${UV} venv -p ${PYBIND11_CREATE_WITH_UV} '${Python_ROOT_DIR}'")
|
|
154
|
+
execute_process(COMMAND ${UV} venv -p ${PYBIND11_CREATE_WITH_UV} "${Python_ROOT_DIR}"
|
|
155
|
+
RESULT_VARIABLE _venv_result)
|
|
156
|
+
if(_venv_result AND NOT _venv_result EQUAL 0)
|
|
157
|
+
message(FATAL_ERROR "uv venv failed with '${_venv_result}'")
|
|
158
|
+
endif()
|
|
159
|
+
message(
|
|
160
|
+
STATUS
|
|
161
|
+
"Installing deps with ${UV} pip install -p '${Python_ROOT_DIR}' -r tests/requirements.txt"
|
|
162
|
+
)
|
|
163
|
+
execute_process(
|
|
164
|
+
COMMAND ${UV} pip install -p "${Python_ROOT_DIR}" -r
|
|
165
|
+
"${CMAKE_CURRENT_SOURCE_DIR}/tests/requirements.txt" RESULT_VARIABLE _pip_result)
|
|
166
|
+
if(_pip_result AND NOT _pip_result EQUAL 0)
|
|
167
|
+
message(FATAL_ERROR "uv pip install failed with '${_pip_result}'")
|
|
168
|
+
endif()
|
|
169
|
+
endif()
|
|
170
|
+
else()
|
|
171
|
+
if(NOT DEFINED Python3_EXECUTABLE
|
|
172
|
+
AND NOT DEFINED Python_EXECUTABLE
|
|
173
|
+
AND NOT DEFINED Python_ROOT_DIR
|
|
174
|
+
AND NOT DEFINED ENV{VIRTUALENV}
|
|
175
|
+
AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.venv")
|
|
176
|
+
message(STATUS "Autodetecting Python in virtual environment")
|
|
177
|
+
set(Python_ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/.venv")
|
|
178
|
+
endif()
|
|
179
|
+
endif()
|
|
180
|
+
endif()
|
|
181
|
+
|
|
182
|
+
set(PYBIND11_HEADERS
|
|
183
|
+
include/pybind11/detail/class.h
|
|
184
|
+
include/pybind11/detail/common.h
|
|
185
|
+
include/pybind11/detail/cpp_conduit.h
|
|
186
|
+
include/pybind11/detail/descr.h
|
|
187
|
+
include/pybind11/detail/dynamic_raw_ptr_cast_if_possible.h
|
|
188
|
+
include/pybind11/detail/exception_translation.h
|
|
189
|
+
include/pybind11/detail/function_record_pyobject.h
|
|
190
|
+
include/pybind11/detail/init.h
|
|
191
|
+
include/pybind11/detail/internals.h
|
|
192
|
+
include/pybind11/detail/native_enum_data.h
|
|
193
|
+
include/pybind11/detail/pybind11_namespace_macros.h
|
|
194
|
+
include/pybind11/detail/struct_smart_holder.h
|
|
195
|
+
include/pybind11/detail/type_caster_base.h
|
|
196
|
+
include/pybind11/detail/typeid.h
|
|
197
|
+
include/pybind11/detail/using_smart_holder.h
|
|
198
|
+
include/pybind11/detail/value_and_holder.h
|
|
199
|
+
include/pybind11/attr.h
|
|
200
|
+
include/pybind11/buffer_info.h
|
|
201
|
+
include/pybind11/cast.h
|
|
202
|
+
include/pybind11/chrono.h
|
|
203
|
+
include/pybind11/common.h
|
|
204
|
+
include/pybind11/complex.h
|
|
205
|
+
include/pybind11/conduit/pybind11_conduit_v1.h
|
|
206
|
+
include/pybind11/conduit/pybind11_platform_abi_id.h
|
|
207
|
+
include/pybind11/conduit/wrap_include_python_h.h
|
|
208
|
+
include/pybind11/critical_section.h
|
|
209
|
+
include/pybind11/options.h
|
|
210
|
+
include/pybind11/eigen.h
|
|
211
|
+
include/pybind11/eigen/common.h
|
|
212
|
+
include/pybind11/eigen/matrix.h
|
|
213
|
+
include/pybind11/eigen/tensor.h
|
|
214
|
+
include/pybind11/embed.h
|
|
215
|
+
include/pybind11/eval.h
|
|
216
|
+
include/pybind11/gil.h
|
|
217
|
+
include/pybind11/gil_safe_call_once.h
|
|
218
|
+
include/pybind11/gil_simple.h
|
|
219
|
+
include/pybind11/iostream.h
|
|
220
|
+
include/pybind11/functional.h
|
|
221
|
+
include/pybind11/native_enum.h
|
|
222
|
+
include/pybind11/numpy.h
|
|
223
|
+
include/pybind11/operators.h
|
|
224
|
+
include/pybind11/pybind11.h
|
|
225
|
+
include/pybind11/pytypes.h
|
|
226
|
+
include/pybind11/subinterpreter.h
|
|
227
|
+
include/pybind11/stl.h
|
|
228
|
+
include/pybind11/stl_bind.h
|
|
229
|
+
include/pybind11/stl/filesystem.h
|
|
230
|
+
include/pybind11/trampoline_self_life_support.h
|
|
231
|
+
include/pybind11/type_caster_pyobject_ptr.h
|
|
232
|
+
include/pybind11/typing.h
|
|
233
|
+
include/pybind11/warnings.h)
|
|
234
|
+
|
|
235
|
+
# Compare with grep and warn if mismatched
|
|
236
|
+
if(PYBIND11_MASTER_PROJECT)
|
|
237
|
+
file(
|
|
238
|
+
GLOB_RECURSE _pybind11_header_check
|
|
239
|
+
LIST_DIRECTORIES false
|
|
240
|
+
RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}"
|
|
241
|
+
CONFIGURE_DEPENDS "include/pybind11/*.h")
|
|
242
|
+
set(_pybind11_here_only ${PYBIND11_HEADERS})
|
|
243
|
+
set(_pybind11_disk_only ${_pybind11_header_check})
|
|
244
|
+
list(REMOVE_ITEM _pybind11_here_only ${_pybind11_header_check})
|
|
245
|
+
list(REMOVE_ITEM _pybind11_disk_only ${PYBIND11_HEADERS})
|
|
246
|
+
if(_pybind11_here_only)
|
|
247
|
+
message(AUTHOR_WARNING "PYBIND11_HEADERS has extra files:" ${_pybind11_here_only})
|
|
248
|
+
endif()
|
|
249
|
+
if(_pybind11_disk_only)
|
|
250
|
+
message(AUTHOR_WARNING "PYBIND11_HEADERS is missing files:" ${_pybind11_disk_only})
|
|
251
|
+
endif()
|
|
252
|
+
endif()
|
|
253
|
+
|
|
254
|
+
list(TRANSFORM PYBIND11_HEADERS PREPEND "${CMAKE_CURRENT_SOURCE_DIR}/")
|
|
255
|
+
|
|
256
|
+
# Cache variable so this can be used in parent projects
|
|
257
|
+
set(pybind11_INCLUDE_DIR
|
|
258
|
+
"${CMAKE_CURRENT_LIST_DIR}/include"
|
|
259
|
+
CACHE INTERNAL "Directory where pybind11 headers are located")
|
|
260
|
+
|
|
261
|
+
# Backward compatible variable for add_subdirectory mode
|
|
262
|
+
if(NOT PYBIND11_MASTER_PROJECT)
|
|
263
|
+
set(PYBIND11_INCLUDE_DIR
|
|
264
|
+
"${pybind11_INCLUDE_DIR}"
|
|
265
|
+
CACHE INTERNAL "")
|
|
266
|
+
endif()
|
|
267
|
+
|
|
268
|
+
# Note: when creating targets, you cannot use if statements at configure time -
|
|
269
|
+
# you need generator expressions, because those will be placed in the target file.
|
|
270
|
+
# You can also place ifs *in* the Config.in, but not here.
|
|
271
|
+
|
|
272
|
+
# This section builds targets, but does *not* touch Python
|
|
273
|
+
# Non-IMPORT targets cannot be defined twice
|
|
274
|
+
if(NOT TARGET pybind11_headers)
|
|
275
|
+
# Build the headers-only target (no Python included):
|
|
276
|
+
# (long name used here to keep this from clashing in subdirectory mode)
|
|
277
|
+
add_library(pybind11_headers INTERFACE)
|
|
278
|
+
add_library(pybind11::pybind11_headers ALIAS pybind11_headers) # to match exported target
|
|
279
|
+
add_library(pybind11::headers ALIAS pybind11_headers) # easier to use/remember
|
|
280
|
+
|
|
281
|
+
target_include_directories(
|
|
282
|
+
pybind11_headers ${pybind11_system} INTERFACE $<BUILD_INTERFACE:${pybind11_INCLUDE_DIR}>
|
|
283
|
+
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
|
|
284
|
+
|
|
285
|
+
target_compile_features(pybind11_headers INTERFACE cxx_inheriting_constructors cxx_user_literals
|
|
286
|
+
cxx_right_angle_brackets)
|
|
287
|
+
if(NOT "${PYBIND11_INTERNALS_VERSION}" STREQUAL "")
|
|
288
|
+
target_compile_definitions(
|
|
289
|
+
pybind11_headers INTERFACE "PYBIND11_INTERNALS_VERSION=${PYBIND11_INTERNALS_VERSION}")
|
|
290
|
+
endif()
|
|
291
|
+
else()
|
|
292
|
+
# It is invalid to install a target twice, too.
|
|
293
|
+
set(PYBIND11_INSTALL OFF)
|
|
294
|
+
endif()
|
|
295
|
+
|
|
296
|
+
include("${CMAKE_CURRENT_SOURCE_DIR}/tools/pybind11Common.cmake")
|
|
297
|
+
# https://github.com/jtojnar/cmake-snips/#concatenating-paths-when-building-pkg-config-files
|
|
298
|
+
# TODO: cmake 3.20 adds the cmake_path() function, which obsoletes this snippet
|
|
299
|
+
include("${CMAKE_CURRENT_SOURCE_DIR}/tools/JoinPaths.cmake")
|
|
300
|
+
|
|
301
|
+
# Relative directory setting
|
|
302
|
+
if(USE_PYTHON_INCLUDE_DIR AND DEFINED Python_INCLUDE_DIRS)
|
|
303
|
+
file(RELATIVE_PATH CMAKE_INSTALL_INCLUDEDIR ${CMAKE_INSTALL_PREFIX} ${Python_INCLUDE_DIRS})
|
|
304
|
+
elseif(USE_PYTHON_INCLUDE_DIR AND DEFINED PYTHON_INCLUDE_DIR)
|
|
305
|
+
file(RELATIVE_PATH CMAKE_INSTALL_INCLUDEDIR ${CMAKE_INSTALL_PREFIX} ${PYTHON_INCLUDE_DIRS})
|
|
306
|
+
endif()
|
|
307
|
+
|
|
308
|
+
if(PYBIND11_INSTALL)
|
|
309
|
+
if(DEFINED SKBUILD_PROJECT_NAME AND SKBUILD_PROJECT_NAME STREQUAL "pybind11_global")
|
|
310
|
+
install(DIRECTORY ${pybind11_INCLUDE_DIR}/pybind11 DESTINATION "${SKBUILD_HEADERS_DIR}")
|
|
311
|
+
endif()
|
|
312
|
+
install(DIRECTORY ${pybind11_INCLUDE_DIR}/pybind11 DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
|
313
|
+
set(PYBIND11_CMAKECONFIG_INSTALL_DIR
|
|
314
|
+
"${CMAKE_INSTALL_DATAROOTDIR}/cmake/${PROJECT_NAME}"
|
|
315
|
+
CACHE STRING "install path for pybind11Config.cmake")
|
|
316
|
+
|
|
317
|
+
if(IS_ABSOLUTE "${CMAKE_INSTALL_INCLUDEDIR}")
|
|
318
|
+
set(pybind11_INCLUDEDIR "${CMAKE_INSTALL_FULL_INCLUDEDIR}")
|
|
319
|
+
else()
|
|
320
|
+
set(pybind11_INCLUDEDIR "\$\{PACKAGE_PREFIX_DIR\}/${CMAKE_INSTALL_INCLUDEDIR}")
|
|
321
|
+
endif()
|
|
322
|
+
|
|
323
|
+
configure_package_config_file(
|
|
324
|
+
tools/${PROJECT_NAME}Config.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
|
|
325
|
+
INSTALL_DESTINATION ${PYBIND11_CMAKECONFIG_INSTALL_DIR})
|
|
326
|
+
|
|
327
|
+
# CMake natively supports header-only libraries
|
|
328
|
+
write_basic_package_version_file(
|
|
329
|
+
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake
|
|
330
|
+
VERSION ${PROJECT_VERSION}
|
|
331
|
+
COMPATIBILITY AnyNewerVersion ARCH_INDEPENDENT)
|
|
332
|
+
|
|
333
|
+
install(
|
|
334
|
+
FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake
|
|
335
|
+
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake
|
|
336
|
+
tools/FindPythonLibsNew.cmake
|
|
337
|
+
tools/pybind11Common.cmake
|
|
338
|
+
tools/pybind11Tools.cmake
|
|
339
|
+
tools/pybind11NewTools.cmake
|
|
340
|
+
tools/pybind11GuessPythonExtSuffix.cmake
|
|
341
|
+
DESTINATION ${PYBIND11_CMAKECONFIG_INSTALL_DIR})
|
|
342
|
+
|
|
343
|
+
if(NOT PYBIND11_EXPORT_NAME)
|
|
344
|
+
set(PYBIND11_EXPORT_NAME "${PROJECT_NAME}Targets")
|
|
345
|
+
endif()
|
|
346
|
+
|
|
347
|
+
install(TARGETS pybind11_headers EXPORT "${PYBIND11_EXPORT_NAME}")
|
|
348
|
+
|
|
349
|
+
install(
|
|
350
|
+
EXPORT "${PYBIND11_EXPORT_NAME}"
|
|
351
|
+
NAMESPACE "pybind11::"
|
|
352
|
+
DESTINATION ${PYBIND11_CMAKECONFIG_INSTALL_DIR})
|
|
353
|
+
|
|
354
|
+
# pkg-config support
|
|
355
|
+
if(NOT prefix_for_pc_file)
|
|
356
|
+
if(IS_ABSOLUTE "${CMAKE_INSTALL_DATAROOTDIR}")
|
|
357
|
+
set(prefix_for_pc_file "${CMAKE_INSTALL_PREFIX}")
|
|
358
|
+
else()
|
|
359
|
+
set(pc_datarootdir "${CMAKE_INSTALL_DATAROOTDIR}")
|
|
360
|
+
if(CMAKE_VERSION VERSION_LESS 3.20)
|
|
361
|
+
set(prefix_for_pc_file "\${pcfiledir}/..")
|
|
362
|
+
while(pc_datarootdir)
|
|
363
|
+
get_filename_component(pc_datarootdir "${pc_datarootdir}" DIRECTORY)
|
|
364
|
+
string(APPEND prefix_for_pc_file "/..")
|
|
365
|
+
endwhile()
|
|
366
|
+
else()
|
|
367
|
+
cmake_path(RELATIVE_PATH CMAKE_INSTALL_PREFIX BASE_DIRECTORY CMAKE_INSTALL_DATAROOTDIR
|
|
368
|
+
OUTPUT_VARIABLE prefix_for_pc_file)
|
|
369
|
+
endif()
|
|
370
|
+
endif()
|
|
371
|
+
endif()
|
|
372
|
+
join_paths(includedir_for_pc_file "\${prefix}" "${CMAKE_INSTALL_INCLUDEDIR}")
|
|
373
|
+
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/tools/pybind11.pc.in"
|
|
374
|
+
"${CMAKE_CURRENT_BINARY_DIR}/pybind11.pc" @ONLY)
|
|
375
|
+
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/pybind11.pc"
|
|
376
|
+
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/pkgconfig/")
|
|
377
|
+
|
|
378
|
+
# When building a wheel, include __init__.py's for modules
|
|
379
|
+
# (see https://github.com/pybind/pybind11/pull/5552)
|
|
380
|
+
if(DEFINED SKBUILD_PROJECT_NAME AND SKBUILD_PROJECT_NAME STREQUAL "pybind11")
|
|
381
|
+
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/empty")
|
|
382
|
+
file(TOUCH "${CMAKE_CURRENT_BINARY_DIR}/empty/__init__.py")
|
|
383
|
+
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/empty/__init__.py"
|
|
384
|
+
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/")
|
|
385
|
+
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/empty/__init__.py"
|
|
386
|
+
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/pkgconfig/")
|
|
387
|
+
endif()
|
|
388
|
+
|
|
389
|
+
# Uninstall target
|
|
390
|
+
if(PYBIND11_MASTER_PROJECT)
|
|
391
|
+
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/tools/cmake_uninstall.cmake.in"
|
|
392
|
+
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" IMMEDIATE @ONLY)
|
|
393
|
+
|
|
394
|
+
add_custom_target(uninstall COMMAND ${CMAKE_COMMAND} -P
|
|
395
|
+
${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
|
|
396
|
+
endif()
|
|
397
|
+
endif()
|
|
398
|
+
|
|
399
|
+
# BUILD_TESTING takes priority, but only if this is the master project
|
|
400
|
+
if(PYBIND11_MASTER_PROJECT AND DEFINED BUILD_TESTING)
|
|
401
|
+
if(BUILD_TESTING)
|
|
402
|
+
if(_pybind11_nopython)
|
|
403
|
+
message(FATAL_ERROR "Cannot activate tests in NOPYTHON mode")
|
|
404
|
+
else()
|
|
405
|
+
add_subdirectory(tests)
|
|
406
|
+
endif()
|
|
407
|
+
endif()
|
|
408
|
+
else()
|
|
409
|
+
if(PYBIND11_TEST)
|
|
410
|
+
if(_pybind11_nopython)
|
|
411
|
+
message(FATAL_ERROR "Cannot activate tests in NOPYTHON mode")
|
|
412
|
+
else()
|
|
413
|
+
add_subdirectory(tests)
|
|
414
|
+
endif()
|
|
415
|
+
endif()
|
|
416
|
+
endif()
|
|
417
|
+
|
|
418
|
+
# Better symmetry with find_package(pybind11 CONFIG) mode.
|
|
419
|
+
if(NOT PYBIND11_MASTER_PROJECT)
|
|
420
|
+
set(pybind11_FOUND
|
|
421
|
+
TRUE
|
|
422
|
+
CACHE INTERNAL "True if pybind11 and all required components found on the system")
|
|
423
|
+
endif()
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 6,
|
|
3
|
+
"configurePresets": [
|
|
4
|
+
{
|
|
5
|
+
"name": "default",
|
|
6
|
+
"displayName": "Default",
|
|
7
|
+
"binaryDir": "build",
|
|
8
|
+
"generator": "Ninja",
|
|
9
|
+
"errors": {
|
|
10
|
+
"dev": true,
|
|
11
|
+
"deprecated": true
|
|
12
|
+
},
|
|
13
|
+
"cacheVariables": {
|
|
14
|
+
"CMAKE_BUILD_TYPE": "Debug",
|
|
15
|
+
"CMAKE_EXPORT_COMPILE_COMMANDS": true,
|
|
16
|
+
"DOWNLOAD_CATCH": true,
|
|
17
|
+
"DOWNLOAD_EIGEN": true,
|
|
18
|
+
"PYBIND11_FINDPYTHON": "NEW",
|
|
19
|
+
"PYBIND11_WERROR": true,
|
|
20
|
+
"CMAKE_COLOR_DIAGNOSTICS": true
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"name": "venv",
|
|
25
|
+
"displayName": "Venv",
|
|
26
|
+
"inherits": "default",
|
|
27
|
+
"cacheVariables": {
|
|
28
|
+
"PYBIND11_CREATE_WITH_UV": "python3",
|
|
29
|
+
"Python_ROOT_DIR": ".venv"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"name": "tidy",
|
|
34
|
+
"displayName": "Clang-tidy",
|
|
35
|
+
"inherits": "default",
|
|
36
|
+
"binaryDir": "build-tidy",
|
|
37
|
+
"cacheVariables": {
|
|
38
|
+
"CMAKE_CXX_CLANG_TIDY": "clang-tidy;--use-color;--warnings-as-errors=*",
|
|
39
|
+
"CMAKE_CXX_STANDARD": "17"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
"buildPresets": [
|
|
44
|
+
{
|
|
45
|
+
"name": "default",
|
|
46
|
+
"displayName": "Default Build",
|
|
47
|
+
"configurePreset": "default"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"name": "venv",
|
|
51
|
+
"displayName": "Venv Build",
|
|
52
|
+
"configurePreset": "venv"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"name": "tidy",
|
|
56
|
+
"displayName": "Clang-tidy Build",
|
|
57
|
+
"configurePreset": "tidy",
|
|
58
|
+
"nativeToolOptions": ["-k0"]
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"name": "tests",
|
|
62
|
+
"displayName": "Tests (for workflow)",
|
|
63
|
+
"configurePreset": "default",
|
|
64
|
+
"targets": ["pytest", "cpptest", "test_cmake_build", "test_cross_module_rtti"]
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"name": "testsvenv",
|
|
68
|
+
"displayName": "Tests Venv (for workflow)",
|
|
69
|
+
"configurePreset": "venv",
|
|
70
|
+
"targets": ["pytest", "cpptest", "test_cmake_build", "test_cross_module_rtti"]
|
|
71
|
+
}
|
|
72
|
+
],
|
|
73
|
+
"workflowPresets": [
|
|
74
|
+
{
|
|
75
|
+
"name": "default",
|
|
76
|
+
"displayName": "Default Workflow",
|
|
77
|
+
"steps": [
|
|
78
|
+
{ "type": "configure", "name": "default" },
|
|
79
|
+
{ "type": "build", "name": "default" },
|
|
80
|
+
{ "type": "build", "name": "tests" }
|
|
81
|
+
]
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"name": "venv",
|
|
85
|
+
"displayName": "Default Workflow",
|
|
86
|
+
"steps": [
|
|
87
|
+
{ "type": "configure", "name": "venv" },
|
|
88
|
+
{ "type": "build", "name": "venv" },
|
|
89
|
+
{ "type": "build", "name": "testsvenv" }
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
]
|
|
93
|
+
}
|
|
@@ -1,18 +1,11 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: pybind11
|
|
3
|
-
Version:
|
|
3
|
+
Version: 3.0.0
|
|
4
4
|
Summary: Seamless operability between C++11 and Python
|
|
5
|
-
Home-page: https://github.com/pybind/pybind11
|
|
6
|
-
Download-URL: https://github.com/pybind/pybind11/tarball/v2.14.0.dev1
|
|
7
|
-
Author: Wenzel Jakob
|
|
8
|
-
Author-email: wenzel.jakob@epfl.ch
|
|
9
|
-
License: BSD
|
|
10
|
-
Project-URL: Documentation, https://pybind11.readthedocs.io/
|
|
11
|
-
Project-URL: Bug Tracker, https://github.com/pybind/pybind11/issues
|
|
12
|
-
Project-URL: Discussions, https://github.com/pybind/pybind11/discussions
|
|
13
|
-
Project-URL: Changelog, https://pybind11.readthedocs.io/en/latest/changelog.html
|
|
14
|
-
Project-URL: Chat, https://gitter.im/pybind/Lobby
|
|
15
5
|
Keywords: C++11,Python bindings
|
|
6
|
+
Author-Email: Wenzel Jakob <wenzel.jakob@epfl.ch>
|
|
7
|
+
License-Expression: BSD-3-Clause
|
|
8
|
+
License-File: LICENSE
|
|
16
9
|
Classifier: Development Status :: 5 - Production/Stable
|
|
17
10
|
Classifier: Intended Audience :: Developers
|
|
18
11
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
@@ -25,23 +18,30 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
25
18
|
Classifier: Programming Language :: Python :: 3.11
|
|
26
19
|
Classifier: Programming Language :: Python :: 3.12
|
|
27
20
|
Classifier: Programming Language :: Python :: 3.13
|
|
28
|
-
Classifier:
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
29
22
|
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
30
23
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
31
24
|
Classifier: Programming Language :: C++
|
|
32
25
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
26
|
+
Project-URL: Homepage, https://github.com/pybind/pybind11
|
|
27
|
+
Project-URL: Documentation, https://pybind11.readthedocs.io/
|
|
28
|
+
Project-URL: Bug Tracker, https://github.com/pybind/pybind11/issues
|
|
29
|
+
Project-URL: Discussions, https://github.com/pybind/pybind11/discussions
|
|
30
|
+
Project-URL: Changelog, https://pybind11.readthedocs.io/en/latest/changelog.html
|
|
31
|
+
Project-URL: Chat, https://gitter.im/pybind/Lobby
|
|
33
32
|
Requires-Python: >=3.8
|
|
34
|
-
Description-Content-Type: text/x-rst
|
|
35
|
-
License-File: LICENSE
|
|
36
33
|
Provides-Extra: global
|
|
37
|
-
Requires-Dist:
|
|
34
|
+
Requires-Dist: pybind11-global==3.0.0; extra == "global"
|
|
35
|
+
Description-Content-Type: text/x-rst
|
|
38
36
|
|
|
39
37
|
.. figure:: https://github.com/pybind/pybind11/raw/master/docs/pybind11-logo.png
|
|
40
38
|
:alt: pybind11 logo
|
|
41
39
|
|
|
42
|
-
**pybind11 — Seamless
|
|
40
|
+
**pybind11 (v3) — Seamless interoperability between C++ and Python**
|
|
43
41
|
|
|
44
|
-
|Latest Documentation Status| |Stable Documentation Status| |Gitter chat| |GitHub Discussions|
|
|
42
|
+
|Latest Documentation Status| |Stable Documentation Status| |Gitter chat| |GitHub Discussions|
|
|
43
|
+
|
|
44
|
+
|CI| |Build status| |SPEC 4 — Using and Creating Nightly Wheels|
|
|
45
45
|
|
|
46
46
|
|Repology| |PyPI package| |Conda-forge| |Python Versions|
|
|
47
47
|
|
|
@@ -72,12 +72,12 @@ dependency.
|
|
|
72
72
|
Think of this library as a tiny self-contained version of Boost.Python
|
|
73
73
|
with everything stripped away that isn't relevant for binding
|
|
74
74
|
generation. Without comments, the core header files only require ~4K
|
|
75
|
-
lines of code and depend on Python (3.8+, or
|
|
76
|
-
standard library. This compact implementation was possible thanks to
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
75
|
+
lines of code and depend on Python (CPython 3.8+, PyPy, or GraalPy) and the C++
|
|
76
|
+
standard library. This compact implementation was possible thanks to some C++11
|
|
77
|
+
language features (specifically: tuples, lambda functions and variadic
|
|
78
|
+
templates). Since its creation, this library has grown beyond Boost.Python in
|
|
79
|
+
many ways, leading to dramatically simpler binding code in many common
|
|
80
|
+
situations.
|
|
81
81
|
|
|
82
82
|
Tutorial and reference documentation is provided at
|
|
83
83
|
`pybind11.readthedocs.io <https://pybind11.readthedocs.io/en/latest>`_.
|
|
@@ -117,8 +117,9 @@ Goodies
|
|
|
117
117
|
In addition to the core functionality, pybind11 provides some extra
|
|
118
118
|
goodies:
|
|
119
119
|
|
|
120
|
-
-
|
|
121
|
-
interface (
|
|
120
|
+
- CPython 3.8+, PyPy3 7.3.17+, and GraalPy 24.1+ are supported with an
|
|
121
|
+
implementation-agnostic interface (see older versions for older CPython
|
|
122
|
+
and PyPy versions).
|
|
122
123
|
|
|
123
124
|
- It is possible to bind C++11 lambda functions with captured
|
|
124
125
|
variables. The lambda capture data is stored inside the resulting
|
|
@@ -161,22 +162,52 @@ Supported compilers
|
|
|
161
162
|
1. Clang/LLVM 3.3 or newer (for Apple Xcode's clang, this is 5.0.0 or
|
|
162
163
|
newer)
|
|
163
164
|
2. GCC 4.8 or newer
|
|
164
|
-
3. Microsoft Visual Studio
|
|
165
|
+
3. Microsoft Visual Studio 2022 or newer (2019 probably works, but was dropped in CI)
|
|
165
166
|
4. Intel classic C++ compiler 18 or newer (ICC 20.2 tested in CI)
|
|
166
167
|
5. Cygwin/GCC (previously tested on 2.5.1)
|
|
167
168
|
6. NVCC (CUDA 11.0 tested in CI)
|
|
168
169
|
7. NVIDIA PGI (20.9 tested in CI)
|
|
169
170
|
|
|
171
|
+
Supported Platforms
|
|
172
|
+
-------------------
|
|
173
|
+
|
|
174
|
+
* Windows, Linux, macOS, and iOS
|
|
175
|
+
* CPython 3.8+, Pyodide, PyPy, and GraalPy
|
|
176
|
+
* C++11, C++14, C++17, C++20, and C++23
|
|
177
|
+
|
|
170
178
|
About
|
|
171
179
|
-----
|
|
172
180
|
|
|
173
181
|
This project was created by `Wenzel
|
|
174
182
|
Jakob <http://rgl.epfl.ch/people/wjakob>`_. Significant features and/or
|
|
175
|
-
improvements to the code were contributed by
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
183
|
+
improvements to the code were contributed by
|
|
184
|
+
Jonas Adler,
|
|
185
|
+
Lori A. Burns,
|
|
186
|
+
Sylvain Corlay,
|
|
187
|
+
Eric Cousineau,
|
|
188
|
+
Aaron Gokaslan,
|
|
189
|
+
Ralf Grosse-Kunstleve,
|
|
190
|
+
Trent Houliston,
|
|
191
|
+
Axel Huebl,
|
|
192
|
+
@hulucc,
|
|
193
|
+
Yannick Jadoul,
|
|
194
|
+
Sergey Lyskov,
|
|
195
|
+
Johan Mabille,
|
|
196
|
+
Tomasz Miąsko,
|
|
197
|
+
Dean Moldovan,
|
|
198
|
+
Ben Pritchard,
|
|
199
|
+
Jason Rhinelander,
|
|
200
|
+
Boris Schäling,
|
|
201
|
+
Pim Schellart,
|
|
202
|
+
Henry Schreiner,
|
|
203
|
+
Ivan Smirnov,
|
|
204
|
+
Dustin Spicuzza,
|
|
205
|
+
Boris Staletic,
|
|
206
|
+
Ethan Steinberg,
|
|
207
|
+
Patrick Stewart,
|
|
208
|
+
Ivor Wanders,
|
|
209
|
+
and
|
|
210
|
+
Xiaofei Wang.
|
|
180
211
|
|
|
181
212
|
We thank Google for a generous financial contribution to the continuous
|
|
182
213
|
integration infrastructure used by this project.
|
|
@@ -217,3 +248,5 @@ to the terms and conditions of this license.
|
|
|
217
248
|
:target: https://pypi.org/project/pybind11/
|
|
218
249
|
.. |GitHub Discussions| image:: https://img.shields.io/static/v1?label=Discussions&message=Ask&color=blue&logo=github
|
|
219
250
|
:target: https://github.com/pybind/pybind11/discussions
|
|
251
|
+
.. |SPEC 4 — Using and Creating Nightly Wheels| image:: https://img.shields.io/badge/SPEC-4-green?labelColor=%23004811&color=%235CA038
|
|
252
|
+
:target: https://scientific-python.org/specs/spec-0004/
|