conan 2.24.0__tar.gz → 2.25.1__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 (358) hide show
  1. {conan-2.24.0/conan.egg-info → conan-2.25.1}/PKG-INFO +1 -1
  2. {conan-2.24.0 → conan-2.25.1}/conan/__init__.py +1 -1
  3. {conan-2.24.0 → conan-2.25.1}/conan/api/conan_api.py +2 -1
  4. {conan-2.24.0 → conan-2.25.1}/conan/api/model/list.py +31 -24
  5. {conan-2.24.0 → conan-2.25.1}/conan/api/output.py +11 -11
  6. {conan-2.24.0 → conan-2.25.1}/conan/api/subapi/cache.py +138 -13
  7. {conan-2.24.0 → conan-2.25.1}/conan/api/subapi/config.py +90 -17
  8. {conan-2.24.0 → conan-2.25.1}/conan/api/subapi/download.py +3 -4
  9. conan-2.25.1/conan/api/subapi/install.py +163 -0
  10. {conan-2.24.0 → conan-2.25.1}/conan/api/subapi/new.py +4 -2
  11. {conan-2.24.0 → conan-2.25.1}/conan/api/subapi/upload.py +2 -5
  12. {conan-2.24.0 → conan-2.25.1}/conan/cli/args.py +1 -1
  13. {conan-2.24.0 → conan-2.25.1}/conan/cli/cli.py +1 -2
  14. {conan-2.24.0 → conan-2.25.1}/conan/cli/command.py +1 -1
  15. {conan-2.24.0 → conan-2.25.1}/conan/cli/commands/cache.py +2 -1
  16. {conan-2.24.0 → conan-2.25.1}/conan/cli/commands/new.py +1 -1
  17. {conan-2.24.0 → conan-2.25.1}/conan/cli/commands/remove.py +1 -1
  18. {conan-2.24.0 → conan-2.25.1}/conan/cli/commands/report.py +1 -2
  19. conan-2.25.1/conan/cli/commands/require.py +130 -0
  20. {conan-2.24.0 → conan-2.25.1}/conan/cli/commands/workspace.py +37 -16
  21. {conan-2.24.0 → conan-2.25.1}/conan/cli/formatters/audit/vulnerabilities.py +3 -2
  22. {conan-2.24.0 → conan-2.25.1}/conan/cps/cps.py +44 -22
  23. {conan-2.24.0 → conan-2.25.1}/conan/internal/api/config/config_installer.py +1 -1
  24. {conan-2.24.0 → conan-2.25.1}/conan/internal/api/detect/detect_api.py +3 -2
  25. {conan-2.24.0 → conan-2.25.1}/conan/internal/api/new/basic.py +44 -0
  26. {conan-2.24.0 → conan-2.25.1}/conan/internal/api/profile/profile_loader.py +21 -6
  27. {conan-2.24.0 → conan-2.25.1}/conan/internal/api/uploader.py +126 -80
  28. {conan-2.24.0 → conan-2.25.1}/conan/internal/cache/cache.py +57 -7
  29. {conan-2.24.0 → conan-2.25.1}/conan/internal/cache/db/cache_database.py +10 -4
  30. {conan-2.24.0 → conan-2.25.1}/conan/internal/cache/db/packages_table.py +20 -18
  31. {conan-2.24.0 → conan-2.25.1}/conan/internal/cache/db/recipes_table.py +19 -19
  32. {conan-2.24.0 → conan-2.25.1}/conan/internal/cache/db/table.py +7 -1
  33. {conan-2.24.0 → conan-2.25.1}/conan/internal/default_settings.py +10 -10
  34. {conan-2.24.0 → conan-2.25.1}/conan/internal/graph/graph.py +2 -2
  35. {conan-2.24.0 → conan-2.25.1}/conan/internal/graph/graph_binaries.py +4 -4
  36. {conan-2.24.0 → conan-2.25.1}/conan/internal/graph/graph_builder.py +5 -1
  37. {conan-2.24.0 → conan-2.25.1}/conan/internal/graph/installer.py +14 -11
  38. {conan-2.24.0 → conan-2.25.1}/conan/internal/graph/proxy.py +16 -13
  39. {conan-2.24.0 → conan-2.25.1}/conan/internal/graph/python_requires.py +1 -1
  40. {conan-2.24.0 → conan-2.25.1}/conan/internal/hook_manager.py +1 -1
  41. {conan-2.24.0 → conan-2.25.1}/conan/internal/model/conf.py +6 -2
  42. {conan-2.24.0 → conan-2.25.1}/conan/internal/model/cpp_info.py +1 -1
  43. {conan-2.24.0 → conan-2.25.1}/conan/internal/model/dependencies.py +1 -1
  44. {conan-2.24.0 → conan-2.25.1}/conan/internal/model/layout.py +3 -3
  45. {conan-2.24.0 → conan-2.25.1}/conan/internal/model/lockfile.py +1 -1
  46. {conan-2.24.0 → conan-2.25.1}/conan/internal/model/manifest.py +7 -4
  47. {conan-2.24.0 → conan-2.25.1}/conan/internal/model/options.py +5 -0
  48. conan-2.25.1/conan/internal/model/recipe_ref.py +8 -0
  49. {conan-2.24.0 → conan-2.25.1}/conan/internal/paths.py +4 -3
  50. {conan-2.24.0 → conan-2.25.1}/conan/internal/rest/file_uploader.py +1 -1
  51. {conan-2.24.0 → conan-2.25.1}/conan/internal/rest/pkg_sign.py +2 -2
  52. {conan-2.24.0 → conan-2.25.1}/conan/internal/rest/remote_manager.py +40 -31
  53. {conan-2.24.0 → conan-2.25.1}/conan/internal/rest/rest_client.py +2 -2
  54. {conan-2.24.0 → conan-2.25.1}/conan/internal/rest/rest_client_v2.py +34 -40
  55. {conan-2.24.0 → conan-2.25.1}/conan/internal/rest/rest_routes.py +1 -1
  56. {conan-2.24.0 → conan-2.25.1}/conan/internal/util/__init__.py +1 -1
  57. {conan-2.24.0 → conan-2.25.1}/conan/internal/util/files.py +29 -0
  58. {conan-2.24.0 → conan-2.25.1}/conan/test/assets/genconanfile.py +13 -1
  59. {conan-2.24.0 → conan-2.25.1}/conan/test/utils/artifactory.py +2 -2
  60. {conan-2.24.0 → conan-2.25.1}/conan/test/utils/mocks.py +1 -1
  61. {conan-2.24.0 → conan-2.25.1}/conan/test/utils/test_files.py +2 -3
  62. {conan-2.24.0 → conan-2.25.1}/conan/test/utils/tools.py +1 -1
  63. {conan-2.24.0 → conan-2.25.1}/conan/tools/apple/xcodebuild.py +1 -1
  64. {conan-2.24.0 → conan-2.25.1}/conan/tools/apple/xcodedeps.py +1 -1
  65. {conan-2.24.0 → conan-2.25.1}/conan/tools/apple/xcodetoolchain.py +1 -1
  66. {conan-2.24.0 → conan-2.25.1}/conan/tools/build/cstd.py +1 -0
  67. conan-2.25.1/conan/tools/cmake/__init__.py +17 -0
  68. conan-2.24.0/conan/tools/cmake/cmakedeps2/cmakedeps.py → conan-2.25.1/conan/tools/cmake/cmakeconfigdeps/cmakeconfigdeps.py +75 -24
  69. {conan-2.24.0/conan/tools/cmake/cmakedeps2 → conan-2.25.1/conan/tools/cmake/cmakeconfigdeps}/config.py +1 -1
  70. {conan-2.24.0/conan/tools/cmake/cmakedeps2 → conan-2.25.1/conan/tools/cmake/cmakeconfigdeps}/config_version.py +1 -1
  71. {conan-2.24.0/conan/tools/cmake/cmakedeps2 → conan-2.25.1/conan/tools/cmake/cmakeconfigdeps}/target_configuration.py +45 -11
  72. {conan-2.24.0 → conan-2.25.1}/conan/tools/cmake/cmakedeps/cmakedeps.py +1 -1
  73. {conan-2.24.0 → conan-2.25.1}/conan/tools/cmake/cmakedeps/templates/__init__.py +1 -1
  74. {conan-2.24.0 → conan-2.25.1}/conan/tools/cmake/cmakedeps/templates/config.py +0 -1
  75. {conan-2.24.0 → conan-2.25.1}/conan/tools/cmake/cmakedeps/templates/target_data.py +1 -1
  76. {conan-2.24.0 → conan-2.25.1}/conan/tools/cmake/presets.py +1 -1
  77. {conan-2.24.0 → conan-2.25.1}/conan/tools/files/copy_pattern.py +4 -3
  78. {conan-2.24.0 → conan-2.25.1}/conan/tools/files/files.py +2 -1
  79. {conan-2.24.0 → conan-2.25.1}/conan/tools/gnu/autotools.py +1 -1
  80. {conan-2.24.0 → conan-2.25.1}/conan/tools/gnu/gnudeps_flags.py +1 -1
  81. {conan-2.24.0 → conan-2.25.1}/conan/tools/google/bazel.py +1 -1
  82. {conan-2.24.0 → conan-2.25.1}/conan/tools/meson/meson.py +1 -1
  83. {conan-2.24.0 → conan-2.25.1}/conan/tools/meson/toolchain.py +6 -1
  84. {conan-2.24.0 → conan-2.25.1}/conan/tools/microsoft/msbuild.py +1 -1
  85. {conan-2.24.0 → conan-2.25.1}/conan/tools/premake/premake.py +2 -1
  86. {conan-2.24.0 → conan-2.25.1}/conan/tools/premake/premakedeps.py +1 -1
  87. {conan-2.24.0 → conan-2.25.1}/conan/tools/qbs/qbs.py +1 -1
  88. {conan-2.24.0 → conan-2.25.1}/conan/tools/ros/rosenv.py +1 -1
  89. {conan-2.24.0 → conan-2.25.1}/conan/tools/sbom/spdx_licenses.py +0 -1
  90. conan-2.25.1/conan/tools/system/__init__.py +1 -0
  91. {conan-2.24.0 → conan-2.25.1}/conan/tools/system/package_manager.py +8 -7
  92. conan-2.25.1/conan/tools/system/python_manager.py +138 -0
  93. {conan-2.24.0 → conan-2.25.1/conan.egg-info}/PKG-INFO +1 -1
  94. {conan-2.24.0 → conan-2.25.1}/conan.egg-info/SOURCES.txt +8 -7
  95. {conan-2.24.0 → conan-2.25.1}/conan.egg-info/requires.txt +0 -2
  96. {conan-2.24.0 → conan-2.25.1}/conans/migrations.py +1 -1
  97. {conan-2.24.0 → conan-2.25.1}/conans/requirements_dev.txt +0 -1
  98. conan-2.24.0/conan/api/subapi/install.py +0 -106
  99. conan-2.24.0/conan/internal/model/recipe_ref.py +0 -13
  100. conan-2.24.0/conan/tools/cmake/__init__.py +0 -31
  101. conan-2.24.0/conan/tools/system/__init__.py +0 -1
  102. conan-2.24.0/conan/tools/system/pip_manager.py +0 -73
  103. {conan-2.24.0 → conan-2.25.1}/LICENSE.md +0 -0
  104. {conan-2.24.0 → conan-2.25.1}/MANIFEST.in +0 -0
  105. {conan-2.24.0 → conan-2.25.1}/README.md +0 -0
  106. {conan-2.24.0 → conan-2.25.1}/conan/api/__init__.py +0 -0
  107. {conan-2.24.0 → conan-2.25.1}/conan/api/input.py +0 -0
  108. {conan-2.24.0 → conan-2.25.1}/conan/api/model/__init__.py +0 -0
  109. {conan-2.24.0 → conan-2.25.1}/conan/api/model/refs.py +0 -0
  110. {conan-2.24.0 → conan-2.25.1}/conan/api/model/remote.py +0 -0
  111. {conan-2.24.0 → conan-2.25.1}/conan/api/subapi/__init__.py +0 -0
  112. {conan-2.24.0 → conan-2.25.1}/conan/api/subapi/audit.py +0 -0
  113. {conan-2.24.0 → conan-2.25.1}/conan/api/subapi/command.py +0 -0
  114. {conan-2.24.0 → conan-2.25.1}/conan/api/subapi/export.py +0 -0
  115. {conan-2.24.0 → conan-2.25.1}/conan/api/subapi/graph.py +0 -0
  116. {conan-2.24.0 → conan-2.25.1}/conan/api/subapi/list.py +0 -0
  117. {conan-2.24.0 → conan-2.25.1}/conan/api/subapi/local.py +0 -0
  118. {conan-2.24.0 → conan-2.25.1}/conan/api/subapi/lockfile.py +0 -0
  119. {conan-2.24.0 → conan-2.25.1}/conan/api/subapi/profiles.py +0 -0
  120. {conan-2.24.0 → conan-2.25.1}/conan/api/subapi/remotes.py +0 -0
  121. {conan-2.24.0 → conan-2.25.1}/conan/api/subapi/remove.py +0 -0
  122. {conan-2.24.0 → conan-2.25.1}/conan/api/subapi/report.py +0 -0
  123. {conan-2.24.0 → conan-2.25.1}/conan/api/subapi/workspace.py +0 -0
  124. {conan-2.24.0 → conan-2.25.1}/conan/cli/__init__.py +0 -0
  125. {conan-2.24.0 → conan-2.25.1}/conan/cli/commands/__init__.py +0 -0
  126. {conan-2.24.0 → conan-2.25.1}/conan/cli/commands/audit.py +0 -0
  127. {conan-2.24.0 → conan-2.25.1}/conan/cli/commands/build.py +0 -0
  128. {conan-2.24.0 → conan-2.25.1}/conan/cli/commands/config.py +0 -0
  129. {conan-2.24.0 → conan-2.25.1}/conan/cli/commands/create.py +0 -0
  130. {conan-2.24.0 → conan-2.25.1}/conan/cli/commands/download.py +0 -0
  131. {conan-2.24.0 → conan-2.25.1}/conan/cli/commands/editable.py +0 -0
  132. {conan-2.24.0 → conan-2.25.1}/conan/cli/commands/export.py +0 -0
  133. {conan-2.24.0 → conan-2.25.1}/conan/cli/commands/export_pkg.py +0 -0
  134. {conan-2.24.0 → conan-2.25.1}/conan/cli/commands/graph.py +0 -0
  135. {conan-2.24.0 → conan-2.25.1}/conan/cli/commands/inspect.py +0 -0
  136. {conan-2.24.0 → conan-2.25.1}/conan/cli/commands/install.py +0 -0
  137. {conan-2.24.0 → conan-2.25.1}/conan/cli/commands/list.py +0 -0
  138. {conan-2.24.0 → conan-2.25.1}/conan/cli/commands/lock.py +0 -0
  139. {conan-2.24.0 → conan-2.25.1}/conan/cli/commands/pkglist.py +0 -0
  140. {conan-2.24.0 → conan-2.25.1}/conan/cli/commands/profile.py +0 -0
  141. {conan-2.24.0 → conan-2.25.1}/conan/cli/commands/remote.py +0 -0
  142. {conan-2.24.0 → conan-2.25.1}/conan/cli/commands/run.py +0 -0
  143. {conan-2.24.0 → conan-2.25.1}/conan/cli/commands/search.py +0 -0
  144. {conan-2.24.0 → conan-2.25.1}/conan/cli/commands/source.py +0 -0
  145. {conan-2.24.0 → conan-2.25.1}/conan/cli/commands/test.py +0 -0
  146. {conan-2.24.0 → conan-2.25.1}/conan/cli/commands/upload.py +0 -0
  147. {conan-2.24.0 → conan-2.25.1}/conan/cli/commands/version.py +0 -0
  148. {conan-2.24.0 → conan-2.25.1}/conan/cli/exit_codes.py +0 -0
  149. {conan-2.24.0 → conan-2.25.1}/conan/cli/formatters/__init__.py +0 -0
  150. {conan-2.24.0 → conan-2.25.1}/conan/cli/formatters/audit/__init__.py +0 -0
  151. {conan-2.24.0 → conan-2.25.1}/conan/cli/formatters/graph/__init__.py +0 -0
  152. {conan-2.24.0 → conan-2.25.1}/conan/cli/formatters/graph/build_order_html.py +0 -0
  153. {conan-2.24.0 → conan-2.25.1}/conan/cli/formatters/graph/graph.py +0 -0
  154. {conan-2.24.0 → conan-2.25.1}/conan/cli/formatters/graph/graph_info_text.py +0 -0
  155. {conan-2.24.0 → conan-2.25.1}/conan/cli/formatters/graph/info_graph_dot.py +0 -0
  156. {conan-2.24.0 → conan-2.25.1}/conan/cli/formatters/graph/info_graph_html.py +0 -0
  157. {conan-2.24.0 → conan-2.25.1}/conan/cli/formatters/list/__init__.py +0 -0
  158. {conan-2.24.0 → conan-2.25.1}/conan/cli/formatters/list/list.py +0 -0
  159. {conan-2.24.0 → conan-2.25.1}/conan/cli/formatters/list/search_table_html.py +0 -0
  160. {conan-2.24.0 → conan-2.25.1}/conan/cli/formatters/report/__init__.py +0 -0
  161. {conan-2.24.0 → conan-2.25.1}/conan/cli/formatters/report/diff.py +0 -0
  162. {conan-2.24.0 → conan-2.25.1}/conan/cli/formatters/report/diff_html.py +0 -0
  163. {conan-2.24.0 → conan-2.25.1}/conan/cli/printers/__init__.py +0 -0
  164. {conan-2.24.0 → conan-2.25.1}/conan/cli/printers/graph.py +0 -0
  165. {conan-2.24.0 → conan-2.25.1}/conan/cps/__init__.py +0 -0
  166. {conan-2.24.0 → conan-2.25.1}/conan/errors.py +0 -0
  167. {conan-2.24.0 → conan-2.25.1}/conan/internal/__init__.py +0 -0
  168. {conan-2.24.0 → conan-2.25.1}/conan/internal/api/__init__.py +0 -0
  169. {conan-2.24.0 → conan-2.25.1}/conan/internal/api/audit/__init__.py +0 -0
  170. {conan-2.24.0 → conan-2.25.1}/conan/internal/api/audit/providers.py +0 -0
  171. {conan-2.24.0 → conan-2.25.1}/conan/internal/api/config/__init__.py +0 -0
  172. {conan-2.24.0 → conan-2.25.1}/conan/internal/api/detect/__init__.py +0 -0
  173. {conan-2.24.0 → conan-2.25.1}/conan/internal/api/detect/detect_vs.py +0 -0
  174. {conan-2.24.0 → conan-2.25.1}/conan/internal/api/export.py +0 -0
  175. {conan-2.24.0 → conan-2.25.1}/conan/internal/api/install/__init__.py +0 -0
  176. {conan-2.24.0 → conan-2.25.1}/conan/internal/api/install/generators.py +0 -0
  177. {conan-2.24.0 → conan-2.25.1}/conan/internal/api/list/__init__.py +0 -0
  178. {conan-2.24.0 → conan-2.25.1}/conan/internal/api/list/query_parse.py +0 -0
  179. {conan-2.24.0 → conan-2.25.1}/conan/internal/api/local/__init__.py +0 -0
  180. {conan-2.24.0 → conan-2.25.1}/conan/internal/api/local/editable.py +0 -0
  181. {conan-2.24.0 → conan-2.25.1}/conan/internal/api/migrations.py +0 -0
  182. {conan-2.24.0 → conan-2.25.1}/conan/internal/api/new/__init__.py +0 -0
  183. {conan-2.24.0 → conan-2.25.1}/conan/internal/api/new/alias_new.py +0 -0
  184. {conan-2.24.0 → conan-2.25.1}/conan/internal/api/new/autoools_exe.py +0 -0
  185. {conan-2.24.0 → conan-2.25.1}/conan/internal/api/new/autotools_lib.py +0 -0
  186. {conan-2.24.0 → conan-2.25.1}/conan/internal/api/new/bazel_7_exe.py +0 -0
  187. {conan-2.24.0 → conan-2.25.1}/conan/internal/api/new/bazel_7_lib.py +0 -0
  188. {conan-2.24.0 → conan-2.25.1}/conan/internal/api/new/bazel_exe.py +0 -0
  189. {conan-2.24.0 → conan-2.25.1}/conan/internal/api/new/bazel_lib.py +0 -0
  190. {conan-2.24.0 → conan-2.25.1}/conan/internal/api/new/cmake_exe.py +0 -0
  191. {conan-2.24.0 → conan-2.25.1}/conan/internal/api/new/cmake_lib.py +0 -0
  192. {conan-2.24.0 → conan-2.25.1}/conan/internal/api/new/header_lib.py +0 -0
  193. {conan-2.24.0 → conan-2.25.1}/conan/internal/api/new/local_recipes_index.py +0 -0
  194. {conan-2.24.0 → conan-2.25.1}/conan/internal/api/new/meson_exe.py +0 -0
  195. {conan-2.24.0 → conan-2.25.1}/conan/internal/api/new/meson_lib.py +0 -0
  196. {conan-2.24.0 → conan-2.25.1}/conan/internal/api/new/msbuild_exe.py +0 -0
  197. {conan-2.24.0 → conan-2.25.1}/conan/internal/api/new/msbuild_lib.py +0 -0
  198. {conan-2.24.0 → conan-2.25.1}/conan/internal/api/new/premake_exe.py +0 -0
  199. {conan-2.24.0 → conan-2.25.1}/conan/internal/api/new/premake_lib.py +0 -0
  200. {conan-2.24.0 → conan-2.25.1}/conan/internal/api/new/qbs_lib.py +0 -0
  201. {conan-2.24.0 → conan-2.25.1}/conan/internal/api/new/workspace.py +0 -0
  202. {conan-2.24.0 → conan-2.25.1}/conan/internal/api/profile/__init__.py +0 -0
  203. {conan-2.24.0 → conan-2.25.1}/conan/internal/api/profile/detect.py +0 -0
  204. {conan-2.24.0 → conan-2.25.1}/conan/internal/api/remotes/__init__.py +0 -0
  205. {conan-2.24.0 → conan-2.25.1}/conan/internal/api/remotes/encrypt.py +0 -0
  206. {conan-2.24.0 → conan-2.25.1}/conan/internal/api/remotes/localdb.py +0 -0
  207. {conan-2.24.0 → conan-2.25.1}/conan/internal/api/upload.py +0 -0
  208. {conan-2.24.0 → conan-2.25.1}/conan/internal/cache/__init__.py +0 -0
  209. {conan-2.24.0 → conan-2.25.1}/conan/internal/cache/conan_reference_layout.py +0 -0
  210. {conan-2.24.0 → conan-2.25.1}/conan/internal/cache/db/__init__.py +0 -0
  211. {conan-2.24.0 → conan-2.25.1}/conan/internal/cache/home_paths.py +0 -0
  212. {conan-2.24.0 → conan-2.25.1}/conan/internal/cache/integrity_check.py +0 -0
  213. {conan-2.24.0 → conan-2.25.1}/conan/internal/conan_app.py +0 -0
  214. {conan-2.24.0 → conan-2.25.1}/conan/internal/deploy.py +0 -0
  215. {conan-2.24.0 → conan-2.25.1}/conan/internal/errors.py +0 -0
  216. {conan-2.24.0 → conan-2.25.1}/conan/internal/graph/__init__.py +0 -0
  217. {conan-2.24.0 → conan-2.25.1}/conan/internal/graph/build_mode.py +0 -0
  218. {conan-2.24.0 → conan-2.25.1}/conan/internal/graph/compatibility.py +0 -0
  219. {conan-2.24.0 → conan-2.25.1}/conan/internal/graph/compute_pid.py +0 -0
  220. {conan-2.24.0 → conan-2.25.1}/conan/internal/graph/graph_error.py +0 -0
  221. {conan-2.24.0 → conan-2.25.1}/conan/internal/graph/install_graph.py +0 -0
  222. {conan-2.24.0 → conan-2.25.1}/conan/internal/graph/profile_node_definer.py +0 -0
  223. {conan-2.24.0 → conan-2.25.1}/conan/internal/graph/provides.py +0 -0
  224. {conan-2.24.0 → conan-2.25.1}/conan/internal/graph/range_resolver.py +0 -0
  225. {conan-2.24.0 → conan-2.25.1}/conan/internal/internal_tools.py +0 -0
  226. {conan-2.24.0 → conan-2.25.1}/conan/internal/loader.py +0 -0
  227. {conan-2.24.0 → conan-2.25.1}/conan/internal/methods.py +0 -0
  228. {conan-2.24.0 → conan-2.25.1}/conan/internal/model/__init__.py +0 -0
  229. {conan-2.24.0 → conan-2.25.1}/conan/internal/model/conan_file.py +0 -0
  230. {conan-2.24.0 → conan-2.25.1}/conan/internal/model/conanconfig.py +0 -0
  231. {conan-2.24.0 → conan-2.25.1}/conan/internal/model/conanfile_interface.py +0 -0
  232. {conan-2.24.0 → conan-2.25.1}/conan/internal/model/info.py +0 -0
  233. {conan-2.24.0 → conan-2.25.1}/conan/internal/model/pkg_type.py +0 -0
  234. {conan-2.24.0 → conan-2.25.1}/conan/internal/model/profile.py +0 -0
  235. {conan-2.24.0 → conan-2.25.1}/conan/internal/model/requires.py +0 -0
  236. {conan-2.24.0 → conan-2.25.1}/conan/internal/model/settings.py +0 -0
  237. {conan-2.24.0 → conan-2.25.1}/conan/internal/model/version.py +0 -0
  238. {conan-2.24.0 → conan-2.25.1}/conan/internal/model/version_range.py +0 -0
  239. {conan-2.24.0 → conan-2.25.1}/conan/internal/model/workspace.py +0 -0
  240. {conan-2.24.0 → conan-2.25.1}/conan/internal/rest/__init__.py +0 -0
  241. {conan-2.24.0 → conan-2.25.1}/conan/internal/rest/auth_manager.py +0 -0
  242. {conan-2.24.0 → conan-2.25.1}/conan/internal/rest/caching_file_downloader.py +0 -0
  243. {conan-2.24.0 → conan-2.25.1}/conan/internal/rest/client_routes.py +0 -0
  244. {conan-2.24.0 → conan-2.25.1}/conan/internal/rest/conan_requester.py +0 -0
  245. {conan-2.24.0 → conan-2.25.1}/conan/internal/rest/download_cache.py +0 -0
  246. {conan-2.24.0 → conan-2.25.1}/conan/internal/rest/file_downloader.py +0 -0
  247. {conan-2.24.0 → conan-2.25.1}/conan/internal/rest/remote_credentials.py +0 -0
  248. {conan-2.24.0 → conan-2.25.1}/conan/internal/rest/rest_client_local_recipe_index.py +0 -0
  249. {conan-2.24.0 → conan-2.25.1}/conan/internal/runner/__init__.py +0 -0
  250. {conan-2.24.0 → conan-2.25.1}/conan/internal/runner/docker.py +0 -0
  251. {conan-2.24.0 → conan-2.25.1}/conan/internal/runner/output.py +0 -0
  252. {conan-2.24.0 → conan-2.25.1}/conan/internal/runner/ssh.py +0 -0
  253. {conan-2.24.0 → conan-2.25.1}/conan/internal/runner/wsl.py +0 -0
  254. {conan-2.24.0 → conan-2.25.1}/conan/internal/source.py +0 -0
  255. {conan-2.24.0 → conan-2.25.1}/conan/internal/subsystems.py +0 -0
  256. {conan-2.24.0 → conan-2.25.1}/conan/internal/util/config_parser.py +0 -0
  257. {conan-2.24.0 → conan-2.25.1}/conan/internal/util/dates.py +0 -0
  258. {conan-2.24.0 → conan-2.25.1}/conan/internal/util/runners.py +0 -0
  259. {conan-2.24.0 → conan-2.25.1}/conan/test/__init__.py +0 -0
  260. {conan-2.24.0 → conan-2.25.1}/conan/test/assets/__init__.py +0 -0
  261. {conan-2.24.0 → conan-2.25.1}/conan/test/assets/autotools.py +0 -0
  262. {conan-2.24.0 → conan-2.25.1}/conan/test/assets/cmake.py +0 -0
  263. {conan-2.24.0 → conan-2.25.1}/conan/test/assets/premake.py +0 -0
  264. {conan-2.24.0 → conan-2.25.1}/conan/test/assets/sources.py +0 -0
  265. {conan-2.24.0 → conan-2.25.1}/conan/test/assets/visual_project_files.py +0 -0
  266. {conan-2.24.0 → conan-2.25.1}/conan/test/utils/__init__.py +0 -0
  267. {conan-2.24.0 → conan-2.25.1}/conan/test/utils/env.py +0 -0
  268. {conan-2.24.0 → conan-2.25.1}/conan/test/utils/file_server.py +0 -0
  269. {conan-2.24.0 → conan-2.25.1}/conan/test/utils/profiles.py +0 -0
  270. {conan-2.24.0 → conan-2.25.1}/conan/test/utils/scm.py +0 -0
  271. {conan-2.24.0 → conan-2.25.1}/conan/test/utils/server_launcher.py +0 -0
  272. {conan-2.24.0 → conan-2.25.1}/conan/tools/__init__.py +0 -0
  273. {conan-2.24.0 → conan-2.25.1}/conan/tools/android/__init__.py +0 -0
  274. {conan-2.24.0 → conan-2.25.1}/conan/tools/android/utils.py +0 -0
  275. {conan-2.24.0 → conan-2.25.1}/conan/tools/apple/__init__.py +0 -0
  276. {conan-2.24.0 → conan-2.25.1}/conan/tools/apple/apple.py +0 -0
  277. {conan-2.24.0 → conan-2.25.1}/conan/tools/build/__init__.py +0 -0
  278. {conan-2.24.0 → conan-2.25.1}/conan/tools/build/compiler.py +0 -0
  279. {conan-2.24.0 → conan-2.25.1}/conan/tools/build/cppstd.py +0 -0
  280. {conan-2.24.0 → conan-2.25.1}/conan/tools/build/cpu.py +0 -0
  281. {conan-2.24.0 → conan-2.25.1}/conan/tools/build/cross_building.py +0 -0
  282. {conan-2.24.0 → conan-2.25.1}/conan/tools/build/flags.py +0 -0
  283. {conan-2.24.0 → conan-2.25.1}/conan/tools/build/stdcpp_library.py +0 -0
  284. {conan-2.24.0 → conan-2.25.1}/conan/tools/cmake/cmake.py +0 -0
  285. {conan-2.24.0/conan/tools/cmake/cmakedeps2 → conan-2.25.1/conan/tools/cmake/cmakeconfigdeps}/__init__.py +0 -0
  286. {conan-2.24.0/conan/tools/cmake/cmakedeps2 → conan-2.25.1/conan/tools/cmake/cmakeconfigdeps}/targets.py +0 -0
  287. {conan-2.24.0 → conan-2.25.1}/conan/tools/cmake/cmakedeps/__init__.py +0 -0
  288. {conan-2.24.0 → conan-2.25.1}/conan/tools/cmake/cmakedeps/templates/config_version.py +0 -0
  289. {conan-2.24.0 → conan-2.25.1}/conan/tools/cmake/cmakedeps/templates/macros.py +0 -0
  290. {conan-2.24.0 → conan-2.25.1}/conan/tools/cmake/cmakedeps/templates/target_configuration.py +0 -0
  291. {conan-2.24.0 → conan-2.25.1}/conan/tools/cmake/cmakedeps/templates/targets.py +0 -0
  292. {conan-2.24.0 → conan-2.25.1}/conan/tools/cmake/layout.py +0 -0
  293. {conan-2.24.0 → conan-2.25.1}/conan/tools/cmake/toolchain/__init__.py +0 -0
  294. {conan-2.24.0 → conan-2.25.1}/conan/tools/cmake/toolchain/blocks.py +0 -0
  295. {conan-2.24.0 → conan-2.25.1}/conan/tools/cmake/toolchain/toolchain.py +0 -0
  296. {conan-2.24.0 → conan-2.25.1}/conan/tools/cmake/utils.py +0 -0
  297. {conan-2.24.0 → conan-2.25.1}/conan/tools/cps/__init__.py +0 -0
  298. {conan-2.24.0 → conan-2.25.1}/conan/tools/cps/cps_deps.py +0 -0
  299. {conan-2.24.0 → conan-2.25.1}/conan/tools/env/__init__.py +0 -0
  300. {conan-2.24.0 → conan-2.25.1}/conan/tools/env/environment.py +0 -0
  301. {conan-2.24.0 → conan-2.25.1}/conan/tools/env/virtualbuildenv.py +0 -0
  302. {conan-2.24.0 → conan-2.25.1}/conan/tools/env/virtualrunenv.py +0 -0
  303. {conan-2.24.0 → conan-2.25.1}/conan/tools/files/__init__.py +0 -0
  304. {conan-2.24.0 → conan-2.25.1}/conan/tools/files/conandata.py +0 -0
  305. {conan-2.24.0 → conan-2.25.1}/conan/tools/files/patches.py +0 -0
  306. {conan-2.24.0 → conan-2.25.1}/conan/tools/files/symlinks/__init__.py +0 -0
  307. {conan-2.24.0 → conan-2.25.1}/conan/tools/files/symlinks/symlinks.py +0 -0
  308. {conan-2.24.0 → conan-2.25.1}/conan/tools/gnu/__init__.py +0 -0
  309. {conan-2.24.0 → conan-2.25.1}/conan/tools/gnu/autotoolsdeps.py +0 -0
  310. {conan-2.24.0 → conan-2.25.1}/conan/tools/gnu/autotoolstoolchain.py +0 -0
  311. {conan-2.24.0 → conan-2.25.1}/conan/tools/gnu/get_gnu_triplet.py +0 -0
  312. {conan-2.24.0 → conan-2.25.1}/conan/tools/gnu/gnutoolchain.py +0 -0
  313. {conan-2.24.0 → conan-2.25.1}/conan/tools/gnu/makedeps.py +0 -0
  314. {conan-2.24.0 → conan-2.25.1}/conan/tools/gnu/pkgconfig.py +0 -0
  315. {conan-2.24.0 → conan-2.25.1}/conan/tools/gnu/pkgconfigdeps.py +0 -0
  316. {conan-2.24.0 → conan-2.25.1}/conan/tools/google/__init__.py +0 -0
  317. {conan-2.24.0 → conan-2.25.1}/conan/tools/google/bazeldeps.py +0 -0
  318. {conan-2.24.0 → conan-2.25.1}/conan/tools/google/layout.py +0 -0
  319. {conan-2.24.0 → conan-2.25.1}/conan/tools/google/toolchain.py +0 -0
  320. {conan-2.24.0 → conan-2.25.1}/conan/tools/intel/__init__.py +0 -0
  321. {conan-2.24.0 → conan-2.25.1}/conan/tools/intel/intel_cc.py +0 -0
  322. {conan-2.24.0 → conan-2.25.1}/conan/tools/layout/__init__.py +0 -0
  323. {conan-2.24.0 → conan-2.25.1}/conan/tools/meson/__init__.py +0 -0
  324. {conan-2.24.0 → conan-2.25.1}/conan/tools/meson/helpers.py +0 -0
  325. {conan-2.24.0 → conan-2.25.1}/conan/tools/microsoft/__init__.py +0 -0
  326. {conan-2.24.0 → conan-2.25.1}/conan/tools/microsoft/layout.py +0 -0
  327. {conan-2.24.0 → conan-2.25.1}/conan/tools/microsoft/msbuilddeps.py +0 -0
  328. {conan-2.24.0 → conan-2.25.1}/conan/tools/microsoft/nmakedeps.py +0 -0
  329. {conan-2.24.0 → conan-2.25.1}/conan/tools/microsoft/nmaketoolchain.py +0 -0
  330. {conan-2.24.0 → conan-2.25.1}/conan/tools/microsoft/subsystems.py +0 -0
  331. {conan-2.24.0 → conan-2.25.1}/conan/tools/microsoft/toolchain.py +0 -0
  332. {conan-2.24.0 → conan-2.25.1}/conan/tools/microsoft/visual.py +0 -0
  333. {conan-2.24.0 → conan-2.25.1}/conan/tools/premake/__init__.py +0 -0
  334. {conan-2.24.0 → conan-2.25.1}/conan/tools/premake/constants.py +0 -0
  335. {conan-2.24.0 → conan-2.25.1}/conan/tools/premake/toolchain.py +0 -0
  336. {conan-2.24.0 → conan-2.25.1}/conan/tools/qbs/__init__.py +0 -0
  337. {conan-2.24.0 → conan-2.25.1}/conan/tools/qbs/common.py +0 -0
  338. {conan-2.24.0 → conan-2.25.1}/conan/tools/qbs/qbsdeps.py +0 -0
  339. {conan-2.24.0 → conan-2.25.1}/conan/tools/qbs/qbsprofile.py +0 -0
  340. {conan-2.24.0 → conan-2.25.1}/conan/tools/ros/__init__.py +0 -0
  341. {conan-2.24.0 → conan-2.25.1}/conan/tools/sbom/__init__.py +0 -0
  342. {conan-2.24.0 → conan-2.25.1}/conan/tools/sbom/cyclonedx.py +0 -0
  343. {conan-2.24.0 → conan-2.25.1}/conan/tools/scm/__init__.py +0 -0
  344. {conan-2.24.0 → conan-2.25.1}/conan/tools/scm/git.py +0 -0
  345. {conan-2.24.0 → conan-2.25.1}/conan/tools/scons/__init__.py +0 -0
  346. {conan-2.24.0 → conan-2.25.1}/conan/tools/scons/sconsdeps.py +0 -0
  347. {conan-2.24.0 → conan-2.25.1}/conan.egg-info/dependency_links.txt +0 -0
  348. {conan-2.24.0 → conan-2.25.1}/conan.egg-info/entry_points.txt +0 -0
  349. {conan-2.24.0 → conan-2.25.1}/conan.egg-info/top_level.txt +0 -0
  350. {conan-2.24.0 → conan-2.25.1}/conans/__init__.py +0 -0
  351. {conan-2.24.0 → conan-2.25.1}/conans/conan.py +0 -0
  352. {conan-2.24.0 → conan-2.25.1}/conans/conan_server.py +0 -0
  353. {conan-2.24.0 → conan-2.25.1}/conans/requirements.txt +0 -0
  354. {conan-2.24.0 → conan-2.25.1}/conans/requirements_runner.txt +0 -0
  355. {conan-2.24.0 → conan-2.25.1}/conans/requirements_server.txt +0 -0
  356. {conan-2.24.0 → conan-2.25.1}/pyproject.toml +0 -0
  357. {conan-2.24.0 → conan-2.25.1}/setup.cfg +0 -0
  358. {conan-2.24.0 → conan-2.25.1}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: conan
