conan 2.23.0__tar.gz → 2.24.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (354) hide show
  1. {conan-2.23.0/conan.egg-info → conan-2.24.0}/PKG-INFO +1 -1
  2. {conan-2.23.0 → conan-2.24.0}/conan/__init__.py +1 -1
  3. {conan-2.23.0 → conan-2.24.0}/conan/api/conan_api.py +7 -4
  4. {conan-2.23.0 → conan-2.24.0}/conan/api/model/list.py +1 -0
  5. {conan-2.23.0 → conan-2.24.0}/conan/api/subapi/cache.py +27 -10
  6. conan-2.24.0/conan/api/subapi/config.py +264 -0
  7. {conan-2.23.0 → conan-2.24.0}/conan/api/subapi/graph.py +7 -4
  8. {conan-2.23.0 → conan-2.24.0}/conan/api/subapi/lockfile.py +13 -8
  9. {conan-2.23.0 → conan-2.24.0}/conan/api/subapi/report.py +12 -5
  10. {conan-2.23.0 → conan-2.24.0}/conan/api/subapi/upload.py +13 -7
  11. {conan-2.23.0 → conan-2.24.0}/conan/api/subapi/workspace.py +74 -13
  12. {conan-2.23.0 → conan-2.24.0}/conan/cli/commands/cache.py +12 -4
  13. {conan-2.23.0 → conan-2.24.0}/conan/cli/commands/config.py +23 -4
  14. {conan-2.23.0 → conan-2.24.0}/conan/cli/commands/lock.py +55 -16
  15. {conan-2.23.0 → conan-2.24.0}/conan/cli/commands/workspace.py +37 -10
  16. {conan-2.23.0 → conan-2.24.0}/conan/cli/formatters/graph/info_graph_html.py +20 -1
  17. {conan-2.23.0 → conan-2.24.0}/conan/cli/formatters/report/diff_html.py +19 -2
  18. {conan-2.23.0 → conan-2.24.0}/conan/internal/api/detect/detect_api.py +1 -1
  19. {conan-2.23.0 → conan-2.24.0}/conan/internal/cache/integrity_check.py +15 -8
  20. {conan-2.23.0 → conan-2.24.0}/conan/internal/graph/graph_binaries.py +12 -25
  21. {conan-2.23.0 → conan-2.24.0}/conan/internal/graph/graph_builder.py +14 -2
  22. {conan-2.23.0 → conan-2.24.0}/conan/internal/graph/graph_error.py +10 -2
  23. conan-2.24.0/conan/internal/model/conanconfig.py +36 -0
  24. {conan-2.23.0 → conan-2.24.0}/conan/internal/model/conf.py +3 -1
  25. conan-2.24.0/conan/internal/model/recipe_ref.py +13 -0
  26. {conan-2.23.0 → conan-2.24.0}/conan/internal/model/workspace.py +3 -2
  27. {conan-2.23.0 → conan-2.24.0}/conan/tools/cmake/cmakedeps2/target_configuration.py +13 -13
  28. {conan-2.23.0 → conan-2.24.0}/conan/tools/env/environment.py +6 -2
  29. {conan-2.23.0 → conan-2.24.0}/conan/tools/gnu/autotoolstoolchain.py +7 -2
  30. {conan-2.23.0 → conan-2.24.0}/conan/tools/gnu/gnutoolchain.py +7 -2
  31. {conan-2.23.0 → conan-2.24.0}/conan/tools/meson/toolchain.py +3 -2
  32. {conan-2.23.0 → conan-2.24.0}/conan/tools/microsoft/nmakedeps.py +1 -1
  33. {conan-2.23.0 → conan-2.24.0}/conan/tools/microsoft/nmaketoolchain.py +15 -10
  34. {conan-2.23.0 → conan-2.24.0}/conan/tools/microsoft/toolchain.py +4 -4
  35. {conan-2.23.0 → conan-2.24.0/conan.egg-info}/PKG-INFO +1 -1
  36. {conan-2.23.0 → conan-2.24.0}/conan.egg-info/SOURCES.txt +1 -0
  37. conan-2.23.0/conan/api/subapi/config.py +0 -189
  38. conan-2.23.0/conan/internal/model/recipe_ref.py +0 -8
  39. {conan-2.23.0 → conan-2.24.0}/LICENSE.md +0 -0
  40. {conan-2.23.0 → conan-2.24.0}/MANIFEST.in +0 -0
  41. {conan-2.23.0 → conan-2.24.0}/README.md +0 -0
  42. {conan-2.23.0 → conan-2.24.0}/conan/api/__init__.py +0 -0
  43. {conan-2.23.0 → conan-2.24.0}/conan/api/input.py +0 -0
  44. {conan-2.23.0 → conan-2.24.0}/conan/api/model/__init__.py +0 -0
  45. {conan-2.23.0 → conan-2.24.0}/conan/api/model/refs.py +0 -0
  46. {conan-2.23.0 → conan-2.24.0}/conan/api/model/remote.py +0 -0
  47. {conan-2.23.0 → conan-2.24.0}/conan/api/output.py +0 -0
  48. {conan-2.23.0 → conan-2.24.0}/conan/api/subapi/__init__.py +0 -0
  49. {conan-2.23.0 → conan-2.24.0}/conan/api/subapi/audit.py +0 -0
  50. {conan-2.23.0 → conan-2.24.0}/conan/api/subapi/command.py +0 -0
  51. {conan-2.23.0 → conan-2.24.0}/conan/api/subapi/download.py +0 -0
  52. {conan-2.23.0 → conan-2.24.0}/conan/api/subapi/export.py +0 -0
  53. {conan-2.23.0 → conan-2.24.0}/conan/api/subapi/install.py +0 -0
  54. {conan-2.23.0 → conan-2.24.0}/conan/api/subapi/list.py +0 -0
  55. {conan-2.23.0 → conan-2.24.0}/conan/api/subapi/local.py +0 -0
  56. {conan-2.23.0 → conan-2.24.0}/conan/api/subapi/new.py +0 -0
  57. {conan-2.23.0 → conan-2.24.0}/conan/api/subapi/profiles.py +0 -0
  58. {conan-2.23.0 → conan-2.24.0}/conan/api/subapi/remotes.py +0 -0
  59. {conan-2.23.0 → conan-2.24.0}/conan/api/subapi/remove.py +0 -0
  60. {conan-2.23.0 → conan-2.24.0}/conan/cli/__init__.py +0 -0
  61. {conan-2.23.0 → conan-2.24.0}/conan/cli/args.py +0 -0
  62. {conan-2.23.0 → conan-2.24.0}/conan/cli/cli.py +0 -0
  63. {conan-2.23.0 → conan-2.24.0}/conan/cli/command.py +0 -0
  64. {conan-2.23.0 → conan-2.24.0}/conan/cli/commands/__init__.py +0 -0
  65. {conan-2.23.0 → conan-2.24.0}/conan/cli/commands/audit.py +0 -0
  66. {conan-2.23.0 → conan-2.24.0}/conan/cli/commands/build.py +0 -0
  67. {conan-2.23.0 → conan-2.24.0}/conan/cli/commands/create.py +0 -0
  68. {conan-2.23.0 → conan-2.24.0}/conan/cli/commands/download.py +0 -0
  69. {conan-2.23.0 → conan-2.24.0}/conan/cli/commands/editable.py +0 -0
  70. {conan-2.23.0 → conan-2.24.0}/conan/cli/commands/export.py +0 -0
  71. {conan-2.23.0 → conan-2.24.0}/conan/cli/commands/export_pkg.py +0 -0
  72. {conan-2.23.0 → conan-2.24.0}/conan/cli/commands/graph.py +0 -0
  73. {conan-2.23.0 → conan-2.24.0}/conan/cli/commands/inspect.py +0 -0
  74. {conan-2.23.0 → conan-2.24.0}/conan/cli/commands/install.py +0 -0
  75. {conan-2.23.0 → conan-2.24.0}/conan/cli/commands/list.py +0 -0
  76. {conan-2.23.0 → conan-2.24.0}/conan/cli/commands/new.py +0 -0
  77. {conan-2.23.0 → conan-2.24.0}/conan/cli/commands/pkglist.py +0 -0
  78. {conan-2.23.0 → conan-2.24.0}/conan/cli/commands/profile.py +0 -0
  79. {conan-2.23.0 → conan-2.24.0}/conan/cli/commands/remote.py +0 -0
  80. {conan-2.23.0 → conan-2.24.0}/conan/cli/commands/remove.py +0 -0
  81. {conan-2.23.0 → conan-2.24.0}/conan/cli/commands/report.py +0 -0
  82. {conan-2.23.0 → conan-2.24.0}/conan/cli/commands/run.py +0 -0
  83. {conan-2.23.0 → conan-2.24.0}/conan/cli/commands/search.py +0 -0
  84. {conan-2.23.0 → conan-2.24.0}/conan/cli/commands/source.py +0 -0
  85. {conan-2.23.0 → conan-2.24.0}/conan/cli/commands/test.py +0 -0
  86. {conan-2.23.0 → conan-2.24.0}/conan/cli/commands/upload.py +0 -0
  87. {conan-2.23.0 → conan-2.24.0}/conan/cli/commands/version.py +0 -0
  88. {conan-2.23.0 → conan-2.24.0}/conan/cli/exit_codes.py +0 -0
  89. {conan-2.23.0 → conan-2.24.0}/conan/cli/formatters/__init__.py +0 -0
  90. {conan-2.23.0 → conan-2.24.0}/conan/cli/formatters/audit/__init__.py +0 -0
  91. {conan-2.23.0 → conan-2.24.0}/conan/cli/formatters/audit/vulnerabilities.py +0 -0
  92. {conan-2.23.0 → conan-2.24.0}/conan/cli/formatters/graph/__init__.py +0 -0
  93. {conan-2.23.0 → conan-2.24.0}/conan/cli/formatters/graph/build_order_html.py +0 -0
  94. {conan-2.23.0 → conan-2.24.0}/conan/cli/formatters/graph/graph.py +0 -0
  95. {conan-2.23.0 → conan-2.24.0}/conan/cli/formatters/graph/graph_info_text.py +0 -0
  96. {conan-2.23.0 → conan-2.24.0}/conan/cli/formatters/graph/info_graph_dot.py +0 -0
  97. {conan-2.23.0 → conan-2.24.0}/conan/cli/formatters/list/__init__.py +0 -0
  98. {conan-2.23.0 → conan-2.24.0}/conan/cli/formatters/list/list.py +0 -0
  99. {conan-2.23.0 → conan-2.24.0}/conan/cli/formatters/list/search_table_html.py +0 -0
  100. {conan-2.23.0 → conan-2.24.0}/conan/cli/formatters/report/__init__.py +0 -0
  101. {conan-2.23.0 → conan-2.24.0}/conan/cli/formatters/report/diff.py +0 -0
  102. {conan-2.23.0 → conan-2.24.0}/conan/cli/printers/__init__.py +0 -0
  103. {conan-2.23.0 → conan-2.24.0}/conan/cli/printers/graph.py +0 -0
  104. {conan-2.23.0 → conan-2.24.0}/conan/cps/__init__.py +0 -0
  105. {conan-2.23.0 → conan-2.24.0}/conan/cps/cps.py +0 -0
  106. {conan-2.23.0 → conan-2.24.0}/conan/errors.py +0 -0
  107. {conan-2.23.0 → conan-2.24.0}/conan/internal/__init__.py +0 -0
  108. {conan-2.23.0 → conan-2.24.0}/conan/internal/api/__init__.py +0 -0
  109. {conan-2.23.0 → conan-2.24.0}/conan/internal/api/audit/__init__.py +0 -0
  110. {conan-2.23.0 → conan-2.24.0}/conan/internal/api/audit/providers.py +0 -0
  111. {conan-2.23.0 → conan-2.24.0}/conan/internal/api/config/__init__.py +0 -0
  112. {conan-2.23.0 → conan-2.24.0}/conan/internal/api/config/config_installer.py +2 -2
  113. {conan-2.23.0 → conan-2.24.0}/conan/internal/api/detect/__init__.py +0 -0
  114. {conan-2.23.0 → conan-2.24.0}/conan/internal/api/detect/detect_vs.py +0 -0
  115. {conan-2.23.0 → conan-2.24.0}/conan/internal/api/export.py +0 -0
  116. {conan-2.23.0 → conan-2.24.0}/conan/internal/api/install/__init__.py +0 -0
  117. {conan-2.23.0 → conan-2.24.0}/conan/internal/api/install/generators.py +0 -0
  118. {conan-2.23.0 → conan-2.24.0}/conan/internal/api/list/__init__.py +0 -0
  119. {conan-2.23.0 → conan-2.24.0}/conan/internal/api/list/query_parse.py +0 -0
  120. {conan-2.23.0 → conan-2.24.0}/conan/internal/api/local/__init__.py +0 -0
  121. {conan-2.23.0 → conan-2.24.0}/conan/internal/api/local/editable.py +0 -0
  122. {conan-2.23.0 → conan-2.24.0}/conan/internal/api/migrations.py +0 -0
  123. {conan-2.23.0 → conan-2.24.0}/conan/internal/api/new/__init__.py +0 -0
  124. {conan-2.23.0 → conan-2.24.0}/conan/internal/api/new/alias_new.py +0 -0
  125. {conan-2.23.0 → conan-2.24.0}/conan/internal/api/new/autoools_exe.py +0 -0
  126. {conan-2.23.0 → conan-2.24.0}/conan/internal/api/new/autotools_lib.py +0 -0
  127. {conan-2.23.0 → conan-2.24.0}/conan/internal/api/new/basic.py +0 -0
  128. {conan-2.23.0 → conan-2.24.0}/conan/internal/api/new/bazel_7_exe.py +0 -0
  129. {conan-2.23.0 → conan-2.24.0}/conan/internal/api/new/bazel_7_lib.py +0 -0
  130. {conan-2.23.0 → conan-2.24.0}/conan/internal/api/new/bazel_exe.py +0 -0
  131. {conan-2.23.0 → conan-2.24.0}/conan/internal/api/new/bazel_lib.py +0 -0
  132. {conan-2.23.0 → conan-2.24.0}/conan/internal/api/new/cmake_exe.py +0 -0
  133. {conan-2.23.0 → conan-2.24.0}/conan/internal/api/new/cmake_lib.py +0 -0
  134. {conan-2.23.0 → conan-2.24.0}/conan/internal/api/new/header_lib.py +0 -0
  135. {conan-2.23.0 → conan-2.24.0}/conan/internal/api/new/local_recipes_index.py +0 -0
  136. {conan-2.23.0 → conan-2.24.0}/conan/internal/api/new/meson_exe.py +0 -0
  137. {conan-2.23.0 → conan-2.24.0}/conan/internal/api/new/meson_lib.py +0 -0
  138. {conan-2.23.0 → conan-2.24.0}/conan/internal/api/new/msbuild_exe.py +0 -0
  139. {conan-2.23.0 → conan-2.24.0}/conan/internal/api/new/msbuild_lib.py +0 -0
  140. {conan-2.23.0 → conan-2.24.0}/conan/internal/api/new/premake_exe.py +0 -0
  141. {conan-2.23.0 → conan-2.24.0}/conan/internal/api/new/premake_lib.py +0 -0
  142. {conan-2.23.0 → conan-2.24.0}/conan/internal/api/new/qbs_lib.py +0 -0
  143. {conan-2.23.0 → conan-2.24.0}/conan/internal/api/new/workspace.py +0 -0
  144. {conan-2.23.0 → conan-2.24.0}/conan/internal/api/profile/__init__.py +0 -0
  145. {conan-2.23.0 → conan-2.24.0}/conan/internal/api/profile/detect.py +0 -0
  146. {conan-2.23.0 → conan-2.24.0}/conan/internal/api/profile/profile_loader.py +0 -0
  147. {conan-2.23.0 → conan-2.24.0}/conan/internal/api/remotes/__init__.py +0 -0
  148. {conan-2.23.0 → conan-2.24.0}/conan/internal/api/remotes/encrypt.py +0 -0
  149. {conan-2.23.0 → conan-2.24.0}/conan/internal/api/remotes/localdb.py +0 -0
  150. {conan-2.23.0 → conan-2.24.0}/conan/internal/api/upload.py +0 -0
  151. {conan-2.23.0 → conan-2.24.0}/conan/internal/api/uploader.py +0 -0
  152. {conan-2.23.0 → conan-2.24.0}/conan/internal/cache/__init__.py +0 -0
  153. {conan-2.23.0 → conan-2.24.0}/conan/internal/cache/cache.py +0 -0
  154. {conan-2.23.0 → conan-2.24.0}/conan/internal/cache/conan_reference_layout.py +0 -0
  155. {conan-2.23.0 → conan-2.24.0}/conan/internal/cache/db/__init__.py +0 -0
  156. {conan-2.23.0 → conan-2.24.0}/conan/internal/cache/db/cache_database.py +0 -0
  157. {conan-2.23.0 → conan-2.24.0}/conan/internal/cache/db/packages_table.py +0 -0
  158. {conan-2.23.0 → conan-2.24.0}/conan/internal/cache/db/recipes_table.py +0 -0
  159. {conan-2.23.0 → conan-2.24.0}/conan/internal/cache/db/table.py +0 -0
  160. {conan-2.23.0 → conan-2.24.0}/conan/internal/cache/home_paths.py +0 -0
  161. {conan-2.23.0 → conan-2.24.0}/conan/internal/conan_app.py +0 -0
  162. {conan-2.23.0 → conan-2.24.0}/conan/internal/default_settings.py +0 -0
  163. {conan-2.23.0 → conan-2.24.0}/conan/internal/deploy.py +0 -0
  164. {conan-2.23.0 → conan-2.24.0}/conan/internal/errors.py +0 -0
  165. {conan-2.23.0 → conan-2.24.0}/conan/internal/graph/__init__.py +0 -0
  166. {conan-2.23.0 → conan-2.24.0}/conan/internal/graph/build_mode.py +0 -0
  167. {conan-2.23.0 → conan-2.24.0}/conan/internal/graph/compatibility.py +0 -0
  168. {conan-2.23.0 → conan-2.24.0}/conan/internal/graph/compute_pid.py +0 -0
  169. {conan-2.23.0 → conan-2.24.0}/conan/internal/graph/graph.py +0 -0
  170. {conan-2.23.0 → conan-2.24.0}/conan/internal/graph/install_graph.py +0 -0
  171. {conan-2.23.0 → conan-2.24.0}/conan/internal/graph/installer.py +0 -0
  172. {conan-2.23.0 → conan-2.24.0}/conan/internal/graph/profile_node_definer.py +0 -0
  173. {conan-2.23.0 → conan-2.24.0}/conan/internal/graph/provides.py +0 -0
  174. {conan-2.23.0 → conan-2.24.0}/conan/internal/graph/proxy.py +0 -0
  175. {conan-2.23.0 → conan-2.24.0}/conan/internal/graph/python_requires.py +0 -0
  176. {conan-2.23.0 → conan-2.24.0}/conan/internal/graph/range_resolver.py +0 -0
  177. {conan-2.23.0 → conan-2.24.0}/conan/internal/hook_manager.py +0 -0
  178. {conan-2.23.0 → conan-2.24.0}/conan/internal/internal_tools.py +0 -0
  179. {conan-2.23.0 → conan-2.24.0}/conan/internal/loader.py +0 -0
  180. {conan-2.23.0 → conan-2.24.0}/conan/internal/methods.py +0 -0
  181. {conan-2.23.0 → conan-2.24.0}/conan/internal/model/__init__.py +0 -0
  182. {conan-2.23.0 → conan-2.24.0}/conan/internal/model/conan_file.py +0 -0
  183. {conan-2.23.0 → conan-2.24.0}/conan/internal/model/conanfile_interface.py +0 -0
  184. {conan-2.23.0 → conan-2.24.0}/conan/internal/model/cpp_info.py +0 -0
  185. {conan-2.23.0 → conan-2.24.0}/conan/internal/model/dependencies.py +0 -0
  186. {conan-2.23.0 → conan-2.24.0}/conan/internal/model/info.py +0 -0
  187. {conan-2.23.0 → conan-2.24.0}/conan/internal/model/layout.py +0 -0
  188. {conan-2.23.0 → conan-2.24.0}/conan/internal/model/lockfile.py +0 -0
  189. {conan-2.23.0 → conan-2.24.0}/conan/internal/model/manifest.py +0 -0
  190. {conan-2.23.0 → conan-2.24.0}/conan/internal/model/options.py +0 -0
  191. {conan-2.23.0 → conan-2.24.0}/conan/internal/model/pkg_type.py +0 -0
  192. {conan-2.23.0 → conan-2.24.0}/conan/internal/model/profile.py +0 -0
  193. {conan-2.23.0 → conan-2.24.0}/conan/internal/model/requires.py +0 -0
  194. {conan-2.23.0 → conan-2.24.0}/conan/internal/model/settings.py +0 -0
  195. {conan-2.23.0 → conan-2.24.0}/conan/internal/model/version.py +0 -0
  196. {conan-2.23.0 → conan-2.24.0}/conan/internal/model/version_range.py +0 -0
  197. {conan-2.23.0 → conan-2.24.0}/conan/internal/paths.py +0 -0
  198. {conan-2.23.0 → conan-2.24.0}/conan/internal/rest/__init__.py +0 -0
  199. {conan-2.23.0 → conan-2.24.0}/conan/internal/rest/auth_manager.py +0 -0
  200. {conan-2.23.0 → conan-2.24.0}/conan/internal/rest/caching_file_downloader.py +0 -0
  201. {conan-2.23.0 → conan-2.24.0}/conan/internal/rest/client_routes.py +0 -0
  202. {conan-2.23.0 → conan-2.24.0}/conan/internal/rest/conan_requester.py +0 -0
  203. {conan-2.23.0 → conan-2.24.0}/conan/internal/rest/download_cache.py +0 -0
  204. {conan-2.23.0 → conan-2.24.0}/conan/internal/rest/file_downloader.py +0 -0
  205. {conan-2.23.0 → conan-2.24.0}/conan/internal/rest/file_uploader.py +0 -0
  206. {conan-2.23.0 → conan-2.24.0}/conan/internal/rest/pkg_sign.py +0 -0
  207. {conan-2.23.0 → conan-2.24.0}/conan/internal/rest/remote_credentials.py +0 -0
  208. {conan-2.23.0 → conan-2.24.0}/conan/internal/rest/remote_manager.py +0 -0
  209. {conan-2.23.0 → conan-2.24.0}/conan/internal/rest/rest_client.py +0 -0
  210. {conan-2.23.0 → conan-2.24.0}/conan/internal/rest/rest_client_local_recipe_index.py +0 -0
  211. {conan-2.23.0 → conan-2.24.0}/conan/internal/rest/rest_client_v2.py +0 -0
  212. {conan-2.23.0 → conan-2.24.0}/conan/internal/rest/rest_routes.py +0 -0
  213. {conan-2.23.0 → conan-2.24.0}/conan/internal/runner/__init__.py +0 -0
  214. {conan-2.23.0 → conan-2.24.0}/conan/internal/runner/docker.py +0 -0
  215. {conan-2.23.0 → conan-2.24.0}/conan/internal/runner/output.py +0 -0
  216. {conan-2.23.0 → conan-2.24.0}/conan/internal/runner/ssh.py +0 -0
  217. {conan-2.23.0 → conan-2.24.0}/conan/internal/runner/wsl.py +0 -0
  218. {conan-2.23.0 → conan-2.24.0}/conan/internal/source.py +0 -0
  219. {conan-2.23.0 → conan-2.24.0}/conan/internal/subsystems.py +0 -0
  220. {conan-2.23.0 → conan-2.24.0}/conan/internal/util/__init__.py +0 -0
  221. {conan-2.23.0 → conan-2.24.0}/conan/internal/util/config_parser.py +0 -0
  222. {conan-2.23.0 → conan-2.24.0}/conan/internal/util/dates.py +0 -0
  223. {conan-2.23.0 → conan-2.24.0}/conan/internal/util/files.py +0 -0
  224. {conan-2.23.0 → conan-2.24.0}/conan/internal/util/runners.py +0 -0
  225. {conan-2.23.0 → conan-2.24.0}/conan/test/__init__.py +0 -0
  226. {conan-2.23.0 → conan-2.24.0}/conan/test/assets/__init__.py +0 -0
  227. {conan-2.23.0 → conan-2.24.0}/conan/test/assets/autotools.py +0 -0
  228. {conan-2.23.0 → conan-2.24.0}/conan/test/assets/cmake.py +0 -0
  229. {conan-2.23.0 → conan-2.24.0}/conan/test/assets/genconanfile.py +0 -0
  230. {conan-2.23.0 → conan-2.24.0}/conan/test/assets/premake.py +0 -0
  231. {conan-2.23.0 → conan-2.24.0}/conan/test/assets/sources.py +0 -0
  232. {conan-2.23.0 → conan-2.24.0}/conan/test/assets/visual_project_files.py +0 -0
  233. {conan-2.23.0 → conan-2.24.0}/conan/test/utils/__init__.py +0 -0
  234. {conan-2.23.0 → conan-2.24.0}/conan/test/utils/artifactory.py +0 -0
  235. {conan-2.23.0 → conan-2.24.0}/conan/test/utils/env.py +0 -0
  236. {conan-2.23.0 → conan-2.24.0}/conan/test/utils/file_server.py +0 -0
  237. {conan-2.23.0 → conan-2.24.0}/conan/test/utils/mocks.py +0 -0
  238. {conan-2.23.0 → conan-2.24.0}/conan/test/utils/profiles.py +0 -0
  239. {conan-2.23.0 → conan-2.24.0}/conan/test/utils/scm.py +0 -0
  240. {conan-2.23.0 → conan-2.24.0}/conan/test/utils/server_launcher.py +0 -0
  241. {conan-2.23.0 → conan-2.24.0}/conan/test/utils/test_files.py +0 -0
  242. {conan-2.23.0 → conan-2.24.0}/conan/test/utils/tools.py +0 -0
  243. {conan-2.23.0 → conan-2.24.0}/conan/tools/__init__.py +0 -0
  244. {conan-2.23.0 → conan-2.24.0}/conan/tools/android/__init__.py +0 -0
  245. {conan-2.23.0 → conan-2.24.0}/conan/tools/android/utils.py +0 -0
  246. {conan-2.23.0 → conan-2.24.0}/conan/tools/apple/__init__.py +0 -0
  247. {conan-2.23.0 → conan-2.24.0}/conan/tools/apple/apple.py +0 -0
  248. {conan-2.23.0 → conan-2.24.0}/conan/tools/apple/xcodebuild.py +0 -0
  249. {conan-2.23.0 → conan-2.24.0}/conan/tools/apple/xcodedeps.py +0 -0
  250. {conan-2.23.0 → conan-2.24.0}/conan/tools/apple/xcodetoolchain.py +0 -0
  251. {conan-2.23.0 → conan-2.24.0}/conan/tools/build/__init__.py +0 -0
  252. {conan-2.23.0 → conan-2.24.0}/conan/tools/build/compiler.py +0 -0
  253. {conan-2.23.0 → conan-2.24.0}/conan/tools/build/cppstd.py +0 -0
  254. {conan-2.23.0 → conan-2.24.0}/conan/tools/build/cpu.py +0 -0
  255. {conan-2.23.0 → conan-2.24.0}/conan/tools/build/cross_building.py +0 -0
  256. {conan-2.23.0 → conan-2.24.0}/conan/tools/build/cstd.py +0 -0
  257. {conan-2.23.0 → conan-2.24.0}/conan/tools/build/flags.py +0 -0
  258. {conan-2.23.0 → conan-2.24.0}/conan/tools/build/stdcpp_library.py +0 -0
  259. {conan-2.23.0 → conan-2.24.0}/conan/tools/cmake/__init__.py +0 -0
  260. {conan-2.23.0 → conan-2.24.0}/conan/tools/cmake/cmake.py +0 -0
  261. {conan-2.23.0 → conan-2.24.0}/conan/tools/cmake/cmakedeps/__init__.py +0 -0
  262. {conan-2.23.0 → conan-2.24.0}/conan/tools/cmake/cmakedeps/cmakedeps.py +0 -0
  263. {conan-2.23.0 → conan-2.24.0}/conan/tools/cmake/cmakedeps/templates/__init__.py +0 -0
  264. {conan-2.23.0 → conan-2.24.0}/conan/tools/cmake/cmakedeps/templates/config.py +0 -0
  265. {conan-2.23.0 → conan-2.24.0}/conan/tools/cmake/cmakedeps/templates/config_version.py +0 -0
  266. {conan-2.23.0 → conan-2.24.0}/conan/tools/cmake/cmakedeps/templates/macros.py +0 -0
  267. {conan-2.23.0 → conan-2.24.0}/conan/tools/cmake/cmakedeps/templates/target_configuration.py +0 -0
  268. {conan-2.23.0 → conan-2.24.0}/conan/tools/cmake/cmakedeps/templates/target_data.py +0 -0
  269. {conan-2.23.0 → conan-2.24.0}/conan/tools/cmake/cmakedeps/templates/targets.py +0 -0
  270. {conan-2.23.0 → conan-2.24.0}/conan/tools/cmake/cmakedeps2/__init__.py +0 -0
  271. {conan-2.23.0 → conan-2.24.0}/conan/tools/cmake/cmakedeps2/cmakedeps.py +0 -0
  272. {conan-2.23.0 → conan-2.24.0}/conan/tools/cmake/cmakedeps2/config.py +0 -0
  273. {conan-2.23.0 → conan-2.24.0}/conan/tools/cmake/cmakedeps2/config_version.py +0 -0
  274. {conan-2.23.0 → conan-2.24.0}/conan/tools/cmake/cmakedeps2/targets.py +0 -0
  275. {conan-2.23.0 → conan-2.24.0}/conan/tools/cmake/layout.py +0 -0
  276. {conan-2.23.0 → conan-2.24.0}/conan/tools/cmake/presets.py +0 -0
  277. {conan-2.23.0 → conan-2.24.0}/conan/tools/cmake/toolchain/__init__.py +0 -0
  278. {conan-2.23.0 → conan-2.24.0}/conan/tools/cmake/toolchain/blocks.py +0 -0
  279. {conan-2.23.0 → conan-2.24.0}/conan/tools/cmake/toolchain/toolchain.py +0 -0
  280. {conan-2.23.0 → conan-2.24.0}/conan/tools/cmake/utils.py +0 -0
  281. {conan-2.23.0 → conan-2.24.0}/conan/tools/cps/__init__.py +0 -0
  282. {conan-2.23.0 → conan-2.24.0}/conan/tools/cps/cps_deps.py +0 -0
  283. {conan-2.23.0 → conan-2.24.0}/conan/tools/env/__init__.py +0 -0
  284. {conan-2.23.0 → conan-2.24.0}/conan/tools/env/virtualbuildenv.py +0 -0
  285. {conan-2.23.0 → conan-2.24.0}/conan/tools/env/virtualrunenv.py +0 -0
  286. {conan-2.23.0 → conan-2.24.0}/conan/tools/files/__init__.py +0 -0
  287. {conan-2.23.0 → conan-2.24.0}/conan/tools/files/conandata.py +0 -0
  288. {conan-2.23.0 → conan-2.24.0}/conan/tools/files/copy_pattern.py +0 -0
  289. {conan-2.23.0 → conan-2.24.0}/conan/tools/files/files.py +0 -0
  290. {conan-2.23.0 → conan-2.24.0}/conan/tools/files/patches.py +0 -0
  291. {conan-2.23.0 → conan-2.24.0}/conan/tools/files/symlinks/__init__.py +0 -0
  292. {conan-2.23.0 → conan-2.24.0}/conan/tools/files/symlinks/symlinks.py +0 -0
  293. {conan-2.23.0 → conan-2.24.0}/conan/tools/gnu/__init__.py +0 -0
  294. {conan-2.23.0 → conan-2.24.0}/conan/tools/gnu/autotools.py +0 -0
  295. {conan-2.23.0 → conan-2.24.0}/conan/tools/gnu/autotoolsdeps.py +0 -0
  296. {conan-2.23.0 → conan-2.24.0}/conan/tools/gnu/get_gnu_triplet.py +0 -0
  297. {conan-2.23.0 → conan-2.24.0}/conan/tools/gnu/gnudeps_flags.py +0 -0
  298. {conan-2.23.0 → conan-2.24.0}/conan/tools/gnu/makedeps.py +0 -0
  299. {conan-2.23.0 → conan-2.24.0}/conan/tools/gnu/pkgconfig.py +0 -0
  300. {conan-2.23.0 → conan-2.24.0}/conan/tools/gnu/pkgconfigdeps.py +0 -0
  301. {conan-2.23.0 → conan-2.24.0}/conan/tools/google/__init__.py +0 -0
  302. {conan-2.23.0 → conan-2.24.0}/conan/tools/google/bazel.py +0 -0
  303. {conan-2.23.0 → conan-2.24.0}/conan/tools/google/bazeldeps.py +0 -0
  304. {conan-2.23.0 → conan-2.24.0}/conan/tools/google/layout.py +0 -0
  305. {conan-2.23.0 → conan-2.24.0}/conan/tools/google/toolchain.py +0 -0
  306. {conan-2.23.0 → conan-2.24.0}/conan/tools/intel/__init__.py +0 -0
  307. {conan-2.23.0 → conan-2.24.0}/conan/tools/intel/intel_cc.py +0 -0
  308. {conan-2.23.0 → conan-2.24.0}/conan/tools/layout/__init__.py +0 -0
  309. {conan-2.23.0 → conan-2.24.0}/conan/tools/meson/__init__.py +0 -0
  310. {conan-2.23.0 → conan-2.24.0}/conan/tools/meson/helpers.py +0 -0
  311. {conan-2.23.0 → conan-2.24.0}/conan/tools/meson/meson.py +0 -0
  312. {conan-2.23.0 → conan-2.24.0}/conan/tools/microsoft/__init__.py +0 -0
  313. {conan-2.23.0 → conan-2.24.0}/conan/tools/microsoft/layout.py +0 -0
  314. {conan-2.23.0 → conan-2.24.0}/conan/tools/microsoft/msbuild.py +0 -0
  315. {conan-2.23.0 → conan-2.24.0}/conan/tools/microsoft/msbuilddeps.py +0 -0
  316. {conan-2.23.0 → conan-2.24.0}/conan/tools/microsoft/subsystems.py +0 -0
  317. {conan-2.23.0 → conan-2.24.0}/conan/tools/microsoft/visual.py +0 -0
  318. {conan-2.23.0 → conan-2.24.0}/conan/tools/premake/__init__.py +0 -0
  319. {conan-2.23.0 → conan-2.24.0}/conan/tools/premake/constants.py +0 -0
  320. {conan-2.23.0 → conan-2.24.0}/conan/tools/premake/premake.py +0 -0
  321. {conan-2.23.0 → conan-2.24.0}/conan/tools/premake/premakedeps.py +0 -0
  322. {conan-2.23.0 → conan-2.24.0}/conan/tools/premake/toolchain.py +0 -0
  323. {conan-2.23.0 → conan-2.24.0}/conan/tools/qbs/__init__.py +0 -0
  324. {conan-2.23.0 → conan-2.24.0}/conan/tools/qbs/common.py +0 -0
  325. {conan-2.23.0 → conan-2.24.0}/conan/tools/qbs/qbs.py +0 -0
  326. {conan-2.23.0 → conan-2.24.0}/conan/tools/qbs/qbsdeps.py +0 -0
  327. {conan-2.23.0 → conan-2.24.0}/conan/tools/qbs/qbsprofile.py +0 -0
  328. {conan-2.23.0 → conan-2.24.0}/conan/tools/ros/__init__.py +0 -0
  329. {conan-2.23.0 → conan-2.24.0}/conan/tools/ros/rosenv.py +0 -0
  330. {conan-2.23.0 → conan-2.24.0}/conan/tools/sbom/__init__.py +0 -0
  331. {conan-2.23.0 → conan-2.24.0}/conan/tools/sbom/cyclonedx.py +0 -0
  332. {conan-2.23.0 → conan-2.24.0}/conan/tools/sbom/spdx_licenses.py +0 -0
  333. {conan-2.23.0 → conan-2.24.0}/conan/tools/scm/__init__.py +0 -0
  334. {conan-2.23.0 → conan-2.24.0}/conan/tools/scm/git.py +0 -0
  335. {conan-2.23.0 → conan-2.24.0}/conan/tools/scons/__init__.py +0 -0
  336. {conan-2.23.0 → conan-2.24.0}/conan/tools/scons/sconsdeps.py +0 -0
  337. {conan-2.23.0 → conan-2.24.0}/conan/tools/system/__init__.py +0 -0
  338. {conan-2.23.0 → conan-2.24.0}/conan/tools/system/package_manager.py +0 -0
  339. {conan-2.23.0 → conan-2.24.0}/conan/tools/system/pip_manager.py +0 -0
  340. {conan-2.23.0 → conan-2.24.0}/conan.egg-info/dependency_links.txt +0 -0
  341. {conan-2.23.0 → conan-2.24.0}/conan.egg-info/entry_points.txt +0 -0
  342. {conan-2.23.0 → conan-2.24.0}/conan.egg-info/requires.txt +0 -0
  343. {conan-2.23.0 → conan-2.24.0}/conan.egg-info/top_level.txt +0 -0
  344. {conan-2.23.0 → conan-2.24.0}/conans/__init__.py +0 -0
  345. {conan-2.23.0 → conan-2.24.0}/conans/conan.py +0 -0
  346. {conan-2.23.0 → conan-2.24.0}/conans/conan_server.py +0 -0
  347. {conan-2.23.0 → conan-2.24.0}/conans/migrations.py +0 -0
  348. {conan-2.23.0 → conan-2.24.0}/conans/requirements.txt +0 -0
  349. {conan-2.23.0 → conan-2.24.0}/conans/requirements_dev.txt +0 -0
  350. {conan-2.23.0 → conan-2.24.0}/conans/requirements_runner.txt +0 -0
  351. {conan-2.23.0 → conan-2.24.0}/conans/requirements_server.txt +0 -0
  352. {conan-2.23.0 → conan-2.24.0}/pyproject.toml +0 -0
  353. {conan-2.23.0 → conan-2.24.0}/setup.cfg +0 -0
  354. {conan-2.23.0 → conan-2.24.0}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: conan
