conan 2.21.0__tar.gz → 2.22.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 (354) hide show
  1. {conan-2.21.0/conan.egg-info → conan-2.22.1}/PKG-INFO +1 -1
  2. {conan-2.21.0 → conan-2.22.1}/conan/__init__.py +1 -1
  3. {conan-2.21.0 → conan-2.22.1}/conan/api/conan_api.py +8 -3
  4. {conan-2.21.0 → conan-2.22.1}/conan/api/output.py +16 -12
  5. {conan-2.21.0 → conan-2.22.1}/conan/api/subapi/cache.py +2 -2
  6. {conan-2.21.0 → conan-2.22.1}/conan/api/subapi/config.py +37 -0
  7. {conan-2.21.0 → conan-2.22.1}/conan/api/subapi/download.py +2 -2
  8. conan-2.22.1/conan/api/subapi/export.py +153 -0
  9. {conan-2.21.0 → conan-2.22.1}/conan/api/subapi/list.py +12 -16
  10. {conan-2.21.0 → conan-2.22.1}/conan/api/subapi/profiles.py +5 -2
  11. {conan-2.21.0 → conan-2.22.1}/conan/api/subapi/workspace.py +10 -2
  12. {conan-2.21.0 → conan-2.22.1}/conan/cli/args.py +57 -52
  13. {conan-2.21.0 → conan-2.22.1}/conan/cli/command.py +15 -6
  14. {conan-2.21.0 → conan-2.22.1}/conan/cli/commands/config.py +1 -1
  15. {conan-2.21.0 → conan-2.22.1}/conan/cli/commands/export_pkg.py +14 -33
  16. {conan-2.21.0 → conan-2.22.1}/conan/cli/commands/list.py +7 -0
  17. {conan-2.21.0 → conan-2.22.1}/conan/cli/formatters/graph/graph_info_text.py +17 -1
  18. {conan-2.21.0 → conan-2.22.1}/conan/cli/formatters/report/diff.py +3 -13
  19. conan-2.22.1/conan/cli/formatters/report/diff_html.py +714 -0
  20. {conan-2.21.0 → conan-2.22.1}/conan/internal/api/export.py +2 -3
  21. {conan-2.21.0 → conan-2.22.1}/conan/internal/api/install/generators.py +27 -6
  22. {conan-2.21.0 → conan-2.22.1}/conan/internal/api/profile/profile_loader.py +4 -0
  23. {conan-2.21.0 → conan-2.22.1}/conan/internal/api/uploader.py +2 -2
  24. {conan-2.21.0 → conan-2.22.1}/conan/internal/cache/cache.py +5 -5
  25. {conan-2.21.0 → conan-2.22.1}/conan/internal/cache/db/cache_database.py +6 -5
  26. {conan-2.21.0 → conan-2.22.1}/conan/internal/default_settings.py +3 -3
  27. {conan-2.21.0 → conan-2.22.1}/conan/internal/graph/graph.py +6 -4
  28. {conan-2.21.0 → conan-2.22.1}/conan/internal/graph/graph_binaries.py +71 -50
  29. {conan-2.21.0 → conan-2.22.1}/conan/internal/graph/graph_builder.py +12 -22
  30. {conan-2.21.0 → conan-2.22.1}/conan/internal/graph/installer.py +6 -3
  31. {conan-2.21.0 → conan-2.22.1}/conan/internal/graph/proxy.py +4 -4
  32. {conan-2.21.0 → conan-2.22.1}/conan/internal/graph/range_resolver.py +8 -0
  33. {conan-2.21.0 → conan-2.22.1}/conan/internal/model/conanfile_interface.py +6 -0
  34. {conan-2.21.0 → conan-2.22.1}/conan/internal/model/conf.py +3 -0
  35. {conan-2.21.0 → conan-2.22.1}/conan/internal/model/cpp_info.py +1 -1
  36. {conan-2.21.0 → conan-2.22.1}/conan/internal/model/dependencies.py +3 -5
  37. {conan-2.21.0 → conan-2.22.1}/conan/internal/model/lockfile.py +1 -1
  38. {conan-2.21.0 → conan-2.22.1}/conan/internal/rest/remote_manager.py +30 -15
  39. {conan-2.21.0 → conan-2.22.1}/conan/internal/rest/rest_client.py +2 -2
  40. {conan-2.21.0 → conan-2.22.1}/conan/internal/rest/rest_client_local_recipe_index.py +3 -2
  41. {conan-2.21.0 → conan-2.22.1}/conan/internal/rest/rest_client_v2.py +4 -11
  42. conan-2.21.0/conan/tools/build/cpu.py → conan-2.22.1/conan/internal/util/__init__.py +1 -24
  43. {conan-2.21.0 → conan-2.22.1}/conan/test/utils/tools.py +7 -7
  44. {conan-2.21.0 → conan-2.22.1}/conan/tools/apple/xcodedeps.py +7 -4
  45. conan-2.22.1/conan/tools/build/cpu.py +21 -0
  46. {conan-2.21.0 → conan-2.22.1}/conan/tools/build/flags.py +32 -1
  47. {conan-2.21.0 → conan-2.22.1}/conan/tools/cmake/cmakedeps/templates/target_data.py +3 -5
  48. {conan-2.21.0 → conan-2.22.1}/conan/tools/cmake/cmakedeps2/cmakedeps.py +21 -0
  49. {conan-2.21.0 → conan-2.22.1}/conan/tools/cmake/cmakedeps2/config.py +8 -6
  50. {conan-2.21.0 → conan-2.22.1}/conan/tools/cmake/cmakedeps2/target_configuration.py +16 -12
  51. {conan-2.21.0 → conan-2.22.1}/conan/tools/cmake/presets.py +3 -0
  52. {conan-2.21.0 → conan-2.22.1}/conan/tools/cmake/toolchain/toolchain.py +2 -1
  53. {conan-2.21.0 → conan-2.22.1}/conan/tools/cmake/utils.py +4 -0
  54. {conan-2.21.0 → conan-2.22.1}/conan/tools/env/environment.py +116 -51
  55. {conan-2.21.0 → conan-2.22.1}/conan/tools/google/bazeldeps.py +3 -1
  56. {conan-2.21.0 → conan-2.22.1}/conan/tools/meson/helpers.py +9 -6
  57. {conan-2.21.0 → conan-2.22.1}/conan/tools/meson/toolchain.py +2 -2
  58. {conan-2.21.0 → conan-2.22.1}/conan/tools/microsoft/toolchain.py +35 -3
  59. {conan-2.21.0 → conan-2.22.1}/conan/tools/microsoft/visual.py +1 -1
  60. conan-2.22.1/conan/tools/ros/rosenv.py +78 -0
  61. {conan-2.21.0 → conan-2.22.1}/conan/tools/system/package_manager.py +4 -2
  62. {conan-2.21.0 → conan-2.22.1}/conan/tools/system/pip_manager.py +20 -2
  63. {conan-2.21.0 → conan-2.22.1/conan.egg-info}/PKG-INFO +1 -1
  64. conan-2.21.0/conan/api/subapi/export.py +0 -64
  65. conan-2.21.0/conan/cli/formatters/report/diff_html.py +0 -248
  66. conan-2.21.0/conan/tools/ros/rosenv.py +0 -52
  67. conan-2.21.0/conans/__init__.py +0 -0
  68. {conan-2.21.0 → conan-2.22.1}/LICENSE.md +0 -0
  69. {conan-2.21.0 → conan-2.22.1}/MANIFEST.in +0 -0
  70. {conan-2.21.0 → conan-2.22.1}/README.md +0 -0
  71. {conan-2.21.0 → conan-2.22.1}/conan/api/__init__.py +0 -0
  72. {conan-2.21.0 → conan-2.22.1}/conan/api/input.py +0 -0
  73. {conan-2.21.0 → conan-2.22.1}/conan/api/model/__init__.py +0 -0
  74. {conan-2.21.0 → conan-2.22.1}/conan/api/model/list.py +0 -0
  75. {conan-2.21.0 → conan-2.22.1}/conan/api/model/refs.py +0 -0
  76. {conan-2.21.0 → conan-2.22.1}/conan/api/model/remote.py +0 -0
  77. {conan-2.21.0 → conan-2.22.1}/conan/api/subapi/__init__.py +0 -0
  78. {conan-2.21.0 → conan-2.22.1}/conan/api/subapi/audit.py +0 -0
  79. {conan-2.21.0 → conan-2.22.1}/conan/api/subapi/command.py +0 -0
  80. {conan-2.21.0 → conan-2.22.1}/conan/api/subapi/graph.py +0 -0
  81. {conan-2.21.0 → conan-2.22.1}/conan/api/subapi/install.py +0 -0
  82. {conan-2.21.0 → conan-2.22.1}/conan/api/subapi/local.py +0 -0
  83. {conan-2.21.0 → conan-2.22.1}/conan/api/subapi/lockfile.py +0 -0
  84. {conan-2.21.0 → conan-2.22.1}/conan/api/subapi/new.py +0 -0
  85. {conan-2.21.0 → conan-2.22.1}/conan/api/subapi/remotes.py +0 -0
  86. {conan-2.21.0 → conan-2.22.1}/conan/api/subapi/remove.py +0 -0
  87. {conan-2.21.0 → conan-2.22.1}/conan/api/subapi/report.py +0 -0
  88. {conan-2.21.0 → conan-2.22.1}/conan/api/subapi/upload.py +0 -0
  89. {conan-2.21.0 → conan-2.22.1}/conan/cli/__init__.py +0 -0
  90. {conan-2.21.0 → conan-2.22.1}/conan/cli/cli.py +0 -0
  91. {conan-2.21.0 → conan-2.22.1}/conan/cli/commands/__init__.py +0 -0
  92. {conan-2.21.0 → conan-2.22.1}/conan/cli/commands/audit.py +0 -0
  93. {conan-2.21.0 → conan-2.22.1}/conan/cli/commands/build.py +0 -0
  94. {conan-2.21.0 → conan-2.22.1}/conan/cli/commands/cache.py +0 -0
  95. {conan-2.21.0 → conan-2.22.1}/conan/cli/commands/create.py +0 -0
  96. {conan-2.21.0 → conan-2.22.1}/conan/cli/commands/download.py +0 -0
  97. {conan-2.21.0 → conan-2.22.1}/conan/cli/commands/editable.py +0 -0
  98. {conan-2.21.0 → conan-2.22.1}/conan/cli/commands/export.py +0 -0
  99. {conan-2.21.0 → conan-2.22.1}/conan/cli/commands/graph.py +0 -0
  100. {conan-2.21.0 → conan-2.22.1}/conan/cli/commands/inspect.py +0 -0
  101. {conan-2.21.0 → conan-2.22.1}/conan/cli/commands/install.py +0 -0
  102. {conan-2.21.0 → conan-2.22.1}/conan/cli/commands/lock.py +0 -0
  103. {conan-2.21.0 → conan-2.22.1}/conan/cli/commands/new.py +0 -0
  104. {conan-2.21.0 → conan-2.22.1}/conan/cli/commands/pkglist.py +0 -0
  105. {conan-2.21.0 → conan-2.22.1}/conan/cli/commands/profile.py +0 -0
  106. {conan-2.21.0 → conan-2.22.1}/conan/cli/commands/remote.py +0 -0
  107. {conan-2.21.0 → conan-2.22.1}/conan/cli/commands/remove.py +0 -0
  108. {conan-2.21.0 → conan-2.22.1}/conan/cli/commands/report.py +0 -0
  109. {conan-2.21.0 → conan-2.22.1}/conan/cli/commands/search.py +0 -0
  110. {conan-2.21.0 → conan-2.22.1}/conan/cli/commands/source.py +0 -0
  111. {conan-2.21.0 → conan-2.22.1}/conan/cli/commands/test.py +0 -0
  112. {conan-2.21.0 → conan-2.22.1}/conan/cli/commands/upload.py +0 -0
  113. {conan-2.21.0 → conan-2.22.1}/conan/cli/commands/version.py +0 -0
  114. {conan-2.21.0 → conan-2.22.1}/conan/cli/commands/workspace.py +0 -0
  115. {conan-2.21.0 → conan-2.22.1}/conan/cli/exit_codes.py +0 -0
  116. {conan-2.21.0 → conan-2.22.1}/conan/cli/formatters/__init__.py +0 -0
  117. {conan-2.21.0 → conan-2.22.1}/conan/cli/formatters/audit/__init__.py +0 -0
  118. {conan-2.21.0 → conan-2.22.1}/conan/cli/formatters/audit/vulnerabilities.py +0 -0
  119. {conan-2.21.0 → conan-2.22.1}/conan/cli/formatters/graph/__init__.py +0 -0
  120. {conan-2.21.0 → conan-2.22.1}/conan/cli/formatters/graph/build_order_html.py +0 -0
  121. {conan-2.21.0 → conan-2.22.1}/conan/cli/formatters/graph/graph.py +0 -0
  122. {conan-2.21.0 → conan-2.22.1}/conan/cli/formatters/graph/info_graph_dot.py +0 -0
  123. {conan-2.21.0 → conan-2.22.1}/conan/cli/formatters/graph/info_graph_html.py +0 -0
  124. {conan-2.21.0 → conan-2.22.1}/conan/cli/formatters/list/__init__.py +0 -0
  125. {conan-2.21.0 → conan-2.22.1}/conan/cli/formatters/list/list.py +0 -0
  126. {conan-2.21.0 → conan-2.22.1}/conan/cli/formatters/list/search_table_html.py +0 -0
  127. {conan-2.21.0 → conan-2.22.1}/conan/cli/formatters/report/__init__.py +0 -0
  128. {conan-2.21.0 → conan-2.22.1}/conan/cli/printers/__init__.py +0 -0
  129. {conan-2.21.0 → conan-2.22.1}/conan/cli/printers/graph.py +0 -0
  130. {conan-2.21.0 → conan-2.22.1}/conan/cps/__init__.py +0 -0
  131. {conan-2.21.0 → conan-2.22.1}/conan/cps/cps.py +0 -0
  132. {conan-2.21.0 → conan-2.22.1}/conan/errors.py +0 -0
  133. {conan-2.21.0 → conan-2.22.1}/conan/internal/__init__.py +0 -0
  134. {conan-2.21.0 → conan-2.22.1}/conan/internal/api/__init__.py +0 -0
  135. {conan-2.21.0 → conan-2.22.1}/conan/internal/api/audit/__init__.py +0 -0
  136. {conan-2.21.0 → conan-2.22.1}/conan/internal/api/audit/providers.py +0 -0
  137. {conan-2.21.0 → conan-2.22.1}/conan/internal/api/config/__init__.py +0 -0
  138. {conan-2.21.0 → conan-2.22.1}/conan/internal/api/config/config_installer.py +0 -0
  139. {conan-2.21.0 → conan-2.22.1}/conan/internal/api/detect/__init__.py +0 -0
  140. {conan-2.21.0 → conan-2.22.1}/conan/internal/api/detect/detect_api.py +0 -0
  141. {conan-2.21.0 → conan-2.22.1}/conan/internal/api/detect/detect_vs.py +0 -0
  142. {conan-2.21.0 → conan-2.22.1}/conan/internal/api/install/__init__.py +0 -0
  143. {conan-2.21.0 → conan-2.22.1}/conan/internal/api/list/__init__.py +0 -0
  144. {conan-2.21.0 → conan-2.22.1}/conan/internal/api/list/query_parse.py +0 -0
  145. {conan-2.21.0 → conan-2.22.1}/conan/internal/api/local/__init__.py +0 -0
  146. {conan-2.21.0 → conan-2.22.1}/conan/internal/api/local/editable.py +0 -0
  147. {conan-2.21.0 → conan-2.22.1}/conan/internal/api/migrations.py +0 -0
  148. {conan-2.21.0 → conan-2.22.1}/conan/internal/api/new/__init__.py +0 -0
  149. {conan-2.21.0 → conan-2.22.1}/conan/internal/api/new/alias_new.py +0 -0
  150. {conan-2.21.0 → conan-2.22.1}/conan/internal/api/new/autoools_exe.py +0 -0
  151. {conan-2.21.0 → conan-2.22.1}/conan/internal/api/new/autotools_lib.py +0 -0
  152. {conan-2.21.0 → conan-2.22.1}/conan/internal/api/new/basic.py +0 -0
  153. {conan-2.21.0 → conan-2.22.1}/conan/internal/api/new/bazel_7_exe.py +0 -0
  154. {conan-2.21.0 → conan-2.22.1}/conan/internal/api/new/bazel_7_lib.py +0 -0
  155. {conan-2.21.0 → conan-2.22.1}/conan/internal/api/new/bazel_exe.py +0 -0
  156. {conan-2.21.0 → conan-2.22.1}/conan/internal/api/new/bazel_lib.py +0 -0
  157. {conan-2.21.0 → conan-2.22.1}/conan/internal/api/new/cmake_exe.py +0 -0
  158. {conan-2.21.0 → conan-2.22.1}/conan/internal/api/new/cmake_lib.py +0 -0
  159. {conan-2.21.0 → conan-2.22.1}/conan/internal/api/new/header_lib.py +0 -0
  160. {conan-2.21.0 → conan-2.22.1}/conan/internal/api/new/local_recipes_index.py +0 -0
  161. {conan-2.21.0 → conan-2.22.1}/conan/internal/api/new/meson_exe.py +0 -0
  162. {conan-2.21.0 → conan-2.22.1}/conan/internal/api/new/meson_lib.py +0 -0
  163. {conan-2.21.0 → conan-2.22.1}/conan/internal/api/new/msbuild_exe.py +0 -0
  164. {conan-2.21.0 → conan-2.22.1}/conan/internal/api/new/msbuild_lib.py +0 -0
  165. {conan-2.21.0 → conan-2.22.1}/conan/internal/api/new/premake_exe.py +0 -0
  166. {conan-2.21.0 → conan-2.22.1}/conan/internal/api/new/premake_lib.py +0 -0
  167. {conan-2.21.0 → conan-2.22.1}/conan/internal/api/new/qbs_lib.py +0 -0
  168. {conan-2.21.0 → conan-2.22.1}/conan/internal/api/new/workspace.py +0 -0
  169. {conan-2.21.0 → conan-2.22.1}/conan/internal/api/profile/__init__.py +0 -0
  170. {conan-2.21.0 → conan-2.22.1}/conan/internal/api/profile/detect.py +0 -0
  171. {conan-2.21.0 → conan-2.22.1}/conan/internal/api/remotes/__init__.py +0 -0
  172. {conan-2.21.0 → conan-2.22.1}/conan/internal/api/remotes/encrypt.py +0 -0
  173. {conan-2.21.0 → conan-2.22.1}/conan/internal/api/remotes/localdb.py +0 -0
  174. {conan-2.21.0 → conan-2.22.1}/conan/internal/api/upload.py +0 -0
  175. {conan-2.21.0 → conan-2.22.1}/conan/internal/cache/__init__.py +0 -0
  176. {conan-2.21.0 → conan-2.22.1}/conan/internal/cache/conan_reference_layout.py +0 -0
  177. {conan-2.21.0 → conan-2.22.1}/conan/internal/cache/db/__init__.py +0 -0
  178. {conan-2.21.0 → conan-2.22.1}/conan/internal/cache/db/packages_table.py +0 -0
  179. {conan-2.21.0 → conan-2.22.1}/conan/internal/cache/db/recipes_table.py +0 -0
  180. {conan-2.21.0 → conan-2.22.1}/conan/internal/cache/db/table.py +0 -0
  181. {conan-2.21.0 → conan-2.22.1}/conan/internal/cache/home_paths.py +0 -0
  182. {conan-2.21.0 → conan-2.22.1}/conan/internal/cache/integrity_check.py +0 -0
  183. {conan-2.21.0 → conan-2.22.1}/conan/internal/conan_app.py +0 -0
  184. {conan-2.21.0 → conan-2.22.1}/conan/internal/deploy.py +0 -0
  185. {conan-2.21.0 → conan-2.22.1}/conan/internal/errors.py +0 -0
  186. {conan-2.21.0 → conan-2.22.1}/conan/internal/graph/__init__.py +0 -0
  187. {conan-2.21.0 → conan-2.22.1}/conan/internal/graph/build_mode.py +0 -0
  188. {conan-2.21.0 → conan-2.22.1}/conan/internal/graph/compatibility.py +0 -0
  189. {conan-2.21.0 → conan-2.22.1}/conan/internal/graph/compute_pid.py +0 -0
  190. {conan-2.21.0 → conan-2.22.1}/conan/internal/graph/graph_error.py +0 -0
  191. {conan-2.21.0 → conan-2.22.1}/conan/internal/graph/install_graph.py +0 -0
  192. {conan-2.21.0 → conan-2.22.1}/conan/internal/graph/profile_node_definer.py +0 -0
  193. {conan-2.21.0 → conan-2.22.1}/conan/internal/graph/provides.py +0 -0
  194. {conan-2.21.0 → conan-2.22.1}/conan/internal/graph/python_requires.py +0 -0
  195. {conan-2.21.0 → conan-2.22.1}/conan/internal/hook_manager.py +0 -0
  196. {conan-2.21.0 → conan-2.22.1}/conan/internal/internal_tools.py +0 -0
  197. {conan-2.21.0 → conan-2.22.1}/conan/internal/loader.py +0 -0
  198. {conan-2.21.0 → conan-2.22.1}/conan/internal/methods.py +0 -0
  199. {conan-2.21.0 → conan-2.22.1}/conan/internal/model/__init__.py +0 -0
  200. {conan-2.21.0 → conan-2.22.1}/conan/internal/model/conan_file.py +0 -0
  201. {conan-2.21.0 → conan-2.22.1}/conan/internal/model/info.py +0 -0
  202. {conan-2.21.0 → conan-2.22.1}/conan/internal/model/layout.py +0 -0
  203. {conan-2.21.0 → conan-2.22.1}/conan/internal/model/manifest.py +0 -0
  204. {conan-2.21.0 → conan-2.22.1}/conan/internal/model/options.py +0 -0
  205. {conan-2.21.0 → conan-2.22.1}/conan/internal/model/pkg_type.py +0 -0
  206. {conan-2.21.0 → conan-2.22.1}/conan/internal/model/profile.py +0 -0
  207. {conan-2.21.0 → conan-2.22.1}/conan/internal/model/recipe_ref.py +0 -0
  208. {conan-2.21.0 → conan-2.22.1}/conan/internal/model/requires.py +0 -0
  209. {conan-2.21.0 → conan-2.22.1}/conan/internal/model/settings.py +0 -0
  210. {conan-2.21.0 → conan-2.22.1}/conan/internal/model/version.py +0 -0
  211. {conan-2.21.0 → conan-2.22.1}/conan/internal/model/version_range.py +0 -0
  212. {conan-2.21.0 → conan-2.22.1}/conan/internal/model/workspace.py +0 -0
  213. {conan-2.21.0 → conan-2.22.1}/conan/internal/paths.py +0 -0
  214. {conan-2.21.0 → conan-2.22.1}/conan/internal/rest/__init__.py +0 -0
  215. {conan-2.21.0 → conan-2.22.1}/conan/internal/rest/auth_manager.py +0 -0
  216. {conan-2.21.0 → conan-2.22.1}/conan/internal/rest/caching_file_downloader.py +0 -0
  217. {conan-2.21.0 → conan-2.22.1}/conan/internal/rest/client_routes.py +0 -0
  218. {conan-2.21.0 → conan-2.22.1}/conan/internal/rest/conan_requester.py +0 -0
  219. {conan-2.21.0 → conan-2.22.1}/conan/internal/rest/download_cache.py +0 -0
  220. {conan-2.21.0 → conan-2.22.1}/conan/internal/rest/file_downloader.py +0 -0
  221. {conan-2.21.0 → conan-2.22.1}/conan/internal/rest/file_uploader.py +0 -0
  222. {conan-2.21.0 → conan-2.22.1}/conan/internal/rest/pkg_sign.py +0 -0
  223. {conan-2.21.0 → conan-2.22.1}/conan/internal/rest/remote_credentials.py +0 -0
  224. {conan-2.21.0 → conan-2.22.1}/conan/internal/rest/rest_routes.py +0 -0
  225. {conan-2.21.0 → conan-2.22.1}/conan/internal/runner/__init__.py +0 -0
  226. {conan-2.21.0 → conan-2.22.1}/conan/internal/runner/docker.py +0 -0
  227. {conan-2.21.0 → conan-2.22.1}/conan/internal/runner/output.py +0 -0
  228. {conan-2.21.0 → conan-2.22.1}/conan/internal/runner/ssh.py +0 -0
  229. {conan-2.21.0 → conan-2.22.1}/conan/internal/runner/wsl.py +0 -0
  230. {conan-2.21.0 → conan-2.22.1}/conan/internal/source.py +0 -0
  231. {conan-2.21.0 → conan-2.22.1}/conan/internal/subsystems.py +0 -0
  232. {conan-2.21.0 → conan-2.22.1}/conan/internal/util/config_parser.py +0 -0
  233. {conan-2.21.0 → conan-2.22.1}/conan/internal/util/dates.py +0 -0
  234. {conan-2.21.0 → conan-2.22.1}/conan/internal/util/files.py +0 -0
  235. {conan-2.21.0 → conan-2.22.1}/conan/internal/util/runners.py +0 -0
  236. {conan-2.21.0/conan/internal/util → conan-2.22.1/conan/test}/__init__.py +0 -0
  237. {conan-2.21.0/conan/test → conan-2.22.1/conan/test/assets}/__init__.py +0 -0
  238. {conan-2.21.0 → conan-2.22.1}/conan/test/assets/autotools.py +0 -0
  239. {conan-2.21.0 → conan-2.22.1}/conan/test/assets/cmake.py +0 -0
  240. {conan-2.21.0 → conan-2.22.1}/conan/test/assets/genconanfile.py +0 -0
  241. {conan-2.21.0 → conan-2.22.1}/conan/test/assets/premake.py +0 -0
  242. {conan-2.21.0 → conan-2.22.1}/conan/test/assets/sources.py +0 -0
  243. {conan-2.21.0 → conan-2.22.1}/conan/test/assets/visual_project_files.py +0 -0
  244. {conan-2.21.0/conan/test/assets → conan-2.22.1/conan/test/utils}/__init__.py +0 -0
  245. {conan-2.21.0 → conan-2.22.1}/conan/test/utils/artifactory.py +0 -0
  246. {conan-2.21.0 → conan-2.22.1}/conan/test/utils/env.py +0 -0
  247. {conan-2.21.0 → conan-2.22.1}/conan/test/utils/file_server.py +0 -0
  248. {conan-2.21.0 → conan-2.22.1}/conan/test/utils/mocks.py +0 -0
  249. {conan-2.21.0 → conan-2.22.1}/conan/test/utils/profiles.py +0 -0
  250. {conan-2.21.0 → conan-2.22.1}/conan/test/utils/scm.py +0 -0
  251. {conan-2.21.0 → conan-2.22.1}/conan/test/utils/server_launcher.py +0 -0
  252. {conan-2.21.0 → conan-2.22.1}/conan/test/utils/test_files.py +0 -0
  253. {conan-2.21.0 → conan-2.22.1}/conan/tools/__init__.py +0 -0
  254. {conan-2.21.0 → conan-2.22.1}/conan/tools/android/__init__.py +0 -0
  255. {conan-2.21.0 → conan-2.22.1}/conan/tools/android/utils.py +0 -0
  256. {conan-2.21.0 → conan-2.22.1}/conan/tools/apple/__init__.py +0 -0
  257. {conan-2.21.0 → conan-2.22.1}/conan/tools/apple/apple.py +0 -0
  258. {conan-2.21.0 → conan-2.22.1}/conan/tools/apple/xcodebuild.py +0 -0
  259. {conan-2.21.0 → conan-2.22.1}/conan/tools/apple/xcodetoolchain.py +0 -0
  260. {conan-2.21.0 → conan-2.22.1}/conan/tools/build/__init__.py +0 -0
  261. {conan-2.21.0 → conan-2.22.1}/conan/tools/build/compiler.py +0 -0
  262. {conan-2.21.0 → conan-2.22.1}/conan/tools/build/cppstd.py +0 -0
  263. {conan-2.21.0 → conan-2.22.1}/conan/tools/build/cross_building.py +0 -0
  264. {conan-2.21.0 → conan-2.22.1}/conan/tools/build/cstd.py +0 -0
  265. {conan-2.21.0 → conan-2.22.1}/conan/tools/build/stdcpp_library.py +0 -0
  266. {conan-2.21.0 → conan-2.22.1}/conan/tools/cmake/__init__.py +0 -0
  267. {conan-2.21.0 → conan-2.22.1}/conan/tools/cmake/cmake.py +0 -0
  268. {conan-2.21.0 → conan-2.22.1}/conan/tools/cmake/cmakedeps/__init__.py +0 -0
  269. {conan-2.21.0 → conan-2.22.1}/conan/tools/cmake/cmakedeps/cmakedeps.py +0 -0
  270. {conan-2.21.0 → conan-2.22.1}/conan/tools/cmake/cmakedeps/templates/__init__.py +0 -0
  271. {conan-2.21.0 → conan-2.22.1}/conan/tools/cmake/cmakedeps/templates/config.py +0 -0
  272. {conan-2.21.0 → conan-2.22.1}/conan/tools/cmake/cmakedeps/templates/config_version.py +0 -0
  273. {conan-2.21.0 → conan-2.22.1}/conan/tools/cmake/cmakedeps/templates/macros.py +0 -0
  274. {conan-2.21.0 → conan-2.22.1}/conan/tools/cmake/cmakedeps/templates/target_configuration.py +0 -0
  275. {conan-2.21.0 → conan-2.22.1}/conan/tools/cmake/cmakedeps/templates/targets.py +0 -0
  276. {conan-2.21.0/conan/test/utils → conan-2.22.1/conan/tools/cmake/cmakedeps2}/__init__.py +0 -0
  277. {conan-2.21.0 → conan-2.22.1}/conan/tools/cmake/cmakedeps2/config_version.py +0 -0
  278. {conan-2.21.0 → conan-2.22.1}/conan/tools/cmake/cmakedeps2/targets.py +0 -0
  279. {conan-2.21.0 → conan-2.22.1}/conan/tools/cmake/layout.py +0 -0
  280. {conan-2.21.0 → conan-2.22.1}/conan/tools/cmake/toolchain/__init__.py +0 -0
  281. {conan-2.21.0 → conan-2.22.1}/conan/tools/cmake/toolchain/blocks.py +0 -0
  282. {conan-2.21.0 → conan-2.22.1}/conan/tools/cps/__init__.py +0 -0
  283. {conan-2.21.0 → conan-2.22.1}/conan/tools/cps/cps_deps.py +0 -0
  284. {conan-2.21.0 → conan-2.22.1}/conan/tools/env/__init__.py +0 -0
  285. {conan-2.21.0 → conan-2.22.1}/conan/tools/env/virtualbuildenv.py +0 -0
  286. {conan-2.21.0 → conan-2.22.1}/conan/tools/env/virtualrunenv.py +0 -0
  287. {conan-2.21.0 → conan-2.22.1}/conan/tools/files/__init__.py +0 -0
  288. {conan-2.21.0 → conan-2.22.1}/conan/tools/files/conandata.py +0 -0
  289. {conan-2.21.0 → conan-2.22.1}/conan/tools/files/copy_pattern.py +0 -0
  290. {conan-2.21.0 → conan-2.22.1}/conan/tools/files/files.py +0 -0
  291. {conan-2.21.0 → conan-2.22.1}/conan/tools/files/patches.py +0 -0
  292. {conan-2.21.0 → conan-2.22.1}/conan/tools/files/symlinks/__init__.py +0 -0
  293. {conan-2.21.0 → conan-2.22.1}/conan/tools/files/symlinks/symlinks.py +0 -0
  294. {conan-2.21.0 → conan-2.22.1}/conan/tools/gnu/__init__.py +0 -0
  295. {conan-2.21.0 → conan-2.22.1}/conan/tools/gnu/autotools.py +0 -0
  296. {conan-2.21.0 → conan-2.22.1}/conan/tools/gnu/autotoolsdeps.py +0 -0
  297. {conan-2.21.0 → conan-2.22.1}/conan/tools/gnu/autotoolstoolchain.py +0 -0
  298. {conan-2.21.0 → conan-2.22.1}/conan/tools/gnu/get_gnu_triplet.py +0 -0
  299. {conan-2.21.0 → conan-2.22.1}/conan/tools/gnu/gnudeps_flags.py +0 -0
  300. {conan-2.21.0 → conan-2.22.1}/conan/tools/gnu/gnutoolchain.py +0 -0
  301. {conan-2.21.0 → conan-2.22.1}/conan/tools/gnu/makedeps.py +0 -0
  302. {conan-2.21.0 → conan-2.22.1}/conan/tools/gnu/pkgconfig.py +0 -0
  303. {conan-2.21.0 → conan-2.22.1}/conan/tools/gnu/pkgconfigdeps.py +0 -0
  304. {conan-2.21.0 → conan-2.22.1}/conan/tools/google/__init__.py +0 -0
  305. {conan-2.21.0 → conan-2.22.1}/conan/tools/google/bazel.py +0 -0
  306. {conan-2.21.0 → conan-2.22.1}/conan/tools/google/layout.py +0 -0
  307. {conan-2.21.0 → conan-2.22.1}/conan/tools/google/toolchain.py +0 -0
  308. {conan-2.21.0 → conan-2.22.1}/conan/tools/intel/__init__.py +0 -0
  309. {conan-2.21.0 → conan-2.22.1}/conan/tools/intel/intel_cc.py +0 -0
  310. {conan-2.21.0 → conan-2.22.1}/conan/tools/layout/__init__.py +0 -0
  311. {conan-2.21.0 → conan-2.22.1}/conan/tools/meson/__init__.py +0 -0
  312. {conan-2.21.0 → conan-2.22.1}/conan/tools/meson/meson.py +0 -0
  313. {conan-2.21.0 → conan-2.22.1}/conan/tools/microsoft/__init__.py +0 -0
  314. {conan-2.21.0 → conan-2.22.1}/conan/tools/microsoft/layout.py +0 -0
  315. {conan-2.21.0 → conan-2.22.1}/conan/tools/microsoft/msbuild.py +0 -0
  316. {conan-2.21.0 → conan-2.22.1}/conan/tools/microsoft/msbuilddeps.py +0 -0
  317. {conan-2.21.0 → conan-2.22.1}/conan/tools/microsoft/nmakedeps.py +0 -0
  318. {conan-2.21.0 → conan-2.22.1}/conan/tools/microsoft/nmaketoolchain.py +0 -0
  319. {conan-2.21.0 → conan-2.22.1}/conan/tools/microsoft/subsystems.py +0 -0
  320. {conan-2.21.0 → conan-2.22.1}/conan/tools/premake/__init__.py +0 -0
  321. {conan-2.21.0 → conan-2.22.1}/conan/tools/premake/constants.py +0 -0
  322. {conan-2.21.0 → conan-2.22.1}/conan/tools/premake/premake.py +0 -0
  323. {conan-2.21.0 → conan-2.22.1}/conan/tools/premake/premakedeps.py +0 -0
  324. {conan-2.21.0 → conan-2.22.1}/conan/tools/premake/toolchain.py +0 -0
  325. {conan-2.21.0 → conan-2.22.1}/conan/tools/qbs/__init__.py +0 -0
  326. {conan-2.21.0 → conan-2.22.1}/conan/tools/qbs/common.py +0 -0
  327. {conan-2.21.0 → conan-2.22.1}/conan/tools/qbs/qbs.py +0 -0
  328. {conan-2.21.0 → conan-2.22.1}/conan/tools/qbs/qbsdeps.py +0 -0
  329. {conan-2.21.0 → conan-2.22.1}/conan/tools/qbs/qbsprofile.py +0 -0
  330. {conan-2.21.0 → conan-2.22.1}/conan/tools/ros/__init__.py +0 -0
  331. {conan-2.21.0 → conan-2.22.1}/conan/tools/sbom/__init__.py +0 -0
  332. {conan-2.21.0 → conan-2.22.1}/conan/tools/sbom/cyclonedx.py +0 -0
  333. {conan-2.21.0 → conan-2.22.1}/conan/tools/sbom/spdx_licenses.py +0 -0
  334. {conan-2.21.0 → conan-2.22.1}/conan/tools/scm/__init__.py +0 -0
  335. {conan-2.21.0 → conan-2.22.1}/conan/tools/scm/git.py +0 -0
  336. {conan-2.21.0 → conan-2.22.1}/conan/tools/scons/__init__.py +0 -0
  337. {conan-2.21.0 → conan-2.22.1}/conan/tools/scons/sconsdeps.py +0 -0
  338. {conan-2.21.0 → conan-2.22.1}/conan/tools/system/__init__.py +0 -0
  339. {conan-2.21.0 → conan-2.22.1}/conan.egg-info/SOURCES.txt +0 -0
  340. {conan-2.21.0 → conan-2.22.1}/conan.egg-info/dependency_links.txt +0 -0
  341. {conan-2.21.0 → conan-2.22.1}/conan.egg-info/entry_points.txt +0 -0
  342. {conan-2.21.0 → conan-2.22.1}/conan.egg-info/requires.txt +0 -0
  343. {conan-2.21.0 → conan-2.22.1}/conan.egg-info/top_level.txt +0 -0
  344. {conan-2.21.0/conan/tools/cmake/cmakedeps2 → conan-2.22.1/conans}/__init__.py +0 -0
  345. {conan-2.21.0 → conan-2.22.1}/conans/conan.py +0 -0
  346. {conan-2.21.0 → conan-2.22.1}/conans/conan_server.py +0 -0
  347. {conan-2.21.0 → conan-2.22.1}/conans/migrations.py +0 -0
  348. {conan-2.21.0 → conan-2.22.1}/conans/requirements.txt +0 -0
  349. {conan-2.21.0 → conan-2.22.1}/conans/requirements_dev.txt +0 -0
  350. {conan-2.21.0 → conan-2.22.1}/conans/requirements_runner.txt +0 -0
  351. {conan-2.21.0 → conan-2.22.1}/conans/requirements_server.txt +0 -0
  352. {conan-2.21.0 → conan-2.22.1}/pyproject.toml +0 -0
  353. {conan-2.21.0 → conan-2.22.1}/setup.cfg +0 -0
  354. {conan-2.21.0 → conan-2.22.1}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: conan