3
- Version: 2.24.0
3
+ Version: 2.25.1
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.24.0'
5
+ __version__ = '2.25.1'
6
6
  conan_version = Version(__version__)
@@ -64,7 +64,8 @@ class ConanAPI:
64
64
  #: Used to get latest refs and list refs of recipes and packages
65
65
  self.list: ListAPI = ListAPI(self)
66
66
  self.profiles = ProfilesAPI(self, self._api_helpers)
67
- self.install = InstallAPI(self, self._api_helpers)
67
+ #: Used to install binaries, sources, deploy packages and more
68
+ self.install: InstallAPI = InstallAPI(self, self._api_helpers)
68
69
  self.graph = GraphAPI(self, self._api_helpers)
69
70
  #: Used to export recipes and pre-compiled package binaries to the Conan cache
70
71
  self.export: ExportAPI = ExportAPI(self, self._api_helpers)
@@ -41,10 +41,6 @@ class MultiPackagesList:
41
41
  for k, v in other.lists.items():
42
42
  self.lists.setdefault(k, PackagesList()).merge(v)
43
43
 
44
- def keep_outer(self, other):
45
- for namespace, other_pkg_list in other.lists.items():
46
- self.lists.get(namespace, PackagesList()).keep_outer(other_pkg_list)
47
-
48
44
  @staticmethod