3
- Version: 2.23.0
3
+ Version: 2.24.0
4
4
  Summary: Conan C/C++ package manager
5
5
  Home-page: https://conan.io
6
6
  Author: JFrog LTD
@@ -2,5 +2,5 @@ from conan.internal.model.conan_file import ConanFile
2
2
  from conan.internal.model.workspace import Workspace
3
3
  from conan.internal.model.version import Version
4
4
 
5
- __version__ = '2.23.0'
5
+ __version__ = '2.24.0'
6
6
  conan_version = Version(__version__)
@@ -74,13 +74,16 @@ class ConanAPI:
74
74
  self.upload: UploadAPI = UploadAPI(self, self._api_helpers)
75
75
  #: Used to download recipes and packages from remotes
76
76
  self.download: DownloadAPI = DownloadAPI(self)
77
- self.cache = CacheAPI(self, self._api_helpers)
78
- self.lockfile = LockfileAPI(self)
77
+ #: Used to interact wit the packages storage cache
78
+ self.cache: CacheAPI = CacheAPI(self, self._api_helpers)
79
+ #: Used to read and manage lockfile files
80
+ self.lockfile: LockfileAPI = LockfileAPI(self)
79
81
  self.local = LocalAPI(self, self._api_helpers)
80
- self.audit = AuditAPI(self)
82
+ #: Used to check vulnerabilities of dependencies
83
+ self.audit: AuditAPI = AuditAPI(self)
81
84
  # Now, lazy loading of editables