3
- Version: 2.21.0
3
+ Version: 2.22.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.21.0'
5
+ __version__ = '2.22.1'
6
6
  conan_version = Version(__version__)
@@ -66,7 +66,8 @@ class ConanAPI:
66
66
  self.profiles = ProfilesAPI(self, self._api_helpers)
67
67
  self.install = InstallAPI(self, self._api_helpers)
68
68
  self.graph = GraphAPI(self, self._api_helpers)
69
- self.export = ExportAPI(self, self._api_helpers)
69
+ #: Used to export recipes and pre-compiled package binaries to the Conan cache
70
+ self.export: ExportAPI = ExportAPI(self, self._api_helpers)
70
71
  self.remove = RemoveAPI(self)
71
72
  self.new = NewAPI(self)
72
73
  #: Used to upload recipes and packages to remotes
@@ -82,7 +83,7 @@ class ConanAPI:
82
83
  self.report = ReportAPI(self, self._api_helpers)
83
84
 
84
85
  @property
85
- def home_folder(self):
86
+ def home_folder(self) -> str:
86
87
  """ Where the Conan user home is located. Read only.
87
88
  Can be modified by the ``CONAN_HOME`` environment variable or by the
88
89
  ``.conanrc`` file in the current directory or any parent directory
@@ -112,6 +113,7 @@ class ConanAPI:
112
113
  self.hook_manager = HookManager(HomePaths(self._conan_api.home_folder).hooks_path)
113
114
  # Wraps an http_requester to inject proxies, certs, etc
114
115
  self._requester = ConanRequester(self.global_conf, self._conan_api.home_folder)
116
+ self._settings_yml = None
115
117
 
116
118
  def set_core_confs(self, core_confs):
117
119
  confs = ConfDefinition()
@@ -137,10 +139,13 @@ class ConanAPI:
137
139
  self._init_global_conf()
138
140
  self.hook_manager.reinit()
139
141
  self._requester = ConanRequester(self.global_conf, self._conan_api.home_folder)
142
+ self._settings_yml = None
140
143
 
141
144
  @property
142
145
  def settings_yml(self):
143
- return load_settings_yml(self._conan_api.home_folder)
146
+ if self._settings_yml is None:
147
+ self._settings_yml = load_settings_yml(self._conan_api.home_folder)
148
+ return self._settings_yml
144
149
 
145
150
  @property
146
151
  def requester(self):
@@ -124,22 +124,26 @@ class ConanOutput:
124
124
  def set_warnings_as_errors(cls, value):
125
125
  cls._warnings_as_errors = value
126
126
 
127
+ @classmethod
128
+ def valid_log_levels(cls):
129
+ return {"quiet": LEVEL_QUIET, # -vquiet 80
130
+ "error": LEVEL_ERROR, # -verror 70
131
+ "warning": LEVEL_WARNING, # -vwaring 60
132
+ "notice": LEVEL_NOTICE, # -vnotice 50
133
+ "status": LEVEL_STATUS, # -vstatus 40
134
+ None: LEVEL_VERBOSE, # -v 30
135
+ "verbose": LEVEL_VERBOSE, # -vverbose 30
136
+ "debug": LEVEL_DEBUG, # -vdebug 20
137
+ "v": LEVEL_DEBUG, # -vv 20
138
+ "trace": LEVEL_TRACE, # -vtrace 10
139
+ "vv": LEVEL_TRACE # -vvv 10
140
+ }
141
+
127
142
  @classmethod
128
143
  def define_log_level(cls, v):
129
144
  env_level = os.getenv("CONAN_LOG_LEVEL")
130
145
  v = env_level or v
131
- levels = {"quiet": LEVEL_QUIET, # -vquiet 80
132
- "error": LEVEL_ERROR, # -verror 70
133
- "warning": LEVEL_WARNING, # -vwaring 60
134
- "notice": LEVEL_NOTICE, # -vnotice 50
135
- "status": LEVEL_STATUS, # -vstatus 40
136
- None: LEVEL_VERBOSE, # -v 30
137
- "verbose": LEVEL_VERBOSE, # -vverbose 30
138
- "debug": LEVEL_DEBUG, # -vdebug 20
139
- "v": LEVEL_DEBUG, # -vv 20
140
- "trace": LEVEL_TRACE, # -vtrace 10
141
- "vv": LEVEL_TRACE # -vvv 10
142
- }
146
+ levels = cls.valid_log_levels()
143
147
  try:
144
148
  level = levels[v]
145
149
  except KeyError:
@@ -276,7 +276,7 @@ class CacheAPI:
276
276
  def _resolve_latest_ref(cache, ref):
277
277
  if ref.revision is None or ref.revision == "latest":
278
278
  ref.revision = None
279
- result = cache.get_latest_recipe_reference(ref)
279
+ result = cache.get_latest_recipe_revision(ref)
280
280
  if result is None:
281
281
  raise ConanException(f"'{ref}' not found in cache")
282
282
  ref = result
@@ -287,7 +287,7 @@ def _resolve_latest_pref(cache, pref):
287
287
  pref.ref = _resolve_latest_ref(cache, pref.ref)
288
288
  if pref.revision is None or pref.revision == "latest":
289
289
  pref.revision = None
290
- result = cache.get_latest_package_reference(pref)
290
+ result = cache.get_latest_package_revision(pref)
291
291
  if result is None:
292
292
  raise ConanException(f"'{pref.repr_notime()}' not found in cache")
293
293
  pref = result
@@ -150,3 +150,40 @@ class ConfigAPI:
150
150
  self._conan_api.reinit()
151
151
  # CHECK: This also generates a remotes.json that is not there after a conan profile show?
152
152
  self._conan_api.migrate()
153
+
154
+ @property
155
+ def settings_yml(self):
156
+ """ Get the contents of the settings.yml and user_settings.yml files,
157
+ which define the possible values for settings.
158
+
159
+ Note that this is different from the settings present in a conanfile,
160
+ which represent the actual values for a specific package, while this
161
+ property represents the possible values for each setting.
162
+
163
+ :returns: A read-only object representing the settings scheme, with a
164
+ ``possible_values()`` method that returns a dictionary with the possible values for each setting,
165
+ and a ``fields`` property that returns an ordered list with the fields of each setting.
166
+ Note that it's possible to access nested settings using attribute access,
167
+ such as ``settings_yml.compiler.possible_values()``.
168
+ """
169
+
170
+ class SettingsYmlInterface:
171
+ def __init__(self, settings):
172
+ self._settings = settings
173
+
174
+ def possible_values(self):
175
+ """ returns a dict with the possible values for each setting """
176
+ return self._settings.possible_values()
177
+
178
+ @property
179
+ def fields(self):
180
+ """ returns a dict with the fields of each setting """
181
+ return self._settings.fields
182
+
183
+ def __getattr__(self, item):
184
+ return SettingsYmlInterface(getattr(self._settings, item))
185
+
186
+ def __str__(self):
187
+ return str(self._settings)
188
+
189
+ return SettingsYmlInterface(self._helpers.settings_yml)
@@ -37,7 +37,7 @@ class DownloadAPI:
37
37
  if ref.timestamp is None: # we didnt obtain the timestamp before (in general it should be)
38
38
  # Respect the timestamp of the server, the ``get_recipe()`` doesn't do it internally
39
39
  # Best would be that ``get_recipe()`` returns the timestamp in the same call
40
- server_ref = app.remote_manager.get_recipe_revision_reference(ref, remote)
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
43
  app.remote_manager.get_recipe(ref, remote, metadata)
@@ -70,7 +70,7 @@ class DownloadAPI:
70
70
 
71
71
  if pref.timestamp is None: # we didn't obtain the timestamp before (in general it should be)
72
72
  # Respect the timestamp of the server
73
- server_pref = app.remote_manager.get_package_revision_reference(pref, remote)
73
+ server_pref = app.remote_manager.get_package_revision(pref, remote)
74
74
  assert server_pref == pref
75
75
  pref.timestamp = server_pref.timestamp
76
76
 
@@ -0,0 +1,153 @@
1
+ import os
2
+ from typing import List, Tuple
3
+
4
+ from conan import ConanFile
5
+ from conan.api.output import ConanOutput
6
+ from conan.cli.printers.graph import print_graph_basic
7
+ from conan.internal.cache.cache import PkgCache
8
+ from conan.internal.conan_app import ConanApp
9
+ from conan.internal.api.export import cmd_export
10
+ from conan.internal.methods import run_package_method
11
+ from conan.internal.graph.graph import BINARY_BUILD, RECIPE_INCACHE
12
+ from conan.api.model import PkgReference, Remote, RecipeReference
13
+ from conan.internal.util.files import mkdir
14
+
15
+
16
+ class ExportAPI:
17
+ """ This API provides methods to export artifacts, both recipes and pre-compiled package
18
+ binaries from user folders to the Conan cache, as Conan recipes and Conan package binaries
19
+ """
20
+
21
+ def __init__(self, conan_api, helpers):
22
+ self._conan_api = conan_api
23
+ self._helpers = helpers
24
+
25
+ def export(self, path, name: str = None, version: str = None, user: str = None,
26
+ channel: str = None, lockfile=None,
27
+ remotes: List[Remote] = None) -> Tuple[RecipeReference, ConanFile]:
28
+ """ Exports a ``conanfile.py`` recipe, together with its associated files to the Conan cache.
29
+ A "recipe-revision" will be computed and assigned.
30
+
31
+ :param path: Path to the conanfile to be exported
32
+ :param name: Optional package name. Typically not necessary as it is defined by the recipe
33
+ attribute or dynamically with the ``set_name()`` method.
34
+ If it is defined in recipe and as an argument, but they don't match, an error will be raised.
35
+ :param version: Optional version. It can be defined in the recipe with the version
36
+ attribute or dynamically with the 'set_version()' method.
37
+ If it is defined in recipe and as an argument, but they don't match, an error will be raised.
38
+ :param user: Optional user. Can be defined by recipe attribute.
39
+ If it is defined in recipe and as an argument, but they don't match, an error will be raised.
40
+ :param channel: Optional channel. Can be defined by recipe attribute.
41
+ If it is defined in recipe and as an argument, but they don't match, an error will be raised.
42
+ :param lockfile: Optional, only relevant if the recipe has 'python-requires' to be locked
43
+ :param remotes: Optional, only relevant to resolve 'python-requires' in remotes
44
+ :return: A tuple of the exported RecipeReference and a ConanFile object
45
+ """
46
+ ConanOutput().title("Exporting recipe to the cache")
47
+ app = ConanApp(self._conan_api)
48
+ hook_manager = self._helpers.hook_manager
49
+ return cmd_export(app.loader, app.cache, hook_manager, self._helpers.global_conf, path,
50
+ name, version, user, channel, graph_lock=lockfile, remotes=remotes)
51
+
52
+ def export_pkg_graph(self, path, ref: RecipeReference, profile_host, profile_build,
53
+ remotes: List[Remote], lockfile=None, is_build_require=False,
54
+ skip_binaries=False, output_folder=None):
55
+ """Computes a dependency graph for a given configuration, for an already existing (previously
56
+ exported) recipe in the Conan cache. This method computes the full dependency graph, using
57
+ the profiles, lockfile and remotes information as any other install/graph/create command.
58
+ This is necessary in order to compute the "package_id" of the binary being exported
59
+ into the Conan cache.
60
+ The resulting dependency graph can be passed to ``export_pkg()`` method
61
+
62
+ :param path: Path to the conanfile.py in the user folder
63
+ :param ref: full RecipeReference, including recipe-revision
64
+ :param profile_host: Profile for the host context
65
+ :param profile_build: Profile for the build context
66
+ :param lockfile: Optional lockfile
67
+ :param remotes: List of Remotes
68
+ :param is_build_require: In case a package intended to be used as a tool-requires
69
+ :param skip_binaries:
70
+ :param output_folder: The folder containing output files, like potential environment scripts
71
+ :return: A Graph object that can be passed to ``export_pkg()`` method
72
+ """
73
+ assert ref.revision, "ref argument must have recipe-revision defined"
74
+ conan_api = self._conan_api
75
+ deps_graph = conan_api.graph.load_graph_consumer(path,
76
+ ref.name, str(ref.version), ref.user,
77
+ ref.channel,
78
+ profile_host=profile_host,
79
+ profile_build=profile_build,
80
+ lockfile=lockfile, remotes=remotes,
81
+ update=None,
82
+ is_build_require=is_build_require)
83
+
84
+ print_graph_basic(deps_graph)
85
+ deps_graph.report_graph_error()
86
+ conan_api.graph.analyze_binaries(deps_graph, build_mode=[ref.name], lockfile=lockfile,
87
+ remotes=remotes)
88
+ deps_graph.report_graph_error()
89
+
90
+ root_node = deps_graph.root
91
+ root_node.ref = ref # Make sure the root node revision is well defined
92
+
93
+ if not skip_binaries:
94
+ # unless the user explicitly opts-out with --skip-binaries, it is necessary to install
95
+ # binaries, in case there are build_requires necessary like tool-requires=cmake
96
+ # and package() method doing ``cmake.install()``
97
+ # for most cases, deps will be in cache already because of a previous "conan install"
98
+ # but if it is not the case, the binaries from remotes will be downloaded
99
+ conan_api.install.install_binaries(deps_graph=deps_graph, remotes=remotes)
100
+ source_folder = os.path.dirname(path)
101
+ conan_api.install.install_consumer(deps_graph=deps_graph, source_folder=source_folder,
102
+ output_folder=output_folder)
103
+ return deps_graph
104
+
105
+ def export_pkg(self, graph, output_folder=None) -> None:
106
+ """Executes the ``package()`` method of the exported recipe in order to copy the artifacts
107
+ from user folder to the Conan cache package folder
108
+
109
+ :param graph: A Graph object
110
+ :param output_folder: Optional folder where generated files like environment scripts
111
+ of dependencies have been installed
112
+ """
113
+ cache = PkgCache(self._conan_api.cache_folder, self._helpers.global_conf)
114
+ hook_manager = self._helpers.hook_manager
115
+
116
+ # The graph has to be loaded with build_mode=[ref.name], so that node is not tried
117
+ # to be downloaded from remotes
118
+ # passing here the create_reference=ref argument is useful so the recipe is in "develop",
119
+ # because the "package()" method is in develop=True already
120
+ pkg_node = graph.root
121
+ ref = pkg_node.ref
122
+ source_folder = os.path.dirname(pkg_node.path)
123
+ out = ConanOutput(scope=pkg_node.conanfile.display_name)
124
+ out.info("Exporting binary from user folder to Conan cache")
125
+ conanfile = pkg_node.conanfile
126
+
127
+ package_id = pkg_node.package_id
128
+ assert package_id is not None
129
+ out.info("Packaging to %s" % package_id)
130
+ pref = PkgReference(ref, package_id)
131
+ pkg_layout = cache.create_build_pkg_layout(pref)
132
+
133
+ conanfile.folders.set_base_folders(source_folder, output_folder)
134
+ dest_package_folder = pkg_layout.package()
135
+ conanfile.folders.set_base_package(dest_package_folder)
136
+ mkdir(pkg_layout.metadata())
137
+ conanfile.folders.set_base_pkg_metadata(pkg_layout.metadata())
138
+
139
+ with pkg_layout.set_dirty_context_manager():
140
+ prev = run_package_method(conanfile, package_id, hook_manager, ref)
141
+
142
+ pref = PkgReference(pref.ref, pref.package_id, prev)
143
+ pkg_layout.reference = pref
144
+ cache.assign_prev(pkg_layout)
145
+ pkg_node.prev = prev
146
+ pkg_node.pref_timestamp = pref.timestamp # assigned by assign_prev
147
+ pkg_node.recipe = RECIPE_INCACHE
148
+ pkg_node.binary = BINARY_BUILD
149
+ # Make sure folder is updated
150
+ final_folder = pkg_layout.package()
151
+ conanfile.folders.set_base_package(final_folder)
152
+ out.info(f"Package folder {final_folder}")
153
+ out.success("Exported package binary")
@@ -57,9 +57,9 @@ class ListAPI:
57
57
  assert ref.revision is None, "latest_recipe_revision: ref already have a revision"
58
58
  app = ConanBasicApp(self._conan_api)
59
59
  if remote:
60
- ret = app.remote_manager.get_latest_recipe_reference(ref, remote=remote)
60
+ ret = app.remote_manager.get_latest_recipe_revision(ref, remote=remote)
61
61
  else:
62
- ret = app.cache.get_latest_recipe_reference(ref)
62
+ ret = app.cache.get_latest_recipe_revision(ref)
63
63
 
64
64
  return ret
65
65
 
@@ -69,9 +69,9 @@ class ListAPI:
69
69
  assert ref.revision is None, "recipe_revisions: ref already have a revision"
70
70
  app = ConanBasicApp(self._conan_api)
71
71
  if remote:
72
- results = app.remote_manager.get_recipe_revisions_references(ref, remote=remote)
72
+ results = app.remote_manager.get_recipe_revisions(ref, remote=remote)
73
73
  else:
74
- results = app.cache.get_recipe_revisions_references(ref)
74
+ results = app.cache.get_recipe_revisions(ref)
75
75
 
76
76
  return results
77
77
 
@@ -83,9 +83,9 @@ class ListAPI:
83
83
  assert pref.package_id is not None, "package_id must be defined"
84
84
  app = ConanBasicApp(self._conan_api)
85
85
  if remote:
86
- ret = app.remote_manager.get_latest_package_reference(pref, remote=remote)
86
+ ret = app.remote_manager.get_latest_package_revision(pref, remote=remote)
87
87
  else:
88
- ret = app.cache.get_latest_package_reference(pref)
88
+ ret = app.cache.get_latest_package_revision(pref)
89
89
  return ret
90
90
 
91
91
  def package_revisions(self, pref: PkgReference, remote=None):
@@ -93,23 +93,20 @@ class ListAPI:
93
93
  "check latest first if needed"
94
94
  app = ConanBasicApp(self._conan_api)
95
95
  if remote:
96
- results = app.remote_manager.get_package_revisions_references(pref, remote=remote)
96
+ results = app.remote_manager.get_package_revisions(pref, remote=remote)
97
97
  else:
98
- results = app.cache.get_package_revisions_references(pref, only_latest_prev=False)
98
+ results = app.cache.get_package_revisions(pref)
99
99
  return results
100
100
 
101
101
  def _packages_configurations(self, ref: RecipeReference,
102
102
  remote=None) -> Dict[PkgReference, dict]:
103
- assert ref.revision is not None, "packages: ref should have a revision. " \
104
- "Check latest if needed."
103
+ assert ref.revision is not None and ref.revision != "latest", \
104
+ "packages: ref should have a revision. Check latest if needed."
105
105
  app = ConanBasicApp(self._conan_api)
106
106
  if not remote:
107
107
  prefs = app.cache.get_package_references(ref)
108
108
  packages = _get_cache_packages_binary_info(app.cache, prefs)
109
109
  else:
110
- if ref.revision == "latest":
111
- ref.revision = None
112
- ref = app.remote_manager.get_latest_recipe_reference(ref, remote=remote)
113
110
  packages = app.remote_manager.search_packages(remote, ref)
114
111
  return packages
115
112
 
@@ -120,8 +117,6 @@ class ListAPI:
120
117
  :param query: str like "os=Windows AND (arch=x86 OR compiler=gcc)"
121
118
  :return: Dict[PkgReference, PkgConfiguration]
122
119
  """