49
45
  def load(file):
50
46
  """ Create an instance of the class from a serialized JSON file path pointed by ``file``."""
@@ -96,7 +92,6 @@ class MultiPackagesList:
96
92
  if not os.path.isfile(graphfile):
97
93
  raise ConanException(f"Graph file not found: {graphfile}")
98
94
  try:
99
- base_context = context.split("-")[0] if context else None
100
95
  graph = json.loads(load(graphfile))
101
96
  # Check if input json is a graph file
102
97
  if "graph" not in graph:
@@ -107,15 +102,7 @@ class MultiPackagesList:
107
102
  )
108
103
 
109
104
  mpkglist = MultiPackagesList._define_graph(graph, graph_recipes, graph_binaries,
110
- context=base_context)
111
- if context == "build-only":
112
- host = MultiPackagesList._define_graph(graph, graph_recipes, graph_binaries,
113
- context="host")
114
- mpkglist.keep_outer(host)
115
- elif context == "host-only":
116
- build = MultiPackagesList._define_graph(graph, graph_recipes, graph_binaries,
117
- context="build")
118
- mpkglist.keep_outer(build)
105
+ context=context)
119
106
  return mpkglist
120
107
  except JSONDecodeError as e:
121
108
  raise ConanException(f"Graph file invalid JSON: {graphfile}\n{e}")
