kr326lib 1.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.
- kr326lib-1.0.0/.github/workflows/release.yml +55 -0
- kr326lib-1.0.0/.gitignore +11 -0
- kr326lib-1.0.0/.gitmodules +4 -0
- kr326lib-1.0.0/CMakeLists.txt +76 -0
- kr326lib-1.0.0/CONTRIBUTING.md +93 -0
- kr326lib-1.0.0/LICENSE +21 -0
- kr326lib-1.0.0/PKG-INFO +70 -0
- kr326lib-1.0.0/README.md +22 -0
- kr326lib-1.0.0/extern/pybind11/.appveyor.yml +35 -0
- kr326lib-1.0.0/extern/pybind11/.clang-format +38 -0
- kr326lib-1.0.0/extern/pybind11/.clang-tidy +83 -0
- kr326lib-1.0.0/extern/pybind11/.cmake-format.yaml +73 -0
- kr326lib-1.0.0/extern/pybind11/.codespell-ignore-lines +36 -0
- kr326lib-1.0.0/extern/pybind11/.gitattributes +1 -0
- kr326lib-1.0.0/extern/pybind11/.github/CODEOWNERS +9 -0
- kr326lib-1.0.0/extern/pybind11/.github/CONTRIBUTING.md +349 -0
- kr326lib-1.0.0/extern/pybind11/.github/ISSUE_TEMPLATE/bug-report.yml +61 -0
- kr326lib-1.0.0/extern/pybind11/.github/ISSUE_TEMPLATE/config.yml +8 -0
- kr326lib-1.0.0/extern/pybind11/.github/dependabot.yml +11 -0
- kr326lib-1.0.0/extern/pybind11/.github/labeler.yml +13 -0
- kr326lib-1.0.0/extern/pybind11/.github/labeler_merged.yml +8 -0
- kr326lib-1.0.0/extern/pybind11/.github/matchers/pylint.json +32 -0
- kr326lib-1.0.0/extern/pybind11/.github/pull_request_template.md +15 -0
- kr326lib-1.0.0/extern/pybind11/.github/workflows/ci.yml +1369 -0
- kr326lib-1.0.0/extern/pybind11/.github/workflows/configure.yml +85 -0
- kr326lib-1.0.0/extern/pybind11/.github/workflows/docs-link.yml +41 -0
- kr326lib-1.0.0/extern/pybind11/.github/workflows/format.yml +54 -0
- kr326lib-1.0.0/extern/pybind11/.github/workflows/labeler.yml +25 -0
- kr326lib-1.0.0/extern/pybind11/.github/workflows/nightlies.yml +59 -0
- kr326lib-1.0.0/extern/pybind11/.github/workflows/pip.yml +118 -0
- kr326lib-1.0.0/extern/pybind11/.github/workflows/reusable-standard.yml +98 -0
- kr326lib-1.0.0/extern/pybind11/.github/workflows/tests-cibw.yml +77 -0
- kr326lib-1.0.0/extern/pybind11/.github/workflows/upstream.yml +118 -0
- kr326lib-1.0.0/extern/pybind11/.gitignore +54 -0
- kr326lib-1.0.0/extern/pybind11/.pre-commit-config.yaml +158 -0
- kr326lib-1.0.0/extern/pybind11/.readthedocs.yml +20 -0
- kr326lib-1.0.0/extern/pybind11/CMakeLists.txt +425 -0
- kr326lib-1.0.0/extern/pybind11/CMakePresets.json +93 -0
- kr326lib-1.0.0/extern/pybind11/LICENSE +29 -0
- kr326lib-1.0.0/extern/pybind11/README.rst +215 -0
- kr326lib-1.0.0/extern/pybind11/SECURITY.md +13 -0
- kr326lib-1.0.0/extern/pybind11/docs/Doxyfile +21 -0
- kr326lib-1.0.0/extern/pybind11/docs/_static/css/custom.css +3 -0
- kr326lib-1.0.0/extern/pybind11/docs/advanced/cast/chrono.rst +81 -0
- kr326lib-1.0.0/extern/pybind11/docs/advanced/cast/custom.rst +137 -0
- kr326lib-1.0.0/extern/pybind11/docs/advanced/cast/eigen.rst +310 -0
- kr326lib-1.0.0/extern/pybind11/docs/advanced/cast/functional.rst +109 -0
- kr326lib-1.0.0/extern/pybind11/docs/advanced/cast/index.rst +43 -0
- kr326lib-1.0.0/extern/pybind11/docs/advanced/cast/overview.rst +170 -0
- kr326lib-1.0.0/extern/pybind11/docs/advanced/cast/stl.rst +249 -0
- kr326lib-1.0.0/extern/pybind11/docs/advanced/cast/strings.rst +296 -0
- kr326lib-1.0.0/extern/pybind11/docs/advanced/classes.rst +1432 -0
- kr326lib-1.0.0/extern/pybind11/docs/advanced/deadlock.md +391 -0
- kr326lib-1.0.0/extern/pybind11/docs/advanced/deprecated.rst +179 -0
- kr326lib-1.0.0/extern/pybind11/docs/advanced/embedding.rst +499 -0
- kr326lib-1.0.0/extern/pybind11/docs/advanced/exceptions.rst +422 -0
- kr326lib-1.0.0/extern/pybind11/docs/advanced/functions.rst +616 -0
- kr326lib-1.0.0/extern/pybind11/docs/advanced/misc.rst +615 -0
- kr326lib-1.0.0/extern/pybind11/docs/advanced/pycpp/index.rst +13 -0
- kr326lib-1.0.0/extern/pybind11/docs/advanced/pycpp/numpy.rst +493 -0
- kr326lib-1.0.0/extern/pybind11/docs/advanced/pycpp/object.rst +286 -0
- kr326lib-1.0.0/extern/pybind11/docs/advanced/pycpp/utilities.rst +155 -0
- kr326lib-1.0.0/extern/pybind11/docs/advanced/smart_ptrs.rst +179 -0
- kr326lib-1.0.0/extern/pybind11/docs/basics.rst +316 -0
- kr326lib-1.0.0/extern/pybind11/docs/benchmark.py +89 -0
- kr326lib-1.0.0/extern/pybind11/docs/benchmark.rst +95 -0
- kr326lib-1.0.0/extern/pybind11/docs/changelog.md +3488 -0
- kr326lib-1.0.0/extern/pybind11/docs/classes.rst +652 -0
- kr326lib-1.0.0/extern/pybind11/docs/cmake/index.rst +8 -0
- kr326lib-1.0.0/extern/pybind11/docs/compiling.rst +731 -0
- kr326lib-1.0.0/extern/pybind11/docs/conf.py +369 -0
- kr326lib-1.0.0/extern/pybind11/docs/faq.rst +351 -0
- kr326lib-1.0.0/extern/pybind11/docs/index.rst +49 -0
- kr326lib-1.0.0/extern/pybind11/docs/installing.rst +105 -0
- kr326lib-1.0.0/extern/pybind11/docs/limitations.rst +68 -0
- kr326lib-1.0.0/extern/pybind11/docs/pybind11-logo.png +0 -0
- kr326lib-1.0.0/extern/pybind11/docs/pybind11_vs_boost_python1.png +0 -0
- kr326lib-1.0.0/extern/pybind11/docs/pybind11_vs_boost_python1.svg +427 -0
- kr326lib-1.0.0/extern/pybind11/docs/pybind11_vs_boost_python2.png +0 -0
- kr326lib-1.0.0/extern/pybind11/docs/pybind11_vs_boost_python2.svg +427 -0
- kr326lib-1.0.0/extern/pybind11/docs/reference.rst +130 -0
- kr326lib-1.0.0/extern/pybind11/docs/release.rst +135 -0
- kr326lib-1.0.0/extern/pybind11/docs/requirements.in +7 -0
- kr326lib-1.0.0/extern/pybind11/docs/requirements.txt +87 -0
- kr326lib-1.0.0/extern/pybind11/docs/upgrade.rst +748 -0
- kr326lib-1.0.0/extern/pybind11/include/pybind11/attr.h +730 -0
- kr326lib-1.0.0/extern/pybind11/include/pybind11/buffer_info.h +209 -0
- kr326lib-1.0.0/extern/pybind11/include/pybind11/cast.h +2446 -0
- kr326lib-1.0.0/extern/pybind11/include/pybind11/chrono.h +227 -0
- kr326lib-1.0.0/extern/pybind11/include/pybind11/common.h +2 -0
- kr326lib-1.0.0/extern/pybind11/include/pybind11/complex.h +93 -0
- kr326lib-1.0.0/extern/pybind11/include/pybind11/conduit/README.txt +15 -0
- kr326lib-1.0.0/extern/pybind11/include/pybind11/conduit/pybind11_conduit_v1.h +116 -0
- kr326lib-1.0.0/extern/pybind11/include/pybind11/conduit/pybind11_platform_abi_id.h +87 -0
- kr326lib-1.0.0/extern/pybind11/include/pybind11/conduit/wrap_include_python_h.h +72 -0
- kr326lib-1.0.0/extern/pybind11/include/pybind11/critical_section.h +56 -0
- kr326lib-1.0.0/extern/pybind11/include/pybind11/detail/argument_vector.h +417 -0
- kr326lib-1.0.0/extern/pybind11/include/pybind11/detail/class.h +850 -0
- kr326lib-1.0.0/extern/pybind11/include/pybind11/detail/common.h +1427 -0
- kr326lib-1.0.0/extern/pybind11/include/pybind11/detail/cpp_conduit.h +75 -0
- kr326lib-1.0.0/extern/pybind11/include/pybind11/detail/descr.h +226 -0
- kr326lib-1.0.0/extern/pybind11/include/pybind11/detail/dynamic_raw_ptr_cast_if_possible.h +39 -0
- kr326lib-1.0.0/extern/pybind11/include/pybind11/detail/exception_translation.h +71 -0
- kr326lib-1.0.0/extern/pybind11/include/pybind11/detail/function_record_pyobject.h +192 -0
- kr326lib-1.0.0/extern/pybind11/include/pybind11/detail/holder_caster_foreign_helpers.h +104 -0
- kr326lib-1.0.0/extern/pybind11/include/pybind11/detail/init.h +548 -0
- kr326lib-1.0.0/extern/pybind11/include/pybind11/detail/internals.h +1082 -0
- kr326lib-1.0.0/extern/pybind11/include/pybind11/detail/native_enum_data.h +227 -0
- kr326lib-1.0.0/extern/pybind11/include/pybind11/detail/pybind11_namespace_macros.h +82 -0
- kr326lib-1.0.0/extern/pybind11/include/pybind11/detail/struct_smart_holder.h +398 -0
- kr326lib-1.0.0/extern/pybind11/include/pybind11/detail/type_caster_base.h +1723 -0
- kr326lib-1.0.0/extern/pybind11/include/pybind11/detail/typeid.h +65 -0
- kr326lib-1.0.0/extern/pybind11/include/pybind11/detail/using_smart_holder.h +22 -0
- kr326lib-1.0.0/extern/pybind11/include/pybind11/detail/value_and_holder.h +92 -0
- kr326lib-1.0.0/extern/pybind11/include/pybind11/eigen/common.h +9 -0
- kr326lib-1.0.0/extern/pybind11/include/pybind11/eigen/matrix.h +723 -0
- kr326lib-1.0.0/extern/pybind11/include/pybind11/eigen/tensor.h +520 -0
- kr326lib-1.0.0/extern/pybind11/include/pybind11/eigen.h +12 -0
- kr326lib-1.0.0/extern/pybind11/include/pybind11/embed.h +320 -0
- kr326lib-1.0.0/extern/pybind11/include/pybind11/eval.h +161 -0
- kr326lib-1.0.0/extern/pybind11/include/pybind11/functional.h +147 -0
- kr326lib-1.0.0/extern/pybind11/include/pybind11/gil.h +203 -0
- kr326lib-1.0.0/extern/pybind11/include/pybind11/gil_safe_call_once.h +273 -0
- kr326lib-1.0.0/extern/pybind11/include/pybind11/gil_simple.h +37 -0
- kr326lib-1.0.0/extern/pybind11/include/pybind11/iostream.h +301 -0
- kr326lib-1.0.0/extern/pybind11/include/pybind11/native_enum.h +76 -0
- kr326lib-1.0.0/extern/pybind11/include/pybind11/numpy.h +2412 -0
- kr326lib-1.0.0/extern/pybind11/include/pybind11/operators.h +202 -0
- kr326lib-1.0.0/extern/pybind11/include/pybind11/options.h +92 -0
- kr326lib-1.0.0/extern/pybind11/include/pybind11/pybind11.h +3962 -0
- kr326lib-1.0.0/extern/pybind11/include/pybind11/pytypes.h +2736 -0
- kr326lib-1.0.0/extern/pybind11/include/pybind11/stl/filesystem.h +114 -0
- kr326lib-1.0.0/extern/pybind11/include/pybind11/stl.h +666 -0
- kr326lib-1.0.0/extern/pybind11/include/pybind11/stl_bind.h +858 -0
- kr326lib-1.0.0/extern/pybind11/include/pybind11/subinterpreter.h +291 -0
- kr326lib-1.0.0/extern/pybind11/include/pybind11/trampoline_self_life_support.h +65 -0
- kr326lib-1.0.0/extern/pybind11/include/pybind11/type_caster_pyobject_ptr.h +61 -0
- kr326lib-1.0.0/extern/pybind11/include/pybind11/typing.h +295 -0
- kr326lib-1.0.0/extern/pybind11/include/pybind11/warnings.h +75 -0
- kr326lib-1.0.0/extern/pybind11/noxfile.py +151 -0
- kr326lib-1.0.0/extern/pybind11/pybind11/__init__.py +19 -0
- kr326lib-1.0.0/extern/pybind11/pybind11/__main__.py +97 -0
- kr326lib-1.0.0/extern/pybind11/pybind11/_version.py +34 -0
- kr326lib-1.0.0/extern/pybind11/pybind11/commands.py +39 -0
- kr326lib-1.0.0/extern/pybind11/pybind11/py.typed +0 -0
- kr326lib-1.0.0/extern/pybind11/pybind11/setup_helpers.py +500 -0
- kr326lib-1.0.0/extern/pybind11/pyproject.toml +215 -0
- kr326lib-1.0.0/extern/pybind11/tests/CMakeLists.txt +694 -0
- kr326lib-1.0.0/extern/pybind11/tests/conftest.py +313 -0
- kr326lib-1.0.0/extern/pybind11/tests/constructor_stats.h +330 -0
- kr326lib-1.0.0/extern/pybind11/tests/cross_module_gil_utils.cpp +111 -0
- kr326lib-1.0.0/extern/pybind11/tests/cross_module_interleaved_error_already_set.cpp +54 -0
- kr326lib-1.0.0/extern/pybind11/tests/custom_exceptions.py +10 -0
- kr326lib-1.0.0/extern/pybind11/tests/eigen_tensor_avoid_stl_array.cpp +16 -0
- kr326lib-1.0.0/extern/pybind11/tests/env.py +76 -0
- kr326lib-1.0.0/extern/pybind11/tests/exo_planet_c_api.cpp +76 -0
- kr326lib-1.0.0/extern/pybind11/tests/exo_planet_pybind11.cpp +19 -0
- kr326lib-1.0.0/extern/pybind11/tests/extra_python_package/pytest.ini +0 -0
- kr326lib-1.0.0/extern/pybind11/tests/extra_python_package/test_files.py +385 -0
- kr326lib-1.0.0/extern/pybind11/tests/extra_setuptools/pytest.ini +0 -0
- kr326lib-1.0.0/extern/pybind11/tests/extra_setuptools/test_setuphelper.py +153 -0
- kr326lib-1.0.0/extern/pybind11/tests/home_planet_very_lonely_traveler.cpp +13 -0
- kr326lib-1.0.0/extern/pybind11/tests/local_bindings.h +93 -0
- kr326lib-1.0.0/extern/pybind11/tests/mod_per_interpreter_gil.cpp +20 -0
- kr326lib-1.0.0/extern/pybind11/tests/mod_per_interpreter_gil_with_singleton.cpp +147 -0
- kr326lib-1.0.0/extern/pybind11/tests/mod_shared_interpreter_gil.cpp +17 -0
- kr326lib-1.0.0/extern/pybind11/tests/object.h +205 -0
- kr326lib-1.0.0/extern/pybind11/tests/pure_cpp/CMakeLists.txt +22 -0
- kr326lib-1.0.0/extern/pybind11/tests/pure_cpp/smart_holder_poc.h +56 -0
- kr326lib-1.0.0/extern/pybind11/tests/pure_cpp/smart_holder_poc_test.cpp +427 -0
- kr326lib-1.0.0/extern/pybind11/tests/pybind11_cross_module_tests.cpp +163 -0
- kr326lib-1.0.0/extern/pybind11/tests/pybind11_tests.cpp +141 -0
- kr326lib-1.0.0/extern/pybind11/tests/pybind11_tests.h +119 -0
- kr326lib-1.0.0/extern/pybind11/tests/pyproject.toml +40 -0
- kr326lib-1.0.0/extern/pybind11/tests/pytest.ini +22 -0
- kr326lib-1.0.0/extern/pybind11/tests/requirements.txt +20 -0
- kr326lib-1.0.0/extern/pybind11/tests/standalone_enum_module.cpp +13 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_async.cpp +25 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_async.py +31 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_buffers.cpp +571 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_buffers.py +471 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_builtin_casters.cpp +393 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_builtin_casters.py +624 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_call_policies.cpp +113 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_call_policies.py +256 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_callbacks.cpp +302 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_callbacks.py +248 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_chrono.cpp +81 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_chrono.py +207 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_class.cpp +700 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_class.py +575 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_class_cross_module_use_after_one_module_dealloc.cpp +23 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_class_cross_module_use_after_one_module_dealloc.py +43 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_class_release_gil_before_calling_cpp_dtor.cpp +54 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_class_release_gil_before_calling_cpp_dtor.py +21 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_class_sh_basic.cpp +248 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_class_sh_basic.py +248 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_class_sh_disowning.cpp +41 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_class_sh_disowning.py +78 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_class_sh_disowning_mi.cpp +85 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_class_sh_disowning_mi.py +246 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_class_sh_factory_constructors.cpp +156 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_class_sh_factory_constructors.py +53 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_class_sh_inheritance.cpp +90 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_class_sh_inheritance.py +63 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_class_sh_mi_thunks.cpp +230 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_class_sh_mi_thunks.py +104 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_class_sh_property.cpp +129 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_class_sh_property.py +218 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_class_sh_property_non_owning.cpp +65 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_class_sh_property_non_owning.py +30 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_class_sh_shared_ptr_copy_move.cpp +103 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_class_sh_shared_ptr_copy_move.py +41 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_class_sh_trampoline_basic.cpp +57 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_class_sh_trampoline_basic.py +35 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_class_sh_trampoline_self_life_support.cpp +86 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_class_sh_trampoline_self_life_support.py +38 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_class_sh_trampoline_shared_from_this.cpp +137 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_class_sh_trampoline_shared_from_this.py +247 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_class_sh_trampoline_shared_ptr_cpp_arg.cpp +92 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_class_sh_trampoline_shared_ptr_cpp_arg.py +154 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_class_sh_trampoline_unique_ptr.cpp +63 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_class_sh_trampoline_unique_ptr.py +31 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_class_sh_unique_ptr_custom_deleter.cpp +30 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_class_sh_unique_ptr_custom_deleter.py +8 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_class_sh_unique_ptr_member.cpp +50 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_class_sh_unique_ptr_member.py +26 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_class_sh_virtual_py_cpp_mix.cpp +58 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_class_sh_virtual_py_cpp_mix.py +66 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_cmake_build/CMakeLists.txt +91 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_cmake_build/embed.cpp +23 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_cmake_build/installed_embed/CMakeLists.txt +19 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_cmake_build/installed_function/CMakeLists.txt +29 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_cmake_build/installed_target/CMakeLists.txt +37 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_cmake_build/main.cpp +6 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_cmake_build/subdirectory_embed/CMakeLists.txt +38 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_cmake_build/subdirectory_function/CMakeLists.txt +32 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_cmake_build/subdirectory_target/CMakeLists.txt +38 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_cmake_build/test.py +10 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_const_name.cpp +55 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_const_name.py +31 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_constants_and_functions.cpp +158 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_constants_and_functions.py +58 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_copy_move.cpp +546 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_copy_move.py +144 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_cpp_conduit.cpp +22 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_cpp_conduit.py +183 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_cpp_conduit_traveler_bindings.h +47 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_cpp_conduit_traveler_types.h +25 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_cross_module_rtti/CMakeLists.txt +70 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_cross_module_rtti/bindings.cpp +20 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_cross_module_rtti/catch.cpp +22 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_cross_module_rtti/lib.cpp +13 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_cross_module_rtti/lib.h +31 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_cross_module_rtti/test_cross_module_rtti.cpp +50 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_custom_type_casters.cpp +217 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_custom_type_casters.py +126 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_custom_type_setup.cpp +104 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_custom_type_setup.py +79 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_docs_advanced_cast_custom.cpp +69 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_docs_advanced_cast_custom.py +40 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_docstring_options.cpp +129 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_docstring_options.py +72 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_eigen_matrix.cpp +448 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_eigen_matrix.py +839 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_eigen_tensor.cpp +18 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_eigen_tensor.inl +338 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_eigen_tensor.py +316 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_enum.cpp +149 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_enum.py +344 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_eval.cpp +118 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_eval.py +52 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_eval_call.py +5 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_exceptions.cpp +427 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_exceptions.h +13 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_exceptions.py +439 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_factory_constructors.cpp +434 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_factory_constructors.py +531 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_gil_scoped.cpp +144 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_gil_scoped.py +294 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_iostream.cpp +162 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_iostream.py +329 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_kwargs_and_defaults.cpp +331 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_kwargs_and_defaults.py +473 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_local_bindings.cpp +131 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_local_bindings.py +291 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_methods_and_attributes.cpp +788 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_methods_and_attributes.py +715 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_modules.cpp +124 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_modules.py +146 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_multiple_inheritance.cpp +341 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_multiple_inheritance.py +500 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_multiple_interpreters.py +437 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_native_enum.cpp +262 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_native_enum.py +377 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_numpy_array.cpp +616 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_numpy_array.py +749 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_numpy_dtypes.cpp +745 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_numpy_dtypes.py +464 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_numpy_scalars.cpp +63 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_numpy_scalars.py +54 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_numpy_vectorize.cpp +137 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_numpy_vectorize.py +319 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_opaque_types.cpp +77 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_opaque_types.py +64 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_operator_overloading.cpp +281 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_operator_overloading.py +161 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_pickling.cpp +191 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_pickling.py +149 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_potentially_slicing_weak_ptr.cpp +170 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_potentially_slicing_weak_ptr.py +174 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_python_multiple_inheritance.cpp +45 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_python_multiple_inheritance.py +36 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_pytorch_shared_ptr_cast_regression.cpp +62 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_pytorch_shared_ptr_cast_regression.py +25 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_pytypes.cpp +1215 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_pytypes.py +1374 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_scoped_critical_section.cpp +274 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_scoped_critical_section.py +30 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_sequences_and_iterators.cpp +600 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_sequences_and_iterators.py +307 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_smart_ptr.cpp +627 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_smart_ptr.py +370 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_standalone_enum_module.py +18 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_stl.cpp +667 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_stl.py +735 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_stl_binders.cpp +275 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_stl_binders.py +414 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_tagbased_polymorphic.cpp +150 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_tagbased_polymorphic.py +30 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_thread.cpp +108 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_thread.py +80 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_type_caster_pyobject_ptr.cpp +168 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_type_caster_pyobject_ptr.py +125 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_type_caster_std_function_specializations.cpp +46 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_type_caster_std_function_specializations.py +15 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_union.cpp +22 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_union.py +10 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_unnamed_namespace_a.cpp +37 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_unnamed_namespace_a.py +33 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_unnamed_namespace_b.cpp +13 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_unnamed_namespace_b.py +7 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_vector_unique_ptr_member.cpp +54 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_vector_unique_ptr_member.py +16 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_virtual_functions.cpp +591 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_virtual_functions.py +468 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_warnings.cpp +46 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_warnings.py +68 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_with_catch/CMakeLists.txt +64 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_with_catch/catch.cpp +175 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_with_catch/catch_skip.h +21 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_with_catch/external_module.cpp +39 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_with_catch/test_args_convert_vector.cpp +80 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_with_catch/test_argument_vector.cpp +94 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_with_catch/test_interpreter.cpp +511 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_with_catch/test_interpreter.py +16 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_with_catch/test_subinterpreter.cpp +579 -0
- kr326lib-1.0.0/extern/pybind11/tests/test_with_catch/test_trampoline.py +18 -0
- kr326lib-1.0.0/extern/pybind11/tests/valgrind-numpy-scipy.supp +140 -0
- kr326lib-1.0.0/extern/pybind11/tests/valgrind-python.supp +117 -0
- kr326lib-1.0.0/extern/pybind11/tools/FindCatch.cmake +74 -0
- kr326lib-1.0.0/extern/pybind11/tools/FindEigen3.cmake +86 -0
- kr326lib-1.0.0/extern/pybind11/tools/FindPythonLibsNew.cmake +320 -0
- kr326lib-1.0.0/extern/pybind11/tools/JoinPaths.cmake +23 -0
- kr326lib-1.0.0/extern/pybind11/tools/check-style.sh +44 -0
- kr326lib-1.0.0/extern/pybind11/tools/cmake_uninstall.cmake.in +23 -0
- kr326lib-1.0.0/extern/pybind11/tools/codespell_ignore_lines_from_errors.py +40 -0
- kr326lib-1.0.0/extern/pybind11/tools/libsize.py +38 -0
- kr326lib-1.0.0/extern/pybind11/tools/make_changelog.py +121 -0
- kr326lib-1.0.0/extern/pybind11/tools/make_global.py +33 -0
- kr326lib-1.0.0/extern/pybind11/tools/pybind11.pc.in +7 -0
- kr326lib-1.0.0/extern/pybind11/tools/pybind11Common.cmake +458 -0
- kr326lib-1.0.0/extern/pybind11/tools/pybind11Config.cmake.in +240 -0
- kr326lib-1.0.0/extern/pybind11/tools/pybind11GuessPythonExtSuffix.cmake +94 -0
- kr326lib-1.0.0/extern/pybind11/tools/pybind11NewTools.cmake +339 -0
- kr326lib-1.0.0/extern/pybind11/tools/pybind11Tools.cmake +217 -0
- kr326lib-1.0.0/extern/pybind11/tools/test-pybind11GuessPythonExtSuffix.cmake +185 -0
- kr326lib-1.0.0/include/chem.hpp +11 -0
- kr326lib-1.0.0/pyproject.toml +49 -0
- kr326lib-1.0.0/src/bindings.cpp +18 -0
- kr326lib-1.0.0/src/chem.cpp +13 -0
- kr326lib-1.0.0/uv.lock +648 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
# Build wheels + sdist and publish to PyPI when a GitHub Release is published.
|
|
4
|
+
# Use workflow_dispatch to dry-run the build (no publish) from any branch.
|
|
5
|
+
on:
|
|
6
|
+
release:
|
|
7
|
+
types: [published]
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
wheels:
|
|
12
|
+
name: Wheels on ${{ matrix.os }}
|
|
13
|
+
runs-on: ${{ matrix.os }}
|
|
14
|
+
strategy:
|
|
15
|
+
fail-fast: false
|
|
16
|
+
matrix:
|
|
17
|
+
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v4
|
|
20
|
+
with:
|
|
21
|
+
submodules: recursive # pybind11 is a submodule
|
|
22
|
+
- uses: pypa/cibuildwheel@v2.21
|
|
23
|
+
# Build selection + test live in [tool.cibuildwheel] in pyproject.toml.
|
|
24
|
+
- uses: actions/upload-artifact@v4
|
|
25
|
+
with:
|
|
26
|
+
name: wheels-${{ matrix.os }}
|
|
27
|
+
path: ./wheelhouse/*.whl
|
|
28
|
+
|
|
29
|
+
sdist:
|
|
30
|
+
name: Source distribution
|
|
31
|
+
runs-on: ubuntu-latest
|
|
32
|
+
steps:
|
|
33
|
+
- uses: actions/checkout@v4
|
|
34
|
+
with:
|
|
35
|
+
submodules: recursive
|
|
36
|
+
- run: pipx run build --sdist
|
|
37
|
+
- uses: actions/upload-artifact@v4
|
|
38
|
+
with:
|
|
39
|
+
name: sdist
|
|
40
|
+
path: dist/*.tar.gz
|
|
41
|
+
|
|
42
|
+
publish:
|
|
43
|
+
name: Publish to PyPI
|
|
44
|
+
needs: [wheels, sdist]
|
|
45
|
+
runs-on: ubuntu-latest
|
|
46
|
+
if: github.event_name == 'release'
|
|
47
|
+
environment: pypi # configure as the trusted publisher on PyPI
|
|
48
|
+
permissions:
|
|
49
|
+
id-token: write # OIDC token for trusted publishing
|
|
50
|
+
steps:
|
|
51
|
+
- uses: actions/download-artifact@v4
|
|
52
|
+
with:
|
|
53
|
+
path: dist
|
|
54
|
+
merge-multiple: true # collect every wheel + the sdist into dist/
|
|
55
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
cmake_minimum_required(VERSION 3.15...4.1)
|
|
2
|
+
project(kr326lib LANGUAGES CXX)
|
|
3
|
+
|
|
4
|
+
# Find Python BEFORE pybind11 so pybind11 builds against this interpreter.
|
|
5
|
+
# Floor of 3.11 (matches requires-python); Development.Module is the right
|
|
6
|
+
# component for building an extension module — no EXACT pin, so wheels can be
|
|
7
|
+
# built for every supported version (cp311–cp313).
|
|
8
|
+
find_package(Python 3.11 REQUIRED COMPONENTS Interpreter Development.Module)
|
|
9
|
+
|
|
10
|
+
add_subdirectory(extern/pybind11)
|
|
11
|
+
|
|
12
|
+
# calclib: target's name (handle for within this file to refer to) STATIC: makes
|
|
13
|
+
# .a file (if SHARED then .so, if INTERFACE it produces nothing, as this
|
|
14
|
+
# indicates we have a header only library) src/calclib.cpp: the source file
|
|
15
|
+
# being compiled into the library include/calc/lib.hpp: only for IDE
|
|
16
|
+
# referencing, no code functionality NOTE: The file will appear as libcalclib.a
|
|
17
|
+
# inside /build, as prefix "lib" is added by CMake, as well as .a on linux
|
|
18
|
+
# systems
|
|
19
|
+
|
|
20
|
+
add_library(chemlib STATIC src/chem.cpp include/chem.hpp)
|
|
21
|
+
|
|
22
|
+
# include contains the .hpp headers needed to satisfy the compiler at
|
|
23
|
+
# compilation time. When calclibs source files (src/calclib.cpp) get compiled
|
|
24
|
+
# the headers are made available via -I include/ (this would also be the case
|
|
25
|
+
# with PRIVATE) Due to keyword PUBLIC, the headers in calclib are also made
|
|
26
|
+
# available with -I include/ to any *target* within this call of *cmake* that
|
|
27
|
+
# links against libcalclib.a
|
|
28
|
+
target_include_directories(chemlib PUBLIC include)
|
|
29
|
+
|
|
30
|
+
# chemlib is a STATIC lib but gets linked into the `chem` shared module, so its
|
|
31
|
+
# objects must be position-independent (-fPIC). Without this the shared module
|
|
32
|
+
# fails to link with "relocation R_X86_64_PC32 ... recompile with -fPIC".
|
|
33
|
+
set_target_properties(chemlib PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
|
34
|
+
|
|
35
|
+
# indicates that the source files that are part of *target* library calclib,
|
|
36
|
+
# later libcalclib.a need to be compiled according to C++11 standard. PUBLIC:
|
|
37
|
+
# means any target linking against libcalclib.a also needs to be compiled under
|
|
38
|
+
# C++11 standards or higher.
|
|
39
|
+
target_compile_features(chemlib PUBLIC cxx_std_11)
|
|
40
|
+
|
|
41
|
+
# Build the Python extension module from the binding glue only.
|
|
42
|
+
# pybind11_add_module creates a SHARED module with the correct name/suffix (e.g.
|
|
43
|
+
# chem.cpython-314-x86_64-linux-gnu.so) and pulls in the Python headers.
|
|
44
|
+
pybind11_add_module(kr326lib src/bindings.cpp)
|
|
45
|
+
|
|
46
|
+
# Link the extension against the pure-C++ static lib so the bindings can call
|
|
47
|
+
# get_P_ideal_gas. PRIVATE: nothing links against a Python module.
|
|
48
|
+
target_link_libraries(kr326lib PRIVATE chemlib)
|
|
49
|
+
|
|
50
|
+
# Install the extension module into the wheel root so `import kr326lib` works.
|
|
51
|
+
# scikit-build-core only packages files placed by install() rules; without this
|
|
52
|
+
# the wheel is empty. DESTINATION "." == top level of site-packages.
|
|
53
|
+
install(TARGETS kr326lib LIBRARY DESTINATION .)
|
|
54
|
+
|
|
55
|
+
# --- Type stub: auto-generated at build time (NOT tracked in git) -----------
|
|
56
|
+
# A compiled .so is opaque to editors, so after the module is linked we run
|
|
57
|
+
# pybind11-stubgen against the freshly-built extension to emit kr326lib.pyi and
|
|
58
|
+
# install it next to the .so. Runs on every build, so the autocomplete/hover
|
|
59
|
+
# docs Python devs see always match the current bindings — no manual step.
|
|
60
|
+
# pybind11-stubgen must be importable by the build interpreter: see pyproject
|
|
61
|
+
# [build-system].requires (wheel builds) and the `dev` extra (editable rebuilds).
|
|
62
|
+
#
|
|
63
|
+
# This step IMPORTS the freshly-built module, so it cannot run when cross-
|
|
64
|
+
# compiling (e.g. macOS universal2 / Linux aarch64 on a different host). Pass
|
|
65
|
+
# -DKR326LIB_STUBS=OFF in that case.
|
|
66
|
+
option(KR326LIB_STUBS "Generate and install the .pyi type stub" ON)
|
|
67
|
+
if(KR326LIB_STUBS)
|
|
68
|
+
set(_stub_out ${CMAKE_CURRENT_BINARY_DIR}/stubs)
|
|
69
|
+
add_custom_command(TARGET kr326lib POST_BUILD
|
|
70
|
+
COMMAND ${CMAKE_COMMAND} -E env "PYTHONPATH=$<TARGET_FILE_DIR:kr326lib>"
|
|
71
|
+
${Python_EXECUTABLE} -m pybind11_stubgen kr326lib -o ${_stub_out}
|
|
72
|
+
BYPRODUCTS ${_stub_out}/kr326lib.pyi
|
|
73
|
+
COMMENT "Generating kr326lib.pyi type stub"
|
|
74
|
+
VERBATIM)
|
|
75
|
+
install(FILES ${_stub_out}/kr326lib.pyi DESTINATION .)
|
|
76
|
+
endif()
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# Contributing to kr326lib
|
|
2
|
+
|
|
3
|
+
`kr326lib` is a C++ library built with CMake and exposed to Python via
|
|
4
|
+
[pybind11](https://pybind11.readthedocs.io/). This guide takes you from a clone
|
|
5
|
+
to a fast edit→run loop and a release wheel.
|
|
6
|
+
|
|
7
|
+
## Project layout
|
|
8
|
+
|
|
9
|
+
| Path | Role |
|
|
10
|
+
| ------------------ | --------------------------- |
|
|
11
|
+
| `include/chem.hpp` | C++ declarations (header) |
|
|
12
|
+
| `src/chem.cpp` | C++ implementation |
|
|
13
|
+
| `src/bindings.cpp` | pybind11 bindings |
|
|
14
|
+
| `CMakeLists.txt` | Build definition |
|
|
15
|
+
| `pyproject.toml` | Packaging / build backend |
|
|
16
|
+
| `extern/pybind11` | Vendored pybind11 submodule |
|
|
17
|
+
|
|
18
|
+
`src/chem.cpp` builds into the `chemlib` static library; `src/bindings.cpp`
|
|
19
|
+
wraps it as the importable `kr326lib` module.
|
|
20
|
+
|
|
21
|
+
## Prerequisites
|
|
22
|
+
|
|
23
|
+
- **Python 3.13** — the build pins this exact version.
|
|
24
|
+
- **A C++ compiler** with C++11 support.
|
|
25
|
+
- **[uv](https://docs.astral.sh/uv/)** — installs CMake and Ninja for you.
|
|
26
|
+
|
|
27
|
+
## Setup (one time)
|
|
28
|
+
|
|
29
|
+
pybind11 is a submodule, so clone recursively (or run
|
|
30
|
+
`git submodule update --init --recursive` inside an existing clone):
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
git clone --recurse-submodules https://github.com/Kai360-dot/kr326lib.git
|
|
34
|
+
cd kr326lib
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Create an editable, auto-rebuilding dev environment:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
uv venv --python 3.13 .venv
|
|
41
|
+
uv pip install scikit-build-core pybind11 cmake ninja # build tools, in the venv
|
|
42
|
+
uv pip install -e ".[dev]" \
|
|
43
|
+
--no-build-isolation \
|
|
44
|
+
--config-settings=editable.rebuild=true \
|
|
45
|
+
--config-settings=build-dir=build/{wheel_tag}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
`editable.rebuild=true` recompiles changed C++ on the next `import`;
|
|
49
|
+
`--no-build-isolation` lets it reuse the build tools installed above.
|
|
50
|
+
|
|
51
|
+
## Debug loop
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
source .venv/bin/activate # once per terminal
|
|
55
|
+
# edit src/*.cpp or include/*.hpp, then:
|
|
56
|
+
python -c "import kr326lib; print(kr326lib.get_P_ideal_gas(1, 300, 0.0224))"
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Importing recompiles automatically when a source file changed (build output
|
|
60
|
+
prints; a failed compile raises on import). That is the whole loop: **edit → run**.
|
|
61
|
+
|
|
62
|
+
**Gotchas**
|
|
63
|
+
|
|
64
|
+
- Run from outside the repo root (or run a real `.py` file): with `python -c`
|
|
65
|
+
the cwd is on `sys.path` and can shadow the installed module.
|
|
66
|
+
- Changed `CMakeLists.txt` (new target / source / dependency)? Re-run the
|
|
67
|
+
`uv pip install -e .` command once. Editing existing sources doesn't need it.
|
|
68
|
+
- Editor autocomplete comes from a type stub generated and installed on every
|
|
69
|
+
build (a `pybind11-stubgen` step in `CMakeLists.txt`); it isn't tracked in git.
|
|
70
|
+
If completion looks stale, restart your language server (interpreter: `.venv`).
|
|
71
|
+
|
|
72
|
+
## Release
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
uv build --wheel # wheel lands in dist/
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
A correct wheel is platform-tagged (e.g. `…-cp313-cp313-linux_x86_64.whl`); a
|
|
79
|
+
`py3-none-any` tag means the C++ was not compiled in. Test it isolated from the
|
|
80
|
+
dev environment:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
uv venv --python 3.13 /tmp/wheeltest
|
|
84
|
+
uv pip install --python /tmp/wheeltest --no-index dist/kr326lib-*.whl
|
|
85
|
+
cd /tmp && /tmp/wheeltest/bin/python -c "import kr326lib; print(kr326lib.get_P_ideal_gas(1, 300, 0.0224))"
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Validate metadata with `twine check dist/*` before publishing.
|
|
89
|
+
|
|
90
|
+
> **PyPI note:** a `linux_x86_64` wheel is rejected by PyPI — Linux binary wheels
|
|
91
|
+
> must be `manylinux`-tagged (build via
|
|
92
|
+
> [`cibuildwheel`](https://cibuildwheel.readthedocs.io/) + `auditwheel`). The
|
|
93
|
+
> sdist (`uv build --sdist`) can always be published.
|
kr326lib-1.0.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Kai Ruth
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
kr326lib-1.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
|
+
Name: kr326lib
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Numerical Library By Kai Ruth (ETH Zurich, Imperial)
|
|
5
|
+
Keywords: numerical,process-engineering,C++,chemistry
|
|
6
|
+
Author-Email: Kai Ruth <contact@kairuth.ch>
|
|
7
|
+
License: MIT License
|
|
8
|
+
|
|
9
|
+
Copyright (c) 2026 Kai Ruth
|
|
10
|
+
|
|
11
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
12
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
13
|
+
in the Software without restriction, including without limitation the rights
|
|
14
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
15
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
16
|
+
furnished to do so, subject to the following conditions:
|
|
17
|
+
|
|
18
|
+
The above copyright notice and this permission notice shall be included in all
|
|
19
|
+
copies or substantial portions of the Software.
|
|
20
|
+
|
|
21
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
22
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
23
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
24
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
25
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
26
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
27
|
+
SOFTWARE.
|
|
28
|
+
|
|
29
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
30
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
31
|
+
Classifier: Operating System :: MacOS
|
|
32
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
33
|
+
Classifier: Programming Language :: C++
|
|
34
|
+
Classifier: Programming Language :: Python :: 3
|
|
35
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
36
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
37
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
38
|
+
Project-URL: Homepage, https://github.com/Kai360-dot/kr326lib
|
|
39
|
+
Requires-Python: >=3.11
|
|
40
|
+
Provides-Extra: dev
|
|
41
|
+
Requires-Dist: black; extra == "dev"
|
|
42
|
+
Requires-Dist: bumpver; extra == "dev"
|
|
43
|
+
Requires-Dist: isort; extra == "dev"
|
|
44
|
+
Requires-Dist: pip-tools; extra == "dev"
|
|
45
|
+
Requires-Dist: pybind11-stubgen; extra == "dev"
|
|
46
|
+
Requires-Dist: pytest; extra == "dev"
|
|
47
|
+
Description-Content-Type: text/markdown
|
|
48
|
+
|
|
49
|
+
# kr326lib
|
|
50
|
+
|
|
51
|
+
Numerical library by Kai Ruth (ETH Zurich, Imperial) — a C++ core with Python
|
|
52
|
+
bindings via [pybind11](https://pybind11.readthedocs.io/).
|
|
53
|
+
|
|
54
|
+
## Install
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
pip install kr326lib
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Usage
|
|
61
|
+
|
|
62
|
+
```python
|
|
63
|
+
import kr326lib
|
|
64
|
+
|
|
65
|
+
# Ideal gas law (SI units; temperature in kelvin).
|
|
66
|
+
P = kr326lib.get_P_ideal_gas(n=1.0, T=300.0, V=0.0224) # pressure [Pa]
|
|
67
|
+
V = kr326lib.get_V_ideal_gas(n=1.0, T=300.0, P=101325) # volume [m^3]
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Building from source or contributing? See [CONTRIBUTING.md](CONTRIBUTING.md).
|
kr326lib-1.0.0/README.md
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# kr326lib
|
|
2
|
+
|
|
3
|
+
Numerical library by Kai Ruth (ETH Zurich, Imperial) — a C++ core with Python
|
|
4
|
+
bindings via [pybind11](https://pybind11.readthedocs.io/).
|
|
5
|
+
|
|
6
|
+
## Install
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
pip install kr326lib
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Usage
|
|
13
|
+
|
|
14
|
+
```python
|
|
15
|
+
import kr326lib
|
|
16
|
+
|
|
17
|
+
# Ideal gas law (SI units; temperature in kelvin).
|
|
18
|
+
P = kr326lib.get_P_ideal_gas(n=1.0, T=300.0, V=0.0224) # pressure [Pa]
|
|
19
|
+
V = kr326lib.get_V_ideal_gas(n=1.0, T=300.0, P=101325) # volume [m^3]
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Building from source or contributing? See [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
version: 1.0.{build}
|
|
2
|
+
image:
|
|
3
|
+
- Visual Studio 2017
|
|
4
|
+
test: off
|
|
5
|
+
skip_branch_with_pr: true
|
|
6
|
+
build:
|
|
7
|
+
parallel: true
|
|
8
|
+
platform:
|
|
9
|
+
- x86
|
|
10
|
+
environment:
|
|
11
|
+
matrix:
|
|
12
|
+
- PYTHON: 38
|
|
13
|
+
CONFIG: Debug
|
|
14
|
+
install:
|
|
15
|
+
- ps: |
|
|
16
|
+
$env:CMAKE_GENERATOR = "Visual Studio 15 2017"
|
|
17
|
+
if ($env:PLATFORM -eq "x64") { $env:PYTHON = "$env:PYTHON-x64" }
|
|
18
|
+
$env:PATH = "C:\Python$env:PYTHON\;C:\Python$env:PYTHON\Scripts\;$env:PATH"
|
|
19
|
+
python -W ignore -m pip install --upgrade pip wheel
|
|
20
|
+
python -W ignore -m pip install pytest numpy --no-warn-script-location pytest-timeout
|
|
21
|
+
- ps: |
|
|
22
|
+
Start-FileDownload 'https://gitlab.com/libeigen/eigen/-/archive/3.3.7/eigen-3.3.7.zip'
|
|
23
|
+
7z x eigen-3.3.7.zip -y > $null
|
|
24
|
+
$env:CMAKE_INCLUDE_PATH = "eigen-3.3.7;$env:CMAKE_INCLUDE_PATH"
|
|
25
|
+
build_script:
|
|
26
|
+
- cmake -G "%CMAKE_GENERATOR%" -A "%CMAKE_ARCH%"
|
|
27
|
+
-DCMAKE_CXX_STANDARD=14
|
|
28
|
+
-DPYBIND11_WERROR=ON
|
|
29
|
+
-DDOWNLOAD_CATCH=ON
|
|
30
|
+
-DCMAKE_SUPPRESS_REGENERATION=1
|
|
31
|
+
.
|
|
32
|
+
- set MSBuildLogger="C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
|
|
33
|
+
- cmake --build . --config %CONFIG% --target pytest -- /m /v:m /logger:%MSBuildLogger%
|
|
34
|
+
- cmake --build . --config %CONFIG% --target cpptest -- /m /v:m /logger:%MSBuildLogger%
|
|
35
|
+
on_failure: if exist "tests\test_cmake_build" type tests\test_cmake_build\*.log*
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
# See all possible options and defaults with:
|
|
3
|
+
# clang-format --style=llvm --dump-config
|
|
4
|
+
BasedOnStyle: LLVM
|
|
5
|
+
AccessModifierOffset: -4
|
|
6
|
+
AllowShortLambdasOnASingleLine: true
|
|
7
|
+
AlwaysBreakTemplateDeclarations: Yes
|
|
8
|
+
BinPackArguments: false
|
|
9
|
+
BinPackParameters: false
|
|
10
|
+
BreakBeforeBinaryOperators: All
|
|
11
|
+
BreakConstructorInitializers: BeforeColon
|
|
12
|
+
ColumnLimit: 99
|
|
13
|
+
CommentPragmas: 'NOLINT:.*|^ IWYU pragma:'
|
|
14
|
+
IncludeBlocks: Regroup
|
|
15
|
+
IndentCaseLabels: true
|
|
16
|
+
IndentPPDirectives: AfterHash
|
|
17
|
+
IndentWidth: 4
|
|
18
|
+
Language: Cpp
|
|
19
|
+
SpaceAfterCStyleCast: true
|
|
20
|
+
Standard: Cpp11
|
|
21
|
+
StatementMacros: ['PyObject_HEAD']
|
|
22
|
+
TabWidth: 4
|
|
23
|
+
IncludeCategories:
|
|
24
|
+
- Regex: '<pybind11/.*'
|
|
25
|
+
Priority: -1
|
|
26
|
+
- Regex: 'pybind11.h"$'
|
|
27
|
+
Priority: 1
|
|
28
|
+
- Regex: '^".*/?detail/'
|
|
29
|
+
Priority: 1
|
|
30
|
+
SortPriority: 2
|
|
31
|
+
- Regex: '^"'
|
|
32
|
+
Priority: 1
|
|
33
|
+
SortPriority: 3
|
|
34
|
+
- Regex: '<[[:alnum:]._]+>'
|
|
35
|
+
Priority: 4
|
|
36
|
+
- Regex: '.*'
|
|
37
|
+
Priority: 5
|
|
38
|
+
...
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
FormatStyle: file
|
|
2
|
+
|
|
3
|
+
Checks: |
|
|
4
|
+
*bugprone*,
|
|
5
|
+
*performance*,
|
|
6
|
+
clang-analyzer-optin.cplusplus.VirtualCall,
|
|
7
|
+
clang-analyzer-optin.performance.Padding,
|
|
8
|
+
cppcoreguidelines-init-variables,
|
|
9
|
+
cppcoreguidelines-prefer-member-initializer,
|
|
10
|
+
cppcoreguidelines-pro-type-static-cast-downcast,
|
|
11
|
+
cppcoreguidelines-slicing,
|
|
12
|
+
google-explicit-constructor,
|
|
13
|
+
llvm-namespace-comment,
|
|
14
|
+
misc-definitions-in-headers,
|
|
15
|
+
misc-misplaced-const,
|
|
16
|
+
misc-non-copyable-objects,
|
|
17
|
+
misc-static-assert,
|
|
18
|
+
misc-throw-by-value-catch-by-reference,
|
|
19
|
+
misc-uniqueptr-reset-release,
|
|
20
|
+
misc-unused-parameters,
|
|
21
|
+
modernize-avoid-bind,
|
|
22
|
+
modernize-loop-convert,
|
|
23
|
+
modernize-make-shared,
|
|
24
|
+
modernize-redundant-void-arg,
|
|
25
|
+
modernize-replace-auto-ptr,
|
|
26
|
+
modernize-replace-disallow-copy-and-assign-macro,
|
|
27
|
+
modernize-replace-random-shuffle,
|
|
28
|
+
modernize-shrink-to-fit,
|
|
29
|
+
modernize-use-auto,
|
|
30
|
+
modernize-use-bool-literals,
|
|
31
|
+
modernize-use-default-member-init,
|
|
32
|
+
modernize-use-emplace,
|
|
33
|
+
modernize-use-equals-default,
|
|
34
|
+
modernize-use-equals-delete,
|
|
35
|
+
modernize-use-noexcept,
|
|
36
|
+
modernize-use-nullptr,
|
|
37
|
+
modernize-use-override,
|
|
38
|
+
modernize-use-using,
|
|
39
|
+
readability-avoid-const-params-in-decls,
|
|
40
|
+
readability-braces-around-statements,
|
|
41
|
+
readability-const-return-type,
|
|
42
|
+
readability-container-size-empty,
|
|
43
|
+
readability-delete-null-pointer,
|
|
44
|
+
readability-else-after-return,
|
|
45
|
+
readability-implicit-bool-conversion,
|
|
46
|
+
readability-inconsistent-declaration-parameter-name,
|
|
47
|
+
readability-make-member-function-const,
|
|
48
|
+
readability-misplaced-array-index,
|
|
49
|
+
readability-non-const-parameter,
|
|
50
|
+
readability-qualified-auto,
|
|
51
|
+
readability-redundant-casting,
|
|
52
|
+
readability-redundant-function-ptr-dereference,
|
|
53
|
+
readability-redundant-inline-specifier,
|
|
54
|
+
readability-redundant-member-init,
|
|
55
|
+
readability-redundant-smartptr-get,
|
|
56
|
+
readability-redundant-string-cstr,
|
|
57
|
+
readability-simplify-subscript-expr,
|
|
58
|
+
readability-static-accessed-through-instance,
|
|
59
|
+
readability-static-definition-in-anonymous-namespace,
|
|
60
|
+
readability-string-compare,
|
|
61
|
+
readability-suspicious-call-argument,
|
|
62
|
+
readability-uniqueptr-delete-release,
|
|
63
|
+
-bugprone-chained-comparison,
|
|
64
|
+
-bugprone-easily-swappable-parameters,
|
|
65
|
+
-bugprone-exception-escape,
|
|
66
|
+
-bugprone-reserved-identifier,
|
|
67
|
+
-bugprone-unused-raii,
|
|
68
|
+
-performance-enum-size,
|
|
69
|
+
-performance-inefficient-string-concatenation,
|
|
70
|
+
|
|
71
|
+
CheckOptions:
|
|
72
|
+
- key: modernize-use-equals-default.IgnoreMacros
|
|
73
|
+
value: false
|
|
74
|
+
- key: performance-for-range-copy.WarnOnAllAutoCopies
|
|
75
|
+
value: true
|
|
76
|
+
- key: performance-inefficient-string-concatenation.StrictMode
|
|
77
|
+
value: true
|
|
78
|
+
- key: performance-unnecessary-value-param.AllowedTypes
|
|
79
|
+
value: 'exception_ptr$;'
|
|
80
|
+
- key: readability-implicit-bool-conversion.AllowPointerConditions
|
|
81
|
+
value: true
|
|
82
|
+
|
|
83
|
+
HeaderFilterRegex: 'pybind11/.*h'
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
parse:
|
|
2
|
+
additional_commands:
|
|
3
|
+
pybind11_add_module:
|
|
4
|
+
flags:
|
|
5
|
+
- THIN_LTO
|
|
6
|
+
- MODULE
|
|
7
|
+
- SHARED
|
|
8
|
+
- NO_EXTRAS
|
|
9
|
+
- EXCLUDE_FROM_ALL
|
|
10
|
+
- SYSTEM
|
|
11
|
+
|
|
12
|
+
format:
|
|
13
|
+
line_width: 99
|
|
14
|
+
tab_size: 2
|
|
15
|
+
|
|
16
|
+
# If an argument group contains more than this many sub-groups
|
|
17
|
+
# (parg or kwarg groups) then force it to a vertical layout.
|
|
18
|
+
max_subgroups_hwrap: 2
|
|
19
|
+
|
|
20
|
+
# If a positional argument group contains more than this many
|
|
21
|
+
# arguments, then force it to a vertical layout.
|
|
22
|
+
max_pargs_hwrap: 6
|
|
23
|
+
|
|
24
|
+
# If a cmdline positional group consumes more than this many
|
|
25
|
+
# lines without nesting, then invalidate the layout (and nest)
|
|
26
|
+
max_rows_cmdline: 2
|
|
27
|
+
separate_ctrl_name_with_space: false
|
|
28
|
+
separate_fn_name_with_space: false
|
|
29
|
+
dangle_parens: false
|
|
30
|
+
|
|
31
|
+
# If the trailing parenthesis must be 'dangled' on its on
|
|
32
|
+
# 'line, then align it to this reference: `prefix`: the start'
|
|
33
|
+
# 'of the statement, `prefix-indent`: the start of the'
|
|
34
|
+
# 'statement, plus one indentation level, `child`: align to'
|
|
35
|
+
# the column of the arguments
|
|
36
|
+
dangle_align: prefix
|
|
37
|
+
# If the statement spelling length (including space and
|
|
38
|
+
# parenthesis) is smaller than this amount, then force reject
|
|
39
|
+
# nested layouts.
|
|
40
|
+
min_prefix_chars: 4
|
|
41
|
+
|
|
42
|
+
# If the statement spelling length (including space and
|
|
43
|
+
# parenthesis) is larger than the tab width by more than this
|
|
44
|
+
# amount, then force reject un-nested layouts.
|
|
45
|
+
max_prefix_chars: 10
|
|
46
|
+
|
|
47
|
+
# If a candidate layout is wrapped horizontally but it exceeds
|
|
48
|
+
# this many lines, then reject the layout.
|
|
49
|
+
max_lines_hwrap: 2
|
|
50
|
+
|
|
51
|
+
line_ending: unix
|
|
52
|
+
|
|
53
|
+
# Format command names consistently as 'lower' or 'upper' case
|
|
54
|
+
command_case: canonical
|
|
55
|
+
|
|
56
|
+
# Format keywords consistently as 'lower' or 'upper' case
|
|
57
|
+
# unchanged is valid too
|
|
58
|
+
keyword_case: 'upper'
|
|
59
|
+
|
|
60
|
+
# A list of command names which should always be wrapped
|
|
61
|
+
always_wrap: []
|
|
62
|
+
|
|
63
|
+
# If true, the argument lists which are known to be sortable
|
|
64
|
+
# will be sorted lexicographically
|
|
65
|
+
enable_sort: true
|
|
66
|
+
|
|
67
|
+
# If true, the parsers may infer whether or not an argument
|
|
68
|
+
# list is sortable (without annotation).
|
|
69
|
+
autosort: false
|
|
70
|
+
|
|
71
|
+
# Causes a few issues - can be solved later, possibly.
|
|
72
|
+
markup:
|
|
73
|
+
enable_markup: false
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
template <op_id id, op_type ot, typename L = undefined_t, typename R = undefined_t>
|
|
2
|
+
template <typename ThisT>
|
|
3
|
+
auto &this_ = static_cast<ThisT &>(*this);
|
|
4
|
+
if (load_impl<ThisT>(temp, false)) {
|
|
5
|
+
return load_impl<ThisT>(src, false);
|
|
6
|
+
ssize_t nd = 0;
|
|
7
|
+
auto trivial = broadcast(buffers, nd, shape);
|
|
8
|
+
auto ndim = (size_t) nd;
|
|
9
|
+
int nd;
|
|
10
|
+
ssize_t ndim() const { return detail::array_proxy(m_ptr)->nd; }
|
|
11
|
+
using op = op_impl<id, ot, Base, L_type, R_type>;
|
|
12
|
+
template <op_id id, op_type ot, typename L, typename R>
|
|
13
|
+
template <detail::op_id id, detail::op_type ot, typename L, typename R, typename... Extra>
|
|
14
|
+
class_ &def(const detail::op_<id, ot, L, R> &op, const Extra &...extra) {
|
|
15
|
+
class_ &def_cast(const detail::op_<id, ot, L, R> &op, const Extra &...extra) {
|
|
16
|
+
int valu;
|
|
17
|
+
explicit movable_int(int v) : valu{v} {}
|
|
18
|
+
movable_int(movable_int &&other) noexcept : valu(other.valu) { other.valu = 91; }
|
|
19
|
+
explicit indestructible_int(int v) : valu{v} {}
|
|
20
|
+
REQUIRE(hld.as_raw_ptr_unowned<zombie>()->valu == 19);
|
|
21
|
+
REQUIRE(othr.valu == 19);
|
|
22
|
+
REQUIRE(orig.valu == 91);
|
|
23
|
+
(m.pass_valu, "Valu", "pass_valu:Valu(_MvCtor)*_CpCtor"),
|
|
24
|
+
atyp_valu rtrn_valu() { atyp_valu obj{"Valu"}; return obj; }
|
|
25
|
+
assert m.atyp_valu().get_mtxt() == "Valu"
|
|
26
|
+
// valu(e), ref(erence), ptr or p (pointer), r = rvalue, m = mutable, c = const,
|
|
27
|
+
@pytest.mark.parametrize("access", ["ro", "rw", "static_ro", "static_rw"])
|
|
28
|
+
struct IntStruct {
|
|
29
|
+
explicit IntStruct(int v) : value(v){};
|
|
30
|
+
~IntStruct() { value = -value; }
|
|
31
|
+
IntStruct(const IntStruct &) = default;
|
|
32
|
+
IntStruct &operator=(const IntStruct &) = default;
|
|
33
|
+
py::class_<IntStruct>(m, "IntStruct").def(py::init([](const int i) { return IntStruct(i); }));
|
|
34
|
+
py::implicitly_convertible<int, IntStruct>();
|
|
35
|
+
m.def("test", [](int expected, const IntStruct &in) {
|
|
36
|
+
[](int expected, const IntStruct &in) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
docs/*.svg binary
|