123
- if query is None:
124
- return pkg_configurations
125
120
  try:
126
121
  if "!" in query:
127
122
  raise ConanException("'!' character is not allowed")
@@ -178,6 +173,7 @@ class ListAPI:
178
173
  It can be a string like ``"2d"`` (2 days) or ``"3h"`` (3 hours).
179
174
  :parameter Profile profile: Profile to filter the packages by settings and options.
180
175
  """
176
+ # TODO: Implement better error forwarding for "list" command that captures Exceptions
181
177
  if package_query and pattern.package_id and "*" not in pattern.package_id:
182
178
  raise ConanException("Cannot specify '-p' package queries, "
183
179
  "if 'package_id' is not a pattern")
@@ -513,7 +509,7 @@ def _get_cache_packages_binary_info(cache, prefs) -> Dict[PkgReference, dict]:
513
509
  result = OrderedDict()
514
510
 
515
511
  for pref in prefs:
516
- latest_prev = cache.get_latest_package_reference(pref)
512
+ latest_prev = cache.get_latest_package_revision(pref)
517
513
  pkg_layout = cache.pkg_layout(latest_prev)
518
514
 
519
515
  # Read conaninfo
@@ -43,8 +43,11 @@ class ProfilesAPI:
43
43
  :return: the path to the default "build" profile, either in the cache or as
44
44
  defined by the user in configuration
45
45
  """
