conan 2.12.1__tar.gz → 2.13.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (348) hide show
  1. {conan-2.12.1/conan.egg-info → conan-2.13.0}/PKG-INFO +1 -1
  2. {conan-2.12.1 → conan-2.13.0}/conan/__init__.py +2 -1
  3. {conan-2.12.1 → conan-2.13.0}/conan/api/model/list.py +0 -8
  4. {conan-2.12.1 → conan-2.13.0}/conan/api/model/refs.py +0 -16
  5. {conan-2.12.1 → conan-2.13.0}/conan/api/output.py +5 -13
  6. {conan-2.12.1 → conan-2.13.0}/conan/api/subapi/new.py +2 -2
  7. conan-2.13.0/conan/api/subapi/workspace.py +253 -0
  8. {conan-2.12.1 → conan-2.13.0}/conan/cli/commands/lock.py +62 -0
  9. {conan-2.12.1 → conan-2.13.0}/conan/cli/commands/new.py +4 -0
  10. {conan-2.12.1 → conan-2.13.0}/conan/cli/commands/remote.py +2 -2
  11. {conan-2.12.1 → conan-2.13.0}/conan/cli/commands/workspace.py +59 -5
  12. {conan-2.12.1 → conan-2.13.0}/conan/cps/cps.py +7 -1
  13. {conan-2.12.1 → conan-2.13.0}/conan/internal/api/install/generators.py +1 -0
  14. {conan-2.12.1 → conan-2.13.0}/conan/internal/api/new/cmake_lib.py +1 -1
  15. conan-2.13.0/conan/internal/api/new/workspace.py +85 -0
  16. {conan-2.12.1 → conan-2.13.0}/conan/internal/conan_app.py +0 -1
  17. {conan-2.12.1 → conan-2.13.0}/conan/internal/default_settings.py +1 -1
  18. {conan-2.12.1 → conan-2.13.0}/conan/internal/deploy.py +12 -3
  19. {conan-2.12.1 → conan-2.13.0}/conan/internal/model/conanfile_interface.py +4 -0
  20. {conan-2.12.1 → conan-2.13.0}/conan/internal/model/conf.py +1 -0
  21. {conan-2.12.1 → conan-2.13.0}/conan/internal/model/cpp_info.py +11 -6
  22. {conan-2.12.1 → conan-2.13.0}/conan/internal/model/version.py +6 -0
  23. conan-2.13.0/conan/internal/model/workspace.py +94 -0
  24. conan-2.13.0/conan/internal/runner/docker.py +333 -0
  25. conan-2.13.0/conan/internal/runner/output.py +12 -0
  26. {conan-2.12.1 → conan-2.13.0}/conan/test/assets/visual_project_files.py +2 -40
  27. {conan-2.12.1 → conan-2.13.0}/conan/test/utils/file_server.py +2 -0
  28. {conan-2.12.1 → conan-2.13.0}/conan/test/utils/mocks.py +0 -32
  29. conan-2.13.0/conan/test/utils/profiles.py +18 -0
  30. {conan-2.12.1 → conan-2.13.0}/conan/test/utils/tools.py +20 -86
  31. conan-2.13.0/conan/tools/cmake/__init__.py +31 -0
  32. {conan-2.12.1 → conan-2.13.0}/conan/tools/cmake/cmake.py +1 -1
  33. {conan-2.12.1 → conan-2.13.0}/conan/tools/cmake/cmakedeps/templates/config.py +7 -0
  34. {conan-2.12.1 → conan-2.13.0}/conan/tools/cmake/cmakedeps2/cmakedeps.py +58 -40
  35. {conan-2.12.1 → conan-2.13.0}/conan/tools/cmake/cmakedeps2/target_configuration.py +42 -15
  36. {conan-2.12.1 → conan-2.13.0}/conan/tools/cps/cps_deps.py +1 -1
  37. {conan-2.12.1 → conan-2.13.0}/conan/tools/env/environment.py +14 -4
  38. {conan-2.12.1 → conan-2.13.0}/conan/tools/files/files.py +25 -21
  39. {conan-2.12.1 → conan-2.13.0}/conan/tools/gnu/autotoolstoolchain.py +1 -1
  40. {conan-2.12.1 → conan-2.13.0}/conan/tools/gnu/gnutoolchain.py +1 -1
  41. conan-2.13.0/conan/tools/premake/premake.py +40 -0
  42. {conan-2.12.1 → conan-2.13.0}/conan/tools/qbs/qbsprofile.py +0 -2
  43. conan-2.13.0/conan/tools/sbom/__init__.py +1 -0
  44. {conan-2.12.1 → conan-2.13.0}/conan/tools/sbom/cyclonedx.py +31 -6
  45. {conan-2.12.1 → conan-2.13.0}/conan/tools/scm/git.py +5 -2
  46. {conan-2.12.1 → conan-2.13.0/conan.egg-info}/PKG-INFO +1 -1
  47. {conan-2.12.1 → conan-2.13.0}/conan.egg-info/SOURCES.txt +2 -2
  48. {conan-2.12.1 → conan-2.13.0}/conan.egg-info/requires.txt +3 -1
  49. {conan-2.12.1 → conan-2.13.0}/conans/client/graph/compatibility.py +1 -1
  50. {conan-2.12.1 → conan-2.13.0}/conans/client/graph/graph_error.py +5 -2
  51. {conan-2.12.1 → conan-2.13.0}/conans/client/graph/profile_node_definer.py +1 -0
  52. {conan-2.12.1 → conan-2.13.0}/conans/client/graph/proxy.py +22 -1
  53. {conan-2.12.1 → conan-2.13.0}/conans/client/rest/file_uploader.py +1 -1
  54. {conan-2.12.1 → conan-2.13.0}/conans/client/rest/rest_client_v2.py +0 -21
  55. {conan-2.12.1 → conan-2.13.0}/conans/client/rest/rest_routes.py +0 -12
  56. {conan-2.12.1 → conan-2.13.0}/conans/client/rest_client_local_recipe_index.py +3 -0
  57. {conan-2.12.1 → conan-2.13.0}/conans/requirements.txt +1 -1
  58. {conan-2.12.1 → conan-2.13.0}/conans/requirements_dev.txt +1 -0
  59. {conan-2.12.1 → conan-2.13.0}/setup.cfg +3 -0
  60. conan-2.12.1/conan/api/subapi/workspace.py +0 -109
  61. conan-2.12.1/conan/internal/api/new/workspace.py +0 -33
  62. conan-2.12.1/conan/internal/runner/docker.py +0 -273
  63. conan-2.12.1/conan/internal/workspace.py +0 -181
  64. conan-2.12.1/conan/test/assets/__init__.py +0 -16
  65. conan-2.12.1/conan/test/assets/pkg_cmake.py +0 -156
  66. conan-2.12.1/conan/test/utils/profiles.py +0 -36
  67. conan-2.12.1/conan/tools/cmake/__init__.py +0 -14
  68. conan-2.12.1/conan/tools/premake/premake.py +0 -17
  69. {conan-2.12.1 → conan-2.13.0}/LICENSE.md +0 -0
  70. {conan-2.12.1 → conan-2.13.0}/MANIFEST.in +0 -0
  71. {conan-2.12.1 → conan-2.13.0}/README.md +0 -0
  72. {conan-2.12.1 → conan-2.13.0}/conan/api/__init__.py +0 -0
  73. {conan-2.12.1 → conan-2.13.0}/conan/api/conan_api.py +0 -0
  74. {conan-2.12.1 → conan-2.13.0}/conan/api/input.py +0 -0
  75. {conan-2.12.1 → conan-2.13.0}/conan/api/model/__init__.py +0 -0
  76. {conan-2.12.1 → conan-2.13.0}/conan/api/model/remote.py +0 -0
  77. {conan-2.12.1 → conan-2.13.0}/conan/api/subapi/__init__.py +0 -0
  78. {conan-2.12.1 → conan-2.13.0}/conan/api/subapi/cache.py +0 -0
  79. {conan-2.12.1 → conan-2.13.0}/conan/api/subapi/command.py +0 -0
  80. {conan-2.12.1 → conan-2.13.0}/conan/api/subapi/config.py +0 -0
  81. {conan-2.12.1 → conan-2.13.0}/conan/api/subapi/download.py +0 -0
  82. {conan-2.12.1 → conan-2.13.0}/conan/api/subapi/export.py +0 -0
  83. {conan-2.12.1 → conan-2.13.0}/conan/api/subapi/graph.py +0 -0
  84. {conan-2.12.1 → conan-2.13.0}/conan/api/subapi/install.py +0 -0
  85. {conan-2.12.1 → conan-2.13.0}/conan/api/subapi/list.py +0 -0
  86. {conan-2.12.1 → conan-2.13.0}/conan/api/subapi/local.py +0 -0
  87. {conan-2.12.1 → conan-2.13.0}/conan/api/subapi/lockfile.py +0 -0
  88. {conan-2.12.1 → conan-2.13.0}/conan/api/subapi/profiles.py +0 -0
  89. {conan-2.12.1 → conan-2.13.0}/conan/api/subapi/remotes.py +0 -0
  90. {conan-2.12.1 → conan-2.13.0}/conan/api/subapi/remove.py +0 -0
  91. {conan-2.12.1 → conan-2.13.0}/conan/api/subapi/search.py +0 -0
  92. {conan-2.12.1 → conan-2.13.0}/conan/api/subapi/upload.py +0 -0
  93. {conan-2.12.1 → conan-2.13.0}/conan/cli/__init__.py +0 -0
  94. {conan-2.12.1 → conan-2.13.0}/conan/cli/args.py +0 -0
  95. {conan-2.12.1 → conan-2.13.0}/conan/cli/cli.py +0 -0
  96. {conan-2.12.1 → conan-2.13.0}/conan/cli/command.py +0 -0
  97. {conan-2.12.1 → conan-2.13.0}/conan/cli/commands/__init__.py +0 -0
  98. {conan-2.12.1 → conan-2.13.0}/conan/cli/commands/build.py +0 -0
  99. {conan-2.12.1 → conan-2.13.0}/conan/cli/commands/cache.py +0 -0
  100. {conan-2.12.1 → conan-2.13.0}/conan/cli/commands/config.py +0 -0
  101. {conan-2.12.1 → conan-2.13.0}/conan/cli/commands/create.py +0 -0
  102. {conan-2.12.1 → conan-2.13.0}/conan/cli/commands/download.py +0 -0
  103. {conan-2.12.1 → conan-2.13.0}/conan/cli/commands/editable.py +0 -0
  104. {conan-2.12.1 → conan-2.13.0}/conan/cli/commands/export.py +0 -0
  105. {conan-2.12.1 → conan-2.13.0}/conan/cli/commands/export_pkg.py +0 -0
  106. {conan-2.12.1 → conan-2.13.0}/conan/cli/commands/graph.py +0 -0
  107. {conan-2.12.1 → conan-2.13.0}/conan/cli/commands/inspect.py +0 -0
  108. {conan-2.12.1 → conan-2.13.0}/conan/cli/commands/install.py +0 -0
  109. {conan-2.12.1 → conan-2.13.0}/conan/cli/commands/list.py +0 -0
  110. {conan-2.12.1 → conan-2.13.0}/conan/cli/commands/pkglist.py +0 -0
  111. {conan-2.12.1 → conan-2.13.0}/conan/cli/commands/profile.py +0 -0
  112. {conan-2.12.1 → conan-2.13.0}/conan/cli/commands/remove.py +0 -0
  113. {conan-2.12.1 → conan-2.13.0}/conan/cli/commands/search.py +0 -0
  114. {conan-2.12.1 → conan-2.13.0}/conan/cli/commands/source.py +0 -0
  115. {conan-2.12.1 → conan-2.13.0}/conan/cli/commands/test.py +0 -0
  116. {conan-2.12.1 → conan-2.13.0}/conan/cli/commands/upload.py +0 -0
  117. {conan-2.12.1 → conan-2.13.0}/conan/cli/commands/version.py +0 -0
  118. {conan-2.12.1 → conan-2.13.0}/conan/cli/exit_codes.py +0 -0
  119. {conan-2.12.1 → conan-2.13.0}/conan/cli/formatters/__init__.py +0 -0
  120. {conan-2.12.1 → conan-2.13.0}/conan/cli/formatters/graph/__init__.py +0 -0
  121. {conan-2.12.1 → conan-2.13.0}/conan/cli/formatters/graph/build_order_html.py +0 -0
  122. {conan-2.12.1 → conan-2.13.0}/conan/cli/formatters/graph/graph.py +0 -0
  123. {conan-2.12.1 → conan-2.13.0}/conan/cli/formatters/graph/graph_info_text.py +0 -0
  124. {conan-2.12.1 → conan-2.13.0}/conan/cli/formatters/graph/info_graph_dot.py +0 -0
  125. {conan-2.12.1 → conan-2.13.0}/conan/cli/formatters/graph/info_graph_html.py +0 -0
  126. {conan-2.12.1 → conan-2.13.0}/conan/cli/formatters/list/__init__.py +0 -0
  127. {conan-2.12.1 → conan-2.13.0}/conan/cli/formatters/list/list.py +0 -0
  128. {conan-2.12.1 → conan-2.13.0}/conan/cli/formatters/list/search_table_html.py +0 -0
  129. {conan-2.12.1 → conan-2.13.0}/conan/cli/printers/__init__.py +0 -0
  130. {conan-2.12.1 → conan-2.13.0}/conan/cli/printers/graph.py +0 -0
  131. {conan-2.12.1 → conan-2.13.0}/conan/cps/__init__.py +0 -0
  132. {conan-2.12.1 → conan-2.13.0}/conan/errors.py +0 -0
  133. {conan-2.12.1 → conan-2.13.0}/conan/internal/__init__.py +0 -0
  134. {conan-2.12.1 → conan-2.13.0}/conan/internal/api/__init__.py +0 -0
  135. {conan-2.12.1 → conan-2.13.0}/conan/internal/api/config/__init__.py +0 -0
  136. {conan-2.12.1 → conan-2.13.0}/conan/internal/api/config/config_installer.py +0 -0
  137. {conan-2.12.1 → conan-2.13.0}/conan/internal/api/detect/__init__.py +0 -0
  138. {conan-2.12.1 → conan-2.13.0}/conan/internal/api/detect/detect_api.py +0 -0
  139. {conan-2.12.1 → conan-2.13.0}/conan/internal/api/detect/detect_vs.py +0 -0
  140. {conan-2.12.1 → conan-2.13.0}/conan/internal/api/export.py +0 -0
  141. {conan-2.12.1 → conan-2.13.0}/conan/internal/api/install/__init__.py +0 -0
  142. {conan-2.12.1 → conan-2.13.0}/conan/internal/api/list/__init__.py +0 -0
  143. {conan-2.12.1 → conan-2.13.0}/conan/internal/api/list/query_parse.py +0 -0
  144. {conan-2.12.1 → conan-2.13.0}/conan/internal/api/local/__init__.py +0 -0
  145. {conan-2.12.1 → conan-2.13.0}/conan/internal/api/local/editable.py +0 -0
  146. {conan-2.12.1 → conan-2.13.0}/conan/internal/api/new/__init__.py +0 -0
  147. {conan-2.12.1 → conan-2.13.0}/conan/internal/api/new/alias_new.py +0 -0
  148. {conan-2.12.1 → conan-2.13.0}/conan/internal/api/new/autoools_exe.py +0 -0
  149. {conan-2.12.1 → conan-2.13.0}/conan/internal/api/new/autotools_lib.py +0 -0
  150. {conan-2.12.1 → conan-2.13.0}/conan/internal/api/new/basic.py +0 -0
  151. {conan-2.12.1 → conan-2.13.0}/conan/internal/api/new/bazel_7_exe.py +0 -0
  152. {conan-2.12.1 → conan-2.13.0}/conan/internal/api/new/bazel_7_lib.py +0 -0
  153. {conan-2.12.1 → conan-2.13.0}/conan/internal/api/new/bazel_exe.py +0 -0
  154. {conan-2.12.1 → conan-2.13.0}/conan/internal/api/new/bazel_lib.py +0 -0
  155. {conan-2.12.1 → conan-2.13.0}/conan/internal/api/new/cmake_exe.py +0 -0
  156. {conan-2.12.1 → conan-2.13.0}/conan/internal/api/new/local_recipes_index.py +0 -0
  157. {conan-2.12.1 → conan-2.13.0}/conan/internal/api/new/meson_exe.py +0 -0
  158. {conan-2.12.1 → conan-2.13.0}/conan/internal/api/new/meson_lib.py +0 -0
  159. {conan-2.12.1 → conan-2.13.0}/conan/internal/api/new/msbuild_exe.py +0 -0
  160. {conan-2.12.1 → conan-2.13.0}/conan/internal/api/new/msbuild_lib.py +0 -0
  161. {conan-2.12.1 → conan-2.13.0}/conan/internal/api/new/qbs_lib.py +0 -0
  162. {conan-2.12.1 → conan-2.13.0}/conan/internal/api/profile/__init__.py +0 -0
  163. {conan-2.12.1 → conan-2.13.0}/conan/internal/api/profile/detect.py +0 -0
  164. {conan-2.12.1 → conan-2.13.0}/conan/internal/api/profile/profile_loader.py +0 -0
  165. {conan-2.12.1 → conan-2.13.0}/conan/internal/api/remotes/__init__.py +0 -0
  166. {conan-2.12.1 → conan-2.13.0}/conan/internal/api/remotes/encrypt.py +0 -0
  167. {conan-2.12.1 → conan-2.13.0}/conan/internal/api/remotes/localdb.py +0 -0
  168. {conan-2.12.1 → conan-2.13.0}/conan/internal/api/uploader.py +0 -0
  169. {conan-2.12.1 → conan-2.13.0}/conan/internal/cache/__init__.py +0 -0
  170. {conan-2.12.1 → conan-2.13.0}/conan/internal/cache/cache.py +0 -0
  171. {conan-2.12.1 → conan-2.13.0}/conan/internal/cache/conan_reference_layout.py +0 -0
  172. {conan-2.12.1 → conan-2.13.0}/conan/internal/cache/db/__init__.py +0 -0
  173. {conan-2.12.1 → conan-2.13.0}/conan/internal/cache/db/cache_database.py +0 -0
  174. {conan-2.12.1 → conan-2.13.0}/conan/internal/cache/db/packages_table.py +0 -0
  175. {conan-2.12.1 → conan-2.13.0}/conan/internal/cache/db/recipes_table.py +0 -0
  176. {conan-2.12.1 → conan-2.13.0}/conan/internal/cache/db/table.py +0 -0
  177. {conan-2.12.1 → conan-2.13.0}/conan/internal/cache/home_paths.py +0 -0
  178. {conan-2.12.1 → conan-2.13.0}/conan/internal/cache/integrity_check.py +0 -0
  179. {conan-2.12.1 → conan-2.13.0}/conan/internal/errors.py +0 -0
  180. {conan-2.12.1 → conan-2.13.0}/conan/internal/internal_tools.py +0 -0
  181. {conan-2.12.1 → conan-2.13.0}/conan/internal/methods.py +0 -0
  182. {conan-2.12.1 → conan-2.13.0}/conan/internal/model/__init__.py +0 -0
  183. {conan-2.12.1 → conan-2.13.0}/conan/internal/model/conan_file.py +0 -0
  184. {conan-2.12.1 → conan-2.13.0}/conan/internal/model/dependencies.py +0 -0
  185. {conan-2.12.1 → conan-2.13.0}/conan/internal/model/info.py +0 -0
  186. {conan-2.12.1 → conan-2.13.0}/conan/internal/model/layout.py +0 -0
  187. {conan-2.12.1 → conan-2.13.0}/conan/internal/model/lockfile.py +0 -0
  188. {conan-2.12.1 → conan-2.13.0}/conan/internal/model/manifest.py +0 -0
  189. {conan-2.12.1 → conan-2.13.0}/conan/internal/model/options.py +0 -0
  190. {conan-2.12.1 → conan-2.13.0}/conan/internal/model/pkg_type.py +0 -0
  191. {conan-2.12.1 → conan-2.13.0}/conan/internal/model/profile.py +0 -0
  192. {conan-2.12.1 → conan-2.13.0}/conan/internal/model/recipe_ref.py +0 -0
  193. {conan-2.12.1 → conan-2.13.0}/conan/internal/model/requires.py +0 -0
  194. {conan-2.12.1 → conan-2.13.0}/conan/internal/model/settings.py +0 -0
  195. {conan-2.12.1 → conan-2.13.0}/conan/internal/model/version_range.py +0 -0
  196. {conan-2.12.1 → conan-2.13.0}/conan/internal/paths.py +0 -0
  197. {conan-2.12.1 → conan-2.13.0}/conan/internal/runner/__init__.py +0 -0
  198. {conan-2.12.1 → conan-2.13.0}/conan/internal/runner/ssh.py +0 -0
  199. {conan-2.12.1 → conan-2.13.0}/conan/internal/runner/wsl.py +0 -0
  200. {conan-2.12.1 → conan-2.13.0}/conan/test/__init__.py +0 -0
  201. {conan-2.12.1/conan/test/utils → conan-2.13.0/conan/test/assets}/__init__.py +0 -0
  202. {conan-2.12.1 → conan-2.13.0}/conan/test/assets/autotools.py +0 -0
  203. {conan-2.12.1 → conan-2.13.0}/conan/test/assets/cmake.py +0 -0
  204. {conan-2.12.1 → conan-2.13.0}/conan/test/assets/genconanfile.py +0 -0
  205. {conan-2.12.1 → conan-2.13.0}/conan/test/assets/sources.py +0 -0
  206. {conan-2.12.1/conan/tools/cmake/cmakedeps2 → conan-2.13.0/conan/test/utils}/__init__.py +0 -0
  207. {conan-2.12.1 → conan-2.13.0}/conan/test/utils/artifactory.py +0 -0
  208. {conan-2.12.1 → conan-2.13.0}/conan/test/utils/env.py +0 -0
  209. {conan-2.12.1 → conan-2.13.0}/conan/test/utils/scm.py +0 -0
  210. {conan-2.12.1 → conan-2.13.0}/conan/test/utils/server_launcher.py +0 -0
  211. {conan-2.12.1 → conan-2.13.0}/conan/test/utils/test_files.py +0 -0
  212. {conan-2.12.1 → conan-2.13.0}/conan/tools/__init__.py +0 -0
  213. {conan-2.12.1 → conan-2.13.0}/conan/tools/android/__init__.py +0 -0
  214. {conan-2.12.1 → conan-2.13.0}/conan/tools/android/utils.py +0 -0
  215. {conan-2.12.1 → conan-2.13.0}/conan/tools/apple/__init__.py +0 -0
  216. {conan-2.12.1 → conan-2.13.0}/conan/tools/apple/apple.py +0 -0
  217. {conan-2.12.1 → conan-2.13.0}/conan/tools/apple/xcodebuild.py +0 -0
  218. {conan-2.12.1 → conan-2.13.0}/conan/tools/apple/xcodedeps.py +0 -0
  219. {conan-2.12.1 → conan-2.13.0}/conan/tools/apple/xcodetoolchain.py +0 -0
  220. {conan-2.12.1 → conan-2.13.0}/conan/tools/build/__init__.py +0 -0
  221. {conan-2.12.1 → conan-2.13.0}/conan/tools/build/cppstd.py +0 -0
  222. {conan-2.12.1 → conan-2.13.0}/conan/tools/build/cpu.py +0 -0
  223. {conan-2.12.1 → conan-2.13.0}/conan/tools/build/cross_building.py +0 -0
  224. {conan-2.12.1 → conan-2.13.0}/conan/tools/build/cstd.py +0 -0
  225. {conan-2.12.1 → conan-2.13.0}/conan/tools/build/flags.py +0 -0
  226. {conan-2.12.1 → conan-2.13.0}/conan/tools/build/stdcpp_library.py +0 -0
  227. {conan-2.12.1 → conan-2.13.0}/conan/tools/cmake/cmakedeps/__init__.py +0 -0
  228. {conan-2.12.1 → conan-2.13.0}/conan/tools/cmake/cmakedeps/cmakedeps.py +0 -0
  229. {conan-2.12.1 → conan-2.13.0}/conan/tools/cmake/cmakedeps/templates/__init__.py +0 -0
  230. {conan-2.12.1 → conan-2.13.0}/conan/tools/cmake/cmakedeps/templates/config_version.py +0 -0
  231. {conan-2.12.1 → conan-2.13.0}/conan/tools/cmake/cmakedeps/templates/macros.py +0 -0
  232. {conan-2.12.1 → conan-2.13.0}/conan/tools/cmake/cmakedeps/templates/target_configuration.py +0 -0
  233. {conan-2.12.1 → conan-2.13.0}/conan/tools/cmake/cmakedeps/templates/target_data.py +0 -0
  234. {conan-2.12.1 → conan-2.13.0}/conan/tools/cmake/cmakedeps/templates/targets.py +0 -0
  235. {conan-2.12.1/conan/tools/sbom → conan-2.13.0/conan/tools/cmake/cmakedeps2}/__init__.py +0 -0
  236. {conan-2.12.1 → conan-2.13.0}/conan/tools/cmake/cmakedeps2/config.py +0 -0
  237. {conan-2.12.1 → conan-2.13.0}/conan/tools/cmake/cmakedeps2/config_version.py +0 -0
  238. {conan-2.12.1 → conan-2.13.0}/conan/tools/cmake/cmakedeps2/targets.py +0 -0
  239. {conan-2.12.1 → conan-2.13.0}/conan/tools/cmake/layout.py +0 -0
  240. {conan-2.12.1 → conan-2.13.0}/conan/tools/cmake/presets.py +0 -0
  241. {conan-2.12.1 → conan-2.13.0}/conan/tools/cmake/toolchain/__init__.py +0 -0
  242. {conan-2.12.1 → conan-2.13.0}/conan/tools/cmake/toolchain/blocks.py +0 -0
  243. {conan-2.12.1 → conan-2.13.0}/conan/tools/cmake/toolchain/toolchain.py +0 -0
  244. {conan-2.12.1 → conan-2.13.0}/conan/tools/cmake/utils.py +0 -0
  245. {conan-2.12.1 → conan-2.13.0}/conan/tools/cps/__init__.py +0 -0
  246. {conan-2.12.1 → conan-2.13.0}/conan/tools/env/__init__.py +0 -0
  247. {conan-2.12.1 → conan-2.13.0}/conan/tools/env/virtualbuildenv.py +0 -0
  248. {conan-2.12.1 → conan-2.13.0}/conan/tools/env/virtualrunenv.py +0 -0
  249. {conan-2.12.1 → conan-2.13.0}/conan/tools/files/__init__.py +0 -0
  250. {conan-2.12.1 → conan-2.13.0}/conan/tools/files/conandata.py +0 -0
  251. {conan-2.12.1 → conan-2.13.0}/conan/tools/files/copy_pattern.py +0 -0
  252. {conan-2.12.1 → conan-2.13.0}/conan/tools/files/packager.py +0 -0
  253. {conan-2.12.1 → conan-2.13.0}/conan/tools/files/patches.py +0 -0
  254. {conan-2.12.1 → conan-2.13.0}/conan/tools/files/symlinks/__init__.py +0 -0
  255. {conan-2.12.1 → conan-2.13.0}/conan/tools/files/symlinks/symlinks.py +0 -0
  256. {conan-2.12.1 → conan-2.13.0}/conan/tools/gnu/__init__.py +0 -0
  257. {conan-2.12.1 → conan-2.13.0}/conan/tools/gnu/autotools.py +0 -0
  258. {conan-2.12.1 → conan-2.13.0}/conan/tools/gnu/autotoolsdeps.py +0 -0
  259. {conan-2.12.1 → conan-2.13.0}/conan/tools/gnu/get_gnu_triplet.py +0 -0
  260. {conan-2.12.1 → conan-2.13.0}/conan/tools/gnu/gnudeps_flags.py +0 -0
  261. {conan-2.12.1 → conan-2.13.0}/conan/tools/gnu/makedeps.py +0 -0
  262. {conan-2.12.1 → conan-2.13.0}/conan/tools/gnu/pkgconfig.py +0 -0
  263. {conan-2.12.1 → conan-2.13.0}/conan/tools/gnu/pkgconfigdeps.py +0 -0
  264. {conan-2.12.1 → conan-2.13.0}/conan/tools/google/__init__.py +0 -0
  265. {conan-2.12.1 → conan-2.13.0}/conan/tools/google/bazel.py +0 -0
  266. {conan-2.12.1 → conan-2.13.0}/conan/tools/google/bazeldeps.py +0 -0
  267. {conan-2.12.1 → conan-2.13.0}/conan/tools/google/layout.py +0 -0
  268. {conan-2.12.1 → conan-2.13.0}/conan/tools/google/toolchain.py +0 -0
  269. {conan-2.12.1 → conan-2.13.0}/conan/tools/intel/__init__.py +0 -0
  270. {conan-2.12.1 → conan-2.13.0}/conan/tools/intel/intel_cc.py +0 -0
  271. {conan-2.12.1 → conan-2.13.0}/conan/tools/layout/__init__.py +0 -0
  272. {conan-2.12.1 → conan-2.13.0}/conan/tools/meson/__init__.py +0 -0
  273. {conan-2.12.1 → conan-2.13.0}/conan/tools/meson/helpers.py +0 -0
  274. {conan-2.12.1 → conan-2.13.0}/conan/tools/meson/meson.py +0 -0
  275. {conan-2.12.1 → conan-2.13.0}/conan/tools/meson/toolchain.py +0 -0
  276. {conan-2.12.1 → conan-2.13.0}/conan/tools/microsoft/__init__.py +0 -0
  277. {conan-2.12.1 → conan-2.13.0}/conan/tools/microsoft/layout.py +0 -0
  278. {conan-2.12.1 → conan-2.13.0}/conan/tools/microsoft/msbuild.py +0 -0
  279. {conan-2.12.1 → conan-2.13.0}/conan/tools/microsoft/msbuilddeps.py +0 -0
  280. {conan-2.12.1 → conan-2.13.0}/conan/tools/microsoft/nmakedeps.py +0 -0
  281. {conan-2.12.1 → conan-2.13.0}/conan/tools/microsoft/nmaketoolchain.py +0 -0
  282. {conan-2.12.1 → conan-2.13.0}/conan/tools/microsoft/subsystems.py +0 -0
  283. {conan-2.12.1 → conan-2.13.0}/conan/tools/microsoft/toolchain.py +0 -0
  284. {conan-2.12.1 → conan-2.13.0}/conan/tools/microsoft/visual.py +0 -0
  285. {conan-2.12.1 → conan-2.13.0}/conan/tools/premake/__init__.py +0 -0
  286. {conan-2.12.1 → conan-2.13.0}/conan/tools/premake/premakedeps.py +0 -0
  287. {conan-2.12.1 → conan-2.13.0}/conan/tools/qbs/__init__.py +0 -0
  288. {conan-2.12.1 → conan-2.13.0}/conan/tools/qbs/common.py +0 -0
  289. {conan-2.12.1 → conan-2.13.0}/conan/tools/qbs/qbs.py +0 -0
  290. {conan-2.12.1 → conan-2.13.0}/conan/tools/qbs/qbsdeps.py +0 -0
  291. {conan-2.12.1 → conan-2.13.0}/conan/tools/ros/__init__.py +0 -0
  292. {conan-2.12.1 → conan-2.13.0}/conan/tools/ros/rosenv.py +0 -0
  293. {conan-2.12.1 → conan-2.13.0}/conan/tools/scm/__init__.py +0 -0
  294. {conan-2.12.1 → conan-2.13.0}/conan/tools/scons/__init__.py +0 -0
  295. {conan-2.12.1 → conan-2.13.0}/conan/tools/scons/sconsdeps.py +0 -0
  296. {conan-2.12.1 → conan-2.13.0}/conan/tools/system/__init__.py +0 -0
  297. {conan-2.12.1 → conan-2.13.0}/conan/tools/system/package_manager.py +0 -0
  298. {conan-2.12.1 → conan-2.13.0}/conan.egg-info/dependency_links.txt +0 -0
  299. {conan-2.12.1 → conan-2.13.0}/conan.egg-info/entry_points.txt +0 -0
  300. {conan-2.12.1 → conan-2.13.0}/conan.egg-info/top_level.txt +0 -0
  301. {conan-2.12.1 → conan-2.13.0}/conans/__init__.py +0 -0
  302. {conan-2.12.1 → conan-2.13.0}/conans/client/__init__.py +0 -0
  303. {conan-2.12.1 → conan-2.13.0}/conans/client/downloaders/__init__.py +0 -0
  304. {conan-2.12.1 → conan-2.13.0}/conans/client/downloaders/caching_file_downloader.py +0 -0
  305. {conan-2.12.1 → conan-2.13.0}/conans/client/downloaders/download_cache.py +0 -0
  306. {conan-2.12.1 → conan-2.13.0}/conans/client/downloaders/file_downloader.py +0 -0
  307. {conan-2.12.1 → conan-2.13.0}/conans/client/graph/__init__.py +0 -0
  308. {conan-2.12.1 → conan-2.13.0}/conans/client/graph/build_mode.py +0 -0
  309. {conan-2.12.1 → conan-2.13.0}/conans/client/graph/compute_pid.py +0 -0
  310. {conan-2.12.1 → conan-2.13.0}/conans/client/graph/graph.py +0 -0
  311. {conan-2.12.1 → conan-2.13.0}/conans/client/graph/graph_binaries.py +0 -0
  312. {conan-2.12.1 → conan-2.13.0}/conans/client/graph/graph_builder.py +0 -0
  313. {conan-2.12.1 → conan-2.13.0}/conans/client/graph/install_graph.py +0 -0
  314. {conan-2.12.1 → conan-2.13.0}/conans/client/graph/provides.py +0 -0
  315. {conan-2.12.1 → conan-2.13.0}/conans/client/graph/python_requires.py +0 -0
  316. {conan-2.12.1 → conan-2.13.0}/conans/client/graph/range_resolver.py +0 -0
  317. {conan-2.12.1 → conan-2.13.0}/conans/client/hook_manager.py +0 -0
  318. {conan-2.12.1 → conan-2.13.0}/conans/client/installer.py +0 -0
  319. {conan-2.12.1 → conan-2.13.0}/conans/client/loader.py +0 -0
  320. {conan-2.12.1 → conan-2.13.0}/conans/client/loader_txt.py +0 -0
  321. {conan-2.12.1 → conan-2.13.0}/conans/client/migrations.py +0 -0
  322. {conan-2.12.1 → conan-2.13.0}/conans/client/pkg_sign.py +0 -0
  323. {conan-2.12.1 → conan-2.13.0}/conans/client/remote_manager.py +0 -0
  324. {conan-2.12.1 → conan-2.13.0}/conans/client/rest/__init__.py +0 -0
  325. {conan-2.12.1 → conan-2.13.0}/conans/client/rest/auth_manager.py +0 -0
  326. {conan-2.12.1 → conan-2.13.0}/conans/client/rest/client_routes.py +0 -0
  327. {conan-2.12.1 → conan-2.13.0}/conans/client/rest/conan_requester.py +0 -0
  328. {conan-2.12.1 → conan-2.13.0}/conans/client/rest/remote_credentials.py +0 -0
  329. {conan-2.12.1 → conan-2.13.0}/conans/client/rest/rest_client.py +0 -0
  330. {conan-2.12.1 → conan-2.13.0}/conans/client/source.py +0 -0
  331. {conan-2.12.1 → conan-2.13.0}/conans/client/subsystems.py +0 -0
  332. {conan-2.12.1 → conan-2.13.0}/conans/conan.py +0 -0
  333. {conan-2.12.1 → conan-2.13.0}/conans/conan_server.py +0 -0
  334. {conan-2.12.1 → conan-2.13.0}/conans/migrations.py +0 -0
  335. {conan-2.12.1 → conan-2.13.0}/conans/model/__init__.py +0 -0
  336. {conan-2.12.1 → conan-2.13.0}/conans/model/package_ref.py +0 -0
  337. {conan-2.12.1 → conan-2.13.0}/conans/model/recipe_ref.py +0 -0
  338. {conan-2.12.1 → conan-2.13.0}/conans/requirements_runner.txt +0 -0
  339. {conan-2.12.1 → conan-2.13.0}/conans/requirements_server.txt +0 -0
  340. {conan-2.12.1 → conan-2.13.0}/conans/util/__init__.py +0 -0
  341. {conan-2.12.1 → conan-2.13.0}/conans/util/config_parser.py +0 -0
  342. {conan-2.12.1 → conan-2.13.0}/conans/util/dates.py +0 -0
  343. {conan-2.12.1 → conan-2.13.0}/conans/util/files.py +0 -0
  344. {conan-2.12.1 → conan-2.13.0}/conans/util/locks.py +0 -0
  345. {conan-2.12.1 → conan-2.13.0}/conans/util/runners.py +0 -0
  346. {conan-2.12.1 → conan-2.13.0}/conans/util/thread.py +0 -0
  347. {conan-2.12.1 → conan-2.13.0}/pyproject.toml +0 -0
  348. {conan-2.12.1 → conan-2.13.0}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: conan