@@ -130,6 +117,7 @@ class MultiPackagesList:
130
117
 
131
118
  @staticmethod
132
119
  def _define_graph(graph, graph_recipes=None, graph_binaries=None, context=None):
120
+ base_context = context.split("-")[0] if context else None
133
121
  pkglist = MultiPackagesList()
134
122
  cache_list = PackagesList()
135
123
  if graph_recipes is None and graph_binaries is None:
@@ -141,7 +129,7 @@ class MultiPackagesList:
141
129
 
142
130
  pkglist.lists["Local Cache"] = cache_list
143
131
  for node in graph["graph"]["nodes"].values():
144
- if context and node['context'] != context:
132
+ if base_context and node['context'] != base_context:
145
133
  continue
146
134
 
147
135
  # We need to add the python_requires too
@@ -189,8 +177,32 @@ class MultiPackagesList:
189
177
  if any(b == "*" or b == binary for b in binaries):
190
178
  cache_list.add_ref(ref) # Binary listed forces recipe listed
191
179
  cache_list.add_pref(pref, node["info"])
180
+ # Now filter possible exclusive contexts once that we know how they are distributed
181
+ MultiPackagesList._filter_exclusive_context(pkglist, graph, context)
192
182
  return pkglist
193
183
 
184
+ @staticmethod
185
+ def _filter_exclusive_context(mpkglist, graph, context):
186
+ if context not in ("host-only", "build-only"):
187
+ return
188
+
189
+ pref_contexts = {}
190
+ for node in graph["graph"]["nodes"].values():
191
+ if node["package_id"] is not None:
192
+ pref = node["ref"] + ":" + node["package_id"]
193
+ pref_contexts.setdefault(pref, set()).add(node['context'])
194
+
195
+ opposite_context = "build" if context == "host-only" else "host"
196
+ for remote, pkglist in mpkglist.lists.items():
197
+ for pref, contexts in pref_contexts.items():
198
+ if opposite_context in contexts:
199
+ pref = PkgReference.loads(pref)
200
+ if pkglist.has_rref(pref.ref):
201
+ rev_dict = pkglist.recipe_dict(pref.ref)
202
+ rev_dict.get("packages", {}).pop(pref.package_id, None)
203
+ if len(rev_dict.get("packages", {})) == 0:
204
+ pkglist._data.pop(str(pref.ref), None)
205
+
194
206
 