82
85
  self.workspace = WorkspaceAPI(self)
83
- self.report = ReportAPI(self, self._api_helpers)
86
+ self.report: ReportAPI = ReportAPI(self, self._api_helpers)
84
87
 
85
88
  @property
86
89
  def home_folder(self) -> str:
@@ -203,6 +203,7 @@ class PackagesList:
203
203
 
204
204
  def merge(self, other):
205
205
  assert isinstance(other, PackagesList)
206
+
206
207
  def recursive_dict_update(d, u): # TODO: repeated from conandata.py
207
208
  for k, v in u.items():
208
209
  if isinstance(v, dict):
@@ -22,6 +22,8 @@ from conan.internal.util.files import rmdir, mkdir, remove, save
22
22
 
23
23
 
24
24
  class CacheAPI:
25
+ """ This CacheAPI is used to interact with the packages storage cache
26
+ """
25
27
 
26
28
  def __init__(self, conan_api, api_helpers):
27
29
  self._conan_api = conan_api
@@ -71,17 +73,29 @@ class CacheAPI:
71
73
  return ref_layout.finalize()
72
74
  return _check_folder_existence(pref, "package", ref_layout.package())
73
75
 
74
- def check_integrity(self, package_list):
75
- """Check if the recipes and packages are corrupted (it will raise a ConanExcepcion)"""
76
+ def check_integrity(self, package_list, return_pkg_list=False):
77
+ """
78
+ Check if the recipes and packages are corrupted
79
+
80
+ :param package_list: PackagesList to check
81
+ :param return_pkg_list: If True, return a PackagesList with corrupted artifacts
82
+ :return: PackagesList with corrupted artifacts if return_pkg_list is True
83
+ :raises: ConanExcepcion if there are corrupted artifacts and return_pkg_list is False
84
+ """
76
85
  cache = PkgCache(self._conan_api.cache_folder, self._api_helpers.global_conf)