3
- Version: 2.12.1
3
+ Version: 2.13.0
4
4
  Summary: Conan C/C++ package manager
5
5
  Home-page: https://conan.io
6
6
  Author: JFrog LTD
@@ -1,5 +1,6 @@
1
1
  from conan.internal.model.conan_file import ConanFile
2
+ from conan.internal.model.workspace import Workspace
2
3
  from conan.internal.model.version import Version
3
4
 
4
- __version__ = '2.12.1'
5
+ __version__ = '2.13.0'
5
6
  conan_version = Version(__version__)
@@ -16,9 +16,6 @@ class MultiPackagesList:
16
16
  def __init__(self):
17
17
  self.lists = {}
18
18
 
19
- def setdefault(self, key, default):
20
- return self.lists.setdefault(key, default)
21
-
22
19
  def __getitem__(self, name):
23
20
  try:
24
21
  return self.lists[name]
@@ -57,11 +54,6 @@ class MultiPackagesList:
57
54
  pkglist.lists = result
58
55
  return pkglist
59
56
 
60
- @staticmethod
61
- def from_graph(graph, graph_recipes=None, graph_binaries=None):
62
- graph = {"graph": graph.serialize()}
63
- return MultiPackagesList._define_graph(graph, graph_recipes, graph_binaries)
64
-
65
57
  @staticmethod