195
207
  class PackagesList:
196
208
  """ A collection of recipes, revisions and packages."""
@@ -213,15 +225,6 @@ class PackagesList:
213
225
  return d
214
226
  recursive_dict_update(self._data, other._data)
215
227
 
216
- def keep_outer(self, other):
217
- assert isinstance(other, PackagesList)
218
- if not self._data:
219
- return
220
-
221
- for ref, info in other._data.items():
222
- if self._data.get(ref, {}) == info:
223
- self._data.pop(ref)
224
-
225
228
  def split(self):
226
229
  """
227
230
  Returns a list of PackageList, split one per reference.
@@ -335,6 +338,10 @@ class PackagesList:
335
338
  """
336
339
  return self._data[str(ref)]["revisions"][ref.revision]
337
340
 
341
+ def has_rref(self, ref: RecipeReference) -> bool:
342
+ # Checks if the PackagesList contains the given RecipeReference.
343
+ return str(ref) in self._data and ref.revision in self._data[str(ref)].get("revisions", {})
344
+
338
345
  def package_dict(self, pref: PkgReference):
339
346
  """ Gives read/write access to the dictionary containing a specific PkgReference
340
347
  information
@@ -135,17 +135,17 @@ class ConanOutput:
135
135
  @classmethod
136
136
  def valid_log_levels(cls):
137
137
  return {"quiet": LEVEL_QUIET, # -vquiet 80
138
- "error": LEVEL_ERROR, # -verror 70
139
- "warning": LEVEL_WARNING, # -vwaring 60
140
- "notice": LEVEL_NOTICE, # -vnotice 50
141
- "status": LEVEL_STATUS, # -vstatus 40
142
- None: LEVEL_VERBOSE, # -v 30
143
- "verbose": LEVEL_VERBOSE, # -vverbose 30
144
- "debug": LEVEL_DEBUG, # -vdebug 20
145
- "v": LEVEL_DEBUG, # -vv 20
146
- "trace": LEVEL_TRACE, # -vtrace 10
147
- "vv": LEVEL_TRACE # -vvv 10
148
- }
138
+ "error": LEVEL_ERROR, # -verror 70
139
+ "warning": LEVEL_WARNING, # -vwaring 60
140
+ "notice": LEVEL_NOTICE, # -vnotice 50
141
+ "status": LEVEL_STATUS, # -vstatus 40
142
+ None: LEVEL_VERBOSE, # -v 30
143
+ "verbose": LEVEL_VERBOSE, # -vverbose 30
144
+ "debug": LEVEL_DEBUG, # -vdebug 20
145
+ "v": LEVEL_DEBUG, # -vv 20
146
+ "trace": LEVEL_TRACE, # -vtrace 10
147
+ "vv": LEVEL_TRACE # -vvv 10
148
+ }
149
149
 
150
150
  @classmethod
151
151
  def define_log_level(cls, v):
@@ -6,13 +6,14 @@ import tempfile
6
6
 
7
7
  from conan.api.model import PackagesList
8
8
  from conan.api.output import ConanOutput
9
- from conan.internal.api.uploader import compress_files
9
+ from conan.internal.api.uploader import compress_files, get_compress_level
10
10
  from conan.internal.cache.cache import PkgCache
11
11
  from conan.internal.cache.conan_reference_layout import (EXPORT_SRC_FOLDER, EXPORT_FOLDER,
12
12
  SRC_FOLDER, METADATA,
13
13
  DOWNLOAD_EXPORT_FOLDER)
14
14
  from conan.internal.cache.home_paths import HomePaths
15
15
  from conan.internal.cache.integrity_check import IntegrityChecker
16
+ from conan.internal.paths import COMPRESSIONS
16
17
  from conan.internal.rest.download_cache import DownloadCache
17
18
  from conan.errors import ConanException
18
19
  from conan.api.model import PkgReference
@@ -23,6 +24,11 @@ from conan.internal.util.files import rmdir, mkdir, remove, save
23
24
 
24
25
  class CacheAPI:
25
26
  """ This CacheAPI is used to interact with the packages storage cache
