xcoll 0.5.12__py3-none-any.whl → 0.6.0__py3-none-any.whl

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.

Potentially problematic release.


This version of xcoll might be problematic. Click here for more details.

Files changed (333) hide show
  1. xcoll/__init__.py +5 -18
  2. xcoll/beam_elements/__init__.py +1 -0
  3. xcoll/beam_elements/absorber.py +12 -2
  4. xcoll/beam_elements/base.py +162 -62
  5. xcoll/beam_elements/blowup.py +1 -0
  6. xcoll/beam_elements/elements_src/black_absorber.h +57 -58
  7. xcoll/beam_elements/elements_src/black_crystal.h +49 -50
  8. xcoll/beam_elements/elements_src/everest_block.h +21 -11
  9. xcoll/beam_elements/elements_src/everest_collimator.h +100 -91
  10. xcoll/beam_elements/elements_src/everest_crystal.h +145 -140
  11. xcoll/beam_elements/elements_src/transparent_collimator.h +126 -0
  12. xcoll/beam_elements/elements_src/transparent_crystal.h +118 -0
  13. xcoll/beam_elements/everest.py +16 -5
  14. xcoll/beam_elements/monitor.py +1 -0
  15. xcoll/beam_elements/transparent.py +83 -0
  16. xcoll/colldb.py +15 -6
  17. xcoll/general.py +1 -1
  18. xcoll/headers/particle_states.py +51 -0
  19. xcoll/initial_distribution.py +121 -91
  20. xcoll/interaction_record/interaction_record.py +2 -1
  21. xcoll/interaction_record/interaction_types.py +2 -2
  22. xcoll/line_tools.py +163 -73
  23. xcoll/lossmap.py +519 -127
  24. xcoll/plot.py +109 -0
  25. xcoll/rf_sweep.py +6 -0
  26. xcoll/scattering_routines/engine.py +414 -217
  27. xcoll/scattering_routines/environment.py +297 -0
  28. xcoll/scattering_routines/everest/amorphous.h +95 -71
  29. xcoll/scattering_routines/everest/{channeling.h → channelling.h} +121 -112
  30. xcoll/scattering_routines/everest/constants.h +1 -1
  31. xcoll/scattering_routines/everest/crystal_parameters.h +9 -9
  32. xcoll/scattering_routines/everest/everest.h +8 -3
  33. xcoll/scattering_routines/everest/everest.py +2 -1
  34. xcoll/scattering_routines/everest/ionisation_loss.h +141 -0
  35. xcoll/scattering_routines/everest/jaw.h +19 -24
  36. xcoll/scattering_routines/everest/materials.py +2 -0
  37. xcoll/scattering_routines/everest/multiple_coulomb_scattering.h +2 -2
  38. xcoll/scattering_routines/everest/nuclear_interaction.h +35 -19
  39. xcoll/scattering_routines/everest/properties.h +3 -72
  40. xcoll/xaux.py +65 -109
  41. {xcoll-0.5.12.dist-info → xcoll-0.6.0.dist-info}/METADATA +5 -5
  42. xcoll-0.6.0.dist-info/RECORD +135 -0
  43. xcoll/_manager.py +0 -22
  44. xcoll/headers/particle_states.h +0 -25
  45. xcoll/install.py +0 -35
  46. xcoll/scattering_routines/geant4/collimasim/.git +0 -1
  47. xcoll/scattering_routines/geant4/collimasim/.gitignore +0 -12
  48. xcoll/scattering_routines/geant4/collimasim/.gitmodules +0 -3
  49. xcoll/scattering_routines/geant4/collimasim/CMakeLists.txt +0 -26
  50. xcoll/scattering_routines/geant4/collimasim/README.md +0 -21
  51. xcoll/scattering_routines/geant4/collimasim/docs/Makefile +0 -20
  52. xcoll/scattering_routines/geant4/collimasim/docs/make.bat +0 -35
  53. xcoll/scattering_routines/geant4/collimasim/docs/source/collimasim.rst +0 -10
  54. xcoll/scattering_routines/geant4/collimasim/docs/source/conf.py +0 -59
  55. xcoll/scattering_routines/geant4/collimasim/docs/source/index.rst +0 -26
  56. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.appveyor.yml +0 -37
  57. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.clang-format +0 -19
  58. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.clang-tidy +0 -65
  59. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.cmake-format.yaml +0 -73
  60. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.git +0 -1
  61. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.github/CODEOWNERS +0 -9
  62. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.github/CONTRIBUTING.md +0 -386
  63. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.github/ISSUE_TEMPLATE/bug-report.yml +0 -45
  64. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.github/ISSUE_TEMPLATE/config.yml +0 -8
  65. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.github/dependabot.yml +0 -16
  66. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.github/labeler.yml +0 -8
  67. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.github/labeler_merged.yml +0 -3
  68. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.github/pull_request_template.md +0 -19
  69. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.github/workflows/ci.yml +0 -969
  70. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.github/workflows/configure.yml +0 -84
  71. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.github/workflows/format.yml +0 -48
  72. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.github/workflows/labeler.yml +0 -16
  73. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.github/workflows/pip.yml +0 -103
  74. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.gitignore +0 -45
  75. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.pre-commit-config.yaml +0 -151
  76. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/.readthedocs.yml +0 -3
  77. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/CMakeLists.txt +0 -297
  78. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/LICENSE +0 -29
  79. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/MANIFEST.in +0 -6
  80. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/README.rst +0 -180
  81. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/Doxyfile +0 -23
  82. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/Makefile +0 -192
  83. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/_static/theme_overrides.css +0 -11
  84. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/cast/chrono.rst +0 -81
  85. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/cast/custom.rst +0 -93
  86. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/cast/eigen.rst +0 -310
  87. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/cast/functional.rst +0 -109
  88. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/cast/index.rst +0 -43
  89. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/cast/overview.rst +0 -171
  90. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/cast/stl.rst +0 -251
  91. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/cast/strings.rst +0 -305
  92. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/classes.rst +0 -1297
  93. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/embedding.rst +0 -262
  94. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/exceptions.rst +0 -396
  95. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/functions.rst +0 -568
  96. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/misc.rst +0 -337
  97. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/pycpp/index.rst +0 -13
  98. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/pycpp/numpy.rst +0 -463
  99. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/pycpp/object.rst +0 -286
  100. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/pycpp/utilities.rst +0 -155
  101. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/advanced/smart_ptrs.rst +0 -174
  102. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/basics.rst +0 -308
  103. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/benchmark.py +0 -91
  104. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/benchmark.rst +0 -95
  105. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/changelog.rst +0 -2050
  106. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/classes.rst +0 -542
  107. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/cmake/index.rst +0 -8
  108. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/compiling.rst +0 -648
  109. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/conf.py +0 -381
  110. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/faq.rst +0 -343
  111. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/index.rst +0 -48
  112. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/installing.rst +0 -105
  113. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/limitations.rst +0 -72
  114. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/pybind11-logo.png +0 -0
  115. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/pybind11_vs_boost_python1.png +0 -0
  116. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/pybind11_vs_boost_python1.svg +0 -427
  117. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/pybind11_vs_boost_python2.png +0 -0
  118. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/pybind11_vs_boost_python2.svg +0 -427
  119. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/reference.rst +0 -130
  120. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/release.rst +0 -96
  121. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/requirements.txt +0 -8
  122. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/docs/upgrade.rst +0 -548
  123. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/attr.h +0 -605
  124. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/buffer_info.h +0 -144
  125. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/cast.h +0 -1432
  126. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/chrono.h +0 -213
  127. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/common.h +0 -2
  128. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/complex.h +0 -65
  129. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/detail/class.h +0 -709
  130. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/detail/common.h +0 -1021
  131. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/detail/descr.h +0 -104
  132. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/detail/init.h +0 -346
  133. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/detail/internals.h +0 -467
  134. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/detail/type_caster_base.h +0 -978
  135. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/detail/typeid.h +0 -55
  136. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/eigen.h +0 -606
  137. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/embed.h +0 -284
  138. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/eval.h +0 -163
  139. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/functional.h +0 -121
  140. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/gil.h +0 -193
  141. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/iostream.h +0 -275
  142. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/numpy.h +0 -1741
  143. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/operators.h +0 -163
  144. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/options.h +0 -65
  145. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/pybind11.h +0 -2497
  146. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/pytypes.h +0 -1879
  147. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/stl/filesystem.h +0 -103
  148. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/stl.h +0 -375
  149. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/include/pybind11/stl_bind.h +0 -747
  150. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/noxfile.py +0 -88
  151. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/pybind11/__init__.py +0 -11
  152. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/pybind11/__main__.py +0 -52
  153. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/pybind11/_version.py +0 -12
  154. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/pybind11/_version.pyi +0 -6
  155. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/pybind11/commands.py +0 -21
  156. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/pybind11/py.typed +0 -0
  157. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/pybind11/setup_helpers.py +0 -482
  158. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/pybind11/setup_helpers.pyi +0 -63
  159. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/pyproject.toml +0 -41
  160. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/setup.cfg +0 -56
  161. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/setup.py +0 -155
  162. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/CMakeLists.txt +0 -503
  163. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/conftest.py +0 -208
  164. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/constructor_stats.h +0 -275
  165. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/cross_module_gil_utils.cpp +0 -73
  166. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/env.py +0 -33
  167. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/extra_python_package/pytest.ini +0 -0
  168. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/extra_python_package/test_files.py +0 -279
  169. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/extra_setuptools/pytest.ini +0 -0
  170. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/extra_setuptools/test_setuphelper.py +0 -143
  171. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/local_bindings.h +0 -85
  172. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/object.h +0 -179
  173. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/pybind11_cross_module_tests.cpp +0 -151
  174. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/pybind11_tests.cpp +0 -91
  175. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/pybind11_tests.h +0 -85
  176. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/pytest.ini +0 -19
  177. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/requirements.txt +0 -12
  178. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_async.cpp +0 -26
  179. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_async.py +0 -25
  180. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_buffers.cpp +0 -216
  181. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_buffers.py +0 -163
  182. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_builtin_casters.cpp +0 -286
  183. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_builtin_casters.py +0 -536
  184. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_call_policies.cpp +0 -107
  185. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_call_policies.py +0 -248
  186. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_callbacks.cpp +0 -227
  187. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_callbacks.py +0 -202
  188. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_chrono.cpp +0 -84
  189. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_chrono.py +0 -210
  190. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_class.cpp +0 -550
  191. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_class.py +0 -473
  192. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_cmake_build/CMakeLists.txt +0 -84
  193. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_cmake_build/embed.cpp +0 -21
  194. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_cmake_build/installed_embed/CMakeLists.txt +0 -28
  195. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_cmake_build/installed_function/CMakeLists.txt +0 -39
  196. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_cmake_build/installed_target/CMakeLists.txt +0 -46
  197. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_cmake_build/main.cpp +0 -6
  198. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_cmake_build/subdirectory_embed/CMakeLists.txt +0 -41
  199. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_cmake_build/subdirectory_function/CMakeLists.txt +0 -35
  200. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_cmake_build/subdirectory_target/CMakeLists.txt +0 -41
  201. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_cmake_build/test.py +0 -10
  202. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_constants_and_functions.cpp +0 -165
  203. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_constants_and_functions.py +0 -53
  204. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_copy_move.cpp +0 -238
  205. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_copy_move.py +0 -126
  206. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_custom_type_casters.cpp +0 -141
  207. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_custom_type_casters.py +0 -117
  208. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_custom_type_setup.cpp +0 -41
  209. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_custom_type_setup.py +0 -50
  210. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_docstring_options.cpp +0 -69
  211. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_docstring_options.py +0 -42
  212. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_eigen.cpp +0 -348
  213. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_eigen.py +0 -771
  214. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_embed/CMakeLists.txt +0 -47
  215. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_embed/catch.cpp +0 -22
  216. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_embed/external_module.cpp +0 -23
  217. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_embed/test_interpreter.cpp +0 -326
  218. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_embed/test_interpreter.py +0 -15
  219. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_enum.cpp +0 -148
  220. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_enum.py +0 -272
  221. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_eval.cpp +0 -119
  222. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_eval.py +0 -51
  223. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_eval_call.py +0 -5
  224. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_exceptions.cpp +0 -285
  225. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_exceptions.h +0 -12
  226. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_exceptions.py +0 -265
  227. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_factory_constructors.cpp +0 -397
  228. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_factory_constructors.py +0 -520
  229. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_gil_scoped.cpp +0 -49
  230. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_gil_scoped.py +0 -94
  231. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_iostream.cpp +0 -125
  232. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_iostream.py +0 -331
  233. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_kwargs_and_defaults.cpp +0 -153
  234. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_kwargs_and_defaults.py +0 -284
  235. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_local_bindings.cpp +0 -107
  236. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_local_bindings.py +0 -257
  237. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_methods_and_attributes.cpp +0 -412
  238. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_methods_and_attributes.py +0 -517
  239. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_modules.cpp +0 -102
  240. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_modules.py +0 -92
  241. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_multiple_inheritance.cpp +0 -233
  242. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_multiple_inheritance.py +0 -360
  243. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_numpy_array.cpp +0 -472
  244. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_numpy_array.py +0 -593
  245. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_numpy_dtypes.cpp +0 -524
  246. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_numpy_dtypes.py +0 -441
  247. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_numpy_vectorize.cpp +0 -103
  248. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_numpy_vectorize.py +0 -267
  249. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_opaque_types.cpp +0 -73
  250. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_opaque_types.py +0 -59
  251. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_operator_overloading.cpp +0 -235
  252. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_operator_overloading.py +0 -146
  253. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_pickling.cpp +0 -189
  254. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_pickling.py +0 -82
  255. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_pytypes.cpp +0 -560
  256. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_pytypes.py +0 -651
  257. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_sequences_and_iterators.cpp +0 -500
  258. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_sequences_and_iterators.py +0 -253
  259. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_smart_ptr.cpp +0 -452
  260. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_smart_ptr.py +0 -318
  261. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_stl.cpp +0 -342
  262. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_stl.py +0 -291
  263. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_stl_binders.cpp +0 -131
  264. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_stl_binders.py +0 -318
  265. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_tagbased_polymorphic.cpp +0 -144
  266. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_tagbased_polymorphic.py +0 -29
  267. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_thread.cpp +0 -66
  268. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_thread.py +0 -44
  269. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_union.cpp +0 -22
  270. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_union.py +0 -9
  271. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_virtual_functions.cpp +0 -510
  272. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/test_virtual_functions.py +0 -408
  273. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/valgrind-numpy-scipy.supp +0 -140
  274. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tests/valgrind-python.supp +0 -117
  275. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/FindCatch.cmake +0 -70
  276. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/FindEigen3.cmake +0 -86
  277. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/FindPythonLibsNew.cmake +0 -257
  278. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/check-style.sh +0 -44
  279. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/cmake_uninstall.cmake.in +0 -23
  280. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/libsize.py +0 -39
  281. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/make_changelog.py +0 -64
  282. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/pybind11Common.cmake +0 -402
  283. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/pybind11Config.cmake.in +0 -233
  284. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/pybind11NewTools.cmake +0 -276
  285. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/pybind11Tools.cmake +0 -214
  286. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/pyproject.toml +0 -3
  287. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/setup_global.py.in +0 -65
  288. xcoll/scattering_routines/geant4/collimasim/lib/pybind11/tools/setup_main.py.in +0 -41
  289. xcoll/scattering_routines/geant4/collimasim/pyproject.toml +0 -8
  290. xcoll/scattering_routines/geant4/collimasim/setup.py +0 -144
  291. xcoll/scattering_routines/geant4/collimasim/src/collimasim/BDSPyATInterface.cpp +0 -403
  292. xcoll/scattering_routines/geant4/collimasim/src/collimasim/BDSPyATInterface.hh +0 -100
  293. xcoll/scattering_routines/geant4/collimasim/src/collimasim/BDSXtrackInterface.cpp +0 -763
  294. xcoll/scattering_routines/geant4/collimasim/src/collimasim/BDSXtrackInterface.hh +0 -118
  295. xcoll/scattering_routines/geant4/collimasim/src/collimasim/__init__.py +0 -8
  296. xcoll/scattering_routines/geant4/collimasim/src/collimasim/bindings.cpp +0 -63
  297. xcoll/scattering_routines/geant4/collimasim/src/collimasim/pyCollimatorPass.py +0 -142
  298. xcoll/scattering_routines/geant4/collimasim/src/collimasim/xtrack_collimator.py +0 -556
  299. xcoll/scattering_routines/geant4/collimasim/src/collimasim.egg-info/PKG-INFO +0 -6
  300. xcoll/scattering_routines/geant4/collimasim/src/collimasim.egg-info/SOURCES.txt +0 -24
  301. xcoll/scattering_routines/geant4/collimasim/src/collimasim.egg-info/dependency_links.txt +0 -1
  302. xcoll/scattering_routines/geant4/collimasim/src/collimasim.egg-info/not-zip-safe +0 -1
  303. xcoll/scattering_routines/geant4/collimasim/src/collimasim.egg-info/top_level.txt +0 -1
  304. xcoll/scattering_routines/geant4/collimasim/tests/README.md +0 -25
  305. xcoll/scattering_routines/geant4/collimasim/tests/resources/CollDB_forions.dat +0 -25
  306. xcoll/scattering_routines/geant4/collimasim/tests/resources/CollDB_new_example.dat +0 -18
  307. xcoll/scattering_routines/geant4/collimasim/tests/resources/CollDB_old_example.dat +0 -68
  308. xcoll/scattering_routines/geant4/collimasim/tests/resources/CollDB_testing.dat +0 -15
  309. xcoll/scattering_routines/geant4/collimasim/tests/resources/CollDB_yaml_example.yaml +0 -110
  310. xcoll/scattering_routines/geant4/collimasim/tests/resources/collgaps.dat +0 -7
  311. xcoll/scattering_routines/geant4/collimasim/tests/resources/collgaps_pyat_test.dat +0 -3
  312. xcoll/scattering_routines/geant4/collimasim/tests/resources/collonly_twiss_file_example.tfs +0 -54
  313. xcoll/scattering_routines/geant4/collimasim/tests/resources/settings.gmad +0 -3
  314. xcoll/scattering_routines/geant4/collimasim/tests/resources/settings_black_absorber.gmad +0 -3
  315. xcoll/scattering_routines/geant4/collimasim/tests/resources/settings_ions.gmad +0 -5
  316. xcoll/scattering_routines/geant4/collimasim/tests/resources/twiss_file_testing.tfs +0 -51
  317. xcoll/scattering_routines/geant4/collimasim/tests/test_pyat.py +0 -65
  318. xcoll/scattering_routines/geant4/collimasim/tests/test_pyat_passmethod.py +0 -59
  319. xcoll/scattering_routines/geant4/collimasim/tests/test_pyat_tracking.py +0 -102
  320. xcoll/scattering_routines/geant4/collimasim/tests/test_xtrack.py +0 -75
  321. xcoll/scattering_routines/geant4/collimasim/tests/test_xtrack_angle.py +0 -74
  322. xcoll/scattering_routines/geant4/collimasim/tests/test_xtrack_colldb_load.py +0 -84
  323. xcoll/scattering_routines/geant4/collimasim/tests/test_xtrack_interaction.py +0 -159
  324. xcoll/scattering_routines/geant4/collimasim/tests/test_xtrack_interaction_ion.py +0 -99
  325. xcoll/scattering_routines/geant4/collimasim/tests/test_xtrack_ions.py +0 -78
  326. xcoll/scattering_routines/geant4/collimasim/tests/test_xtrack_lost_energy.py +0 -88
  327. xcoll/scattering_routines/geant4/collimasim/tests/test_xtrack_tilt.py +0 -80
  328. xcoll/scattering_routines/geant4/collimasim/tests/test_xtrack_tracking.py +0 -97
  329. xcoll/scattering_routines/geant4/collimasim/tests/test_xtrack_tracking_ions.py +0 -96
  330. xcoll-0.5.12.dist-info/RECORD +0 -415
  331. {xcoll-0.5.12.dist-info → xcoll-0.6.0.dist-info}/LICENSE +0 -0
  332. {xcoll-0.5.12.dist-info → xcoll-0.6.0.dist-info}/NOTICE +0 -0
  333. {xcoll-0.5.12.dist-info → xcoll-0.6.0.dist-info}/WHEEL +0 -0