66
58
  def load_graph(graphfile, graph_recipes=None, graph_binaries=None):
67
59
  if not os.path.isfile(graphfile):
@@ -44,12 +44,6 @@ class RecipeReference:
44
44
  result += "#{}".format(self.revision)
45
45
  return result
46
46
 
47
- def repr_reduced(self):
48
- result = self.__str__()
49
- if self.revision is not None:
50
- result += "#{}".format(self.revision[0:4])
51
- return result
52
-
53
47
  def repr_humantime(self):
54
48
  result = self.repr_notime()
55
49
  assert self.timestamp
@@ -236,16 +230,6 @@ class PkgReference:
236
230
  result += "#{}".format(self.revision)
237
231
  return result
238
232
 
239
- def repr_reduced(self):
240
- if self.ref is None:
241
- return ""
242
- result = self.ref.repr_reduced()
243
- if self.package_id:
244
- result += ":{}".format(self.package_id[0:4])
245
- if self.revision is not None:
246
- result += "#{}".format(self.revision[0:4])
247
- return result
248
-
249
233
  def repr_humantime(self):
250
234
  result = self.repr_notime()
251
235
  assert self.timestamp
@@ -175,18 +175,7 @@ class ConanOutput:
175
175
 
176
176
  return self
177
177
 
178
- def rewrite_line(self, line):
179
- tmp_color = self._color
180
- self._color = False
181
- total_size = 70
182
- limit_size = total_size // 2 - 3
183
- if len(line) > total_size:
184
- line = line[0:limit_size] + " ... " + line[-limit_size:]
185
- self.write("\r%s%s" % (line, " " * (total_size - len(line))))
186
- self.stream.flush()
187
- self._color = tmp_color
188
-
189
- def _write_message(self, msg, fg=None, bg=None):
178
+ def _write_message(self, msg, fg=None, bg=None, newline=True):
190
179
  if isinstance(msg, dict):
