stablebear 0.4.2__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.
Files changed (313) hide show
  1. stablebear-0.4.2/3rd/pybind11/CMakeLists.txt +425 -0
  2. stablebear-0.4.2/3rd/pybind11/CMakePresets.json +93 -0
  3. stablebear-0.4.2/3rd/pybind11/LICENSE +29 -0
  4. stablebear-0.4.2/3rd/pybind11/README.rst +215 -0
  5. stablebear-0.4.2/3rd/pybind11/SECURITY.md +13 -0
  6. stablebear-0.4.2/3rd/pybind11/include/pybind11/attr.h +730 -0
  7. stablebear-0.4.2/3rd/pybind11/include/pybind11/buffer_info.h +209 -0
  8. stablebear-0.4.2/3rd/pybind11/include/pybind11/cast.h +2433 -0
  9. stablebear-0.4.2/3rd/pybind11/include/pybind11/chrono.h +228 -0
  10. stablebear-0.4.2/3rd/pybind11/include/pybind11/common.h +2 -0
  11. stablebear-0.4.2/3rd/pybind11/include/pybind11/complex.h +93 -0
  12. stablebear-0.4.2/3rd/pybind11/include/pybind11/conduit/README.txt +15 -0
  13. stablebear-0.4.2/3rd/pybind11/include/pybind11/conduit/pybind11_conduit_v1.h +116 -0
  14. stablebear-0.4.2/3rd/pybind11/include/pybind11/conduit/pybind11_platform_abi_id.h +87 -0
  15. stablebear-0.4.2/3rd/pybind11/include/pybind11/conduit/wrap_include_python_h.h +72 -0
  16. stablebear-0.4.2/3rd/pybind11/include/pybind11/critical_section.h +56 -0
  17. stablebear-0.4.2/3rd/pybind11/include/pybind11/detail/argument_vector.h +417 -0
  18. stablebear-0.4.2/3rd/pybind11/include/pybind11/detail/class.h +836 -0
  19. stablebear-0.4.2/3rd/pybind11/include/pybind11/detail/common.h +1357 -0
  20. stablebear-0.4.2/3rd/pybind11/include/pybind11/detail/cpp_conduit.h +75 -0
  21. stablebear-0.4.2/3rd/pybind11/include/pybind11/detail/descr.h +226 -0
  22. stablebear-0.4.2/3rd/pybind11/include/pybind11/detail/dynamic_raw_ptr_cast_if_possible.h +39 -0
  23. stablebear-0.4.2/3rd/pybind11/include/pybind11/detail/exception_translation.h +71 -0
  24. stablebear-0.4.2/3rd/pybind11/include/pybind11/detail/function_record_pyobject.h +192 -0
  25. stablebear-0.4.2/3rd/pybind11/include/pybind11/detail/holder_caster_foreign_helpers.h +86 -0
  26. stablebear-0.4.2/3rd/pybind11/include/pybind11/detail/init.h +544 -0
  27. stablebear-0.4.2/3rd/pybind11/include/pybind11/detail/internals.h +1077 -0
  28. stablebear-0.4.2/3rd/pybind11/include/pybind11/detail/native_enum_data.h +227 -0
  29. stablebear-0.4.2/3rd/pybind11/include/pybind11/detail/pybind11_namespace_macros.h +82 -0
  30. stablebear-0.4.2/3rd/pybind11/include/pybind11/detail/struct_smart_holder.h +398 -0
  31. stablebear-0.4.2/3rd/pybind11/include/pybind11/detail/type_caster_base.h +1711 -0
  32. stablebear-0.4.2/3rd/pybind11/include/pybind11/detail/typeid.h +65 -0
  33. stablebear-0.4.2/3rd/pybind11/include/pybind11/detail/using_smart_holder.h +22 -0
  34. stablebear-0.4.2/3rd/pybind11/include/pybind11/detail/value_and_holder.h +92 -0
  35. stablebear-0.4.2/3rd/pybind11/include/pybind11/eigen/common.h +9 -0
  36. stablebear-0.4.2/3rd/pybind11/include/pybind11/eigen/matrix.h +723 -0
  37. stablebear-0.4.2/3rd/pybind11/include/pybind11/eigen/tensor.h +520 -0
  38. stablebear-0.4.2/3rd/pybind11/include/pybind11/eigen.h +12 -0
  39. stablebear-0.4.2/3rd/pybind11/include/pybind11/embed.h +320 -0
  40. stablebear-0.4.2/3rd/pybind11/include/pybind11/eval.h +161 -0
  41. stablebear-0.4.2/3rd/pybind11/include/pybind11/functional.h +147 -0
  42. stablebear-0.4.2/3rd/pybind11/include/pybind11/gil.h +203 -0
  43. stablebear-0.4.2/3rd/pybind11/include/pybind11/gil_safe_call_once.h +273 -0
  44. stablebear-0.4.2/3rd/pybind11/include/pybind11/gil_simple.h +37 -0
  45. stablebear-0.4.2/3rd/pybind11/include/pybind11/iostream.h +265 -0
  46. stablebear-0.4.2/3rd/pybind11/include/pybind11/native_enum.h +76 -0
  47. stablebear-0.4.2/3rd/pybind11/include/pybind11/numpy.h +2330 -0
  48. stablebear-0.4.2/3rd/pybind11/include/pybind11/operators.h +202 -0
  49. stablebear-0.4.2/3rd/pybind11/include/pybind11/options.h +92 -0
  50. stablebear-0.4.2/3rd/pybind11/include/pybind11/pybind11.h +3746 -0
  51. stablebear-0.4.2/3rd/pybind11/include/pybind11/pytypes.h +2738 -0
  52. stablebear-0.4.2/3rd/pybind11/include/pybind11/stl/filesystem.h +114 -0
  53. stablebear-0.4.2/3rd/pybind11/include/pybind11/stl.h +666 -0
  54. stablebear-0.4.2/3rd/pybind11/include/pybind11/stl_bind.h +858 -0
  55. stablebear-0.4.2/3rd/pybind11/include/pybind11/subinterpreter.h +291 -0
  56. stablebear-0.4.2/3rd/pybind11/include/pybind11/trampoline_self_life_support.h +65 -0
  57. stablebear-0.4.2/3rd/pybind11/include/pybind11/type_caster_pyobject_ptr.h +61 -0
  58. stablebear-0.4.2/3rd/pybind11/include/pybind11/typing.h +295 -0
  59. stablebear-0.4.2/3rd/pybind11/include/pybind11/warnings.h +75 -0
  60. stablebear-0.4.2/3rd/pybind11/tools/FindCatch.cmake +74 -0
  61. stablebear-0.4.2/3rd/pybind11/tools/FindEigen3.cmake +86 -0
  62. stablebear-0.4.2/3rd/pybind11/tools/FindPythonLibsNew.cmake +320 -0
  63. stablebear-0.4.2/3rd/pybind11/tools/JoinPaths.cmake +23 -0
  64. stablebear-0.4.2/3rd/pybind11/tools/check-style.sh +44 -0
  65. stablebear-0.4.2/3rd/pybind11/tools/cmake_uninstall.cmake.in +23 -0
  66. stablebear-0.4.2/3rd/pybind11/tools/codespell_ignore_lines_from_errors.py +40 -0
  67. stablebear-0.4.2/3rd/pybind11/tools/libsize.py +38 -0
  68. stablebear-0.4.2/3rd/pybind11/tools/make_changelog.py +121 -0
  69. stablebear-0.4.2/3rd/pybind11/tools/make_global.py +33 -0
  70. stablebear-0.4.2/3rd/pybind11/tools/pybind11.pc.in +7 -0
  71. stablebear-0.4.2/3rd/pybind11/tools/pybind11Common.cmake +458 -0
  72. stablebear-0.4.2/3rd/pybind11/tools/pybind11Config.cmake.in +240 -0
  73. stablebear-0.4.2/3rd/pybind11/tools/pybind11GuessPythonExtSuffix.cmake +94 -0
  74. stablebear-0.4.2/3rd/pybind11/tools/pybind11NewTools.cmake +339 -0
  75. stablebear-0.4.2/3rd/pybind11/tools/pybind11Tools.cmake +217 -0
  76. stablebear-0.4.2/3rd/pybind11/tools/test-pybind11GuessPythonExtSuffix.cmake +185 -0
  77. stablebear-0.4.2/3rd/taskflow/CMakeLists.txt +380 -0
  78. stablebear-0.4.2/3rd/taskflow/LICENSE +25 -0
  79. stablebear-0.4.2/3rd/taskflow/README.md +438 -0
  80. stablebear-0.4.2/3rd/taskflow/TaskflowConfig.cmake.in +13 -0
  81. stablebear-0.4.2/3rd/taskflow/cmake/Atomic/CheckAtomic.cmake +157 -0
  82. stablebear-0.4.2/3rd/taskflow/cmake/Atomic/LICENSE +39 -0
  83. stablebear-0.4.2/3rd/taskflow/cmake/cuda/modules/FindcuBLAS.cmake +82 -0
  84. stablebear-0.4.2/3rd/taskflow/modules/CMakeLists.txt +29 -0
  85. stablebear-0.4.2/3rd/taskflow/modules/tf.algorithm.cppm +59 -0
  86. stablebear-0.4.2/3rd/taskflow/modules/tf.core.cppm +92 -0
  87. stablebear-0.4.2/3rd/taskflow/modules/tf.cppm +14 -0
  88. stablebear-0.4.2/3rd/taskflow/modules/tf.cuda.cppm +152 -0
  89. stablebear-0.4.2/3rd/taskflow/modules/tf.utility.cppm +138 -0
  90. stablebear-0.4.2/3rd/taskflow/taskflow/algorithm/algorithm.hpp +14 -0
  91. stablebear-0.4.2/3rd/taskflow/taskflow/algorithm/data_pipeline.hpp +639 -0
  92. stablebear-0.4.2/3rd/taskflow/taskflow/algorithm/find.hpp +495 -0
  93. stablebear-0.4.2/3rd/taskflow/taskflow/algorithm/for_each.hpp +233 -0
  94. stablebear-0.4.2/3rd/taskflow/taskflow/algorithm/module.hpp +77 -0
  95. stablebear-0.4.2/3rd/taskflow/taskflow/algorithm/partitioner.hpp +832 -0
  96. stablebear-0.4.2/3rd/taskflow/taskflow/algorithm/pipeline.hpp +1232 -0
  97. stablebear-0.4.2/3rd/taskflow/taskflow/algorithm/reduce.hpp +538 -0
  98. stablebear-0.4.2/3rd/taskflow/taskflow/algorithm/scan.hpp +701 -0
  99. stablebear-0.4.2/3rd/taskflow/taskflow/algorithm/sort.hpp +650 -0
  100. stablebear-0.4.2/3rd/taskflow/taskflow/algorithm/transform.hpp +186 -0
  101. stablebear-0.4.2/3rd/taskflow/taskflow/core/async.hpp +440 -0
  102. stablebear-0.4.2/3rd/taskflow/taskflow/core/async_task.hpp +295 -0
  103. stablebear-0.4.2/3rd/taskflow/taskflow/core/atomic_notifier.hpp +176 -0
  104. stablebear-0.4.2/3rd/taskflow/taskflow/core/declarations.hpp +63 -0
  105. stablebear-0.4.2/3rd/taskflow/taskflow/core/environment.hpp +8 -0
  106. stablebear-0.4.2/3rd/taskflow/taskflow/core/error.hpp +98 -0
  107. stablebear-0.4.2/3rd/taskflow/taskflow/core/executor.hpp +2405 -0
  108. stablebear-0.4.2/3rd/taskflow/taskflow/core/flow_builder.hpp +1579 -0
  109. stablebear-0.4.2/3rd/taskflow/taskflow/core/freelist.hpp +190 -0
  110. stablebear-0.4.2/3rd/taskflow/taskflow/core/graph.hpp +977 -0
  111. stablebear-0.4.2/3rd/taskflow/taskflow/core/nonblocking_notifier.hpp +641 -0
  112. stablebear-0.4.2/3rd/taskflow/taskflow/core/observer.hpp +1052 -0
  113. stablebear-0.4.2/3rd/taskflow/taskflow/core/runtime.hpp +1013 -0
  114. stablebear-0.4.2/3rd/taskflow/taskflow/core/semaphore.hpp +188 -0
  115. stablebear-0.4.2/3rd/taskflow/taskflow/core/task.hpp +1372 -0
  116. stablebear-0.4.2/3rd/taskflow/taskflow/core/task_group.hpp +909 -0
  117. stablebear-0.4.2/3rd/taskflow/taskflow/core/taskflow.hpp +713 -0
  118. stablebear-0.4.2/3rd/taskflow/taskflow/core/topology.hpp +17 -0
  119. stablebear-0.4.2/3rd/taskflow/taskflow/core/worker.hpp +325 -0
  120. stablebear-0.4.2/3rd/taskflow/taskflow/core/wsq.hpp +959 -0
  121. stablebear-0.4.2/3rd/taskflow/taskflow/cuda/algorithm/find.hpp +294 -0
  122. stablebear-0.4.2/3rd/taskflow/taskflow/cuda/algorithm/for_each.hpp +109 -0
  123. stablebear-0.4.2/3rd/taskflow/taskflow/cuda/algorithm/matmul.hpp +57 -0
  124. stablebear-0.4.2/3rd/taskflow/taskflow/cuda/algorithm/merge.hpp +585 -0
  125. stablebear-0.4.2/3rd/taskflow/taskflow/cuda/algorithm/reduce.hpp +460 -0
  126. stablebear-0.4.2/3rd/taskflow/taskflow/cuda/algorithm/scan.hpp +488 -0
  127. stablebear-0.4.2/3rd/taskflow/taskflow/cuda/algorithm/single_task.hpp +36 -0
  128. stablebear-0.4.2/3rd/taskflow/taskflow/cuda/algorithm/sort.hpp +506 -0
  129. stablebear-0.4.2/3rd/taskflow/taskflow/cuda/algorithm/transform.hpp +126 -0
  130. stablebear-0.4.2/3rd/taskflow/taskflow/cuda/algorithm/transpose.hpp +41 -0
  131. stablebear-0.4.2/3rd/taskflow/taskflow/cuda/cuda_capturer.hpp +732 -0
  132. stablebear-0.4.2/3rd/taskflow/taskflow/cuda/cuda_device.hpp +338 -0
  133. stablebear-0.4.2/3rd/taskflow/taskflow/cuda/cuda_error.hpp +34 -0
  134. stablebear-0.4.2/3rd/taskflow/taskflow/cuda/cuda_execution_policy.hpp +136 -0
  135. stablebear-0.4.2/3rd/taskflow/taskflow/cuda/cuda_graph.hpp +1126 -0
  136. stablebear-0.4.2/3rd/taskflow/taskflow/cuda/cuda_graph_exec.hpp +384 -0
  137. stablebear-0.4.2/3rd/taskflow/taskflow/cuda/cuda_memory.hpp +839 -0
  138. stablebear-0.4.2/3rd/taskflow/taskflow/cuda/cuda_meta.hpp +452 -0
  139. stablebear-0.4.2/3rd/taskflow/taskflow/cuda/cuda_optimizer.hpp +404 -0
  140. stablebear-0.4.2/3rd/taskflow/taskflow/cuda/cuda_stream.hpp +345 -0
  141. stablebear-0.4.2/3rd/taskflow/taskflow/cuda/cudaflow.hpp +27 -0
  142. stablebear-0.4.2/3rd/taskflow/taskflow/taskflow.hpp +98 -0
  143. stablebear-0.4.2/3rd/taskflow/taskflow/utility/iterator.hpp +241 -0
  144. stablebear-0.4.2/3rd/taskflow/taskflow/utility/lazy_string.hpp +73 -0
  145. stablebear-0.4.2/3rd/taskflow/taskflow/utility/macros.hpp +41 -0
  146. stablebear-0.4.2/3rd/taskflow/taskflow/utility/math.hpp +396 -0
  147. stablebear-0.4.2/3rd/taskflow/taskflow/utility/mpmc.hpp +508 -0
  148. stablebear-0.4.2/3rd/taskflow/taskflow/utility/object_pool.hpp +774 -0
  149. stablebear-0.4.2/3rd/taskflow/taskflow/utility/os.hpp +241 -0
  150. stablebear-0.4.2/3rd/taskflow/taskflow/utility/serializer.hpp +1135 -0
  151. stablebear-0.4.2/3rd/taskflow/taskflow/utility/small_vector.hpp +1056 -0
  152. stablebear-0.4.2/3rd/taskflow/taskflow/utility/stream.hpp +32 -0
  153. stablebear-0.4.2/3rd/taskflow/taskflow/utility/traits.hpp +318 -0
  154. stablebear-0.4.2/3rd/taskflow/taskflow/utility/uuid.hpp +235 -0
  155. stablebear-0.4.2/CMakeLists.txt +1241 -0
  156. stablebear-0.4.2/CMakePresets.json +49 -0
  157. stablebear-0.4.2/LICENSE.rst +464 -0
  158. stablebear-0.4.2/PKG-INFO +63 -0
  159. stablebear-0.4.2/README.md +39 -0
  160. stablebear-0.4.2/cmake/clean_stablebear.cmake +32 -0
  161. stablebear-0.4.2/context7.json +5 -0
  162. stablebear-0.4.2/include/sbear/algorithm.hpp +25 -0
  163. stablebear-0.4.2/include/sbear/algorithms/functional/apply_functional.hpp +129 -0
  164. stablebear-0.4.2/include/sbear/algorithms/functional/iterate_rectangles.hpp +174 -0
  165. stablebear-0.4.2/include/sbear/algorithms/functional/lp_distance.hpp +41 -0
  166. stablebear-0.4.2/include/sbear/algorithms/functional/matrix_integrate.hpp +172 -0
  167. stablebear-0.4.2/include/sbear/algorithms/functional/matrix_reduce.hpp +144 -0
  168. stablebear-0.4.2/include/sbear/algorithms/functional/reduce.hpp +272 -0
  169. stablebear-0.4.2/include/sbear/algorithms/subdivide.hpp +47 -0
  170. stablebear-0.4.2/include/sbear/algorithms/tensor_eval.hpp +100 -0
  171. stablebear-0.4.2/include/sbear/block_matrix_support.cuh +120 -0
  172. stablebear-0.4.2/include/sbear/concepts.hpp +131 -0
  173. stablebear-0.4.2/include/sbear/config.hpp +111 -0
  174. stablebear-0.4.2/include/sbear/cuda/cuda_block_executor.cuh +361 -0
  175. stablebear-0.4.2/include/sbear/cuda/cuda_block_scheduler.hpp +148 -0
  176. stablebear-0.4.2/include/sbear/cuda/cuda_device_array.cuh +166 -0
  177. stablebear-0.4.2/include/sbear/cuda/cuda_functional_support.cuh +62 -0
  178. stablebear-0.4.2/include/sbear/cuda/cuda_matrix_integrate.cuh +23 -0
  179. stablebear-0.4.2/include/sbear/cuda/cuda_matrix_integrate_api.hpp +132 -0
  180. stablebear-0.4.2/include/sbear/cuda/cuda_matrix_integrate_structs.cuh +34 -0
  181. stablebear-0.4.2/include/sbear/cuda/cuda_offset_data_manager.cuh +67 -0
  182. stablebear-0.4.2/include/sbear/cuda/cuda_pcf_data_manager.cuh +42 -0
  183. stablebear-0.4.2/include/sbear/cuda/cuda_pcf_kernel.cuh +166 -0
  184. stablebear-0.4.2/include/sbear/cuda/cuda_result_writer.hpp +127 -0
  185. stablebear-0.4.2/include/sbear/cuda/cuda_util.cuh +29 -0
  186. stablebear-0.4.2/include/sbear/cuda/offset_data_manager.hpp +111 -0
  187. stablebear-0.4.2/include/sbear/cuda/pcf_block_op.cuh +306 -0
  188. stablebear-0.4.2/include/sbear/cuda/triangle_skip_mode.hpp +31 -0
  189. stablebear-0.4.2/include/sbear/detail/tensor_1d_value_iterator.hpp +185 -0
  190. stablebear-0.4.2/include/sbear/detail/xoroshiro128pp_impl.hpp +51 -0
  191. stablebear-0.4.2/include/sbear/distance_matrix.hpp +163 -0
  192. stablebear-0.4.2/include/sbear/executor.hpp +137 -0
  193. stablebear-0.4.2/include/sbear/functional/operations.cuh +84 -0
  194. stablebear-0.4.2/include/sbear/functional/pcf.hpp +354 -0
  195. stablebear-0.4.2/include/sbear/functional/piecewise_function.hpp +125 -0
  196. stablebear-0.4.2/include/sbear/functional/rectangle.hpp +79 -0
  197. stablebear-0.4.2/include/sbear/functional/time_point.hpp +99 -0
  198. stablebear-0.4.2/include/sbear/io/barcode_io.hpp +54 -0
  199. stablebear-0.4.2/include/sbear/io/compressed_matrix_io.hpp +49 -0
  200. stablebear-0.4.2/include/sbear/io/io_stream.hpp +73 -0
  201. stablebear-0.4.2/include/sbear/io/io_stream_base.hpp +160 -0
  202. stablebear-0.4.2/include/sbear/io/pcf_io.hpp +38 -0
  203. stablebear-0.4.2/include/sbear/io/point_cloud_io.hpp +27 -0
  204. stablebear-0.4.2/include/sbear/io/point_io.hpp +40 -0
  205. stablebear-0.4.2/include/sbear/io/tensor_io.hpp +262 -0
  206. stablebear-0.4.2/include/sbear/io.hpp +333 -0
  207. stablebear-0.4.2/include/sbear/math.hpp +62 -0
  208. stablebear-0.4.2/include/sbear/persistence/accumulated_persistence.hpp +118 -0
  209. stablebear-0.4.2/include/sbear/persistence/barcode.hpp +201 -0
  210. stablebear-0.4.2/include/sbear/persistence/barcode_summary.hpp +71 -0
  211. stablebear-0.4.2/include/sbear/persistence/betti_curve.hpp +98 -0
  212. stablebear-0.4.2/include/sbear/persistence/compute_persistence.hpp +215 -0
  213. stablebear-0.4.2/include/sbear/persistence/persistence_pair.hpp +56 -0
  214. stablebear-0.4.2/include/sbear/persistence/ripser/ripser.hpp +1209 -0
  215. stablebear-0.4.2/include/sbear/persistence/stable_rank.hpp +94 -0
  216. stablebear-0.4.2/include/sbear/platform.hpp +38 -0
  217. stablebear-0.4.2/include/sbear/point_cloud.hpp +30 -0
  218. stablebear-0.4.2/include/sbear/point_process/poisson.hpp +87 -0
  219. stablebear-0.4.2/include/sbear/random.hpp +68 -0
  220. stablebear-0.4.2/include/sbear/random_generator.hpp +121 -0
  221. stablebear-0.4.2/include/sbear/settings.hpp +48 -0
  222. stablebear-0.4.2/include/sbear/special_tensors.hpp +65 -0
  223. stablebear-0.4.2/include/sbear/symmetric_matrix.hpp +120 -0
  224. stablebear-0.4.2/include/sbear/task.hpp +161 -0
  225. stablebear-0.4.2/include/sbear/tensor.hpp +631 -0
  226. stablebear-0.4.2/include/sbear/tensor.tpp +1719 -0
  227. stablebear-0.4.2/include/sbear/tensor_to_string.hpp +89 -0
  228. stablebear-0.4.2/include/sbear/version.hpp +32 -0
  229. stablebear-0.4.2/include/sbear/walk.hpp +228 -0
  230. stablebear-0.4.2/include/sbear/xoroshiro128pp.hpp +55 -0
  231. stablebear-0.4.2/pyproject.toml +154 -0
  232. stablebear-0.4.2/src/cuda/cuda_matrix_integrate.cu +156 -0
  233. stablebear-0.4.2/src/executor.cpp +54 -0
  234. stablebear-0.4.2/src/gpu_detect/gpu_detect.cpp +193 -0
  235. stablebear-0.4.2/src/io_stream.cpp +26 -0
  236. stablebear-0.4.2/src/python/functional/py_distance.cpp +266 -0
  237. stablebear-0.4.2/src/python/functional/py_distance.hpp +26 -0
  238. stablebear-0.4.2/src/python/functional/py_inner_product.cpp +106 -0
  239. stablebear-0.4.2/src/python/functional/py_inner_product.hpp +25 -0
  240. stablebear-0.4.2/src/python/functional/py_make_from_serial_content.cpp +114 -0
  241. stablebear-0.4.2/src/python/functional/py_make_from_serial_content.hpp +24 -0
  242. stablebear-0.4.2/src/python/functional/py_norms.cpp +85 -0
  243. stablebear-0.4.2/src/python/functional/py_norms.hpp +25 -0
  244. stablebear-0.4.2/src/python/functional/py_pcf.cpp +252 -0
  245. stablebear-0.4.2/src/python/functional/py_pcf.hpp +27 -0
  246. stablebear-0.4.2/src/python/functional/py_pcf_tensor_eval.hpp +54 -0
  247. stablebear-0.4.2/src/python/functional/py_random.cpp +86 -0
  248. stablebear-0.4.2/src/python/functional/py_random.hpp +27 -0
  249. stablebear-0.4.2/src/python/functional/py_reductions.cpp +74 -0
  250. stablebear-0.4.2/src/python/functional/py_reductions.hpp +28 -0
  251. stablebear-0.4.2/src/python/persistence/py_barcode.cpp +115 -0
  252. stablebear-0.4.2/src/python/persistence/py_barcode.hpp +27 -0
  253. stablebear-0.4.2/src/python/persistence/py_barcode_summary.cpp +81 -0
  254. stablebear-0.4.2/src/python/persistence/py_barcode_summary.hpp +25 -0
  255. stablebear-0.4.2/src/python/persistence/py_persistence_pair.cpp +42 -0
  256. stablebear-0.4.2/src/python/persistence/py_persistence_pair.hpp +25 -0
  257. stablebear-0.4.2/src/python/persistence/py_ripser.cpp +60 -0
  258. stablebear-0.4.2/src/python/persistence/py_ripser.hpp +25 -0
  259. stablebear-0.4.2/src/python/persistence/pymodule_persistence.cpp +35 -0
  260. stablebear-0.4.2/src/python/persistence/pymodule_persistence.hpp +25 -0
  261. stablebear-0.4.2/src/python/point_process/py_poisson.cpp +64 -0
  262. stablebear-0.4.2/src/python/point_process/py_poisson.hpp +27 -0
  263. stablebear-0.4.2/src/python/point_process/pymodule_point_process.cpp +31 -0
  264. stablebear-0.4.2/src/python/point_process/pymodule_point_process.hpp +27 -0
  265. stablebear-0.4.2/src/python/py_async_support.hpp +38 -0
  266. stablebear-0.4.2/src/python/py_distance_matrix.cpp +30 -0
  267. stablebear-0.4.2/src/python/py_distance_matrix.hpp +105 -0
  268. stablebear-0.4.2/src/python/py_future.hpp +82 -0
  269. stablebear-0.4.2/src/python/py_io.cpp +118 -0
  270. stablebear-0.4.2/src/python/py_io.hpp +68 -0
  271. stablebear-0.4.2/src/python/py_np_support.hpp +126 -0
  272. stablebear-0.4.2/src/python/py_np_tensor_convert.cpp +69 -0
  273. stablebear-0.4.2/src/python/py_np_tensor_convert.hpp +26 -0
  274. stablebear-0.4.2/src/python/py_symmetric_matrix.cpp +30 -0
  275. stablebear-0.4.2/src/python/py_symmetric_matrix.hpp +111 -0
  276. stablebear-0.4.2/src/python/py_tensor.cpp +161 -0
  277. stablebear-0.4.2/src/python/py_tensor.hpp +503 -0
  278. stablebear-0.4.2/src/python/pybind.hpp +26 -0
  279. stablebear-0.4.2/src/python/pymodule.cpp +195 -0
  280. stablebear-0.4.2/src/python/pypcf_support.hpp +141 -0
  281. stablebear-0.4.2/stablebear/__init__.py +68 -0
  282. stablebear-0.4.2/stablebear/_cudart_preload.py +62 -0
  283. stablebear-0.4.2/stablebear/_sb_cpp.py +216 -0
  284. stablebear-0.4.2/stablebear/_tensor_base.py +915 -0
  285. stablebear-0.4.2/stablebear/async_task.py +55 -0
  286. stablebear-0.4.2/stablebear/comparison.py +63 -0
  287. stablebear-0.4.2/stablebear/distance.py +168 -0
  288. stablebear-0.4.2/stablebear/distance_matrix.py +196 -0
  289. stablebear-0.4.2/stablebear/functional/__init__.py +15 -0
  290. stablebear-0.4.2/stablebear/functional/pcf.py +386 -0
  291. stablebear-0.4.2/stablebear/gpu.py +145 -0
  292. stablebear-0.4.2/stablebear/inner_product.py +64 -0
  293. stablebear-0.4.2/stablebear/io.py +237 -0
  294. stablebear-0.4.2/stablebear/norms.py +67 -0
  295. stablebear-0.4.2/stablebear/np_support.py +31 -0
  296. stablebear-0.4.2/stablebear/persistence/__init__.py +32 -0
  297. stablebear-0.4.2/stablebear/persistence/barcode.py +112 -0
  298. stablebear-0.4.2/stablebear/persistence/barcode_summary.py +150 -0
  299. stablebear-0.4.2/stablebear/persistence/homology.py +160 -0
  300. stablebear-0.4.2/stablebear/persistence/ph_tensor.py +57 -0
  301. stablebear-0.4.2/stablebear/persistence/ripser.py +47 -0
  302. stablebear-0.4.2/stablebear/plotting.py +168 -0
  303. stablebear-0.4.2/stablebear/point_process/__init__.py +25 -0
  304. stablebear-0.4.2/stablebear/point_process/poisson.py +84 -0
  305. stablebear-0.4.2/stablebear/random.py +134 -0
  306. stablebear-0.4.2/stablebear/reductions.py +110 -0
  307. stablebear-0.4.2/stablebear/serialize.py +60 -0
  308. stablebear-0.4.2/stablebear/symmetric_matrix.py +195 -0
  309. stablebear-0.4.2/stablebear/system.py +136 -0
  310. stablebear-0.4.2/stablebear/tensor.py +416 -0
  311. stablebear-0.4.2/stablebear/tensor_create.py +231 -0
  312. stablebear-0.4.2/stablebear/typing.py +149 -0
  313. stablebear-0.4.2/version.cpp.in +15 -0