46
- global_conf = self._api_helpers.global_conf
47
- default_profile = global_conf.get("core:default_build_profile", default=DEFAULT_PROFILE_NAME)
46
+ default_profile = os.environ.get("CONAN_DEFAULT_BUILD_PROFILE")
47
+ if default_profile is None:
48
+ global_conf = self._api_helpers.global_conf
49
+ default_profile = global_conf.get("core:default_build_profile",
50
+ default=DEFAULT_PROFILE_NAME)
48
51
  default_profile = os.path.join(self._home_paths.profiles_path, default_profile)
49
52
  if not os.path.exists(default_profile):
50
53
  msg = ("The default build profile '{}' doesn't exist.\n"
@@ -263,10 +263,11 @@ class WorkspaceAPI:
263
263
 
264
264
  def super_build_graph(self, deps_graph, profile_host, profile_build):
265
265
  order = []
266
- packages = self._ws.packages()
266
+ packages = self.packages()
267
267
 
268
268
  def find_folder(ref):
269
- return next(p["path"] for p in packages if RecipeReference.loads(p["ref"]) == ref)
269
+ return next(os.path.dirname(os.path.relpath(p["path"], self._folder)) for p_ref, p in
270
+ packages.items() if p_ref == ref)
270
271
 
271
272
  for level in deps_graph.by_levels():
272
273
  items = [item for item in level if item.recipe == "Editable"]
@@ -303,6 +304,13 @@ class WorkspaceAPI:
303
304
  conanfile.workspace_packages_options = {}
304
305
  for node in deps_graph.nodes[1:]: # Exclude the current root
305
306
  if node.recipe != RECIPE_EDITABLE:
307
+ # sanity check, a pacakge in the cache cannot have dependencies to the workspace
308
+ deps_edit = [d.node for d in node.transitive_deps.values()
309
+ if d.node.recipe == RECIPE_EDITABLE]
310
+ if deps_edit:
311
+ raise ConanException(f"Workspace definition error. Package {node} in the "
312
+ f"Conan cache has dependencies to packages "
313
+ f"in the workspace: {deps_edit}")
306
314
  result.add_node(node)
307
315
  continue
308
316
  conanfile.workspace_packages_options[node.ref] = node.conanfile.options.serialize()
@@ -27,29 +27,31 @@ _help_build_policies = '''Optional, specify which packages to build from source.
27
27
 
28
28
 
29
29
  def add_lockfile_args(parser):
30
- parser.add_argument("-l", "--lockfile", action=OnceArgument,
31
- help="Path to a lockfile. Use --lockfile=\"\" to avoid automatic use of "
32
- "existing 'conan.lock' file")
33
- parser.add_argument("--lockfile-partial", action="store_true",
34
- help="Do not raise an error if some dependency is not found in lockfile")
35
- parser.add_argument("--lockfile-out", action=OnceArgument,
36
- help="Filename of the updated lockfile")
37
- parser.add_argument("--lockfile-packages", action="store_true",
38
- help=argparse.SUPPRESS)
39
- parser.add_argument("--lockfile-clean", action="store_true",
40
- help="Remove unused entries from the lockfile")
41
- parser.add_argument("--lockfile-overrides",
42
- help="Overwrite lockfile overrides")
30
+ group = parser.add_argument_group("lockfile arguments")
31
+ group.add_argument("-l", "--lockfile", action=OnceArgument,
32
+ help="Path to a lockfile. Use --lockfile=\"\" to avoid automatic use of "
33
+ "existing 'conan.lock' file")
34
+ group.add_argument("--lockfile-partial", action="store_true",
35
+ help="Do not raise an error if some dependency is not found in lockfile")
36
+ group.add_argument("--lockfile-out", action=OnceArgument,
37
+ help="Filename of the updated lockfile")
38
+ group.add_argument("--lockfile-packages", action="store_true",
39
+ help=argparse.SUPPRESS)
40
+ group.add_argument("--lockfile-clean", action="store_true",
41
+ help="Remove unused entries from the lockfile")
42
+ group.add_argument("--lockfile-overrides",
43
+ help="Overwrite lockfile overrides")
43
44
 
44
45
 
45
46
  def add_common_install_arguments(parser):
46
47
  parser.add_argument("-b", "--build", action="append", help=_help_build_policies)
47
48
 
48
- group = parser.add_mutually_exclusive_group()
49
- group.add_argument("-r", "--remote", action="append", default=None,
50
- help='Look in the specified remote or remotes server')
51
- group.add_argument("-nr", "--no-remote", action="store_true",
52
- help='Do not use remote, resolve exclusively in the cache')
49
+ group = parser.add_argument_group("remote arguments")
50
+ exclusive_group = group.add_mutually_exclusive_group()
51
+ exclusive_group.add_argument("-r", "--remote", action="append", default=None,
52
+ help='Look in the specified remote or remotes server')
53
+ exclusive_group.add_argument("-nr", "--no-remote", action="store_true",
54
+ help='Do not use remote, resolve exclusively in the cache')
53
55
 
54
56
  update_help = ("Will install newer versions and/or revisions in the local cache "
55
57
  "for the given reference name, or all references in the graph if no argument is supplied. "
@@ -57,13 +59,15 @@ def add_common_install_arguments(parser):
57
59
  "satisfies the range. It will update to the "
58
60
  "latest revision for the resolved version range.")
59
61
 
60
- parser.add_argument("-u", "--update", action="append", nargs="?", help=update_help, const="*")
62
+ group.add_argument("-u", "--update", action="append", nargs="?", help=update_help, const="*")
61
63
  add_profiles_args(parser)
62
64
 
63
65
 
64
66
  def add_profiles_args(parser):
65
67
  contexts = ["build", "host"]
66
68
 
69
+ group = parser.add_argument_group("profile arguments")
70
+
67
71
  # This comes from the _AppendAction code but modified to add to the contexts
68
72
  class ContextAllAction(argparse.Action):
69
73
 
@@ -75,29 +79,29 @@ def add_profiles_args(parser):
75
79
  setattr(namespace, self.dest + "_" + context, items)
76
80
 
77
81
  def create_config(short, long, example=None):
78
- parser.add_argument(f"-{short}", f"--{long}",
79
- default=None,
80
- action="append",
81
- dest=f"{long}_host",
82
- metavar=long.upper(),
83
- help=f'Apply the specified {long}. '
84
- f'By default, or if specifying -{short}:h (--{long}:host), it applies to the host context. '
85
- f'Use -{short}:b (--{long}:build) to specify the build context, '
86
- f'or -{short}:a (--{long}:all) to specify both contexts at once'
87
- + ('' if not example else f". Example: {example}"))
82
+ group.add_argument(f"-{short}", f"--{long}",
83
+ default=None,
84
+ action="append",
85
+ dest=f"{long}_host",
86
+ metavar=long.upper(),
87
+ help=f'Apply the specified {long}. '
88
+ f'By default, or if specifying -{short}:h (--{long}:host), it applies to the host context. '
89
+ f'Use -{short}:b (--{long}:build) to specify the build context, '
90
+ f'or -{short}:a (--{long}:all) to specify both contexts at once'
91
+ + ('' if not example else f". Example: {example}"))
88
92
  for context in contexts:
89
- parser.add_argument(f"-{short}:{context[0]}", f"--{long}:{context}",
90
- default=None,
91
- action="append",
92
- dest=f"{long}_{context}",
93
- help="")
94
-
95
- parser.add_argument(f"-{short}:a", f"--{long}:all",
96
- default=None,
97
- action=ContextAllAction,
98
- dest=long,
99
- metavar=f"{long.upper()}_ALL",
100
- help="")
93
+ group.add_argument(f"-{short}:{context[0]}", f"--{long}:{context}",
94
+ default=None,
95
+ action="append",
96
+ dest=f"{long}_{context}",
97
+ help="")
98
+
99
+ group.add_argument(f"-{short}:a", f"--{long}:all",
100
+ default=None,
101
+ action=ContextAllAction,
102
+ dest=long,
103
+ metavar=f"{long.upper()}_ALL",
104
+ help="")
101
105
 
102
106
  create_config("pr", "profile")
103
107
  create_config("o", "options", '-o="pkg/*:with_qt=True"')
@@ -106,14 +110,15 @@ def add_profiles_args(parser):
106
110
 
107
111
 
108
112
  def add_reference_args(parser):
109
- parser.add_argument("--name", action=OnceArgument,
110
- help='Provide a package name if not specified in conanfile')
111
- parser.add_argument("--version", action=OnceArgument,
112
- help='Provide a package version if not specified in conanfile')
113
- parser.add_argument("--user", action=OnceArgument,
114
- help='Provide a user if not specified in conanfile')
115
- parser.add_argument("--channel", action=OnceArgument,
116
- help='Provide a channel if not specified in conanfile')
113
+ group = parser.add_argument_group("reference arguments")
114
+ group.add_argument("--name", action=OnceArgument,
115
+ help='Provide a package name if not specified in conanfile')
116
+ group.add_argument("--version", action=OnceArgument,
117
+ help='Provide a package version if not specified in conanfile')
118
+ group.add_argument("--user", action=OnceArgument,
119
+ help='Provide a user if not specified in conanfile')
120
+ group.add_argument("--channel", action=OnceArgument,
121
+ help='Provide a channel if not specified in conanfile')
117
122
 
118
123
 
119
124
  def common_graph_args(subparser):
@@ -124,12 +129,12 @@ def common_graph_args(subparser):
124
129
  "directory when no --requires or --tool-requires is "
125
130
  "given",
126
131
  default=None)
127
- add_reference_args(subparser)
132
+ add_common_install_arguments(subparser)
128
133
  subparser.add_argument("--requires", action="append",
129
134
  help='Directly provide requires instead of a conanfile')
130
135
  subparser.add_argument("--tool-requires", action='append',
131
- help='Directly provide tool-requires instead of a conanfile')
132
- add_common_install_arguments(subparser)
136
+ help='Directly provide tool-requires instead of a conanfile')
137
+ add_reference_args(subparser)
133
138
  add_lockfile_args(subparser)
134
139
 
135
140