191
180
  # For traces we can receive a dict already, we try to transform then into more natural
192
181
  # text
@@ -206,8 +195,11 @@ class ConanOutput:
206
195
  else:
207
196
  ret += "{}".format(msg)
208
197
 
198
+ if newline:
199
+ ret = "%s\n" % ret
200
+
209
201
  with self.lock:
210
- self.stream.write("{}\n".format(ret))
202
+ self.stream.write(ret)
211
203
  self.stream.flush()
212
204
 
213
205
  def trace(self, msg):
@@ -111,7 +111,7 @@ class NewAPI:
111
111
  ensure_list("tool_requires")
112
112
 
113
113
  def as_package_name(n):
114
- return n.replace("-", "_").replace("+", "_").replace(".", "_")
114
+ return n.replace("-", "_").replace("+", "_")
115
115
 
116
116
  def as_name(ref):
117
117
  ref = as_package_name(ref)
@@ -119,7 +119,7 @@ class NewAPI:
119
119
  ref = ref[0:ref.index('/')]
120
120
  return ref
121
121
 
122
- definitions["package_name"] = as_package_name(name)
122
+ definitions["package_name"] = as_package_name(name).replace(".", "_")
123
123
  definitions["as_name"] = as_name
124
124
  definitions["names"] = lambda x: ", ".join(r.split("/", 1)[0] for r in x)