77
86
  checker = IntegrityChecker(cache)
78
- checker.check(package_list)
87
+ corrupted_pkg_list = checker.check(package_list)
88
+ if return_pkg_list:
89
+ return corrupted_pkg_list
90
+ if corrupted_pkg_list:
91
+ raise ConanException("There are corrupted artifacts, check the error logs")
79
92
 
80
93
  def clean(self, package_list, source=True, build=True, download=True, temp=True,
81
94
  backup_sources=False):
82
95
  """
83
96
  Remove non critical folders from the cache, like source, build and download (.tgz store)
84
97
  folders.
98
+
85
99
  :param package_list: the package lists that should be cleaned
86
100
  :param source: boolean, remove the "source" folder if True
87
101
  :param build: boolean, remove the "build" folder if True
@@ -128,7 +142,7 @@ class CacheAPI:
128
142
  if download:
129
143
  rmdir(pref_layout.download_package())
130
144
 
131
- def save(self, package_list, tgz_path, no_source=False):
145
+ def save(self, package_list: PackagesList, tgz_path, no_source=False) -> None:
132
146
  global_conf = self._api_helpers.global_conf
133
147
  cache = PkgCache(self._conan_api.cache_folder, global_conf)
134
148
  cache_folder = cache.store # Note, this is not the home, but the actual package cache
@@ -181,7 +195,7 @@ class CacheAPI:
181
195
  compresslevel, recursive=True)
182
196
  remove(pkglist_path)
183
197
 
184
- def restore(self, path):
198
+ def restore(self, path) -> PackagesList:
185
199
  if not os.path.isfile(path):
186
200
  raise ConanException(f"Restore archive doesn't exist in {path}")
187
201
 
@@ -253,11 +267,14 @@ class CacheAPI:
253
267
 
254
268
  def get_backup_sources(self, package_list=None, exclude=True, only_upload=True):
255
269
  """Get list of backup source files currently present in the cache,