27
+
28
+ Note that the Conan packages cache is exclusively **read-only** for user code. Only Conan
29
+ can write or modify the folders and files in the Conan cache. In general, when a method
30
+ returns a folder, it is mostly for debugging purposes and read-only access, but never to
31
+ modify the contents of the cache.
26
32
  """
27
33
 
28
34
  def __init__(self, conan_api, api_helpers):
@@ -30,42 +36,127 @@ class CacheAPI:
30
36
  self._api_helpers = api_helpers
31
37
 
32
38
  def export_path(self, ref: RecipeReference):
39
+ """Returns the path of the recipe conanfile and exported files in the Conan cache
40
+
41
+ This folder is exclusively for **read-only** access, typically for debugging purposes,
42
+ it is completely forbidden to modify any of its contents.
43
+
44
+ :param ref: RecipeReference. If it includes recipe revision, that exact revision will be
45
+ returned, if it doesn't include recipe revision, it will return the latest revision one.
46
+ :return: path to the folder, as a string
47
+ :raises: ConanExcepcion if the folder doesn't exist
48
+ """
49
+
33
50
  cache = PkgCache(self._conan_api.cache_folder, self._api_helpers.global_conf)
34
51
  ref = _resolve_latest_ref(cache, ref)
35
52
  ref_layout = cache.recipe_layout(ref)
36
53
  return _check_folder_existence(ref, "export", ref_layout.export())
37
54
 
38
55
  def recipe_metadata_path(self, ref: RecipeReference):
56
+ """Returns the path of the recipe metadata files in the Conan cache
57
+
58
+ Exceptionally, adding or modifying the files within this folder is allowed, as
59
+ the metadata files are not taken into account into the computation of the recipe hash
60
+ (recipe revision).
61
+
62
+ :param ref: RecipeReference. If it includes recipe revision, that exact revision will be
63
+ returned, if it doesn't include recipe revision, it will return the latest revision one.
64
+ :return: path to the folder, as a string
65
+ :raises: ConanExcepcion if the folder doesn't exist
66
+ """
39
67
  cache = PkgCache(self._conan_api.cache_folder, self._api_helpers.global_conf)
40
68
  ref = _resolve_latest_ref(cache, ref)
41
69
  ref_layout = cache.recipe_layout(ref)
42
70
  return _check_folder_existence(ref, "metadata", ref_layout.metadata())
43
71
 
44
72
  def export_source_path(self, ref: RecipeReference):
73
+ """Returns the path of the exported sources in the Conan cache
74
+
75
+ Note that the exported sources only exist in the cache when the package has been created
76
+ locally or built from source.
77
+
78
+ This folder is exclusively for **read-only** access, typically for debugging purposes,
79
+ it is completely forbidden to modify any of its contents.
80
+
81
+ :param ref: RecipeReference. If it includes recipe revision, that exact revision will be
82
+ returned, if it doesn't include recipe revision, it will return the latest revision one.
83
+ :return: path to the folder, as a string
84
+ :raises: ConanExcepcion if the folder doesn't exist
85
+ """
45
86
  cache = PkgCache(self._conan_api.cache_folder, self._api_helpers.global_conf)
46
87
  ref = _resolve_latest_ref(cache, ref)
47
88
  ref_layout = cache.recipe_layout(ref)
48
89
  return _check_folder_existence(ref, "export_sources", ref_layout.export_sources())
49
90
 
50
91
  def source_path(self, ref: RecipeReference):
92
+ """Returns the path of the temporary source folder in the Conan cache
93
+
94
+ Note that the source folder only exist in the cache when the package has been created
95
+ locally or built from source.
96
+
97
+ This folder is exclusively for **read-only** access, typically for debugging purposes,
98
+ it is completely forbidden to modify any of its contents.
99
+
100
+ :param ref: RecipeReference. If it includes recipe revision, that exact revision will be
101
+ returned, if it doesn't include recipe revision, it will return the latest revision one.
102
+ :return: path to the folder, as a string
103
+ :raises: ConanExcepcion if the folder doesn't exist
104
+ """
51
105
  cache = PkgCache(self._conan_api.cache_folder, self._api_helpers.global_conf)
52
106
  ref = _resolve_latest_ref(cache, ref)
53
107
  ref_layout = cache.recipe_layout(ref)
54
108
  return _check_folder_existence(ref, "source", ref_layout.source())
55
109
 
56
110
  def build_path(self, pref: PkgReference):
111
+ """Returns the path of the temporary build folder in the Conan cache
112
+
113
+ Note that the build folder only exist in the cache when the package has been created
114
+ locally or built from source.
115
+
116
+ This folder is exclusively for **read-only** access, typically for debugging purposes,
117
+ it is completely forbidden to modify any of its contents.
118
+
119
+ :param pref: PkgReference. If it includes recipe revision, that exact revision will be
120
+ returned, if it doesn't include recipe revision, it will return the latest revision one.
121
+ Exactly same behavior for the package revision.
122
+ :return: path to the folder, as a string
123
+ :raises: ConanExcepcion if the folder doesn't exist
124
+ """
57
125
  cache = PkgCache(self._conan_api.cache_folder, self._api_helpers.global_conf)
58
126
  pref = _resolve_latest_pref(cache, pref)
59
127
  ref_layout = cache.pkg_layout(pref)
60
128
  return _check_folder_existence(pref, "build", ref_layout.build())
61
129
 
62
130
  def package_metadata_path(self, pref: PkgReference):
131
+ """Returns the path of the package metadata folder in the Conan cache
132
+
133
+ Exceptionally, adding or modifying the files within this folder is allowed, as
134
+ the metadata files are not taken into account into the computation of the package hash
135
+ (package revision).
136
+
137
+ :param pref: PkgReference. If it includes recipe revision, that exact revision will be
138
+ returned, if it doesn't include recipe revision, it will return the latest revision one.
139
+ Exactly same behavior for the package revision.
140
+ :return: path to the folder, as a string
141
+ :raises: ConanExcepcion if the folder doesn't exist
142
+ """
63
143
  cache = PkgCache(self._conan_api.cache_folder, self._api_helpers.global_conf)
64
144
  pref = _resolve_latest_pref(cache, pref)
65
145
  ref_layout = cache.pkg_layout(pref)
66
146
  return _check_folder_existence(pref, "metadata", ref_layout.metadata())
67
147
 
68
148
  def package_path(self, pref: PkgReference):
149
+ """Returns the path of the package folder in the Conan cache
150
+
151
+ This folder is exclusively for **read-only** access, typically for debugging purposes,
152
+ it is completely forbidden to modify any of its contents.
153
+
154
+ :param pref: PkgReference. If it includes recipe revision, that exact revision will be
155
+ returned, if it doesn't include recipe revision, it will return the latest revision one.
156
+ Exactly same behavior for the package revision.
157
+ :return: path to the folder, as a string
158
+ :raises: ConanExcepcion if the folder doesn't exist
159
+ """
69
160
  cache = PkgCache(self._conan_api.cache_folder, self._api_helpers.global_conf)
70
161
  pref = _resolve_latest_pref(cache, pref)
71
162
  ref_layout = cache.pkg_layout(pref)
@@ -91,7 +182,7 @@ class CacheAPI:
91
182
  raise ConanException("There are corrupted artifacts, check the error logs")
92
183
 
93
184
  def clean(self, package_list, source=True, build=True, download=True, temp=True,
94
- backup_sources=False):
185
+ backup_sources=False) -> None:
95
186
  """