125
125
  if "name" not in definitions:
@@ -0,0 +1,253 @@
1
+ import inspect
2
+ import os
3
+ import shutil
4
+ from pathlib import Path
5
+
6
+ from conan import ConanFile
7
+ from conan.api.model import RecipeReference
8
+ from conan.api.output import ConanOutput
9
+ from conan.cli import make_abs_path
10
+ from conan.errors import ConanException
11
+ from conan.internal.conan_app import ConanApp
12
+ from conan.internal.model.workspace import Workspace
13
+ from conan.tools.scm import Git
14
+ from conans.client.graph.graph import RECIPE_EDITABLE, DepsGraph, CONTEXT_HOST, RECIPE_VIRTUAL, Node, \
15
+ RECIPE_CONSUMER
16
+ from conans.client.graph.graph import TransitiveRequirement
17
+ from conans.client.graph.profile_node_definer import consumer_definer
18
+ from conans.client.loader import load_python_file
19
+ from conans.client.source import retrieve_exports_sources
20
+ from conans.util.files import merge_directories
21
+
22
+
23
+ def _find_ws_folder():
24
+ path = Path(os.getcwd())
25
+ while path.is_dir() and len(path.parts) > 1: # finish at '/'
26
+ if (path / "conanws.yml").is_file() or (path / "conanws.py").is_file():
27
+ return str(path)
28
+ else:
29
+ path = path.parent
30
+
31
+
32
+ def _load_workspace(ws_folder, conan_api):
33
+ """ loads a conanfile basic object without evaluating anything, returns the module too
34
+ """
35
+ wspy = os.path.join(ws_folder, "conanws.py")
36
+ if not os.path.isfile(wspy):
37
+ ConanOutput().info(f"conanws.py doesn't exist in {ws_folder}, using default behavior")
38
+ assert os.path.exists(os.path.join(ws_folder, "conanws.yml"))
39
+ ws = Workspace(ws_folder, conan_api)
40
+ else:
41
+ try:
42
+ module, module_id = load_python_file(wspy)
43
+ ws = _parse_module(module, module_id)
44
+ ws = ws(ws_folder, conan_api)
45
+ except ConanException as e:
46
+ raise ConanException(f"Error loading conanws.py at '{wspy}': {e}")
47
+ return ws
48
+
49
+
50
+ def _parse_module(conanfile_module, module_id):
51
+ result = None
52
+ for name, attr in conanfile_module.__dict__.items():
53
+ if (name.startswith("_") or not inspect.isclass(attr) or
54
+ attr.__dict__.get("__module__") != module_id):
55
+ continue
56
+
57
+ if issubclass(attr, Workspace) and attr != Workspace:
58
+ if result is None:
59
+ result = attr
60
+ else:
61
+ raise ConanException("More than 1 Workspace in the file")
62
+
63
+ if result is None:
64
+ raise ConanException("No subclass of Workspace")
65
+
66
+ return result
67
+
68
+
69
+ class WorkspaceAPI:
70
+ TEST_ENABLED = False
71
+
72
+ def __init__(self, conan_api):
73
+ self._conan_api = conan_api
74
+ self._folder = _find_ws_folder()
75
+ if self._folder:
76
+ ConanOutput().warning(f"Workspace found: {self._folder}")
77
+ if (WorkspaceAPI.TEST_ENABLED or os.getenv("CONAN_WORKSPACE_ENABLE")) != "will_break_next":
78
+ ConanOutput().warning("Workspace ignored as CONAN_WORKSPACE_ENABLE is not set")
79
+ self._folder = None
80
+ else:
81
+ ConanOutput().warning(f"Workspace is a dev-only feature, exclusively for testing")
82
+ self._ws = _load_workspace(self._folder, conan_api) # Error if not loading
83
+
84
+ @property
85
+ def name(self):
86
+ self._check_ws()
87
+ return self._ws.name()
88
+
89
+ def home_folder(self):
90
+ """
91
+ @return: The custom defined Conan home/cache folder if defined, else None
92
+ """
93
+ if not self._folder:
94
+ return
95
+ folder = self._ws.home_folder()
96
+ if folder is None or os.path.isabs(folder):
97
+ return folder
98
+ return os.path.normpath(os.path.join(self._folder, folder))
99
+
100
+ def folder(self):
101
+ """
102
+ @return: the current workspace folder where the conanws.yml or conanws.py is located
103
+ """
104
+ return self._folder
105
+
106
+ @property
107
+ def editable_packages(self):
108
+ """
109
+ @return: Returns {RecipeReference: {"path": full abs-path, "output_folder": abs-path}}
110
+ """
111
+ if not self._folder:
112
+ return
113
+ editables = self._ws.editables()
114
+ editables = {RecipeReference.loads(r): v.copy() for r, v in editables.items()}
115
+ for v in editables.values():
116
+ path = os.path.normpath(os.path.join(self._folder, v["path"], "conanfile.py"))
117
+ if not os.path.isfile(path):
118
+ raise ConanException(f"Workspace editable not found: {path}")
119
+ v["path"] = path
120
+ if v.get("output_folder"):
121
+ v["output_folder"] = os.path.normpath(os.path.join(self._folder,
122
+ v["output_folder"]))
123
+ return editables
124
+
125
+ @property
126
+ def products(self):
127
+ self._check_ws()
128
+ return self._ws.products()
129
+
130
+ def open(self, require, remotes, cwd=None):
131
+ app = ConanApp(self._conan_api)
132
+ ref = RecipeReference.loads(require)
133
+ recipe = app.proxy.get_recipe(ref, remotes, update=False, check_update=False)
134
+
135
+ layout, recipe_status, remote = recipe
136
+ if recipe_status == RECIPE_EDITABLE:
137
+ raise ConanException(f"Can't open a dependency that is already an editable: {ref}")
138
+ ref = layout.reference
139
+ conanfile_path = layout.conanfile()
140
+ conanfile, module = app.loader.load_basic_module(conanfile_path, remotes=remotes)
141
+
142
+ scm = conanfile.conan_data.get("scm") if conanfile.conan_data else None
143
+ dst_path = os.path.join(cwd or os.getcwd(), ref.name)
144
+ if scm is None:
145
+ conanfile.output.warning("conandata doesn't contain 'scm' information\n"
146
+ "doing a local copy!!!")
147
+ shutil.copytree(layout.export(), dst_path)
148
+ retrieve_exports_sources(app.remote_manager, layout, conanfile, ref, remotes)
149
+ export_sources = layout.export_sources()
150
+ if os.path.exists(export_sources):
151
+ conanfile.output.warning("There are export-sources, copying them, but the location"
152
+ " might be incorrect, use 'scm' approach")
153
+ merge_directories(export_sources, dst_path)
154
+ else:
155
+ git = Git(conanfile, folder=cwd)
156
+ git.clone(url=scm["url"], target=ref.name)
157
+ git.folder = ref.name # change to the cloned folder
158
+ git.checkout(commit=scm["commit"])
159
+ return dst_path
160
+
161
+ def _check_ws(self):
162
+ if not self._folder:
163
+ raise ConanException("Workspace not defined, please create a "
164
+ "'conanws.py' or 'conanws.yml' file")
165
+
166
+ def add(self, path, name=None, version=None, user=None, channel=None, cwd=None,
167
+ output_folder=None, remotes=None, product=False):
168
+ """
169
+ Add a new editable package to the current workspace (the current workspace must exist)
170
+ @param path: The path to the folder containing the conanfile.py that defines the package
171
+ @param name: (optional) The name of the package to be added if not defined in recipe
172
+ @param version:
173
+ @param user:
174
+ @param channel:
175
+ @param cwd:
176
+ @param output_folder:
177
+ @param remotes:
178
+ @param product:
179
+ @return: The reference of the added package
180
+ """
181
+ self._check_ws()
182
+ full_path = self._conan_api.local.get_conanfile_path(path, cwd, py=True)
183
+ app = ConanApp(self._conan_api)
184
+ conanfile = app.loader.load_named(full_path, name, version, user, channel, remotes=remotes)
185
+ if conanfile.name is None or conanfile.version is None:
186
+ raise ConanException("Editable package recipe should declare its name and version")
187
+ ref = RecipeReference(conanfile.name, conanfile.version, conanfile.user, conanfile.channel)
188
+ ref.validate_ref()
189
+ output_folder = make_abs_path(output_folder) if output_folder else None
190
+ # Check the conanfile is there, and name/version matches
191
+ self._ws.add(ref, full_path, output_folder, product)
192
+ return ref
193
+
194
+ def remove(self, path):
195
+ self._check_ws()
196
+ return self._ws.remove(path)
197
+
198
+ def info(self):
199
+ self._check_ws()
200
+ return {"name": self.name,
201
+ "folder": self._folder,
202
+ "products": self.products,
203
+ "editables": self._ws.editables()}
204
+
205
+ def editable_from_path(self, path):
206
+ editables = self._ws.editables()
207
+ for ref, info in editables.items():
208
+ if info["path"].replace("\\", "/") == path:
209
+ return RecipeReference.loads(ref)
210
+
211
+ def collapse_editables(self, deps_graph, profile_host, profile_build):
212
+ ConanOutput().title(f"Collapsing workspace editables")
213
+
214
+ root_class = self._ws.root_conanfile()
215
+ if root_class is not None:
216
+ conanfile = root_class("conanws.py base project Conanfile")
217
+ consumer_definer(conanfile, profile_host, profile_build)
218
+ root = Node(None, conanfile, context=CONTEXT_HOST, recipe=RECIPE_CONSUMER,
219
+ path=self._folder) # path lets use the conanws.py folder
220
+ root.should_build = True # It is a consumer, this is something we are building
221
+ for field in ("requires", "build_requires", "test_requires", "requirements", "build",
222
+ "source", "package"):
223
+ if getattr(conanfile, field, None):
224
+ raise ConanException(f"Conanfile in conanws.py shouldn't have '{field}'")
225
+ else:
226
+ ConanOutput().info("Workspace conanfilews.py not found in the workspace folder, "
227
+ "using default behavior")
228
+ conanfile = ConanFile(display_name="cli")
229
+ consumer_definer(conanfile, profile_host, profile_build)
230
+ root = Node(ref=None, conanfile=conanfile, context=CONTEXT_HOST, recipe=RECIPE_VIRTUAL)
231
+
232
+ result = DepsGraph() # TODO: We might need to copy more information from the original graph
233
+ result.add_node(root)
234
+ for node in deps_graph.nodes[1:]: # Exclude the current root
235
+ if node.recipe != RECIPE_EDITABLE:
236
+ result.add_node(node)
237
+ continue
238
+ for r, t in node.transitive_deps.items():
239
+ if t.node.recipe == RECIPE_EDITABLE:
240
+ continue
241
+ existing = root.transitive_deps.pop(r, None)
242
+ if existing is None:
243
+ root.transitive_deps[r] = t
244
+ else:
245
+ require = existing.require
246
+ require.aggregate(r)
247
+ root.transitive_deps[require] = TransitiveRequirement(require, t.node)
248
+
249
+ # The graph edges must be defined too
250
+ for r, t in root.transitive_deps.items():
251
+ result.add_edge(root, t.node, r)
252
+
253
+ return result
@@ -1,3 +1,4 @@
1
+ from collections import defaultdict
1
2
  import os