256
- either all of them if no argument, or filtered by those belonging to the references in the package_list
257
-
258
- @param package_list: a PackagesList object to filter backup files from (The files should have been downloaded form any of the references in the package_list)
259
- @param exclude: if True, exclude the sources that come from URLs present the core.sources:exclude_urls global conf
260
- @param only_upload: if True, only return the files for packages that are set to be uploaded
270
+ either all of them if no argument, or filtered by those belonging to the references
271
+ in the package_list
272
+
273
+ :param package_list: a PackagesList object to filter backup files from (The files should
274
+ have been downloaded form any of the references in the package_list)
275
+ :param exclude: if True, exclude the sources that come from URLs present the
276
+ core.sources:exclude_urls global conf
277
+ :param only_upload: if True, only return the files for packages that are set to be uploaded
261
278
  """
262
279
  config = self._api_helpers.global_conf
263
280
  download_cache_path = config.get("core.sources:download_cache")
@@ -0,0 +1,264 @@
1
+ import os
2
+
3
+ from conan.api.output import ConanOutput
4
+
5
+ from conan.internal.cache.home_paths import HomePaths
6
+ from conan.internal.conan_app import ConanApp
7
+ from conan.internal.graph.graph import CONTEXT_HOST, RECIPE_VIRTUAL, Node
8
+ from conan.internal.graph.graph_builder import DepsGraphBuilder
9
+ from conan.internal.graph.profile_node_definer import consumer_definer
10
+ from conan.errors import ConanException
11
+
12
+ from conan.internal.model.conanconfig import loadconanconfig, saveconanconfig, loadconanconfig_yml
13
+ from conan.internal.model.conf import BUILT_IN_CONFS
14
+ from conan.internal.model.pkg_type import PackageType
15
+ from conan.api.model import RecipeReference, Remote
16
+ from conan.internal.util.files import rmdir, remove
17
+
18
+
19
+ class ConfigAPI:
20
+ """ This API provides methods to manage the Conan configuration in the Conan home folder.
21
+ It allows installing configurations from various sources, retrieving global configuration
22
+ values, and listing available configurations. It also provides methods to clean the
23
+ Conan home folder, resetting it to a clean state.
24
+ """
25
+
26
+ def __init__(self, conan_api, helpers):
27
+ self._conan_api = conan_api
28
+ self._helpers = helpers
29
+
30
+ def home(self):
31
+ """ return the current Conan home folder containing the configuration files like
32
+ remotes, settings, profiles, and the packages cache. It is provided for debugging
33
+ purposes. Recall that it is not allowed to write, modify or remove packages in the
34
+ packages cache, and that to automate tasks that uses packages from the cache Conan
35
+ provides mechanisms like deployers or custom commands.
36
+ """
37
+ return self._conan_api.cache_folder
38
+
39
+ def install(self, path_or_url, verify_ssl, config_type=None, args=None,
40
+ source_folder=None, target_folder=None):
41
+ """ install Conan configuration from a git repo, from a zip file in an http server
42
+ or a local folder
43
+ """
44
+ from conan.internal.api.config.config_installer import configuration_install
45
+ cache_folder = self._conan_api.cache_folder
46
+ requester = self._helpers.requester
47
+ configuration_install(cache_folder, requester, path_or_url, verify_ssl,
48
+ config_type=config_type, args=args,
49
+ source_folder=source_folder, target_folder=target_folder)
50
+ self._conan_api.reinit()
51
+
52
+ def install_package(self, require, lockfile=None, force=False, remotes=None, profile=None):
53
+ ConanOutput().warning("The 'conan config install-pkg' is experimental",
54
+ warn_tag="experimental")
55
+ require = RecipeReference.loads(require)
56
+ required_pkgs = self.fetch_packages([require], lockfile, remotes, profile)
57
+ installed_refs = self._install_pkgs(required_pkgs, force)
58
+ self._conan_api.reinit()
59
+ return installed_refs
60
+
61
+ @staticmethod
62
+ def load_conanconfig(path, remotes):
63
+ if os.path.isdir(path):
64
+ path = os.path.join(path, "conanconfig.yml")
65
+ requested_requires, urls = loadconanconfig_yml(path)
66
+ if urls:
67
+ new_remotes = [Remote(f"config_install_url{'_' + str(i)}", url=url)
68
+ for i, url in enumerate(urls)]
69
+ remotes = remotes or []
70
+ remotes += new_remotes
71
+ return requested_requires, remotes
72
+
73
+ def install_conanconfig(self, path, lockfile=None, force=False, remotes=None, profile=None):
74
+ ConanOutput().warning("The 'conan config install-pkg' is experimental",
75
+ warn_tag="experimental")
76
+ requested_requires, remotes = self.load_conanconfig(path, remotes)
77
+ required_pkgs = self.fetch_packages(requested_requires, lockfile, remotes, profile)
78
+ installed_refs = self._install_pkgs(required_pkgs, force)
79
+ self._conan_api.reinit()
80
+ return installed_refs
81
+
82
+ def _install_pkgs(self, required_pkgs, force):
83
+ out = ConanOutput()
84
+ out.title("Configuration packages to install")
85
+ config_version_file = HomePaths(self._conan_api.home_folder).config_version_path
86
+ if not os.path.exists(config_version_file):
87
+ config_versions = []
88
+ else:
89
+ ConanOutput().info(f"Reading existing config-versions file: {config_version_file}")
90
+ config_versions = loadconanconfig(config_version_file)
91
+ config_versions_dict = {r.name: r for r in config_versions}
92
+ if len(config_versions_dict) < len(config_versions):
93
+ raise ConanException("There are multiple requirements for the same package "
94
+ f"with different versions: {config_version_file}")
95
+
96
+ new_config = config_versions_dict.copy()
97
+ for required_pkg in required_pkgs:
98
+ new_config.pop(required_pkg.ref.name, None) # To ensure new order
99
+ new_config[required_pkg.ref.name] = required_pkg.ref
100
+ final_config_refs = [r for r in new_config.values()]
101
+
102
+ prev_refs = "\n\t".join(repr(r) for r in config_versions)
103
+ out.info(f"Previously installed configuration packages:\n\t{prev_refs}")
104
+
105
+ new_refs = "\n\t".join(r.repr_notime() for r in final_config_refs)
106
+ out.info(f"New configuration packages to install:\n\t{new_refs}")
107
+
108
+ if list(config_versions_dict) == list(new_config)[:len(config_versions_dict)]:
109
+ # There is no conflict in order, can be done safely
110
+ if final_config_refs == config_versions:
111
+ if force:
112
+ out.warning("The requested configurations are identical to the already "
113
+ "installed ones, but forcing re-installation because --force")
114
+ to_install = required_pkgs
115
+ else:
116
+ out.info("The requested configurations are identical to the already "
117
+ "installed ones, skipping re-installation")
118
+ to_install = []
119
+ else:
120
+ out.info("Installing new or updating configuration packages")
121
+ to_install = required_pkgs
122
+ else:
123
+ # Change in order of existing configuration
124
+ if force:
125
+ out.warning("Installing these configuration packages will break the "
126
+ "existing order, with possible side effects. "
127
+ "Forcing the installation because --force was defined", warn_tag="risk")
128
+ to_install = required_pkgs
129
+ else:
130
+ msg = ("Installing these configuration packages will break the "
131
+ "existing order, with possible side effects, like breaking 'package_ids'.\n"
132
+ "If you still want to enforce this configuration you can:\n"
133
+ " Use 'conan config clean' first to fully reset your configuration.\n"
134
+ " Or use 'conan config install-pkg --force' to force installation.")
135
+ raise ConanException(msg)
136
+
137
+ out.title("Installing configuration from packages")
138
+ # install things and update the Conan cache "config_versions.json" file
139
+ from conan.internal.api.config.config_installer import configuration_install
140
+ cache_folder = self._conan_api.cache_folder
141
+ requester = self._helpers.requester
142
+ for pkg in to_install:
143
+ out.info(f"Installing configuration from {pkg.ref}")
144
+ configuration_install(cache_folder, requester, uri=pkg.conanfile.package_folder,
145
+ verify_ssl=False, config_type="dir",
146
+ ignore=["conaninfo.txt", "conanmanifest.txt"])
147
+
148
+ saveconanconfig(config_version_file, final_config_refs)
149
+ return final_config_refs
150
+
151
+ def fetch_packages(self, refs, lockfile=None, remotes=None, profile=None):
152
+ """ install configuration stored inside a Conan package
153
+ The installation of configuration will reinitialize the full ConanAPI
154
+ """
155
+ conan_api = self._conan_api
156
+ remotes = conan_api.remotes.list() if remotes is None else remotes
157
+ profile_host = profile_build = profile or conan_api.profiles.get_profile([])
158
+
159
+ app = ConanApp(self._conan_api)
160
+
161
+ ConanOutput().title("Fetching requested configuration packages")
162
+ result = []
163
+ for ref in refs:
164
+ # Computation of a very simple graph that requires "ref"
165
+ # Need to convert input requires to RecipeReference
166
+ conanfile = app.loader.load_virtual(requires=[ref])
167
+ consumer_definer(conanfile, profile_host, profile_build)
168
+ root_node = Node(ref=None, conanfile=conanfile, context=CONTEXT_HOST,
169
+ recipe=RECIPE_VIRTUAL)
170
+ root_node.is_conf = True
171
+ update = ["*"]
172
+ builder = DepsGraphBuilder(app.proxy, app.loader, app.range_resolver, app.cache, remotes,
173
+ update, update, self._helpers.global_conf)
174
+ deps_graph = builder.load_graph(root_node, profile_host, profile_build, lockfile)
175
+
176
+ # Basic checks of the package: correct package_type and no-dependencies
177
+ deps_graph.report_graph_error()
178
+ pkg = deps_graph.root.edges[0].dst
179
+ ConanOutput().info(f"Configuration from package: {pkg}")
180
+ if pkg.conanfile.package_type is not PackageType.CONF:
181
+ raise ConanException(f'{pkg.conanfile} is not of package_type="configuration"')
182
+ if pkg.edges:
183
+ raise ConanException(f"Configuration package {pkg.ref} cannot have dependencies")
184
+
185
+ # The computation of the "package_id" and the download of the package is done as usual
186
+ # By default we allow all remotes, and build_mode=None, always updating
187
+ conan_api.graph.analyze_binaries(deps_graph, None, remotes, update=update,
188
+ lockfile=lockfile)
189
+ conan_api.install.install_binaries(deps_graph=deps_graph, remotes=remotes)
190
+ result.append(pkg)
191
+ return result
192
+
193
+ def get(self, name, default=None, check_type=None):
194
+ """ get the value of a global.conf item
195
+ """
196
+ return self._helpers.global_conf.get(name, default=default, check_type=check_type)
197
+
198
+ def show(self, pattern) -> dict:
199
+ """ get the values of global.conf for those configurations that matches the pattern
200
+ """
201
+ return self._helpers.global_conf.show(pattern)
202
+
203
+ @staticmethod
204
+ def conf_list():
205
+ """ list all the available built-in configurations
206
+ """
207
+ return BUILT_IN_CONFS.copy()
208
+
209
+ def clean(self):
210
+ """ reset the Conan home folder to a clean state, removing all the user
211
+ custom configuration, custom files, and resetting modified files
212
+ """
213
+ contents = os.listdir(self.home())
214
+ packages_folder = (self._helpers.global_conf.get("core.cache:storage_path") or
215
+ os.path.join(self.home(), "p"))
216
+ for content in contents:
217
+ content_path = os.path.join(self.home(), content)
218
+ if content_path == packages_folder:
219
+ continue
220
+ ConanOutput().debug(f"Removing {content_path}")
221
+ if os.path.isdir(content_path):
222
+ rmdir(content_path)
223
+ else:
224
+ remove(content_path)
225
+ self._conan_api.reinit()
226
+ # CHECK: This also generates a remotes.json that is not there after a conan profile show?
227
+ self._conan_api.migrate()
228
+
229
+ @property
230
+ def settings_yml(self):
231
+ """ Get the contents of the settings.yml and user_settings.yml files,
232
+ which define the possible values for settings.
233
+
234
+ Note that this is different from the settings present in a conanfile,
235
+ which represent the actual values for a specific package, while this
236
+ property represents the possible values for each setting.
237
+
238
+ :returns: A read-only object representing the settings scheme, with a
239
+ ``possible_values()`` method that returns a dictionary with the possible values for each setting,
240
+ and a ``fields`` property that returns an ordered list with the fields of each setting.
241
+ Note that it's possible to access nested settings using attribute access,
242
+ such as ``settings_yml.compiler.possible_values()``.
243
+ """
244
+
245
+ class SettingsYmlInterface:
246
+ def __init__(self, settings):
247
+ self._settings = settings
248
+
249
+ def possible_values(self):
250
+ """ returns a dict with the possible values for each setting """
251
+ return self._settings.possible_values()
252
+
253
+ @property
254
+ def fields(self):
255
+ """ returns a dict with the fields of each setting """
256
+ return self._settings.fields
257
+
258
+ def __getattr__(self, item):
259
+ return SettingsYmlInterface(getattr(self._settings, item))
260
+
261
+ def __str__(self):
262
+ return str(self._settings)
263
+
264
+ return SettingsYmlInterface(self._helpers.settings_yml)
@@ -109,12 +109,15 @@ class GraphAPI:
109
109
  Command line helper to scope options when ``command -o myoption=myvalue`` is used,
110
110
  that needs to be converted to "-o pkg:myoption=myvalue". The "pkg" value will be
111
111
  computed from the given requires/tool_requires
112
+
113
+ This is legacy, as options should always be scoped now
112
114
  """