96
187
  Remove non critical folders from the cache, like source, build and download (.tgz store)
97
188
  folders.
@@ -118,6 +209,12 @@ class CacheAPI:
118
209
  info = os.path.join(folder, "p", "conaninfo.txt")
119
210
  if not os.path.exists(manifest) or not os.path.exists(info):
120
211
  rmdir(folder)
212
+
213
+ # Temporary name (not named) until we have clarity if this is the same as the "t"
214
+ # temporary (for exports) or not
215
+ if os.path.exists(os.path.join(cache.store, "d")):
216
+ rmdir(os.path.join(cache.store, "d"))
217
+
121
218
  if backup_sources:
122
219
  backup_files = self._conan_api.cache.get_backup_sources(package_list, exclude=False,
123
220
  only_upload=False)
@@ -142,13 +239,31 @@ class CacheAPI:
142
239
  if download:
143
240
  rmdir(pref_layout.download_package())
144
241
 
145
- def save(self, package_list: PackagesList, tgz_path, no_source=False) -> None:
242
+ def save(self, package_list: PackagesList, path, no_source=False) -> None:
243
+ """Create a compressed archive with recipes and packages from the Conan cache that
244
+ can be later restored in another cache.
245
+
246
+ Do not manipulate the contents of the resulting archive, as it also contains metadata,
247
+ and modifying the contents would be equivalent to modify the Conan package cache, which
248
+ is forbidden.
249
+
250
+ :param package_list: PackagesList containing the recipes and packages to add
251
+ to the compressed archive
252
+ :param path: The archive file to generate. Based on the extension of the file, different
253
+ compression formats can be used (.tgz, .txz and .tzst, the latter only for Python>=3.14).
254
+ :param no_source: If True, the source folders in the cache will not be added to the archive.
255
+ :return:
256
+ """
146
257
  global_conf = self._api_helpers.global_conf
147
258
  cache = PkgCache(self._conan_api.cache_folder, global_conf)
148
259
  cache_folder = cache.store # Note, this is not the home, but the actual package cache
149
260
  out = ConanOutput()
150
- mkdir(os.path.dirname(tgz_path))
151
- compresslevel = global_conf.get("core.gzip:compresslevel", check_type=int)
261
+ mkdir(os.path.dirname(path))
262
+ tgz_name = os.path.basename(path)
263
+ compressformat = next((e for e in COMPRESSIONS if tgz_name.endswith(e)), None)
264
+ if not compressformat:
265
+ raise ConanException(f"Unsupported compression format for {tgz_name}")
266
+ compresslevel = get_compress_level(compressformat, global_conf)
152
267
  tar_files: dict[str, str] = {} # {path_in_tar: abs_path}
153
268
 
154
269
  for ref, packages in package_list.items():
@@ -162,12 +277,12 @@ class CacheAPI:
162
277
  for f in (EXPORT_FOLDER, EXPORT_SRC_FOLDER, SRC_FOLDER):
163
278
  if f == SRC_FOLDER and no_source:
164
279
  continue
165
- path = os.path.join(cache_folder, recipe_folder, f)
166
- if os.path.exists(path):
167
- tar_files[f"{recipe_folder}/{f}"] = path
168
- path = os.path.join(cache_folder, recipe_folder, DOWNLOAD_EXPORT_FOLDER, METADATA)
169
- if os.path.exists(path):
170
- tar_files[f"{recipe_folder}/{DOWNLOAD_EXPORT_FOLDER}/{METADATA}"] = path
280
+ cachepath = os.path.join(cache_folder, recipe_folder, f)
281
+ if os.path.exists(cachepath):
282
+ tar_files[f"{recipe_folder}/{f}"] = cachepath
283
+ cachepath = os.path.join(cache_folder, recipe_folder, DOWNLOAD_EXPORT_FOLDER, METADATA)
284
+ if os.path.exists(cachepath):
285
+ tar_files[f"{recipe_folder}/{DOWNLOAD_EXPORT_FOLDER}/{METADATA}"] = cachepath
171
286
 
172
287
  for pref in packages:
173
288
  pref_layout = cache.pkg_layout(pref)
@@ -191,11 +306,18 @@ class CacheAPI:
191
306
  pkglist_path = os.path.join(tempfile.gettempdir(), "pkglist.json")
192
307
  save(pkglist_path, serialized)
193
308
  tar_files["pkglist.json"] = pkglist_path
194
- compress_files(tar_files, os.path.basename(tgz_path), os.path.dirname(tgz_path),
195
- compresslevel, recursive=True)
309
+ compress_files(tar_files, tgz_name, os.path.dirname(path), compresslevel, recursive=True)
196
310
  remove(pkglist_path)
311
+ ConanOutput().success(f"Created cache save file: {path}")
197
312
 
198
313
  def restore(self, path) -> PackagesList:
314
+ """Restore a compressed archive with recipes and packages previously saved from another
315
+ Conan cache into the currently active Conan cache.
316
+
317
+ :param path: The archive file to restore. Based on the extension of the file, different
318
+ compression formats can be used (.tgz, .txz and .tzst, the latter only for Python>=3.14).
319
+ :return: a PackageLists with the recipes and packages that have been restored to the cache
320
+ """
199
321
  if not os.path.isfile(path):
200
322
  raise ConanException(f"Restore archive doesn't exist in {path}")
201
323
 
@@ -275,6 +397,7 @@ class CacheAPI:
275
397
  :param exclude: if True, exclude the sources that come from URLs present the
276
398
  core.sources:exclude_urls global conf
277
399
  :param only_upload: if True, only return the files for packages that are set to be uploaded
400
+ :return: A list of files that need to be uploaded
278
401
  """
279
402
  config = self._api_helpers.global_conf
280
403
  download_cache_path = config.get("core.sources:download_cache")
@@ -286,6 +409,8 @@ class CacheAPI:
286
409
  return download_cache.get_backup_sources_files(excluded_urls, package_list, only_upload)
287
410
 
288
411
  def path_to_ref(self, path):
412
+ # This method is explicitly not publicly documented, as mostly a command helper for
413
+ # debugging, it shouldn't be used in any real API usage
289
414
  cache = PkgCache(self._conan_api.cache_folder, self._api_helpers.global_conf)
290
415
  result = cache.path_to_ref(path)
291
416
  if result is None:
@@ -36,10 +36,25 @@ class ConfigAPI:
36
36
  """
37
37
  return self._conan_api.cache_folder
38
38
 