2
3
 
3
4
  from conan.api.output import ConanOutput
@@ -6,6 +7,7 @@ from conan.cli.command import conan_command, OnceArgument, conan_subcommand
6
7
  from conan.cli import make_abs_path
7
8
  from conan.cli.args import common_graph_args, validate_common_graph_args
8
9
  from conan.cli.printers.graph import print_graph_packages, print_graph_basic
10
+ from conan.errors import ConanException
9
11
  from conan.api.model import RecipeReference
10
12
 
11
13
 
@@ -172,3 +174,63 @@ def lock_update(conan_api, parser, subparser, *args):
172
174
  lockfile.update(requires=args.requires, build_requires=args.build_requires,
173
175
  python_requires=args.python_requires, config_requires=args.config_requires)
174
176
  conan_api.lockfile.save_lockfile(lockfile, args.lockfile_out)
177
+
178
+
179
+
180
+
181
+ @conan_subcommand()
182
+ def lock_upgrade(conan_api, parser, subparser, *args):
183
+ """
184
+ (Experimental) Upgrade requires, build-requires or python-requires from an existing lockfile given a conanfile
185
+ or a reference.
186
+ """
187
+
188
+ common_graph_args(subparser)
189
+ subparser.add_argument('--update-requires', action="append", help='Update requires from lockfile')
190
+ subparser.add_argument('--update-build-requires', action="append", help='Update build-requires from lockfile')
191
+ subparser.add_argument('--update-python-requires', action="append", help='Update python-requires from lockfile')
192
+ subparser.add_argument('--update-config-requires', action="append", help='Update config-requires from lockfile')
193
+ subparser.add_argument('--build-require', action='store_true', default=False, help='Whether the provided reference is a build-require')
194
+ args = parser.parse_args(*args)
195
+
196
+ # parameter validation
197
+ validate_common_graph_args(args)
198
+
199
+ if not any([args.update_requires, args.update_build_requires, args.update_python_requires, args.update_config_requires]):
200
+ raise ConanException("At least one of --update-requires, --update-build-requires, "
201
+ "--update-python-requires or --update-config-requires should be specified")
202
+
203
+ cwd = os.getcwd()
204
+ path = conan_api.local.get_conanfile_path(args.path, cwd, py=None) if args.path else None
205
+ remotes = conan_api.remotes.list(args.remote) if not args.no_remote else []
206
+ overrides = eval(args.lockfile_overrides) if args.lockfile_overrides else None
207
+ lockfile = conan_api.lockfile.get_lockfile(lockfile=args.lockfile, conanfile_path=path,
208
+ cwd=cwd, partial=True, overrides=overrides)
209
+ profile_host, profile_build = conan_api.profiles.get_profiles_from_args(args)
210
+
211
+ # Remove the lockfile entries that will be updated
212
+ lockfile = conan_api.lockfile.remove_lockfile(lockfile,
213
+ requires=args.update_requires,
214
+ python_requires=args.update_python_requires,
215
+ build_requires=args.update_build_requires,
216
+ config_requires=args.update_config_requires)
217
+ # Resolve new graph
218
+ if path:
219
+ graph = conan_api.graph.load_graph_consumer(path, args.name, args.version,
220
+ args.user, args.channel,
221
+ profile_host, profile_build, lockfile,
222
+ remotes, args.update,
223
+ is_build_require=args.build_require)
224
+ else:
225
+ graph = conan_api.graph.load_graph_requires(args.requires, args.tool_requires,
226
+ profile_host, profile_build, lockfile,
227
+ remotes, args.update)
228
+ print_graph_basic(graph)
229
+ graph.report_graph_error()
230
+ conan_api.graph.analyze_binaries(graph, args.build, remotes=remotes, update=args.update,
231
+ lockfile=lockfile)
232
+ print_graph_packages(graph)
233
+
234
+ lockfile = conan_api.lockfile.update_lockfile(lockfile, graph, args.lockfile_packages,
235
+ clean=args.lockfile_clean)
236
+ conan_api.lockfile.save_lockfile(lockfile, args.lockfile_out or "conan.lock")
@@ -46,6 +46,7 @@ def new(conan_api, parser, *args):
46
46
  definitions[k] = v