113
- # FIXME: This helper function here is not great, find a better place
114
115
  if requires and len(requires) == 1 and not tool_requires:
115
- profile.options.scope(requires[0])
116
- if tool_requires and len(tool_requires) == 1 and not requires:
117
- profile.options.scope(tool_requires[0])
116
+ ref = requires[0]
117
+ if str(ref.version).startswith("["):
118
+ ref = ref.copy()
119
+ ref.version = "*"
120
+ profile.options.scope(ref)
118
121
 
119
122
  def load_graph_requires(self, requires, tool_requires, profile_host, profile_build,
120
123
  lockfile, remotes, update, check_updates=False, python_requires=None):
@@ -13,15 +13,20 @@ class LockfileAPI:
13
13
  self._conan_api = conan_api
14
14
 
15
15
  @staticmethod
16
- def get_lockfile(lockfile=None, conanfile_path=None, cwd=None, partial=False, overrides=None):
16
+ def get_lockfile(lockfile=None, conanfile_path=None, cwd=None, partial=False,
17
+ overrides=None) -> Lockfile:
17
18
  """ obtain a lockfile, following this logic:
18
- - If lockfile is explicitly defined, it would be either absolute or relative to cwd and
19
- the lockfile file must exist. If lockfile="" (empty string) the default "conan.lock"
20
- lockfile will not be automatically used even if it is present.
21
- - If lockfile is not defined, it will still look for a default conan.lock:
22
- - if conanfile_path is defined, it will be besides it
23
- - if conanfile_path is not defined, the default conan.lock should be in cwd
24
- - if the default conan.lock cannot be found, it is not an error
19
+
20
+ If lockfile is explicitly defined, it would be either absolute or relative to cwd and
21
+ the lockfile file must exist. If lockfile="" (empty string) the default "conan.lock"
22
+ lockfile will not be automatically used even if it is present.
23
+
24
+ If lockfile is not defined, it will still look for a default conan.lock:
25
+
26
+ - if conanfile_path is defined, it will be besides it
27
+ - if conanfile_path is not defined, the default conan.lock should be in cwd
28
+ - if the default conan.lock cannot be found, it is not an error
29
+
25
30
 
26
31
  :param partial: If the obtained lockfile will allow partial resolving
27
32
  :param cwd: the current working dir, if None, os.getcwd() will be used
@@ -14,6 +14,9 @@ from conan.internal.util.runners import conan_run
14
14
 
15
15
 
16
16
  class ReportAPI:
17
+ """ Used to compute the differences (the "diff") between two versions or revisions, for
18
+ both the recipe and source code.
19
+ """
17
20
  def __init__(self, conan_api, helpers):
18
21
  self._conan_api = conan_api
19
22
  self._helpers = helpers
@@ -21,6 +24,7 @@ class ReportAPI:
21
24
  def diff(self, old_reference, new_reference, remotes, old_path=None, new_path=None, cwd=None):
22
25
  """