39
- def install(self, path_or_url, verify_ssl, config_type=None, args=None,
40
- source_folder=None, target_folder=None):
39
+ def install(self, path_or_url: str, verify_ssl, config_type=None, args=None,
40
+ source_folder=None, target_folder=None) -> None:
41
41
  """ install Conan configuration from a git repo, from a zip file in an http server
42
42
  or a local folder
43
+
44
+ Calling this method will cause a reinitilization of the full ConanAPI, with possible
45
+ invalidation of cached information, and references to objects from the ConanAPI might
46
+ become dangling or outdated.
47
+
48
+ :param path_or_url: path or url to install. It can be a http://.../somefile.zip, a
49
+ git repository URL, or a local folder
50
+ :param verify_ssl: Argument passed to python-requests library for SSL verification
51
+ :param config_type: type of configuration to install: "git", "dir", "file", "url"
52
+ :param args: additional arguments to pass to git repositories cloning
53
+ :param source_folder: If specified, install files from that folder of the origin only
54
+ :param target_folder: If the files are to be installed in a specific folder in the Conan
55
+ home. For example, if it is desired to install only profiles from a configuration and
56
+ using source_folder="profiles", it might be expected to use target_folder="profiles"
57
+ to keep the correct profile files location in the local home.
43
58
  """
44
59
  from conan.internal.api.config.config_installer import configuration_install
45
60
  cache_folder = self._conan_api.cache_folder
@@ -50,6 +65,25 @@ class ConfigAPI:
50
65
  self._conan_api.reinit()
51
66
 
52
67
  def install_package(self, require, lockfile=None, force=False, remotes=None, profile=None):
68
+ """ install Conan configuration from a Conan package
69
+
70
+ Calling this method will cause a reinitilization of the full ConanAPI, with possible
71
+ invalidation of cached information, and references to objects from the ConanAPI might
72
+ become dangling or outdated.
73
+
74
+ :param require: The package requirement to be installed. It can contain version range
75
+ expressions. If the revision is not specified, as a recipe ``requires``, it will
76
+ also resolve to the latest recipe-revision
77
+ :param lockfile: Lockfile to be used to constrain and lock the versions and recipe-revisions
78
+ from the input requirements, to the exact versions and revisions specified in the
79
+ lockfile
80
+ :param force: If the package has already been installed, nothing will be done unless
81
+ force is True
82
+ :param remotes: Remotes to look for the configuration package
83
+ :param profile: If specified, use that profile to resolve for profile-specific different
84
+ configurations, like depending on different settings.
85
+ :return: list of RecipeReferences of the installed configuration packages
86
+ """
53
87
  ConanOutput().warning("The 'conan config install-pkg' is experimental",
54
88
  warn_tag="experimental")
55
89
  require = RecipeReference.loads(require)
@@ -60,6 +94,7 @@ class ConfigAPI:
60
94
 
61
95
  @staticmethod
62
96
  def load_conanconfig(path, remotes):
97
+ # Internal, do not document yet.
63
98
  if os.path.isdir(path):
64
99
  path = os.path.join(path, "conanconfig.yml")
65
100
  requested_requires, urls = loadconanconfig_yml(path)
@@ -71,6 +106,24 @@ class ConfigAPI:
71
106
  return requested_requires, remotes
72
107
 
73
108
  def install_conanconfig(self, path, lockfile=None, force=False, remotes=None, profile=None):
109
+ """ install Conan configuration from a Conan "conanconfig.yml" file
110
+
111
+ Calling this method will cause a reinitilization of the full ConanAPI, with possible
112
+ invalidation of cached information, and references to objects from the ConanAPI might
113
+ become dangling or outdated.
114
+
115
+ :param path: Path to the conanconfig.yml file containing the configuration packages
116
+ requirement definitions
117
+ :param lockfile: Lockfile to be used to constrain and lock the versions and recipe-revisions
118
+ from the input requirements, to the exact versions and revisions specified in the
119
+ lockfile
120
+ :param force: If the package has already been installed, nothing will be done unless
121
+ force is True
122
+ :param remotes: Remotes to look for the configuration package
123
+ :param profile: If specified, use that profile to resolve for profile-specific different
124
+ configurations, like depending on different settings.
125
+ :return: list of RecipeReferences of the installed configuration packages
126
+ """
74
127
  ConanOutput().warning("The 'conan config install-pkg' is experimental",
75
128
  warn_tag="experimental")
76
129
  requested_requires, remotes = self.load_conanconfig(path, remotes)
@@ -148,9 +201,12 @@ class ConfigAPI:
148
201
  saveconanconfig(config_version_file, final_config_refs)
149
202
  return final_config_refs
150
203
 
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
204
+ def fetch_packages(self, requires, lockfile=None, remotes=None, profile=None):
205
+ """ get and download configuration packages into the Conan cache, without installing
206
+ such configuration in the current Conan home.
207
+
208
+ This shouldn't be necessary for regular Conan configuration, and used at the moment
209
+ exclusively for the "conan lock upgrade-config" experimental command.
154
210
  """
155
211
  conan_api = self._conan_api
156
212
  remotes = conan_api.remotes.list() if remotes is None else remotes
@@ -160,7 +216,7 @@ class ConfigAPI:
160
216
 
161
217
  ConanOutput().title("Fetching requested configuration packages")
162
218
  result = []
163
- for ref in refs:
219
+ for ref in requires:
164
220
  # Computation of a very simple graph that requires "ref"
165
221
  # Need to convert input requires to RecipeReference
166
222
  conanfile = app.loader.load_virtual(requires=[ref])
@@ -192,21 +248,34 @@ class ConfigAPI:
192
248
 
193
249
  def get(self, name, default=None, check_type=None):
194
250
  """ get the value of a global.conf item
251
+
252
+ :param name: configuration value to return
253
+ :param default: default value to return if the configuration doesn't contain a value
254
+ :param check_type: check if value is of type check_type, only if the value is defined
195
255
  """
196
256
  return self._helpers.global_conf.get(name, default=default, check_type=check_type)
197
257
 
198
258
  def show(self, pattern) -> dict:
199
259
  """ get the values of global.conf for those configurations that matches the pattern
260
+ that have an actual user definition.
261
+
262
+ Values with no user definitions will be skipped from the returned value,
263
+ defaults for those confs won't be shown.
264
+
265
+ :param pattern: pattern to match against
266
+ :return: dict of configuration values
200
267
  """
201
268
  return self._helpers.global_conf.show(pattern)
202
269
 
203
270
  @staticmethod
204
- def conf_list():
271
+ def conf_list() -> dict:
205
272
  """ list all the available built-in configurations
273
+
274
+ :return: A sorted dictionary with all possible built-in configurations
206
275
  """
207
276
  return BUILT_IN_CONFS.copy()
208
277
 
209
- def clean(self):
278
+ def clean(self) -> None:
210
279
  """ reset the Conan home folder to a clean state, removing all the user
211
280
  custom configuration, custom files, and resetting modified files
212
281
  """
@@ -229,17 +298,21 @@ class ConfigAPI:
229
298
  @property
230
299
  def settings_yml(self):
231
300
  """ Get the contents of the settings.yml and user_settings.yml files,
232
- which define the possible values for settings.
301
+ which define the possible values for settings.
302
+
303
+ Note that this is different from the settings present in a conanfile,
304
+ which represent the actual values for a specific package, while this
305
+ property represents the possible values for each setting.
233
306
 
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.
307
+ This is intended to be a **read-only** value, do not try to attempt to modify,
308
+ inject or remove settings with this attribute.
237
309
 
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()``.
310
+ :returns: A read-only object representing the settings scheme, with a
311
+ ``possible_values()`` method that returns a dictionary with the possible
312
+ values for each setting, and a ``fields`` property that returns an ordered
313
+ list with the fields of each setting.
314
+ Note that it's possible to access nested settings using attribute access,
315
+ such as ``settings_yml.compiler.possible_values()``.
243
316
  """
244
317
 
245
318
  class SettingsYmlInterface:
@@ -24,13 +24,13 @@ class DownloadAPI:
24
24
  app = ConanBasicApp(self._conan_api)
25
25
  assert ref.revision, f"Reference '{ref}' must have revision"
26
26
  try:
27
- app.cache.recipe_layout(ref) # raises if not found
27
+ recipe_layout = app.cache.recipe_layout(ref) # raises if not found
28
28
  except ConanException:
29
29
  pass
30
30
  else:
31
31
  output.info(f"Skip recipe {ref.repr_notime()} download, already in cache")
32
32
  if metadata:
33
- app.remote_manager.get_recipe_metadata(ref, remote, metadata)
33
+ app.remote_manager.get_recipe_metadata(recipe_layout, ref, remote, metadata)
34
34
  return False
35
35
 
36
36
  output.info(f"Downloading recipe '{ref.repr_notime()}'")
@@ -40,11 +40,10 @@ class DownloadAPI:
40
40
  server_ref = app.remote_manager.get_recipe_revision(ref, remote)
41
41
  assert server_ref == ref
42
42
  ref.timestamp = server_ref.timestamp
43
- app.remote_manager.get_recipe(ref, remote, metadata)
43
+ recipe_layout = app.remote_manager.get_recipe(ref, remote, metadata)
44
44
 
45
45
  # Download the sources too, don't be lazy
46
46
  output.info(f"Downloading '{str(ref)}' sources")
47
- recipe_layout = app.cache.recipe_layout(ref)
48
47
  app.remote_manager.get_recipe_sources(ref, recipe_layout, remote)
49
48
  return True
50
49