47
47
 
48
48
  files = conan_api.new.get_template(args.template) # First priority: user folder
49
+ is_builtin = False
49
50
  if not files: # then, try the templates in the Conan home
50
51
  files = conan_api.new.get_home_template(args.template)
51
52
  if files:
@@ -53,10 +54,13 @@ def new(conan_api, parser, *args):
53
54
  else:
54
55
  template_files = conan_api.new.get_builtin_template(args.template)
55
56
  non_template_files = {}
57
+ is_builtin = True
56
58
 
57
59
  if not template_files and not non_template_files:
58
60
  raise ConanException("Template doesn't exist or not a folder: {}".format(args.template))
59
61
 
62
+ if is_builtin and args.template == "workspace": # hardcoded for the workspace special case
63
+ definitions["name"] = "liba"
60
64
  template_files = conan_api.new.render(template_files, definitions)
61
65
 
62
66
  # Saving the resulting files
@@ -278,7 +278,7 @@ def print_auth_json(results):
278
278
  @conan_subcommand(formatters={"text": print_auth, "json": print_auth_json})
279
279
  def remote_auth(conan_api, parser, subparser, *args):
280
280
  """
281
- Authenticate in the defined remotes. Use CONAN_LOGIN* and CONAN_PASSWORD* variables if available.
281
+ Authenticate in the defined remotes. Use CONAN_LOGIN_USERNAME* and CONAN_PASSWORD* variables if available.
282
282
  Ask for username and password interactively in case (re-)authentication is required and there are
283
283
  no CONAN_LOGIN* and CONAN_PASSWORD* variables available which could be used.
284
284
  Usually you'd use this method over conan remote login for scripting which needs to run in CI
@@ -288,7 +288,7 @@ def remote_auth(conan_api, parser, subparser, *args):
288
288
  " The pattern uses 'fnmatch' style wildcards.")
289
289
  subparser.add_argument("--with-user", action="store_true",
290
290
  help="Only try to auth in those remotes that already "
291
- "have a username or a CONAN_LOGIN_ env-var defined")
291
+ "have a username or a CONAN_LOGIN_USERNAME* env-var defined")
292
292
  subparser.add_argument("--force", action="store_true",
293
293
  help="Force authentication for anonymous-enabled repositories. "
294
294
  "Can be used for force authentication in case your Artifactory "
@@ -3,6 +3,7 @@ import os
3
3
 
4
4
  from conan.api.conan_api import ConanAPI
5
5
  from conan.api.output import ConanOutput, cli_out_write
6
+ from conan.api.subapi.workspace import WorkspaceAPI
6
7
  from conan.cli import make_abs_path
7
8
  from conan.cli.args import add_reference_args, add_common_install_arguments, add_lockfile_args
8
9
  from conan.cli.command import conan_command, conan_subcommand
@@ -13,7 +14,7 @@ from conan.errors import ConanException
13
14
 
14
15
 
15
16
  @conan_subcommand(formatters={"text": cli_out_write})
16
- def workspace_root(conan_api: ConanAPI, parser, subparser, *args):
17
+ def workspace_root(conan_api: ConanAPI, parser, subparser, *args): # noqa
17
18
  """