23
26
  Compare two recipes and return the differences.
27
+
24
28
  :param old_reference: The reference of the old recipe.
25
29
  :param new_reference: The reference of the new recipe.
26
30
  :param remotes: List of remotes to search for the recipes.
@@ -32,7 +36,8 @@ class ReportAPI:
32
36
 
33
37
  def _source(path_to_conanfile, reference):
34
38
  if path_to_conanfile is None:
35
- export_ref, cache_path = _get_ref_from_cache_or_remote(self._conan_api, reference, remotes)
39
+ export_ref, cache_path = _get_ref_from_cache_or_remote(self._conan_api, reference,
40
+ remotes)
36
41
  else:
37
42
  export_ref, cache_path = _export_recipe_from_path(self._conan_api, path_to_conanfile,
38
43
  reference, remotes, cwd)
@@ -56,7 +61,8 @@ class ReportAPI:
56
61
  f'"{old_diff_path}" "{new_diff_path}"')
57
62
 
58
63
  ConanOutput().info(
59
- f"Generating diff from {old_export_ref.repr_notime()} to {new_export_ref.repr_notime()} (this might take a while)")
64
+ f"Generating diff from {old_export_ref.repr_notime()} to {new_export_ref.repr_notime()} "
65
+ f"(this might take a while)")
60
66
  ConanOutput().info(command)
