conan 2.17.1__tar.gz → 2.18.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.
- {conan-2.17.1/conan.egg-info → conan-2.18.1}/PKG-INFO +1 -1
- {conan-2.17.1 → conan-2.18.1}/conan/__init__.py +1 -1
- {conan-2.17.1 → conan-2.18.1}/conan/api/conan_api.py +2 -0
- {conan-2.17.1 → conan-2.18.1}/conan/api/output.py +6 -0
- {conan-2.17.1 → conan-2.18.1}/conan/api/subapi/cache.py +8 -0
- {conan-2.17.1 → conan-2.18.1}/conan/api/subapi/command.py +2 -1
- {conan-2.17.1 → conan-2.18.1}/conan/api/subapi/config.py +2 -2
- {conan-2.17.1 → conan-2.18.1}/conan/api/subapi/local.py +3 -1
- {conan-2.17.1 → conan-2.18.1}/conan/api/subapi/new.py +4 -0
- {conan-2.17.1 → conan-2.18.1}/conan/api/subapi/profiles.py +6 -6
- conan-2.18.1/conan/api/subapi/report.py +144 -0
- {conan-2.17.1 → conan-2.18.1}/conan/api/subapi/workspace.py +91 -39
- {conan-2.17.1 → conan-2.18.1}/conan/cli/command.py +3 -0
- {conan-2.17.1 → conan-2.18.1}/conan/cli/commands/audit.py +20 -10
- {conan-2.17.1 → conan-2.18.1}/conan/cli/commands/cache.py +14 -0
- {conan-2.17.1 → conan-2.18.1}/conan/cli/commands/create.py +2 -2
- {conan-2.17.1 → conan-2.18.1}/conan/cli/commands/editable.py +1 -0
- {conan-2.17.1 → conan-2.18.1}/conan/cli/commands/export_pkg.py +1 -1
- {conan-2.17.1 → conan-2.18.1}/conan/cli/commands/profile.py +1 -0
- {conan-2.17.1 → conan-2.18.1}/conan/cli/commands/remote.py +1 -0
- conan-2.18.1/conan/cli/commands/report.py +61 -0
- {conan-2.17.1 → conan-2.18.1}/conan/cli/commands/upload.py +1 -0
- {conan-2.17.1 → conan-2.18.1}/conan/cli/commands/version.py +1 -0
- {conan-2.17.1 → conan-2.18.1}/conan/cli/commands/workspace.py +159 -54
- conan-2.18.1/conan/cli/formatters/report/__init__.py +1 -0
- conan-2.18.1/conan/cli/formatters/report/diff.py +95 -0
- conan-2.18.1/conan/cli/formatters/report/diff_html.py +138 -0
- {conan-2.17.1 → conan-2.18.1}/conan/cli/printers/graph.py +6 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/api/detect/detect_api.py +13 -9
- {conan-2.17.1 → conan-2.18.1}/conan/internal/api/install/generators.py +4 -2
- conan-2.18.1/conan/internal/api/new/premake_exe.py +104 -0
- conan-2.18.1/conan/internal/api/new/premake_lib.py +148 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/api/new/workspace.py +6 -8
- {conan-2.17.1 → conan-2.18.1}/conan/internal/api/profile/profile_loader.py +12 -11
- {conan-2.17.1 → conan-2.18.1}/conan/internal/cache/cache.py +8 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/cache/db/cache_database.py +6 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/cache/db/packages_table.py +13 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/cache/db/recipes_table.py +13 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/cache/integrity_check.py +12 -12
- {conan-2.17.1 → conan-2.18.1}/conan/internal/conan_app.py +1 -1
- {conan-2.17.1 → conan-2.18.1}/conan/internal/default_settings.py +9 -1
- {conan-2.17.1 → conan-2.18.1}/conan/internal/graph/compute_pid.py +4 -4
- {conan-2.17.1 → conan-2.18.1}/conan/internal/graph/graph.py +30 -11
- {conan-2.17.1 → conan-2.18.1}/conan/internal/graph/graph_binaries.py +2 -2
- {conan-2.17.1 → conan-2.18.1}/conan/internal/graph/graph_builder.py +17 -5
- {conan-2.17.1 → conan-2.18.1}/conan/internal/graph/graph_error.py +0 -14
- {conan-2.17.1 → conan-2.18.1}/conan/internal/graph/install_graph.py +9 -6
- {conan-2.17.1 → conan-2.18.1}/conan/internal/graph/installer.py +8 -4
- {conan-2.17.1 → conan-2.18.1}/conan/internal/hook_manager.py +3 -1
- {conan-2.17.1 → conan-2.18.1}/conan/internal/model/conf.py +19 -8
- {conan-2.17.1 → conan-2.18.1}/conan/internal/model/cpp_info.py +21 -2
- {conan-2.17.1 → conan-2.18.1}/conan/internal/model/workspace.py +23 -25
- {conan-2.17.1 → conan-2.18.1}/conan/internal/rest/remote_manager.py +2 -2
- {conan-2.17.1 → conan-2.18.1}/conan/internal/rest/rest_client_local_recipe_index.py +8 -1
- {conan-2.17.1 → conan-2.18.1}/conan/test/utils/file_server.py +1 -1
- {conan-2.17.1 → conan-2.18.1}/conan/test/utils/tools.py +17 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/apple/apple.py +0 -6
- {conan-2.17.1 → conan-2.18.1}/conan/tools/apple/xcodedeps.py +0 -1
- {conan-2.17.1 → conan-2.18.1}/conan/tools/apple/xcodetoolchain.py +13 -5
- {conan-2.17.1 → conan-2.18.1}/conan/tools/build/cppstd.py +18 -1
- {conan-2.17.1 → conan-2.18.1}/conan/tools/build/cstd.py +16 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/build/flags.py +35 -5
- {conan-2.17.1 → conan-2.18.1}/conan/tools/cmake/cmake.py +12 -2
- {conan-2.17.1 → conan-2.18.1}/conan/tools/cmake/cmakedeps/templates/macros.py +17 -2
- {conan-2.17.1 → conan-2.18.1}/conan/tools/cmake/cmakedeps2/target_configuration.py +15 -4
- {conan-2.17.1 → conan-2.18.1}/conan/tools/cmake/cmakedeps2/targets.py +1 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/cmake/presets.py +4 -1
- {conan-2.17.1 → conan-2.18.1}/conan/tools/cmake/toolchain/blocks.py +42 -7
- {conan-2.17.1 → conan-2.18.1}/conan/tools/gnu/autotoolstoolchain.py +23 -6
- {conan-2.17.1 → conan-2.18.1}/conan/tools/gnu/get_gnu_triplet.py +1 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/gnu/gnutoolchain.py +22 -6
- {conan-2.17.1 → conan-2.18.1}/conan/tools/gnu/pkgconfigdeps.py +2 -1
- conan-2.18.1/conan/tools/google/bazeldeps.py +547 -0
- conan-2.18.1/conan/tools/layout/__init__.py +16 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/meson/helpers.py +2 -1
- {conan-2.17.1 → conan-2.18.1}/conan/tools/meson/meson.py +2 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/meson/toolchain.py +24 -13
- {conan-2.17.1 → conan-2.18.1}/conan/tools/microsoft/msbuilddeps.py +11 -3
- conan-2.18.1/conan/tools/premake/__init__.py +3 -0
- conan-2.18.1/conan/tools/premake/constants.py +33 -0
- conan-2.18.1/conan/tools/premake/premake.py +119 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/premake/premakedeps.py +7 -10
- conan-2.18.1/conan/tools/premake/toolchain.py +296 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/qbs/common.py +2 -1
- {conan-2.17.1 → conan-2.18.1}/conan/tools/sbom/cyclonedx.py +6 -6
- {conan-2.17.1 → conan-2.18.1}/conan/tools/scm/git.py +3 -0
- {conan-2.17.1 → conan-2.18.1/conan.egg-info}/PKG-INFO +1 -1
- {conan-2.17.1 → conan-2.18.1}/conan.egg-info/SOURCES.txt +9 -0
- conan-2.17.1/conan/tools/google/bazeldeps.py +0 -644
- conan-2.17.1/conan/tools/layout/__init__.py +0 -13
- conan-2.17.1/conan/tools/premake/__init__.py +0 -2
- conan-2.17.1/conan/tools/premake/premake.py +0 -40
- {conan-2.17.1 → conan-2.18.1}/LICENSE.md +0 -0
- {conan-2.17.1 → conan-2.18.1}/MANIFEST.in +0 -0
- {conan-2.17.1 → conan-2.18.1}/README.md +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/api/__init__.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/api/input.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/api/model/__init__.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/api/model/list.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/api/model/refs.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/api/model/remote.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/api/subapi/__init__.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/api/subapi/audit.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/api/subapi/download.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/api/subapi/export.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/api/subapi/graph.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/api/subapi/install.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/api/subapi/list.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/api/subapi/lockfile.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/api/subapi/remotes.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/api/subapi/remove.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/api/subapi/search.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/api/subapi/upload.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/cli/__init__.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/cli/args.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/cli/cli.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/cli/commands/__init__.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/cli/commands/build.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/cli/commands/config.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/cli/commands/download.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/cli/commands/export.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/cli/commands/graph.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/cli/commands/inspect.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/cli/commands/install.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/cli/commands/list.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/cli/commands/lock.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/cli/commands/new.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/cli/commands/pkglist.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/cli/commands/remove.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/cli/commands/search.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/cli/commands/source.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/cli/commands/test.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/cli/exit_codes.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/cli/formatters/__init__.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/cli/formatters/audit/__init__.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/cli/formatters/audit/vulnerabilities.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/cli/formatters/graph/__init__.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/cli/formatters/graph/build_order_html.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/cli/formatters/graph/graph.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/cli/formatters/graph/graph_info_text.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/cli/formatters/graph/info_graph_dot.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/cli/formatters/graph/info_graph_html.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/cli/formatters/list/__init__.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/cli/formatters/list/list.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/cli/formatters/list/search_table_html.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/cli/printers/__init__.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/cps/__init__.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/cps/cps.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/errors.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/__init__.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/api/__init__.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/api/audit/__init__.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/api/audit/providers.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/api/config/__init__.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/api/config/config_installer.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/api/detect/__init__.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/api/detect/detect_vs.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/api/export.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/api/install/__init__.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/api/list/__init__.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/api/list/query_parse.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/api/local/__init__.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/api/local/editable.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/api/migrations.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/api/new/__init__.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/api/new/alias_new.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/api/new/autoools_exe.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/api/new/autotools_lib.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/api/new/basic.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/api/new/bazel_7_exe.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/api/new/bazel_7_lib.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/api/new/bazel_exe.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/api/new/bazel_lib.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/api/new/cmake_exe.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/api/new/cmake_lib.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/api/new/header_lib.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/api/new/local_recipes_index.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/api/new/meson_exe.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/api/new/meson_lib.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/api/new/msbuild_exe.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/api/new/msbuild_lib.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/api/new/qbs_lib.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/api/profile/__init__.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/api/profile/detect.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/api/remotes/__init__.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/api/remotes/encrypt.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/api/remotes/localdb.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/api/upload.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/api/uploader.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/cache/__init__.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/cache/conan_reference_layout.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/cache/db/__init__.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/cache/db/table.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/cache/home_paths.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/deploy.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/errors.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/graph/__init__.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/graph/build_mode.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/graph/compatibility.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/graph/profile_node_definer.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/graph/provides.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/graph/proxy.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/graph/python_requires.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/graph/range_resolver.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/internal_tools.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/loader.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/methods.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/model/__init__.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/model/conan_file.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/model/conanfile_interface.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/model/dependencies.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/model/info.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/model/layout.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/model/lockfile.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/model/manifest.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/model/options.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/model/pkg_type.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/model/profile.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/model/recipe_ref.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/model/requires.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/model/settings.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/model/version.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/model/version_range.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/paths.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/rest/__init__.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/rest/auth_manager.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/rest/caching_file_downloader.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/rest/client_routes.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/rest/conan_requester.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/rest/download_cache.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/rest/file_downloader.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/rest/file_uploader.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/rest/pkg_sign.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/rest/remote_credentials.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/rest/rest_client.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/rest/rest_client_v2.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/rest/rest_routes.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/runner/__init__.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/runner/docker.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/runner/output.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/runner/ssh.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/runner/wsl.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/source.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/subsystems.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/util/__init__.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/util/config_parser.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/util/dates.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/util/files.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/internal/util/runners.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/test/__init__.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/test/assets/__init__.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/test/assets/autotools.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/test/assets/cmake.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/test/assets/genconanfile.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/test/assets/sources.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/test/assets/visual_project_files.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/test/utils/__init__.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/test/utils/artifactory.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/test/utils/env.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/test/utils/mocks.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/test/utils/profiles.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/test/utils/scm.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/test/utils/server_launcher.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/test/utils/test_files.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/__init__.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/android/__init__.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/android/utils.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/apple/__init__.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/apple/xcodebuild.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/build/__init__.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/build/cpu.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/build/cross_building.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/build/stdcpp_library.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/cmake/__init__.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/cmake/cmakedeps/__init__.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/cmake/cmakedeps/cmakedeps.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/cmake/cmakedeps/templates/__init__.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/cmake/cmakedeps/templates/config.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/cmake/cmakedeps/templates/config_version.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/cmake/cmakedeps/templates/target_configuration.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/cmake/cmakedeps/templates/target_data.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/cmake/cmakedeps/templates/targets.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/cmake/cmakedeps2/__init__.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/cmake/cmakedeps2/cmakedeps.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/cmake/cmakedeps2/config.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/cmake/cmakedeps2/config_version.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/cmake/layout.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/cmake/toolchain/__init__.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/cmake/toolchain/toolchain.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/cmake/utils.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/cps/__init__.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/cps/cps_deps.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/env/__init__.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/env/environment.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/env/virtualbuildenv.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/env/virtualrunenv.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/files/__init__.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/files/conandata.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/files/copy_pattern.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/files/files.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/files/packager.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/files/patches.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/files/symlinks/__init__.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/files/symlinks/symlinks.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/gnu/__init__.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/gnu/autotools.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/gnu/autotoolsdeps.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/gnu/gnudeps_flags.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/gnu/makedeps.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/gnu/pkgconfig.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/google/__init__.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/google/bazel.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/google/layout.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/google/toolchain.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/intel/__init__.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/intel/intel_cc.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/meson/__init__.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/microsoft/__init__.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/microsoft/layout.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/microsoft/msbuild.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/microsoft/nmakedeps.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/microsoft/nmaketoolchain.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/microsoft/subsystems.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/microsoft/toolchain.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/microsoft/visual.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/qbs/__init__.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/qbs/qbs.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/qbs/qbsdeps.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/qbs/qbsprofile.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/ros/__init__.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/ros/rosenv.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/sbom/__init__.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/sbom/spdx_licenses.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/scm/__init__.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/scons/__init__.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/scons/sconsdeps.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/system/__init__.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan/tools/system/package_manager.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan.egg-info/dependency_links.txt +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan.egg-info/entry_points.txt +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan.egg-info/requires.txt +0 -0
- {conan-2.17.1 → conan-2.18.1}/conan.egg-info/top_level.txt +0 -0
- {conan-2.17.1 → conan-2.18.1}/conans/__init__.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conans/conan.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conans/conan_server.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conans/migrations.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conans/model/__init__.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conans/model/package_ref.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conans/model/recipe_ref.py +0 -0
- {conan-2.17.1 → conan-2.18.1}/conans/requirements.txt +0 -0
- {conan-2.17.1 → conan-2.18.1}/conans/requirements_dev.txt +0 -0
- {conan-2.17.1 → conan-2.18.1}/conans/requirements_runner.txt +0 -0
- {conan-2.17.1 → conan-2.18.1}/conans/requirements_server.txt +0 -0
- {conan-2.17.1 → conan-2.18.1}/pyproject.toml +0 -0
- {conan-2.17.1 → conan-2.18.1}/setup.cfg +0 -0
- {conan-2.17.1 → conan-2.18.1}/setup.py +0 -0
|
@@ -7,6 +7,7 @@ from conan.api.subapi.cache import CacheAPI
|
|
|
7
7
|
from conan.api.subapi.command import CommandAPI
|
|
8
8
|
from conan.api.subapi.local import LocalAPI
|
|
9
9
|
from conan.api.subapi.lockfile import LockfileAPI
|
|
10
|
+
from conan.api.subapi.report import ReportAPI
|
|
10
11
|
from conan.api.subapi.workspace import WorkspaceAPI
|
|
11
12
|
from conan.api.subapi.config import ConfigAPI
|
|
12
13
|
from conan.api.subapi.download import DownloadAPI
|
|
@@ -72,6 +73,7 @@ class ConanAPI:
|
|
|
72
73
|
self.audit = AuditAPI(self)
|
|
73
74
|
# Now, lazy loading of editables
|
|
74
75
|
self.workspace = WorkspaceAPI(self)
|
|
76
|
+
self.report = ReportAPI(self)
|
|
75
77
|
|
|
76
78
|
_check_conan_version(self)
|
|
77
79
|
|
|
@@ -175,6 +175,12 @@ class ConanOutput:
|
|
|
175
175
|
|
|
176
176
|
return self
|
|
177
177
|
|
|
178
|
+
def box(self, msg):
|
|
179
|
+
color = Color.BRIGHT_GREEN
|
|
180
|
+
self.writeln("\n**************************************************", fg=color)
|
|
181
|
+
self.writeln(f'*{msg: ^48}*', fg=color)
|
|
182
|
+
self.writeln(f"**************************************************\n", fg=color)
|
|
183
|
+
|
|
178
184
|
def _write_message(self, msg, fg=None, bg=None, newline=True):
|
|
179
185
|
if isinstance(msg, dict):
|
|
180
186
|
# For traces we can receive a dict already, we try to transform then into more natural
|
|
@@ -259,6 +259,14 @@ class CacheAPI:
|
|
|
259
259
|
download_cache = DownloadCache(download_cache_path)
|
|
260
260
|
return download_cache.get_backup_sources_files(excluded_urls, package_list, only_upload)
|
|
261
261
|
|
|
262
|
+
def path_to_ref(self, path):
|
|
263
|
+
cache = PkgCache(self.conan_api.cache_folder, self.conan_api.config.global_conf)
|
|
264
|
+
result = cache.path_to_ref(path)
|
|
265
|
+
if result is None:
|
|
266
|
+
base, folder = os.path.split(path)
|
|
267
|
+
result = cache.path_to_ref(base)
|
|
268
|
+
return result
|
|
269
|
+
|
|
262
270
|
|
|
263
271
|
def _resolve_latest_ref(cache, ref):
|
|
264
272
|
if ref.revision is None or ref.revision == "latest":
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import os
|
|
2
|
+
import shlex
|
|
2
3
|
|
|
3
4
|
from conan.api.output import ConanOutput
|
|
4
5
|
from conan.errors import ConanException
|
|
@@ -12,7 +13,7 @@ class CommandAPI:
|
|
|
12
13
|
|
|
13
14
|
def run(self, cmd):
|
|
14
15
|
if isinstance(cmd, str):
|
|
15
|
-
cmd =
|
|
16
|
+
cmd = shlex.split(cmd)
|
|
16
17
|
if isinstance(cmd, list):
|
|
17
18
|
current_cmd = cmd[0]
|
|
18
19
|
args = cmd[1:]
|
|
@@ -66,11 +66,11 @@ class ConfigAPI:
|
|
|
66
66
|
|
|
67
67
|
# Basic checks of the package: correct package_type and no-dependencies
|
|
68
68
|
deps_graph.report_graph_error()
|
|
69
|
-
pkg = deps_graph.root.
|
|
69
|
+
pkg = deps_graph.root.edges[0].dst
|
|
70
70
|
ConanOutput().info(f"Configuration from package: {pkg}")
|
|
71
71
|
if pkg.conanfile.package_type is not PackageType.CONF:
|
|
72
72
|
raise ConanException(f'{pkg.conanfile} is not of package_type="configuration"')
|
|
73
|
-
if pkg.
|
|
73
|
+
if pkg.edges:
|
|
74
74
|
raise ConanException(f"Configuration package {pkg.ref} cannot have dependencies")
|
|
75
75
|
|
|
76
76
|
# The computation of the "package_id" and the download of the package is done as usual
|
|
@@ -82,7 +82,9 @@ class LocalAPI:
|
|
|
82
82
|
with conanfile_exception_formatter(conanfile, "layout"):
|
|
83
83
|
conanfile.layout()
|
|
84
84
|
|
|
85
|
-
folder = conanfile.recipe_folder
|
|
85
|
+
folder = conanfile.recipe_folder if conanfile.folders.root is None else \
|
|
86
|
+
os.path.normpath(os.path.join(conanfile.recipe_folder, conanfile.folders.root))
|
|
87
|
+
|
|
86
88
|
conanfile.folders.set_base_source(folder)
|
|
87
89
|
conanfile.folders.set_base_export_sources(folder)
|
|
88
90
|
conanfile.folders.set_base_recipe_metadata(os.path.join(folder, "metadata"))
|
|
@@ -96,6 +96,8 @@ class NewAPI:
|
|
|
96
96
|
from conan.internal.api.new.bazel_7_exe import bazel_exe_files_7
|
|
97
97
|
from conan.internal.api.new.autotools_lib import autotools_lib_files
|
|
98
98
|
from conan.internal.api.new.autoools_exe import autotools_exe_files
|
|
99
|
+
from conan.internal.api.new.premake_lib import premake_lib_files
|
|
100
|
+
from conan.internal.api.new.premake_exe import premake_exe_files
|
|
99
101
|
from conan.internal.api.new.local_recipes_index import local_recipes_index_files
|
|
100
102
|
from conan.internal.api.new.qbs_lib import qbs_lib_files
|
|
101
103
|
from conan.internal.api.new.workspace import workspace_files
|
|
@@ -114,6 +116,8 @@ class NewAPI:
|
|
|
114
116
|
"bazel_7_exe": bazel_exe_files_7,
|
|
115
117
|
"autotools_lib": autotools_lib_files,
|
|
116
118
|
"autotools_exe": autotools_exe_files,
|
|
119
|
+
"premake_lib": premake_lib_files,
|
|
120
|
+
"premake_exe": premake_exe_files,
|
|
117
121
|
"alias": alias_file,
|
|
118
122
|
"local_recipes_index": local_recipes_index_files,
|
|
119
123
|
"qbs_lib": qbs_lib_files,
|
|
@@ -64,12 +64,12 @@ class ProfilesAPI:
|
|
|
64
64
|
cwd = os.getcwd()
|
|
65
65
|
profile_build = self._get_profile(build_profiles, args.settings_build, args.options_build,
|
|
66
66
|
args.conf_build, cwd, cache_settings,
|
|
67
|
-
profile_plugin, global_conf)
|
|
67
|
+
profile_plugin, global_conf, context="build")
|
|
68
68
|
profile_host = self._get_profile(host_profiles, args.settings_host, args.options_host, args.conf_host,
|
|
69
|
-
cwd, cache_settings, profile_plugin, global_conf)
|
|
69
|
+
cwd, cache_settings, profile_plugin, global_conf, context="host")
|
|
70
70
|
return profile_host, profile_build
|
|
71
71
|
|
|
72
|
-
def get_profile(self, profiles, settings=None, options=None, conf=None, cwd=None):
|
|
72
|
+
def get_profile(self, profiles, settings=None, options=None, conf=None, cwd=None, context=None):
|
|
73
73
|
""" Computes a Profile as the result of aggregating all the user arguments, first it
|
|
74
74
|
loads the "profiles", composing them in order (last profile has priority), and
|
|
75
75
|
finally adding the individual settings, options (priority over the profiles)
|
|
@@ -81,13 +81,13 @@ class ProfilesAPI:
|
|
|
81
81
|
profile_plugin = self._load_profile_plugin()
|
|
82
82
|
|
|
83
83
|
profile = self._get_profile(profiles, settings, options, conf, cwd, cache_settings,
|
|
84
|
-
profile_plugin, global_conf)
|
|
84
|
+
profile_plugin, global_conf, context=context)
|
|
85
85
|
return profile
|
|
86
86
|
|
|
87
87
|
def _get_profile(self, profiles, settings, options, conf, cwd, cache_settings,
|
|
88
|
-
profile_plugin, global_conf):
|
|
88
|
+
profile_plugin, global_conf, context):
|
|
89
89
|
loader = ProfileLoader(self._conan_api.cache_folder)
|
|
90
|
-
profile = loader.from_cli_args(profiles, settings, options, conf, cwd)
|
|
90
|
+
profile = loader.from_cli_args(profiles, settings, options, conf, cwd, context)
|
|
91
91
|
if profile_plugin is not None:
|
|
92
92
|
try:
|
|
93
93
|
profile_plugin(profile)
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import base64
|
|
2
|
+
import os
|
|
3
|
+
from io import StringIO
|
|
4
|
+
|
|
5
|
+
from conan.api.output import ConanOutput
|
|
6
|
+
from conan.errors import ConanException
|
|
7
|
+
from conan.api.model import RecipeReference
|
|
8
|
+
from conan.internal.conan_app import ConanApp
|
|
9
|
+
from conan.internal.errors import conanfile_exception_formatter
|
|
10
|
+
from conan.internal.graph.graph import CONTEXT_HOST
|
|
11
|
+
from conan.internal.graph.profile_node_definer import initialize_conanfile_profile
|
|
12
|
+
from conan.internal.source import config_source
|
|
13
|
+
from conan.internal.util.runners import conan_run
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class ReportAPI:
|
|
17
|
+
def __init__(self, conan_api):
|
|
18
|
+
self.conan_api = conan_api
|
|
19
|
+
|
|
20
|
+
def diff(self, old_reference, new_reference, remotes, old_path=None, new_path=None, cwd=None):
|
|
21
|
+
"""
|
|
22
|
+
Compare two recipes and return the differences.
|
|
23
|
+
:param old_reference: The reference of the old recipe.
|
|
24
|
+
:param new_reference: The reference of the new recipe.
|
|
25
|
+
:param remotes: List of remotes to search for the recipes.
|
|
26
|
+
:param old_path: Optional path to the old recipe's conanfile.py.
|
|
27
|
+
:param new_path: Optional path to the new recipe's conanfile.py.
|
|
28
|
+
:param cwd: Current working directory, used to resolve paths.
|
|
29
|
+
:return: A dictionary with the differences between the two recipes.
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
def _source(path_to_conanfile, reference):
|
|
33
|
+
if path_to_conanfile is None:
|
|
34
|
+
export_ref, cache_path = _get_ref_from_cache_or_remote(self.conan_api, reference, remotes)
|
|
35
|
+
else:
|
|
36
|
+
export_ref, cache_path = _export_recipe_from_path(self.conan_api, path_to_conanfile,
|
|
37
|
+
reference, remotes, cwd)
|
|
38
|
+
exported_path = self.conan_api.local.get_conanfile_path(cache_path, cwd, py=True)
|
|
39
|
+
_configure_source(self.conan_api, exported_path, export_ref, remotes)
|
|
40
|
+
return export_ref, cache_path
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
old_export_ref, old_cache_path = _source(old_path, old_reference)
|
|
44
|
+
new_export_ref, new_cache_path = _source(new_path, new_reference)
|
|
45
|
+
|
|
46
|
+
old_diff_path = os.path.abspath(os.path.join(old_cache_path, os.path.pardir)).replace("\\",
|
|
47
|
+
"/")
|
|
48
|
+
new_diff_path = os.path.abspath(os.path.join(new_cache_path, os.path.pardir)).replace("\\",
|
|
49
|
+
"/")
|
|
50
|
+
|
|
51
|
+
src_prefix = base64.b64encode(str(new_export_ref.repr_notime()).encode()).decode() + "/"
|
|
52
|
+
dst_prefix = base64.b64encode(str(old_export_ref.repr_notime()).encode()).decode() + "/"
|
|
53
|
+
|
|
54
|
+
command = (f'git diff --no-index --src-prefix "{src_prefix}" --dst-prefix "{dst_prefix}" '
|
|
55
|
+
f'"{old_diff_path}" "{new_diff_path}"')
|
|
56
|
+
|
|
57
|
+
ConanOutput().info(
|
|
58
|
+
f"Generating diff from {old_export_ref.repr_notime()} to {new_export_ref.repr_notime()} (this might take a while)")
|
|
59
|
+
ConanOutput().info(command)
|
|
60
|
+
|
|
61
|
+
stdout, stderr = StringIO(), StringIO()
|
|
62
|
+
conan_run(command, stdout=stdout, stderr=stderr)
|
|
63
|
+
diff = stdout.getvalue()
|
|
64
|
+
|
|
65
|
+
if old_path:
|
|
66
|
+
self.conan_api.remove.recipe(old_export_ref)
|
|
67
|
+
if new_path:
|
|
68
|
+
self.conan_api.remove.recipe(new_export_ref)
|
|
69
|
+
|
|
70
|
+
return {
|
|
71
|
+
"diff": diff,
|
|
72
|
+
"old_export_ref": old_export_ref,
|
|
73
|
+
"new_export_ref": new_export_ref,
|
|
74
|
+
"old_cache_path": old_diff_path,
|
|
75
|
+
"new_cache_path": new_diff_path,
|
|
76
|
+
"src_prefix": src_prefix,
|
|
77
|
+
"dst_prefix": dst_prefix,
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
def _configure_source(conan_api, conanfile_path, ref, remotes):
|
|
81
|
+
app = ConanApp(conan_api)
|
|
82
|
+
conanfile = app.loader.load_consumer(conanfile_path, name=ref.name, version=str(ref.version),
|
|
83
|
+
user=ref.user, channel=ref.channel, graph_lock=None,
|
|
84
|
+
remotes=remotes)
|
|
85
|
+
# This profile is empty, but with the conf from global.conf
|
|
86
|
+
profile = conan_api.profiles.get_profile([])
|
|
87
|
+
initialize_conanfile_profile(conanfile, profile, profile, CONTEXT_HOST, False)
|
|
88
|
+
# This is important, otherwise the ``conan source`` doesn't define layout and fails
|
|
89
|
+
if hasattr(conanfile, "layout"):
|
|
90
|
+
with conanfile_exception_formatter(conanfile, "layout"):
|
|
91
|
+
conanfile.layout()
|
|
92
|
+
|
|
93
|
+
recipe_layout = app.cache.recipe_layout(ref)
|
|
94
|
+
export_source_folder = recipe_layout.export_sources()
|
|
95
|
+
source_folder = recipe_layout.source()
|
|
96
|
+
|
|
97
|
+
conanfile.folders.set_base_source(source_folder)
|
|
98
|
+
conanfile.folders.set_base_export_sources(export_source_folder)
|
|
99
|
+
conanfile.folders.set_base_recipe_metadata(recipe_layout.metadata())
|
|
100
|
+
config_source(export_source_folder, conanfile, conan_api.config.hook_manager)
|
|
101
|
+
|
|
102
|
+
def _get_ref_from_cache_or_remote(conan_api, reference, enabled_remotes):
|
|
103
|
+
ref = RecipeReference.loads(reference)
|
|
104
|
+
full_ref, matching_remote = None, False
|
|
105
|
+
# The first remote is None, which means local cache for the list subapi methods
|
|
106
|
+
for remote in [None] + enabled_remotes:
|
|
107
|
+
if ref.revision:
|
|
108
|
+
no_rrev_ref = RecipeReference.loads(reference)
|
|
109
|
+
no_rrev_ref.revision = None
|
|
110
|
+
try:
|
|
111
|
+
remote_revisions = conan_api.list.recipe_revisions(no_rrev_ref, remote)
|
|
112
|
+
if ref in remote_revisions:
|
|
113
|
+
full_ref = ref
|
|
114
|
+
matching_remote = remote
|
|
115
|
+
break
|
|
116
|
+
except:
|
|
117
|
+
continue
|
|
118
|
+
else:
|
|
119
|
+
try:
|
|
120
|
+
latest_recipe_revision = conan_api.list.latest_recipe_revision(ref, remote)
|
|
121
|
+
except:
|
|
122
|
+
continue
|
|
123
|
+
if full_ref is None or (latest_recipe_revision.timestamp > full_ref.timestamp):
|
|
124
|
+
full_ref = latest_recipe_revision
|
|
125
|
+
matching_remote = remote
|
|
126
|
+
if full_ref is None or matching_remote is False:
|
|
127
|
+
raise ConanException(f"No matching reference for {reference} in remotes.\n"
|
|
128
|
+
"If you want to check against a local recipe, add an additional --{old,new}-path arg.\n")
|
|
129
|
+
if matching_remote is not None:
|
|
130
|
+
conan_api.download.recipe(full_ref, matching_remote)
|
|
131
|
+
cache_path = conan_api.cache.export_path(full_ref)
|
|
132
|
+
return full_ref, cache_path
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
def _export_recipe_from_path(conan_api, path_to_conanfile, reference, enabled_remotes, cwd=None):
|
|
136
|
+
path = conan_api.local.get_conanfile_path(path_to_conanfile, cwd, py=True)
|
|
137
|
+
ref = RecipeReference.loads(reference)
|
|
138
|
+
export_ref, conanfile = conan_api.export.export(path=path,
|
|
139
|
+
name=ref.name, version=str(ref.version),
|
|
140
|
+
user=ref.user, channel=ref.channel,
|
|
141
|
+
lockfile=None,
|
|
142
|
+
remotes=enabled_remotes)
|
|
143
|
+
cache_path = conan_api.cache.export_path(export_ref)
|
|
144
|
+
return export_ref, cache_path
|
|
@@ -8,8 +8,10 @@ from conan import ConanFile
|
|
|
8
8
|
from conan.api.model import RecipeReference
|
|
9
9
|
from conan.api.output import ConanOutput
|
|
10
10
|
from conan.cli import make_abs_path
|
|
11
|
+
from conan.cli.printers.graph import print_graph_basic, print_graph_packages
|
|
11
12
|
from conan.errors import ConanException
|
|
12
13
|
from conan.internal.conan_app import ConanApp
|
|
14
|
+
from conan.internal.graph.install_graph import ProfileArgs
|
|
13
15
|
from conan.internal.model.workspace import Workspace, WORKSPACE_YML, WORKSPACE_PY, WORKSPACE_FOLDER
|
|
14
16
|
from conan.tools.scm import Git
|
|
15
17
|
from conan.internal.graph.graph import RECIPE_EDITABLE, DepsGraph, CONTEXT_HOST, RECIPE_VIRTUAL, Node, \
|
|
@@ -74,6 +76,7 @@ class WorkspaceAPI:
|
|
|
74
76
|
TEST_ENABLED = False
|
|
75
77
|
|
|
76
78
|
def __init__(self, conan_api):
|
|
79
|
+
self._enabled = True
|
|
77
80
|
self._conan_api = conan_api
|
|
78
81
|
self._folder = _find_ws_folder()
|
|
79
82
|
if self._folder:
|
|
@@ -85,6 +88,9 @@ class WorkspaceAPI:
|
|
|
85
88
|
ConanOutput().warning(f"Workspace is a dev-only feature, exclusively for testing")
|
|
86
89
|
self._ws = _load_workspace(self._folder, conan_api) # Error if not loading
|
|
87
90
|
|
|
91
|
+
def enable(self, value):
|
|
92
|
+
self._enabled = value
|
|
93
|
+
|
|
88
94
|
@property
|
|
89
95
|
def name(self):
|
|
90
96
|
self._check_ws()
|
|
@@ -94,41 +100,42 @@ class WorkspaceAPI:
|
|
|
94
100
|
"""
|
|
95
101
|
@return: the current workspace folder where the conanws.yml or conanws.py is located
|
|
96
102
|
"""
|
|
103
|
+
self._check_ws()
|
|
97
104
|
return self._folder
|
|
98
105
|
|
|
99
|
-
|
|
100
|
-
def editable_packages(self):
|
|
106
|
+
def packages(self):
|
|
101
107
|
"""
|
|
102
108
|
@return: Returns {RecipeReference: {"path": full abs-path, "output_folder": abs-path}}
|
|
103
109
|
"""
|
|
104
|
-
if not self._folder:
|
|
110
|
+
if not self._folder or not self._enabled:
|
|
105
111
|
return
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
path = os.path.normpath(os.path.join(self._folder,
|
|
112
|
+
packages = {}
|
|
113
|
+
for editable_info in self._ws.packages():
|
|
114
|
+
rel_path = editable_info["path"]
|
|
115
|
+
path = os.path.normpath(os.path.join(self._folder, rel_path, "conanfile.py"))
|
|
110
116
|
if not os.path.isfile(path):
|
|
111
117
|
raise ConanException(f"Workspace editable not found: {path}")
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
118
|
+
ref = editable_info.get("ref")
|
|
119
|
+
try:
|
|
120
|
+
if ref is None:
|
|
121
|
+
conanfile = self._ws.load_conanfile(rel_path)
|
|
122
|
+
reference = RecipeReference(name=conanfile.name, version=conanfile.version,
|
|
123
|
+
user=conanfile.user, channel=conanfile.channel)
|
|
124
|
+
else:
|
|
125
|
+
reference = RecipeReference.loads(ref)
|
|
126
|
+
reference.validate_ref(reference)
|
|
127
|
+
except:
|
|
128
|
+
raise ConanException(f"Workspace editable reference could not be deduced by"
|
|
129
|
+
f" {rel_path}/conanfile.py or it is not"
|
|
130
|
+
f" correctly defined in the conanws.yml file.")
|
|
131
|
+
if reference in packages:
|
|
132
|
+
raise ConanException(f"Workspace editable reference '{str(reference)}' already exists.")
|
|
133
|
+
packages[reference] = {"path": path}
|
|
134
|
+
if editable_info.get("output_folder"):
|
|
135
|
+
packages[reference]["output_folder"] = (
|
|
136
|
+
os.path.normpath(os.path.join(self._folder, editable_info["output_folder"]))
|
|
137
|
+
)
|
|
138
|
+
return packages
|
|
132
139
|
|
|
133
140
|
def open(self, require, remotes, cwd=None):
|
|
134
141
|
app = ConanApp(self._conan_api)
|
|
@@ -167,7 +174,7 @@ class WorkspaceAPI:
|
|
|
167
174
|
f"'{WORKSPACE_PY}' or '{WORKSPACE_YML}' file")
|
|
168
175
|
|
|
169
176
|
def add(self, path, name=None, version=None, user=None, channel=None, cwd=None,
|
|
170
|
-
output_folder=None, remotes=None
|
|
177
|
+
output_folder=None, remotes=None):
|
|
171
178
|
"""
|
|
172
179
|
Add a new editable package to the current workspace (the current workspace must exist)
|
|
173
180
|
@param path: The path to the folder containing the conanfile.py that defines the package
|
|
@@ -178,7 +185,6 @@ class WorkspaceAPI:
|
|
|
178
185
|
@param cwd:
|
|
179
186
|
@param output_folder:
|
|
180
187
|
@param remotes:
|
|
181
|
-
@param product:
|
|
182
188
|
@return: The reference of the added package
|
|
183
189
|
"""
|
|
184
190
|
self._check_ws()
|
|
@@ -191,7 +197,7 @@ class WorkspaceAPI:
|
|
|
191
197
|
ref.validate_ref()
|
|
192
198
|
output_folder = make_abs_path(output_folder) if output_folder else None
|
|
193
199
|
# Check the conanfile is there, and name/version matches
|
|
194
|
-
self._ws.add(ref, full_path, output_folder
|
|
200
|
+
self._ws.add(ref, full_path, output_folder)
|
|
195
201
|
return ref
|
|
196
202
|
|
|
197
203
|
@staticmethod
|
|
@@ -230,17 +236,10 @@ class WorkspaceAPI:
|
|
|
230
236
|
self._check_ws()
|
|
231
237
|
return {"name": self.name,
|
|
232
238
|
"folder": self._folder,
|
|
233
|
-
"products": self.products,
|
|
234
239
|
"packages": self._ws.packages()}
|
|
235
240
|
|
|
236
|
-
def
|
|
237
|
-
|
|
238
|
-
for ref, info in editables.items():
|
|
239
|
-
if info["path"].replace("\\", "/") == path:
|
|
240
|
-
return RecipeReference.loads(ref)
|
|
241
|
-
|
|
242
|
-
def collapse_editables(self, deps_graph, profile_host, profile_build):
|
|
243
|
-
ConanOutput().title("Collapsing workspace editables")
|
|
241
|
+
def super_build_graph(self, deps_graph, profile_host, profile_build):
|
|
242
|
+
ConanOutput().title("Collapsing workspace packages")
|
|
244
243
|
|
|
245
244
|
root_class = self._ws.root_conanfile()
|
|
246
245
|
if root_class is not None:
|
|
@@ -282,3 +281,56 @@ class WorkspaceAPI:
|
|
|
282
281
|
result.add_edge(root, t.node, r)
|
|
283
282
|
|
|
284
283
|
return result
|
|
284
|
+
|
|
285
|
+
def export(self, lockfile=None, remotes=None):
|
|
286
|
+
self._check_ws()
|
|
287
|
+
exported = []
|
|
288
|
+
for ref, info in self.packages().items():
|
|
289
|
+
exported_ref = self._conan_api.export.export(info["path"], ref.name, str(ref.version),
|
|
290
|
+
ref.user, ref.channel,
|
|
291
|
+
lockfile=lockfile, remotes=remotes)
|
|
292
|
+
ref, _ = exported_ref
|
|
293
|
+
exported.append(ref)
|
|
294
|
+
return exported
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
def select_packages(self, packages):
|
|
298
|
+
self._check_ws()
|
|
299
|
+
editable = self.packages()
|
|
300
|
+
packages = packages or []
|
|
301
|
+
selected_editables = {}
|
|
302
|
+
for ref, info in editable.items():
|
|
303
|
+
if packages and not any(ref.matches(p, False) for p in packages):
|
|
304
|
+
continue
|
|
305
|
+
selected_editables[ref] = info
|
|
306
|
+
if not selected_editables:
|
|
307
|
+
raise ConanException("There are no selected packages defined in the workspace")
|
|
308
|
+
|
|
309
|
+
return selected_editables
|
|
310
|
+
|
|
311
|
+
def build_order(self, packages, profile_host, profile_build, build_mode, lockfile, remotes,
|
|
312
|
+
profile_args, update=False):
|
|
313
|
+
ConanOutput().title(f"Computing dependency graph for each package")
|
|
314
|
+
conan_api = self._conan_api
|
|
315
|
+
from conan.internal.graph.install_graph import InstallGraph
|
|
316
|
+
install_order = InstallGraph(None)
|
|
317
|
+
|
|
318
|
+
for ref, info in packages.items():
|
|
319
|
+
ConanOutput().title(f"Computing the dependency graph for package: {ref}")
|
|
320
|
+
|
|
321
|
+
deps_graph = conan_api.graph.load_graph_requires([ref], None,
|
|
322
|
+
profile_host, profile_build, lockfile,
|
|
323
|
+
remotes, update)
|
|
324
|
+
deps_graph.report_graph_error()
|
|
325
|
+
print_graph_basic(deps_graph)
|
|
326
|
+
conan_api.graph.analyze_binaries(deps_graph, build_mode, remotes=remotes, update=update,
|
|
327
|
+
lockfile=lockfile)
|
|
328
|
+
print_graph_packages(deps_graph)
|
|
329
|
+
|
|
330
|
+
ConanOutput().success(f"\nAggregating build-order for package: {ref}")
|
|
331
|
+
install_graph = InstallGraph(deps_graph, order_by="recipe",
|
|
332
|
+
profile_args=ProfileArgs.from_args(profile_args))
|
|
333
|
+
install_graph.raise_errors()
|
|
334
|
+
install_order.merge(install_graph)
|
|
335
|
+
|
|
336
|
+
return install_order
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import argparse
|
|
2
|
+
import os
|
|
2
3
|
import textwrap
|
|
3
4
|
from contextlib import redirect_stdout
|
|
4
5
|
|
|
@@ -96,6 +97,8 @@ class BaseConanCommand:
|
|
|
96
97
|
formatarg, ", ".join(self._help_formatters)))
|
|
97
98
|
|
|
98
99
|
if out_file:
|
|
100
|
+
if os.path.dirname(out_file):
|
|
101
|
+
os.makedirs(os.path.dirname(out_file), exist_ok=True)
|
|
99
102
|
with open(out_file, 'w') as f:
|
|
100
103
|
with redirect_stdout(f):
|
|
101
104
|
formatter(info)
|
|
@@ -3,7 +3,7 @@ import os
|
|
|
3
3
|
|
|
4
4
|
from conan.api.conan_api import ConanAPI
|
|
5
5
|
from conan.api.input import UserInput
|
|
6
|
-
from conan.api.model import MultiPackagesList
|
|
6
|
+
from conan.api.model import MultiPackagesList, RecipeReference
|
|
7
7
|
from conan.api.output import cli_out_write, ConanOutput
|
|
8
8
|
from conan.api.subapi.audit import CONAN_CENTER_AUDIT_PROVIDER_NAME
|
|
9
9
|
from conan.cli import make_abs_path
|
|
@@ -14,6 +14,7 @@ from conan.cli.formatters.audit.vulnerabilities import text_vuln_formatter, json
|
|
|
14
14
|
from conan.cli.printers import print_profiles
|
|
15
15
|
from conan.cli.printers.graph import print_graph_basic
|
|
16
16
|
from conan.errors import ConanException
|
|
17
|
+
from conan.internal.util.files import load
|
|
17
18
|
|
|
18
19
|
|
|
19
20
|
def _add_provider_arg(subparser):
|
|
@@ -108,18 +109,15 @@ def audit_list(conan_api: ConanAPI, parser, subparser, *args):
|
|
|
108
109
|
"""
|
|
109
110
|
List the vulnerabilities of the given reference.
|
|
110
111
|
"""
|
|
111
|
-
subparser.
|
|
112
|
-
|
|
112
|
+
input_group = subparser.add_mutually_exclusive_group(required=True)
|
|
113
|
+
input_group.add_argument("reference", help="Reference to list vulnerabilities for", nargs="?")
|
|
114
|
+
input_group.add_argument("-l", "--list", help="pkglist file to list vulnerabilities for")
|
|
115
|
+
input_group.add_argument("-s", "--sbom", help="sbom file to list vulnerabilities for")
|
|
116
|
+
input_group.add_argument("-lock", "--lockfile", help="lockfile file to list vulnerabilities for")
|
|
113
117
|
subparser.add_argument("-r", "--remote", help="Remote to use for listing")
|
|
114
118
|
_add_provider_arg(subparser)
|
|
115
119
|
args = parser.parse_args(*args)
|
|
116
120
|
|
|
117
|
-
if not args.reference and not args.list:
|
|
118
|
-
raise ConanException("Please specify a reference or a pkglist file")
|
|
119
|
-
|
|
120
|
-
if args.reference and args.list:
|
|
121
|
-
raise ConanException("Please specify a reference or a pkglist file, not both")
|
|
122
|
-
|
|
123
121
|
provider = conan_api.audit.get_provider(args.provider or CONAN_CENTER_AUDIT_PROVIDER_NAME)
|
|
124
122
|
|
|
125
123
|
if args.list:
|
|
@@ -130,7 +128,19 @@ def audit_list(conan_api: ConanAPI, parser, subparser, *args):
|
|
|
130
128
|
refs_to_list = package_list.serialize()
|
|
131
129
|
references = list(refs_to_list.keys())
|
|
132
130
|
if not references: # the package list might contain only refs, no revs
|
|
133
|
-
ConanOutput().warning("Nothing to list, package list
|
|
131
|
+
ConanOutput().warning("Nothing to list, package list does not contain recipe revisions")
|
|
132
|
+
elif args.sbom:
|
|
133
|
+
sbom_file = make_abs_path(args.sbom)
|
|
134
|
+
sbom = json.loads(load(sbom_file))
|
|
135
|
+
if sbom.get("bomFormat") != "CycloneDX":
|
|
136
|
+
raise ConanException(f"Unsupported SBOM format, only CycloneDX is supported.")
|
|
137
|
+
purls = [component["purl"] for component in sbom["components"]]
|
|
138
|
+
references = [purl.split("pkg:conan/")[1].replace("@", "/") for purl in purls]
|
|
139
|
+
elif args.lockfile:
|
|
140
|
+
lock_file = make_abs_path(args.lockfile)
|
|
141
|
+
lockfile = conan_api.lockfile.get_lockfile(lock_file).serialize()
|
|
142
|
+
references = [str(RecipeReference.loads(ref[0] if isinstance(ref, tuple) else ref))
|
|
143
|
+
for ref in lockfile["requires"]]
|
|
134
144
|
else:
|
|
135
145
|
references = [args.reference]
|
|
136
146
|
return conan_api.audit.list(references, provider)
|
|
@@ -64,6 +64,19 @@ def cache_path(conan_api: ConanAPI, parser, subparser, *args):
|
|
|
64
64
|
return path
|
|
65
65
|
|
|
66
66
|
|
|
67
|
+
@conan_subcommand(formatters={"text": cli_out_write})
|
|
68
|
+
def cache_ref(conan_api: ConanAPI, parser, subparser, *args):
|
|
69
|
+
"""
|
|
70
|
+
Show the reference for a given Conan cache folder
|
|
71
|
+
"""
|
|
72
|
+
subparser.add_argument("path", help="Path to a Conan cache folder")
|
|
73
|
+
args = parser.parse_args(*args)
|
|
74
|
+
ref = conan_api.cache.path_to_ref(args.path)
|
|
75
|
+
if ref is None:
|
|
76
|
+
raise ConanException("Reference for this path not found in cache")
|
|
77
|
+
return ref.repr_notime()
|
|
78
|
+
|
|
79
|
+
|
|
67
80
|
@conan_subcommand()
|
|
68
81
|
def cache_clean(conan_api: ConanAPI, parser, subparser, *args):
|
|
69
82
|
"""
|
|
@@ -187,5 +200,6 @@ def cache_backup_upload(conan_api: ConanAPI, parser, subparser, *args):
|
|
|
187
200
|
"""
|
|
188
201
|
Upload all the source backups present in the cache
|
|
189
202
|
"""
|
|
203
|
+
args = parser.parse_args(*args)
|
|
190
204
|
files = conan_api.cache.get_backup_sources()
|
|
191
205
|
conan_api.upload.upload_backup_sources(files)
|
|
@@ -107,8 +107,8 @@ def create(conan_api, parser, *args):
|
|
|
107
107
|
if args.test_folder is None else args.test_folder
|
|
108
108
|
test_conanfile_path = _get_test_conanfile_path(test_package_folder, path)
|
|
109
109
|
# If the user provide --test-missing and the binary was not built from source, skip test_package
|
|
110
|
-
if args.test_missing and deps_graph.root.
|
|
111
|
-
and deps_graph.root.
|
|
110
|
+
if args.test_missing and deps_graph.root.edges\
|
|
111
|
+
and deps_graph.root.edges[0].dst.binary != "Build":
|
|
112
112
|
test_conanfile_path = None # disable it
|
|
113
113
|
|
|
114
114
|
if test_conanfile_path:
|
|
@@ -59,7 +59,7 @@ def export_pkg(conan_api, parser, *args):
|
|
|
59
59
|
|
|
60
60
|
# TODO: Maybe we want to be able to export-pkg it as --build-require
|
|
61
61
|
deps_graph = conan_api.graph.load_graph_consumer(path,
|
|
62
|
-
ref.name, ref.version, ref.user, ref.channel,
|
|
62
|
+
ref.name, str(ref.version), ref.user, ref.channel,
|
|
63
63
|
profile_host=profile_host,
|
|
64
64
|
profile_build=profile_build,
|
|
65
65
|
lockfile=lockfile, remotes=remotes, update=None,
|