@@ -1,70 +0,0 @@
1
- # - Find the Catch test framework or download it (single header)
2
- #
3
- # This is a quick module for internal use. It assumes that Catch is
4
- # REQUIRED and that a minimum version is provided (not EXACT). If
5
- # a suitable version isn't found locally, the single header file
6
- # will be downloaded and placed in the build dir: PROJECT_BINARY_DIR.
7
- #
8
- # This code sets the following variables:
9
- # CATCH_INCLUDE_DIR - path to catch.hpp
10
- # CATCH_VERSION - version number
11
-
12
- if(NOT Catch_FIND_VERSION)
13
- message(FATAL_ERROR "A version number must be specified.")
14
- elseif(Catch_FIND_REQUIRED)
15
- message(FATAL_ERROR "This module assumes Catch is not required.")
16
- elseif(Catch_FIND_VERSION_EXACT)
17
- message(FATAL_ERROR "Exact version numbers are not supported, only minimum.")
18
- endif()
19
-
20
- # Extract the version number from catch.hpp
21
- function(_get_catch_version)
22
- file(
23
- STRINGS "${CATCH_INCLUDE_DIR}/catch.hpp" version_line
24
- REGEX "Catch v.*"
25
- LIMIT_COUNT 1)
26
- if(version_line MATCHES "Catch v([0-9]+)\\.([0-9]+)\\.([0-9]+)")
27
- set(CATCH_VERSION
28
- "${CMAKE_MATCH_1}.${CMAKE_MATCH_2}.${CMAKE_MATCH_3}"
29
- PARENT_SCOPE)
30
- endif()
31
- endfunction()
32
-
33
- # Download the single-header version of Catch
34
- function(_download_catch version destination_dir)
35
- message(STATUS "Downloading catch v${version}...")
36
- set(url https://github.com/philsquared/Catch/releases/download/v${version}/catch.hpp)
37
- file(DOWNLOAD ${url} "${destination_dir}/catch.hpp" STATUS status)
38
- list(GET status 0 error)
39
- if(error)
40
- message(FATAL_ERROR "Could not download ${url}")
41
- endif()
42
- set(CATCH_INCLUDE_DIR
43
- "${destination_dir}"
44
- CACHE INTERNAL "")
45
- endfunction()
46
-
47
- # Look for catch locally
48
- find_path(
49
- CATCH_INCLUDE_DIR
50
- NAMES catch.hpp
51
- PATH_SUFFIXES catch2)
52
- if(CATCH_INCLUDE_DIR)
53
- _get_catch_version()
54
- endif()
55
-
56
- # Download the header if it wasn't found or if it's outdated
57
- if(NOT CATCH_VERSION OR CATCH_VERSION VERSION_LESS ${Catch_FIND_VERSION})
58
- if(DOWNLOAD_CATCH)
59
- _download_catch(${Catch_FIND_VERSION} "${PROJECT_BINARY_DIR}/catch/")
60
- _get_catch_version()
61
- else()
62
- set(CATCH_FOUND FALSE)
63
- return()
64
- endif()
65
- endif()
66
-
67
- add_library(Catch2::Catch2 IMPORTED INTERFACE)
68
- set_property(TARGET Catch2::Catch2 PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${CATCH_INCLUDE_DIR}")
69
-
70
- set(CATCH_FOUND TRUE)
@@ -1,86 +0,0 @@
1
- # - Try to find Eigen3 lib
2
- #
3
- # This module supports requiring a minimum version, e.g. you can do
4
- # find_package(Eigen3 3.1.2)
5
- # to require version 3.1.2 or newer of Eigen3.
6
- #
7
- # Once done this will define
8
- #
9
- # EIGEN3_FOUND - system has eigen lib with correct version
10
- # EIGEN3_INCLUDE_DIR - the eigen include directory
11
- # EIGEN3_VERSION - eigen version
12
-
13
- # Copyright (c) 2006, 2007 Montel Laurent, <montel@kde.org>
14
- # Copyright (c) 2008, 2009 Gael Guennebaud, <g.gael@free.fr>
15
- # Copyright (c) 2009 Benoit Jacob <jacob.benoit.1@gmail.com>
16
- # Redistribution and use is allowed according to the terms of the 2-clause BSD license.
17
-
18
- if(NOT Eigen3_FIND_VERSION)
19
- if(NOT Eigen3_FIND_VERSION_MAJOR)
20
- set(Eigen3_FIND_VERSION_MAJOR 2)
21
- endif(NOT Eigen3_FIND_VERSION_MAJOR)
22
- if(NOT Eigen3_FIND_VERSION_MINOR)
23
- set(Eigen3_FIND_VERSION_MINOR 91)
24
- endif(NOT Eigen3_FIND_VERSION_MINOR)
25
- if(NOT Eigen3_FIND_VERSION_PATCH)
26
- set(Eigen3_FIND_VERSION_PATCH 0)
27
- endif(NOT Eigen3_FIND_VERSION_PATCH)
28
-
29
- set(Eigen3_FIND_VERSION
30
- "${Eigen3_FIND_VERSION_MAJOR}.${Eigen3_FIND_VERSION_MINOR}.${Eigen3_FIND_VERSION_PATCH}")
31
- endif(NOT Eigen3_FIND_VERSION)
32
-
33
- macro(_eigen3_check_version)
34
- file(READ "${EIGEN3_INCLUDE_DIR}/Eigen/src/Core/util/Macros.h" _eigen3_version_header)
35
-
36
- string(REGEX MATCH "define[ \t]+EIGEN_WORLD_VERSION[ \t]+([0-9]+)" _eigen3_world_version_match
37
- "${_eigen3_version_header}")
38
- set(EIGEN3_WORLD_VERSION "${CMAKE_MATCH_1}")
39
- string(REGEX MATCH "define[ \t]+EIGEN_MAJOR_VERSION[ \t]+([0-9]+)" _eigen3_major_version_match
40
- "${_eigen3_version_header}")
41
- set(EIGEN3_MAJOR_VERSION "${CMAKE_MATCH_1}")
42
- string(REGEX MATCH "define[ \t]+EIGEN_MINOR_VERSION[ \t]+([0-9]+)" _eigen3_minor_version_match
43
- "${_eigen3_version_header}")
44
- set(EIGEN3_MINOR_VERSION "${CMAKE_MATCH_1}")
45
-
46
- set(EIGEN3_VERSION ${EIGEN3_WORLD_VERSION}.${EIGEN3_MAJOR_VERSION}.${EIGEN3_MINOR_VERSION})
47
- if(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION})
48
- set(EIGEN3_VERSION_OK FALSE)
49
- else(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION})
50
- set(EIGEN3_VERSION_OK TRUE)
51
- endif(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION})
52
-
53
- if(NOT EIGEN3_VERSION_OK)
54
-
55
- message(STATUS "Eigen3 version ${EIGEN3_VERSION} found in ${EIGEN3_INCLUDE_DIR}, "
56
- "but at least version ${Eigen3_FIND_VERSION} is required")
57
- endif(NOT EIGEN3_VERSION_OK)
58
- endmacro(_eigen3_check_version)
59
-
60
- if(EIGEN3_INCLUDE_DIR)
61
-
62
- # in cache already
63
- _eigen3_check_version()
64
- set(EIGEN3_FOUND ${EIGEN3_VERSION_OK})
65
-
66
- else(EIGEN3_INCLUDE_DIR)
67
- if(NOT DEFINED KDE4_INCLUDE_DIR)
68
- set(KDE4_INCLUDE_DIR "")
69
- endif()
70
-
71
- find_path(
72
- EIGEN3_INCLUDE_DIR
73
- NAMES signature_of_eigen3_matrix_library
74
- PATHS ${CMAKE_INSTALL_PREFIX}/include ${KDE4_INCLUDE_DIR}
75
- PATH_SUFFIXES eigen3 eigen)
76
-
77
- if(EIGEN3_INCLUDE_DIR)
78
- _eigen3_check_version()
79
- endif(EIGEN3_INCLUDE_DIR)
80
-
81
- include(FindPackageHandleStandardArgs)
82
- find_package_handle_standard_args(Eigen3 DEFAULT_MSG EIGEN3_INCLUDE_DIR EIGEN3_VERSION_OK)
83
-
84
- mark_as_advanced(EIGEN3_INCLUDE_DIR)
85
-
86
- endif(EIGEN3_INCLUDE_DIR)
@@ -1,257 +0,0 @@
1
- # - Find python libraries
2
- # This module finds the libraries corresponding to the Python interpreter
3
- # FindPythonInterp provides.
4
- # This code sets the following variables:
5
- #
6
- # PYTHONLIBS_FOUND - have the Python libs been found
7
- # PYTHON_PREFIX - path to the Python installation
8
- # PYTHON_LIBRARIES - path to the python library
9
- # PYTHON_INCLUDE_DIRS - path to where Python.h is found
10
- # PYTHON_MODULE_EXTENSION - lib extension, e.g. '.so' or '.pyd'
11
- # PYTHON_MODULE_PREFIX - lib name prefix: usually an empty string
12
- # PYTHON_SITE_PACKAGES - path to installation site-packages
13
- # PYTHON_IS_DEBUG - whether the Python interpreter is a debug build
14
- #
15
- # Thanks to talljimbo for the patch adding the 'LDVERSION' config
16
- # variable usage.
17
-
18
- #=============================================================================
19
- # Copyright 2001-2009 Kitware, Inc.
20
- # Copyright 2012 Continuum Analytics, Inc.
21
- #
22
- # All rights reserved.
23
- #
24
- # Redistribution and use in source and binary forms, with or without
25
- # modification, are permitted provided that the following conditions
26
- # are met:
27
- #
28
- # * Redistributions of source code must retain the above copyright
29
- # notice, this list of conditions and the following disclaimer.
30
- #
31
- # * Redistributions in binary form must reproduce the above copyright
32
- # notice, this list of conditions and the following disclaimer in the
33
- # documentation and/or other materials provided with the distribution.
34
- #
35
- # * Neither the names of Kitware, Inc., the Insight Software Consortium,
36
- # nor the names of their contributors may be used to endorse or promote
37
- # products derived from this software without specific prior written
38
- # permission.
39
- #
40
- # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
41
- # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
42
- # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
43
- # # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
44
- # HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
45
- # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
46
- # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
47
- # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
48
- # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
49
- # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
50
- # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
51
- #=============================================================================
52
-
53
- # Checking for the extension makes sure that `LibsNew` was found and not just `Libs`.
54
- if(PYTHONLIBS_FOUND AND PYTHON_MODULE_EXTENSION)
55
- return()
56
- endif()
57
-
58
- if(PythonLibsNew_FIND_QUIETLY)
59
- set(_pythonlibs_quiet QUIET)
60
- else()
61
- set(_pythonlibs_quiet "")
62
- endif()
63
-
64
- if(PythonLibsNew_FIND_REQUIRED)
65
- set(_pythonlibs_required REQUIRED)
66
- endif()
67
-
68
- # Check to see if the `python` command is present and from a virtual
69
- # environment, conda, or GHA activation - if it is, try to use that.
70
-
71
- if(NOT DEFINED PYTHON_EXECUTABLE)
72
- if(DEFINED ENV{VIRTUAL_ENV})
73
- find_program(
74
- PYTHON_EXECUTABLE python
75
- PATHS "$ENV{VIRTUAL_ENV}" "$ENV{VIRTUAL_ENV}/bin"
76
- NO_DEFAULT_PATH)
77
- elseif(DEFINED ENV{CONDA_PREFIX})
78
- find_program(
79
- PYTHON_EXECUTABLE python
80
- PATHS "$ENV{CONDA_PREFIX}" "$ENV{CONDA_PREFIX}/bin"
81
- NO_DEFAULT_PATH)
82
- elseif(DEFINED ENV{pythonLocation})
83
- find_program(
84
- PYTHON_EXECUTABLE python
85
- PATHS "$ENV{pythonLocation}" "$ENV{pythonLocation}/bin"
86
- NO_DEFAULT_PATH)
87
- endif()
88
- if(NOT PYTHON_EXECUTABLE)
89
- unset(PYTHON_EXECUTABLE)
90
- endif()
91
- endif()
92
-
93
- # Use the Python interpreter to find the libs.
94
- if(NOT PythonLibsNew_FIND_VERSION)
95
- set(PythonLibsNew_FIND_VERSION "")
96
- endif()
97
-
98
- find_package(PythonInterp ${PythonLibsNew_FIND_VERSION} ${_pythonlibs_required}
99
- ${_pythonlibs_quiet})
100
-
101
- if(NOT PYTHONINTERP_FOUND)
102
- set(PYTHONLIBS_FOUND FALSE)
103
- set(PythonLibsNew_FOUND FALSE)
104
- return()
105
- endif()
106
-
107
- # According to https://stackoverflow.com/questions/646518/python-how-to-detect-debug-interpreter
108
- # testing whether sys has the gettotalrefcount function is a reliable, cross-platform
109
- # way to detect a CPython debug interpreter.
110
- #
111
- # The library suffix is from the config var LDVERSION sometimes, otherwise
112
- # VERSION. VERSION will typically be like "2.7" on unix, and "27" on windows.
113
- execute_process(
114
- COMMAND
115
- "${PYTHON_EXECUTABLE}" "-c" "from distutils import sysconfig as s;import sys;import struct;
116
- print('.'.join(str(v) for v in sys.version_info));
117
- print(sys.prefix);
118
- print(s.get_python_inc(plat_specific=True));
119
- print(s.get_python_lib(plat_specific=True));
120
- print(s.get_config_var('EXT_SUFFIX') or s.get_config_var('SO'));
121
- print(hasattr(sys, 'gettotalrefcount')+0);
122
- print(struct.calcsize('@P'));
123
- print(s.get_config_var('LDVERSION') or s.get_config_var('VERSION'));
124
- print(s.get_config_var('LIBDIR') or '');
125
- print(s.get_config_var('MULTIARCH') or '');
126
- "
127
- RESULT_VARIABLE _PYTHON_SUCCESS
128
- OUTPUT_VARIABLE _PYTHON_VALUES
129
- ERROR_VARIABLE _PYTHON_ERROR_VALUE)
130
-
131
- if(NOT _PYTHON_SUCCESS MATCHES 0)
132
- if(PythonLibsNew_FIND_REQUIRED)
133
- message(FATAL_ERROR "Python config failure:\n${_PYTHON_ERROR_VALUE}")
134
- endif()
135
- set(PYTHONLIBS_FOUND FALSE)
136
- set(PythonLibsNew_FOUND FALSE)
137
- return()
138
- endif()
139
-
140
- # Convert the process output into a list
141
- if(WIN32)
142
- string(REGEX REPLACE "\\\\" "/" _PYTHON_VALUES ${_PYTHON_VALUES})
143
- endif()
144
- string(REGEX REPLACE ";" "\\\\;" _PYTHON_VALUES ${_PYTHON_VALUES})
145
- string(REGEX REPLACE "\n" ";" _PYTHON_VALUES ${_PYTHON_VALUES})
146
- list(GET _PYTHON_VALUES 0 _PYTHON_VERSION_LIST)
147
- list(GET _PYTHON_VALUES 1 PYTHON_PREFIX)
148
- list(GET _PYTHON_VALUES 2 PYTHON_INCLUDE_DIR)
149
- list(GET _PYTHON_VALUES 3 PYTHON_SITE_PACKAGES)
150
- list(GET _PYTHON_VALUES 4 PYTHON_MODULE_EXTENSION)
151
- list(GET _PYTHON_VALUES 5 PYTHON_IS_DEBUG)
152
- list(GET _PYTHON_VALUES 6 PYTHON_SIZEOF_VOID_P)
153
- list(GET _PYTHON_VALUES 7 PYTHON_LIBRARY_SUFFIX)
154
- list(GET _PYTHON_VALUES 8 PYTHON_LIBDIR)
155
- list(GET _PYTHON_VALUES 9 PYTHON_MULTIARCH)
156
-
157
- # Make sure the Python has the same pointer-size as the chosen compiler
158
- # Skip if CMAKE_SIZEOF_VOID_P is not defined
159
- if(CMAKE_SIZEOF_VOID_P AND (NOT "${PYTHON_SIZEOF_VOID_P}" STREQUAL "${CMAKE_SIZEOF_VOID_P}"))
160
- if(PythonLibsNew_FIND_REQUIRED)
161
- math(EXPR _PYTHON_BITS "${PYTHON_SIZEOF_VOID_P} * 8")
162
- math(EXPR _CMAKE_BITS "${CMAKE_SIZEOF_VOID_P} * 8")
163
- message(FATAL_ERROR "Python config failure: Python is ${_PYTHON_BITS}-bit, "
164
- "chosen compiler is ${_CMAKE_BITS}-bit")
165
- endif()
166
- set(PYTHONLIBS_FOUND FALSE)
167
- set(PythonLibsNew_FOUND FALSE)
168
- return()
169
- endif()
170
-
171
- # The built-in FindPython didn't always give the version numbers
172
- string(REGEX REPLACE "\\." ";" _PYTHON_VERSION_LIST ${_PYTHON_VERSION_LIST})
173
- list(GET _PYTHON_VERSION_LIST 0 PYTHON_VERSION_MAJOR)
174
- list(GET _PYTHON_VERSION_LIST 1 PYTHON_VERSION_MINOR)
175
- list(GET _PYTHON_VERSION_LIST 2 PYTHON_VERSION_PATCH)
176
- set(PYTHON_VERSION "${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.${PYTHON_VERSION_PATCH}")
177
-
178
- # Make sure all directory separators are '/'
179
- string(REGEX REPLACE "\\\\" "/" PYTHON_PREFIX "${PYTHON_PREFIX}")
180
- string(REGEX REPLACE "\\\\" "/" PYTHON_INCLUDE_DIR "${PYTHON_INCLUDE_DIR}")
181
- string(REGEX REPLACE "\\\\" "/" PYTHON_SITE_PACKAGES "${PYTHON_SITE_PACKAGES}")
182
-
183
- if(CMAKE_HOST_WIN32)
184
- set(PYTHON_LIBRARY "${PYTHON_PREFIX}/libs/python${PYTHON_LIBRARY_SUFFIX}.lib")
185
-
186
- # when run in a venv, PYTHON_PREFIX points to it. But the libraries remain in the
187
- # original python installation. They may be found relative to PYTHON_INCLUDE_DIR.
188
- if(NOT EXISTS "${PYTHON_LIBRARY}")
189
- get_filename_component(_PYTHON_ROOT ${PYTHON_INCLUDE_DIR} DIRECTORY)
190
- set(PYTHON_LIBRARY "${_PYTHON_ROOT}/libs/python${PYTHON_LIBRARY_SUFFIX}.lib")
191
- endif()
192
-
193
- # if we are in MSYS & MINGW, and we didn't find windows python lib, look for system python lib
194
- if(DEFINED ENV{MSYSTEM}
195
- AND MINGW
196
- AND NOT EXISTS "${PYTHON_LIBRARY}")
197
- if(PYTHON_MULTIARCH)
198
- set(_PYTHON_LIBS_SEARCH "${PYTHON_LIBDIR}/${PYTHON_MULTIARCH}" "${PYTHON_LIBDIR}")
199
- else()
200
- set(_PYTHON_LIBS_SEARCH "${PYTHON_LIBDIR}")
201
- endif()
202
- unset(PYTHON_LIBRARY)
203
- find_library(
204
- PYTHON_LIBRARY
205
- NAMES "python${PYTHON_LIBRARY_SUFFIX}"
206
- PATHS ${_PYTHON_LIBS_SEARCH}
207
- NO_DEFAULT_PATH)
208
- endif()
209
-
210
- # raise an error if the python libs are still not found.
211
- if(NOT EXISTS "${PYTHON_LIBRARY}")
212
- message(FATAL_ERROR "Python libraries not found")
213
- endif()
214
-
215
- else()
216
- if(PYTHON_MULTIARCH)
217
- set(_PYTHON_LIBS_SEARCH "${PYTHON_LIBDIR}/${PYTHON_MULTIARCH}" "${PYTHON_LIBDIR}")
218
- else()
219
- set(_PYTHON_LIBS_SEARCH "${PYTHON_LIBDIR}")
220
- endif()
221
- #message(STATUS "Searching for Python libs in ${_PYTHON_LIBS_SEARCH}")
222
- # Probably this needs to be more involved. It would be nice if the config
223
- # information the python interpreter itself gave us were more complete.
224
- find_library(
225
- PYTHON_LIBRARY
226
- NAMES "python${PYTHON_LIBRARY_SUFFIX}"
227
- PATHS ${_PYTHON_LIBS_SEARCH}
228
- NO_DEFAULT_PATH)
229
-
230
- # If all else fails, just set the name/version and let the linker figure out the path.
231
- if(NOT PYTHON_LIBRARY)
232
- set(PYTHON_LIBRARY python${PYTHON_LIBRARY_SUFFIX})
233
- endif()
234
- endif()
235
-
236
- mark_as_advanced(PYTHON_LIBRARY PYTHON_INCLUDE_DIR)
237
-
238
- # We use PYTHON_INCLUDE_DIR, PYTHON_LIBRARY and PYTHON_DEBUG_LIBRARY for the
239
- # cache entries because they are meant to specify the location of a single
240
- # library. We now set the variables listed by the documentation for this
241
- # module.
242
- set(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}")
243
- set(PYTHON_LIBRARIES "${PYTHON_LIBRARY}")
244
- if(NOT PYTHON_DEBUG_LIBRARY)
245
- set(PYTHON_DEBUG_LIBRARY "")
246
- endif()
247
- set(PYTHON_DEBUG_LIBRARIES "${PYTHON_DEBUG_LIBRARY}")
248
-
249
- find_package_message(PYTHON "Found PythonLibs: ${PYTHON_LIBRARY}"
250
- "${PYTHON_EXECUTABLE}${PYTHON_VERSION_STRING}")
251
-
252
- set(PYTHONLIBS_FOUND TRUE)
253
- set(PythonLibsNew_FOUND TRUE)
254
-
255
- if(NOT PYTHON_MODULE_PREFIX)
256
- set(PYTHON_MODULE_PREFIX "")
257
- endif()
@@ -1,44 +0,0 @@
1
- #!/bin/bash
2
- #
3
- # Script to check include/test code for common pybind11 code style errors.
4
- #
5
- # This script currently checks for
6
- #
7
- # 1. missing space between keyword and parenthesis, e.g.: for(, if(, while(
8
- # 2. Missing space between right parenthesis and brace, e.g. 'for (...){'
9
- # 3. opening brace on its own line. It should always be on the same line as the
10
- # if/while/for/do statement.
11
- #
12
- # Invoke as: tools/check-style.sh <filenames>
13
- #
14
-
15
- check_style_errors=0
16
- IFS=$'\n'
17
-
18
-
19
- found="$(grep '\<\(if\|for\|while\|catch\)(\|){' "$@" -rn --color=always)"
20
- if [ -n "$found" ]; then
21
- echo -e '\033[31;01mError: found the following coding style problems:\033[0m'
22
- check_style_errors=1
23
- echo "${found//^/ /}"
24
- fi
25
-
26
- found="$(awk '
27
- function prefix(filename, lineno) {
28
- return " \033[35m" filename "\033[36m:\033[32m" lineno "\033[36m:\033[0m"
29
- }
30
- function mark(pattern, string) { sub(pattern, "\033[01;31m&\033[0m", string); return string }
31
- last && /^\s*{/ {
32
- print prefix(FILENAME, FNR-1) mark("\\)\\s*$", last)
33
- print prefix(FILENAME, FNR) mark("^\\s*{", $0)
34
- last=""
35
- }
36
- { last = /(if|for|while|catch|switch)\s*\(.*\)\s*$/ ? $0 : "" }
37
- ' "$(find include -type f)" "$@")"
38
- if [ -n "$found" ]; then
39
- check_style_errors=1
40
- echo -e '\033[31;01mError: braces should occur on the same line as the if/while/.. statement. Found issues in the following files:\033[0m'
41
- echo "$found"
42
- fi
43
-
44
- exit $check_style_errors
@@ -1,23 +0,0 @@
1
- # Source: https://gitlab.kitware.com/cmake/community/-/wikis/FAQ#can-i-do-make-uninstall-with-cmake
2
-
3
- if(NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt")
4
- message(FATAL_ERROR "Cannot find install manifest: @CMAKE_BINARY_DIR@/install_manifest.txt")
5
- endif()
6
-
7
- file(READ "@CMAKE_BINARY_DIR@/install_manifest.txt" files)
8
- string(REGEX REPLACE "\n" ";" files "${files}")
9
- foreach(file ${files})
10
- message(STATUS "Uninstalling $ENV{DESTDIR}${file}")
11
- if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
12
- exec_program(
13
- "@CMAKE_COMMAND@" ARGS
14
- "-E remove \"$ENV{DESTDIR}${file}\""
15
- OUTPUT_VARIABLE rm_out
16
- RETURN_VALUE rm_retval)
17
- if(NOT "${rm_retval}" STREQUAL 0)
18
- message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}")
19
- endif()
20
- else(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
21
- message(STATUS "File $ENV{DESTDIR}${file} does not exist.")
22
- endif()
23
- endforeach()
@@ -1,39 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- from __future__ import division, print_function
3
-
4
- import os
5
- import sys
6
-
7
- # Internal build script for generating debugging test .so size.
8
- # Usage:
9
- # python libsize.py file.so save.txt -- displays the size of file.so and, if save.txt exists, compares it to the
10
- # size in it, then overwrites save.txt with the new size for future runs.
11
-
12
- if len(sys.argv) != 3:
13
- sys.exit("Invalid arguments: usage: python libsize.py file.so save.txt")
14
-
15
- lib = sys.argv[1]
16
- save = sys.argv[2]
17
-
18
- if not os.path.exists(lib):
19
- sys.exit("Error: requested file ({}) does not exist".format(lib))
20
-
21
- libsize = os.path.getsize(lib)
22
-
23
- print("------", os.path.basename(lib), "file size:", libsize, end="")
24
-
25
- if os.path.exists(save):
26
- with open(save) as sf:
27
- oldsize = int(sf.readline())
28
-
29
- if oldsize > 0:
30
- change = libsize - oldsize
31
- if change == 0:
32
- print(" (no change)")
33
- else:
34
- print(" (change of {:+} bytes = {:+.2%})".format(change, change / oldsize))
35
- else:
36
- print()
37
-
38
- with open(save, "w") as sf:
39
- sf.write(str(libsize))
@@ -1,64 +0,0 @@
1
- #!/usr/bin/env python3
2
- # -*- coding: utf-8 -*-
3
-
4
- import re
5
-
6
- import ghapi.all
7
- from rich import print
8
- from rich.syntax import Syntax
9
-
10
- ENTRY = re.compile(
11
- r"""
12
- Suggested \s changelog \s entry:
13
- .*
14
- ```rst
15
- \s*
16
- (.*?)
17
- \s*
18
- ```
19
- """,
20
- re.DOTALL | re.VERBOSE,
21
- )
22
-
23
- print()
24
-
25
-
26
- api = ghapi.all.GhApi(owner="pybind", repo="pybind11")
27
-
28
- issues_pages = ghapi.page.paged(
29
- api.issues.list_for_repo, labels="needs changelog", state="closed"
30
- )
31
- issues = (issue for page in issues_pages for issue in page)
32
- missing = []
33
-
34
- for issue in issues:
35
- changelog = ENTRY.findall(issue.body)
36
- if changelog:
37
- (msg,) = changelog
38
- if not msg.startswith("* "):
39
- msg = "* " + msg
40
- if not msg.endswith("."):
41
- msg += "."
42
-
43
- msg += f"\n `#{issue.number} <{issue.html_url}>`_"
44
-
45
- print(Syntax(msg, "rst", theme="ansi_light", word_wrap=True))
46
- print()
47
-
48
- else:
49
- missing.append(issue)
50
-
51
- if missing:
52
- print()
53
- print("[blue]" + "-" * 30)
54
- print()
55
-
56
- for issue in missing:
57
- print(f"[red bold]Missing:[/red bold][red] {issue.title}")
58
- print(f"[red] {issue.html_url}\n")
59
-
60
- print("[bold]Template:\n")
61
- msg = "## Suggested changelog entry:\n\n```rst\n\n```"
62
- print(Syntax(msg, "md", theme="ansi_light"))
63
-
64
- print()