61
67
 
62
68
  stdout, stderr = StringIO(), StringIO()
@@ -116,19 +122,20 @@ def _get_ref_from_cache_or_remote(conan_api, reference, enabled_remotes):
116
122
  full_ref = ref
117
123
  matching_remote = remote
118
124
  break
119
- except:
125
+ except (Exception,):
120
126
  continue
121
127
  else:
122
128
  try:
123
129
  latest_recipe_revision = conan_api.list.latest_recipe_revision(ref, remote)
124
- except:
130
+ except (Exception,):
125
131
  continue
126
132
  if full_ref is None or (latest_recipe_revision.timestamp > full_ref.timestamp):
127
133
  full_ref = latest_recipe_revision
128
134
  matching_remote = remote
129
135
  if full_ref is None or matching_remote is False:
130
136
  raise ConanException(f"No matching reference for {reference} in remotes.\n"
131
- "If you want to check against a local recipe, add an additional --{old,new}-path arg.\n")
137
+ "If you want to check against a local recipe, add an "
138
+ "additional --{old,new}-path arg.\n")
132
139
  if matching_remote is not None:
133
140
  conan_api.download.recipe(full_ref, matching_remote)
134
141
  cache_path = conan_api.cache.export_path(full_ref)
@@ -22,8 +22,8 @@ class UploadAPI:
22
22
  self._conan_api = conan_api
23
23
  self._api_helpers = api_helpers
24
24
 
25
- def check_upstream(self, package_list: PackagesList, remote: Remote, enabled_remotes: List[Remote],
26
- force=False):
25
+ def check_upstream(self, package_list: PackagesList, remote: Remote,
26
+ enabled_remotes: List[Remote], force=False):
27
27
  """ Checks ``remote`` for the existence of the recipes and packages in ``package_list``.
28
28
  Items that are not present in the remote will add an ``upload`` key to the entry
29
29
  with the value ``True``.
@@ -34,8 +34,8 @@ class UploadAPI:
34
34
  :parameter remote: Remote to check.
35
35
  :parameter enabled_remotes: List of enabled remotes. This is used to possibly load
36
36
  python_requires from the listed recipes if necessary.
37
- :parameter force: If ``True``, it will skip the check and mark that all items need to be uploaded.
38
- A ``force_upload`` key will be added to the entries that will be uploaded.
37
+ :parameter force: If ``True``, it will skip the check and mark that all items need to be
38
+ uploaded. A ``force_upload`` key will be added to the entries that will be uploaded.
39
39
  """
40
40
  app = ConanApp(self._conan_api)
41
41
  for ref, _ in package_list.items():
@@ -87,7 +87,8 @@ class UploadAPI:
87
87
  The steps that this method performs are:
88
88
  - calls ``conan_api.cache.check_integrity`` to ensure the packages are not corrupted
89
89
  - checks the upload policy of the recipes
90
- - (if it is ``"skip"``, it will not upload the binaries, but will still upload the metadata)
90
+ - (if it is ``"skip"``, it will not upload the binaries, but will still upload
91
+ the metadata)
91
92
  - checks which revisions already exist in the server so that it can skip the upload
92
93
  - prepares the artifacts to upload (compresses the conan_package.tgz)
93
94
  - executes the actual upload
@@ -142,7 +143,13 @@ class UploadAPI:
142
143
  ConanOutput().success(f"Upload completed in {int(elapsed)}s\n")
143
144
  add_urls(package_list, remote)
144
145
 
145
- def upload_backup_sources(self, files):
146
+ def upload_backup_sources(self, files: List) -> None:
147
+ """
148
+ Upload to the server the backup sources files, that have been typically gathered by
149
+ CacheAPI.get_backup_sources()
150
+
151
+ :param files: The list of files that must be uploaded
152
+ """
146
153
  config = self._api_helpers.global_conf
147
154
  url = config.get("core.sources:upload_url", check_type=str)
148
155
  if url is None:
@@ -181,4 +188,3 @@ class UploadAPI:
181
188
  f"/permissions, please provide 'source_credentials.json': {e}")
182
189
 
183
190
  output.success("Upload backup sources complete\n")
184
- return