18
19
  Return the folder containing the conanws.py/conanws.yml workspace file
19
20
  """
@@ -96,11 +97,10 @@ def _print_workspace_info(data):
96
97
 
97
98
 
98
99
  @conan_subcommand(formatters={"text": _print_workspace_info, "json": print_json})
99
- def workspace_info(conan_api: ConanAPI, parser, subparser, *args):
100
+ def workspace_info(conan_api: ConanAPI, parser, subparser, *args): # noqa
100
101
  """
101
102
  Display info for current workspace
102
103
  """
103
- parser.parse_args(*args)
104
104
  return {"info": conan_api.workspace.info()}
105
105
 
106
106
 
@@ -134,7 +134,7 @@ def workspace_build(conan_api: ConanAPI, parser, subparser, *args):
134
134
  products = [args.path]
135
135
  else: # all products
136
136
  products = conan_api.workspace.products
137
- if products is None:
137
+ if not products:
138
138
  raise ConanException("There are no products defined in the workspace, can't build\n"
139
139
  "You can use 'conan build <path> --build=editable' to build")
140
140
  ConanOutput().title(f"Building workspace products {products}")
@@ -164,8 +164,62 @@ def workspace_build(conan_api: ConanAPI, parser, subparser, *args):
164
164
  conan_api.local.build(conanfile)
165
165
 
166
166
 
167
+ @conan_subcommand()
168
+ def workspace_install(conan_api: ConanAPI, parser, subparser, *args):
169
+ """
170
+ Install the workspace as a monolith, installing only external dependencies to the workspace,
171
+ generating a single result (generators, etc) for the whole workspace.
172
+ """
173
+ subparser.add_argument("-g", "--generator", action="append", help='Generators to use')
174
+ subparser.add_argument("-of", "--output-folder",
175
+ help='The root output folder for generated and build files')
176
+ subparser.add_argument("--envs-generation", default=None, choices=["false"],
177
+ help="Generation strategy for virtual environment files for the root")
178
+ add_common_install_arguments(subparser)
179
+ add_lockfile_args(subparser)
180
+ args = parser.parse_args(*args)
181
+ # Basic collaborators: remotes, lockfile, profiles
182
+ remotes = conan_api.remotes.list(args.remote) if not args.no_remote else []
183
+ overrides = eval(args.lockfile_overrides) if args.lockfile_overrides else None
184
+ # The lockfile by default if not defined will be read from the root workspace folder
185
+ ws_folder = conan_api.workspace.folder()
186
+ lockfile = conan_api.lockfile.get_lockfile(lockfile=args.lockfile, conanfile_path=ws_folder,
187
+ cwd=None,
188
+ partial=args.lockfile_partial, overrides=overrides)
189
+ profile_host, profile_build = conan_api.profiles.get_profiles_from_args(args)
190
+ print_profiles(profile_host, profile_build)
191
+
192
+ conan_api.workspace.info() # FIXME: Just to force error if WS not enabled
193
+ # Build a dependency graph with all editables as requirements
194
+ editables = conan_api.workspace.editable_packages
195
+ requires = [ref for ref in editables]
196
+ if not requires:
197
+ raise ConanException("This workspace cannot be installed, it doesn't have any editable")
198
+ deps_graph = conan_api.graph.load_graph_requires(requires, [],
199
+ profile_host, profile_build, lockfile,
200
+ remotes, args.build, args.update)
201
+ deps_graph.report_graph_error()
202
+ print_graph_basic(deps_graph)
203
+
204
+ # Collapsing the graph
205
+ ws_graph = conan_api.workspace.collapse_editables(deps_graph, profile_host, profile_build)
206
+ ConanOutput().subtitle("Collapsed graph")
207
+ print_graph_basic(ws_graph)
208
+
209
+ conan_api.graph.analyze_binaries(ws_graph, args.build, remotes=remotes, update=args.update,
210
+ lockfile=lockfile)
211
+ print_graph_packages(ws_graph)
212
+ conan_api.install.install_binaries(deps_graph=ws_graph, remotes=remotes)
213
+ output_folder = make_abs_path(args.output_folder) if args.output_folder else None
214
+ conan_api.install.install_consumer(ws_graph, args.generator, ws_folder, output_folder,
215
+ envs_generation=args.envs_generation)
216
+
217
+
167
218
  @conan_command(group="Consumer")
168
- def workspace(conan_api, parser, *args):
219
+ def workspace(conan_api, parser, *args): # noqa
169
220
  """
170
221
  Manage Conan workspaces (group of packages in editable mode)
171
222
  """
223
+ if (WorkspaceAPI.TEST_ENABLED or os.getenv("CONAN_WORKSPACE_ENABLE")) != "will_break_next":
224
+ raise ConanException("Workspace command disabled without CONAN_WORKSPACE_ENABLE env var,"
225
+ "please read the docs about this 'incubating' feature")
@@ -115,12 +115,16 @@ class CPS:
115
115
  self.description = None
116
116
  self.license = None
117
117
  self.website = None
118
+ self.prefix = None
118
119
 
119
120
  def serialize(self):
120
- cps = {"cps_version": "0.12.0",
121
+ cps = {"cps_version": "0.13.0",
121
122
  "name": self.name,
122
123
  "version": self.version}
123
124
 
125
+ if self.prefix is not None:
126
+ cps["prefix"] = self.prefix
127
+
124
128
  # Supplemental
125
129
  for data in "license", "description", "website":
126
130
  if getattr(self, data, None):
@@ -143,6 +147,7 @@ class CPS:
143
147
  def deserialize(data):
144
148
  cps = CPS()
145
149
  cps.name = data.get("name")
150
+ cps.prefix = data.get("prefix")
146
151
  cps.version = data.get("version")
147
152
  cps.license = data.get("license")
148
153
  cps.description = data.get("description")
@@ -157,6 +162,7 @@ class CPS:
157
162
  @staticmethod
158
163
  def from_conan(dep):
159
164
  cps = CPS(dep.ref.name, str(dep.ref.version))
165
+ cps.prefix = dep.package_folder.replace("\\", "/")
160
166
  # supplemental
161
167
  cps.license = dep.license
162
168
  cps.description = dep.description
@@ -11,6 +11,7 @@ from conans.util.files import save, mkdir, chdir
11
11
 
12
12
  _generators = {"CMakeToolchain": "conan.tools.cmake",
13
13
  "CMakeDeps": "conan.tools.cmake",
14
+ "CMakeConfigDeps": "conan.tools.cmake",
14
15
  "MesonToolchain": "conan.tools.meson",
15
16
  "MSBuildDeps": "conan.tools.microsoft",
16
17
  "MSBuildToolchain": "conan.tools.microsoft",
@@ -115,7 +115,7 @@ source_cpp = r"""#include <iostream>
115
115
  void {{package_name}}(){
116
116
  {% if requires is defined -%}
117
117
  {% for require in requires -%}
118
- {{ as_name(require) }}();
118
+ {{ as_name(require).replace(".", "_") }}();
119
119
  {% endfor %}
120
120
  {%- endif %}
121
121