@@ -0,0 +1,425 @@
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.2)
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/argument_vector.h
184
+ include/pybind11/detail/class.h
185
+ include/pybind11/detail/common.h
186
+ include/pybind11/detail/cpp_conduit.h
187
+ include/pybind11/detail/descr.h
188
+ include/pybind11/detail/dynamic_raw_ptr_cast_if_possible.h
189
+ include/pybind11/detail/exception_translation.h
190
+ include/pybind11/detail/function_record_pyobject.h
191
+ include/pybind11/detail/holder_caster_foreign_helpers.h
192
+ include/pybind11/detail/init.h
193
+ include/pybind11/detail/internals.h
194
+ include/pybind11/detail/native_enum_data.h
195
+ include/pybind11/detail/pybind11_namespace_macros.h
196
+ include/pybind11/detail/struct_smart_holder.h
197
+ include/pybind11/detail/type_caster_base.h
198
+ include/pybind11/detail/typeid.h
199
+ include/pybind11/detail/using_smart_holder.h
200
+ include/pybind11/detail/value_and_holder.h
201
+ include/pybind11/attr.h
202
+ include/pybind11/buffer_info.h
203
+ include/pybind11/cast.h
204
+ include/pybind11/chrono.h
205
+ include/pybind11/common.h
206
+ include/pybind11/complex.h
207
+ include/pybind11/conduit/pybind11_conduit_v1.h
208
+ include/pybind11/conduit/pybind11_platform_abi_id.h
209
+ include/pybind11/conduit/wrap_include_python_h.h
210
+ include/pybind11/critical_section.h
211
+ include/pybind11/options.h
212
+ include/pybind11/eigen.h
213
+ include/pybind11/eigen/common.h
214
+ include/pybind11/eigen/matrix.h
215
+ include/pybind11/eigen/tensor.h
216
+ include/pybind11/embed.h
217
+ include/pybind11/eval.h
218
+ include/pybind11/gil.h
219
+ include/pybind11/gil_safe_call_once.h
220
+ include/pybind11/gil_simple.h
221
+ include/pybind11/iostream.h
222
+ include/pybind11/functional.h
223
+ include/pybind11/native_enum.h
224
+ include/pybind11/numpy.h
225
+ include/pybind11/operators.h
226
+ include/pybind11/pybind11.h
227
+ include/pybind11/pytypes.h
228
+ include/pybind11/subinterpreter.h
229
+ include/pybind11/stl.h
230
+ include/pybind11/stl_bind.h
231
+ include/pybind11/stl/filesystem.h
232
+ include/pybind11/trampoline_self_life_support.h
233
+ include/pybind11/type_caster_pyobject_ptr.h
234
+ include/pybind11/typing.h
235
+ include/pybind11/warnings.h)
236
+
237
+ # Compare with grep and warn if mismatched
238
+ if(PYBIND11_MASTER_PROJECT)
239
+ file(
240
+ GLOB_RECURSE _pybind11_header_check
241
+ LIST_DIRECTORIES false
242
+ RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}"
243
+ CONFIGURE_DEPENDS "include/pybind11/*.h")
244
+ set(_pybind11_here_only ${PYBIND11_HEADERS})
245
+ set(_pybind11_disk_only ${_pybind11_header_check})
246
+ list(REMOVE_ITEM _pybind11_here_only ${_pybind11_header_check})
247
+ list(REMOVE_ITEM _pybind11_disk_only ${PYBIND11_HEADERS})
248
+ if(_pybind11_here_only)
249
+ message(AUTHOR_WARNING "PYBIND11_HEADERS has extra files:" ${_pybind11_here_only})
250
+ endif()
251
+ if(_pybind11_disk_only)
252
+ message(AUTHOR_WARNING "PYBIND11_HEADERS is missing files:" ${_pybind11_disk_only})
253
+ endif()
254
+ endif()
255
+
256
+ list(TRANSFORM PYBIND11_HEADERS PREPEND "${CMAKE_CURRENT_SOURCE_DIR}/")
257
+
258
+ # Cache variable so this can be used in parent projects
259
+ set(pybind11_INCLUDE_DIR
260
+ "${CMAKE_CURRENT_LIST_DIR}/include"
261
+ CACHE INTERNAL "Directory where pybind11 headers are located")
262
+
263
+ # Backward compatible variable for add_subdirectory mode
264
+ if(NOT PYBIND11_MASTER_PROJECT)
265
+ set(PYBIND11_INCLUDE_DIR
266
+ "${pybind11_INCLUDE_DIR}"
267
+ CACHE INTERNAL "")
268
+ endif()
269
+
270
+ # Note: when creating targets, you cannot use if statements at configure time -
271
+ # you need generator expressions, because those will be placed in the target file.
272
+ # You can also place ifs *in* the Config.in, but not here.
273
+
274
+ # This section builds targets, but does *not* touch Python
275
+ # Non-IMPORT targets cannot be defined twice
276
+ if(NOT TARGET pybind11_headers)
277
+ # Build the headers-only target (no Python included):
278
+ # (long name used here to keep this from clashing in subdirectory mode)
279
+ add_library(pybind11_headers INTERFACE)
280
+ add_library(pybind11::pybind11_headers ALIAS pybind11_headers) # to match exported target
281
+ add_library(pybind11::headers ALIAS pybind11_headers) # easier to use/remember
282
+
283
+ target_include_directories(
284
+ pybind11_headers ${pybind11_system} INTERFACE $<BUILD_INTERFACE:${pybind11_INCLUDE_DIR}>
285
+ $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
286
+
287
+ target_compile_features(pybind11_headers INTERFACE cxx_inheriting_constructors cxx_user_literals
288
+ cxx_right_angle_brackets)
289
+ if(NOT "${PYBIND11_INTERNALS_VERSION}" STREQUAL "")
290
+ target_compile_definitions(
291
+ pybind11_headers INTERFACE "PYBIND11_INTERNALS_VERSION=${PYBIND11_INTERNALS_VERSION}")
292
+ endif()
293
+ else()
294
+ # It is invalid to install a target twice, too.
295
+ set(PYBIND11_INSTALL OFF)
296
+ endif()
297
+
298
+ include("${CMAKE_CURRENT_SOURCE_DIR}/tools/pybind11Common.cmake")
299
+ # https://github.com/jtojnar/cmake-snips/#concatenating-paths-when-building-pkg-config-files
300
+ # TODO: cmake 3.20 adds the cmake_path() function, which obsoletes this snippet
301
+ include("${CMAKE_CURRENT_SOURCE_DIR}/tools/JoinPaths.cmake")
302
+
303
+ # Relative directory setting
304
+ if(USE_PYTHON_INCLUDE_DIR AND DEFINED Python_INCLUDE_DIRS)
305
+ file(RELATIVE_PATH CMAKE_INSTALL_INCLUDEDIR ${CMAKE_INSTALL_PREFIX} ${Python_INCLUDE_DIRS})
306
+ elseif(USE_PYTHON_INCLUDE_DIR AND DEFINED PYTHON_INCLUDE_DIR)
307
+ file(RELATIVE_PATH CMAKE_INSTALL_INCLUDEDIR ${CMAKE_INSTALL_PREFIX} ${PYTHON_INCLUDE_DIRS})
308
+ endif()
309
+
310
+ if(PYBIND11_INSTALL)
311
+ if(DEFINED SKBUILD_PROJECT_NAME AND SKBUILD_PROJECT_NAME STREQUAL "pybind11_global")
312
+ install(DIRECTORY ${pybind11_INCLUDE_DIR}/pybind11 DESTINATION "${SKBUILD_HEADERS_DIR}")
313
+ endif()
314
+ install(DIRECTORY ${pybind11_INCLUDE_DIR}/pybind11 DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
315
+ set(PYBIND11_CMAKECONFIG_INSTALL_DIR
316
+ "${CMAKE_INSTALL_DATAROOTDIR}/cmake/${PROJECT_NAME}"
317
+ CACHE STRING "install path for pybind11Config.cmake")
318
+
319
+ if(IS_ABSOLUTE "${CMAKE_INSTALL_INCLUDEDIR}")
320
+ set(pybind11_INCLUDEDIR "${CMAKE_INSTALL_FULL_INCLUDEDIR}")
321
+ else()
322
+ set(pybind11_INCLUDEDIR "\$\{PACKAGE_PREFIX_DIR\}/${CMAKE_INSTALL_INCLUDEDIR}")
323
+ endif()
324
+
325
+ configure_package_config_file(
326
+ tools/${PROJECT_NAME}Config.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
327
+ INSTALL_DESTINATION ${PYBIND11_CMAKECONFIG_INSTALL_DIR})
328
+
329
+ # CMake natively supports header-only libraries
330
+ write_basic_package_version_file(
331
+ ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake
332
+ VERSION ${PROJECT_VERSION}
333
+ COMPATIBILITY AnyNewerVersion ARCH_INDEPENDENT)
334
+
335
+ install(
336
+ FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake
337
+ ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake
338
+ tools/FindPythonLibsNew.cmake
339
+ tools/pybind11Common.cmake
340
+ tools/pybind11Tools.cmake
341
+ tools/pybind11NewTools.cmake
342
+ tools/pybind11GuessPythonExtSuffix.cmake
343
+ DESTINATION ${PYBIND11_CMAKECONFIG_INSTALL_DIR})
344
+
345
+ if(NOT PYBIND11_EXPORT_NAME)
346
+ set(PYBIND11_EXPORT_NAME "${PROJECT_NAME}Targets")
347
+ endif()
348
+
349
+ install(TARGETS pybind11_headers EXPORT "${PYBIND11_EXPORT_NAME}")
350
+
351
+ install(
352
+ EXPORT "${PYBIND11_EXPORT_NAME}"
353
+ NAMESPACE "pybind11::"
354
+ DESTINATION ${PYBIND11_CMAKECONFIG_INSTALL_DIR})
355
+
356
+ # pkg-config support
357
+ if(NOT prefix_for_pc_file)
358
+ if(IS_ABSOLUTE "${CMAKE_INSTALL_DATAROOTDIR}")
359
+ set(prefix_for_pc_file "${CMAKE_INSTALL_PREFIX}")
360
+ else()
361
+ set(pc_datarootdir "${CMAKE_INSTALL_DATAROOTDIR}")
362
+ if(CMAKE_VERSION VERSION_LESS 3.20)
363
+ set(prefix_for_pc_file "\${pcfiledir}/..")
364
+ while(pc_datarootdir)
365
+ get_filename_component(pc_datarootdir "${pc_datarootdir}" DIRECTORY)
366
+ string(APPEND prefix_for_pc_file "/..")
367
+ endwhile()
368
+ else()
369
+ cmake_path(RELATIVE_PATH CMAKE_INSTALL_PREFIX BASE_DIRECTORY CMAKE_INSTALL_DATAROOTDIR
370
+ OUTPUT_VARIABLE prefix_for_pc_file)
371
+ endif()
372
+ endif()
373
+ endif()
374
+ join_paths(includedir_for_pc_file "\${prefix}" "${CMAKE_INSTALL_INCLUDEDIR}")
375
+ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/tools/pybind11.pc.in"
376
+ "${CMAKE_CURRENT_BINARY_DIR}/pybind11.pc" @ONLY)
377
+ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/pybind11.pc"
378
+ DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/pkgconfig/")
379
+
380
+ # When building a wheel, include __init__.py's for modules
381
+ # (see https://github.com/pybind/pybind11/pull/5552)
382
+ if(DEFINED SKBUILD_PROJECT_NAME AND SKBUILD_PROJECT_NAME STREQUAL "pybind11")
383
+ file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/empty")
384
+ file(TOUCH "${CMAKE_CURRENT_BINARY_DIR}/empty/__init__.py")
385
+ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/empty/__init__.py"
386
+ DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/")
387
+ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/empty/__init__.py"
388
+ DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/pkgconfig/")
389
+ endif()
390
+
391
+ # Uninstall target
392
+ if(PYBIND11_MASTER_PROJECT)
393
+ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/tools/cmake_uninstall.cmake.in"
394
+ "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" IMMEDIATE @ONLY)
395
+
396
+ add_custom_target(uninstall COMMAND ${CMAKE_COMMAND} -P
397
+ ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
398
+ endif()
399
+ endif()
400
+
401
+ # BUILD_TESTING takes priority, but only if this is the master project
402
+ if(PYBIND11_MASTER_PROJECT AND DEFINED BUILD_TESTING)
403
+ if(BUILD_TESTING)
404
+ if(_pybind11_nopython)
405
+ message(FATAL_ERROR "Cannot activate tests in NOPYTHON mode")
406
+ else()
407
+ add_subdirectory(tests)
408
+ endif()
409
+ endif()
410
+ else()
411
+ if(PYBIND11_TEST)
412
+ if(_pybind11_nopython)
413
+ message(FATAL_ERROR "Cannot activate tests in NOPYTHON mode")
414
+ else()
415
+ add_subdirectory(tests)
416
+ endif()
417
+ endif()
418
+ endif()
419
+
420
+ # Better symmetry with find_package(pybind11 CONFIG) mode.
421
+ if(NOT PYBIND11_MASTER_PROJECT)
422
+ set(pybind11_FOUND
423
+ TRUE
424
+ CACHE INTERNAL "True if pybind11 and all required components found on the system")
425
+ 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
+ }
@@ -0,0 +1,29 @@
1
+ Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch>, All rights reserved.
2
+
3
+ Redistribution and use in source and binary forms, with or without
4
+ modification, are permitted provided that the following conditions are met:
5
+
6
+ 1. Redistributions of source code must retain the above copyright notice, this
7
+ list of conditions and the following disclaimer.
8
+
9
+ 2. Redistributions in binary form must reproduce the above copyright notice,
10
+ this list of conditions and the following disclaimer in the documentation
11
+ and/or other materials provided with the distribution.
12
+
13
+ 3. Neither the name of the copyright holder nor the names of its contributors
14
+ may be used to endorse or promote products derived from this software
15
+ without specific prior written permission.
16
+
17
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
21
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
23
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
24
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
25
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
+
28
+ Please also refer to the file .github/CONTRIBUTING.md, which clarifies licensing of
29
+ external contributions to this project including patches, pull requests, etc.