conan 2.23.0__tar.gz → 2.25.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.
- {conan-2.23.0/conan.egg-info → conan-2.25.0}/PKG-INFO +1 -1
- {conan-2.23.0 → conan-2.25.0}/conan/__init__.py +1 -1
- {conan-2.23.0 → conan-2.25.0}/conan/api/conan_api.py +9 -5
- {conan-2.23.0 → conan-2.25.0}/conan/api/model/list.py +32 -24
- {conan-2.23.0 → conan-2.25.0}/conan/api/output.py +11 -11
- {conan-2.23.0 → conan-2.25.0}/conan/api/subapi/cache.py +164 -22
- conan-2.25.0/conan/api/subapi/config.py +337 -0
- {conan-2.23.0 → conan-2.25.0}/conan/api/subapi/download.py +3 -4
- {conan-2.23.0 → conan-2.25.0}/conan/api/subapi/graph.py +7 -4
- conan-2.25.0/conan/api/subapi/install.py +163 -0
- {conan-2.23.0 → conan-2.25.0}/conan/api/subapi/lockfile.py +13 -8
- {conan-2.23.0 → conan-2.25.0}/conan/api/subapi/new.py +4 -2
- {conan-2.23.0 → conan-2.25.0}/conan/api/subapi/report.py +12 -5
- {conan-2.23.0 → conan-2.25.0}/conan/api/subapi/upload.py +15 -12
- {conan-2.23.0 → conan-2.25.0}/conan/api/subapi/workspace.py +74 -13
- {conan-2.23.0 → conan-2.25.0}/conan/cli/args.py +1 -1
- {conan-2.23.0 → conan-2.25.0}/conan/cli/cli.py +1 -2
- {conan-2.23.0 → conan-2.25.0}/conan/cli/command.py +1 -1
- {conan-2.23.0 → conan-2.25.0}/conan/cli/commands/cache.py +14 -5
- {conan-2.23.0 → conan-2.25.0}/conan/cli/commands/config.py +23 -4
- {conan-2.23.0 → conan-2.25.0}/conan/cli/commands/lock.py +55 -16
- {conan-2.23.0 → conan-2.25.0}/conan/cli/commands/new.py +1 -1
- {conan-2.23.0 → conan-2.25.0}/conan/cli/commands/remove.py +1 -1
- {conan-2.23.0 → conan-2.25.0}/conan/cli/commands/report.py +1 -2
- conan-2.25.0/conan/cli/commands/require.py +130 -0
- {conan-2.23.0 → conan-2.25.0}/conan/cli/commands/workspace.py +68 -20
- {conan-2.23.0 → conan-2.25.0}/conan/cli/formatters/audit/vulnerabilities.py +3 -2
- {conan-2.23.0 → conan-2.25.0}/conan/cli/formatters/graph/info_graph_html.py +20 -1
- {conan-2.23.0 → conan-2.25.0}/conan/cli/formatters/report/diff_html.py +19 -2
- {conan-2.23.0 → conan-2.25.0}/conan/cps/cps.py +44 -22
- {conan-2.23.0 → conan-2.25.0}/conan/internal/api/config/config_installer.py +3 -3
- {conan-2.23.0 → conan-2.25.0}/conan/internal/api/detect/detect_api.py +4 -3
- {conan-2.23.0 → conan-2.25.0}/conan/internal/api/new/basic.py +44 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/api/profile/profile_loader.py +21 -6
- {conan-2.23.0 → conan-2.25.0}/conan/internal/api/uploader.py +126 -80
- {conan-2.23.0 → conan-2.25.0}/conan/internal/cache/cache.py +57 -7
- {conan-2.23.0 → conan-2.25.0}/conan/internal/cache/db/cache_database.py +10 -4
- {conan-2.23.0 → conan-2.25.0}/conan/internal/cache/db/packages_table.py +20 -18
- {conan-2.23.0 → conan-2.25.0}/conan/internal/cache/db/recipes_table.py +19 -19
- {conan-2.23.0 → conan-2.25.0}/conan/internal/cache/db/table.py +7 -1
- {conan-2.23.0 → conan-2.25.0}/conan/internal/cache/integrity_check.py +15 -8
- {conan-2.23.0 → conan-2.25.0}/conan/internal/default_settings.py +10 -10
- {conan-2.23.0 → conan-2.25.0}/conan/internal/graph/graph.py +2 -2
- {conan-2.23.0 → conan-2.25.0}/conan/internal/graph/graph_binaries.py +16 -29
- {conan-2.23.0 → conan-2.25.0}/conan/internal/graph/graph_builder.py +19 -3
- {conan-2.23.0 → conan-2.25.0}/conan/internal/graph/graph_error.py +10 -2
- {conan-2.23.0 → conan-2.25.0}/conan/internal/graph/installer.py +14 -11
- {conan-2.23.0 → conan-2.25.0}/conan/internal/graph/proxy.py +16 -13
- {conan-2.23.0 → conan-2.25.0}/conan/internal/graph/python_requires.py +1 -1
- {conan-2.23.0 → conan-2.25.0}/conan/internal/hook_manager.py +1 -1
- conan-2.25.0/conan/internal/model/conanconfig.py +36 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/model/conf.py +9 -3
- {conan-2.23.0 → conan-2.25.0}/conan/internal/model/cpp_info.py +1 -1
- {conan-2.23.0 → conan-2.25.0}/conan/internal/model/dependencies.py +1 -1
- {conan-2.23.0 → conan-2.25.0}/conan/internal/model/layout.py +3 -3
- {conan-2.23.0 → conan-2.25.0}/conan/internal/model/lockfile.py +1 -1
- {conan-2.23.0 → conan-2.25.0}/conan/internal/model/manifest.py +7 -4
- {conan-2.23.0 → conan-2.25.0}/conan/internal/model/options.py +5 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/model/workspace.py +3 -2
- {conan-2.23.0 → conan-2.25.0}/conan/internal/paths.py +4 -3
- {conan-2.23.0 → conan-2.25.0}/conan/internal/rest/file_uploader.py +1 -1
- {conan-2.23.0 → conan-2.25.0}/conan/internal/rest/pkg_sign.py +2 -2
- {conan-2.23.0 → conan-2.25.0}/conan/internal/rest/remote_manager.py +40 -31
- {conan-2.23.0 → conan-2.25.0}/conan/internal/rest/rest_client.py +2 -2
- {conan-2.23.0 → conan-2.25.0}/conan/internal/rest/rest_client_v2.py +34 -40
- {conan-2.23.0 → conan-2.25.0}/conan/internal/rest/rest_routes.py +1 -1
- {conan-2.23.0 → conan-2.25.0}/conan/internal/util/__init__.py +1 -1
- {conan-2.23.0 → conan-2.25.0}/conan/internal/util/files.py +10 -0
- {conan-2.23.0 → conan-2.25.0}/conan/test/assets/genconanfile.py +13 -1
- {conan-2.23.0 → conan-2.25.0}/conan/test/utils/artifactory.py +2 -2
- {conan-2.23.0 → conan-2.25.0}/conan/test/utils/mocks.py +1 -1
- {conan-2.23.0 → conan-2.25.0}/conan/test/utils/test_files.py +2 -3
- {conan-2.23.0 → conan-2.25.0}/conan/test/utils/tools.py +1 -1
- {conan-2.23.0 → conan-2.25.0}/conan/tools/apple/xcodebuild.py +1 -1
- {conan-2.23.0 → conan-2.25.0}/conan/tools/apple/xcodedeps.py +1 -1
- {conan-2.23.0 → conan-2.25.0}/conan/tools/apple/xcodetoolchain.py +1 -1
- {conan-2.23.0 → conan-2.25.0}/conan/tools/build/cstd.py +1 -0
- conan-2.25.0/conan/tools/cmake/__init__.py +17 -0
- conan-2.23.0/conan/tools/cmake/cmakedeps2/cmakedeps.py → conan-2.25.0/conan/tools/cmake/cmakeconfigdeps/cmakeconfigdeps.py +75 -24
- {conan-2.23.0/conan/tools/cmake/cmakedeps2 → conan-2.25.0/conan/tools/cmake/cmakeconfigdeps}/config.py +1 -1
- {conan-2.23.0/conan/tools/cmake/cmakedeps2 → conan-2.25.0/conan/tools/cmake/cmakeconfigdeps}/config_version.py +1 -1
- {conan-2.23.0/conan/tools/cmake/cmakedeps2 → conan-2.25.0/conan/tools/cmake/cmakeconfigdeps}/target_configuration.py +58 -24
- {conan-2.23.0 → conan-2.25.0}/conan/tools/cmake/cmakedeps/cmakedeps.py +1 -1
- {conan-2.23.0 → conan-2.25.0}/conan/tools/cmake/cmakedeps/templates/__init__.py +1 -1
- {conan-2.23.0 → conan-2.25.0}/conan/tools/cmake/cmakedeps/templates/config.py +0 -1
- {conan-2.23.0 → conan-2.25.0}/conan/tools/cmake/cmakedeps/templates/target_data.py +1 -1
- {conan-2.23.0 → conan-2.25.0}/conan/tools/cmake/presets.py +1 -1
- {conan-2.23.0 → conan-2.25.0}/conan/tools/env/environment.py +6 -2
- {conan-2.23.0 → conan-2.25.0}/conan/tools/files/copy_pattern.py +4 -3
- {conan-2.23.0 → conan-2.25.0}/conan/tools/files/files.py +2 -1
- {conan-2.23.0 → conan-2.25.0}/conan/tools/gnu/autotools.py +1 -1
- {conan-2.23.0 → conan-2.25.0}/conan/tools/gnu/autotoolstoolchain.py +7 -2
- {conan-2.23.0 → conan-2.25.0}/conan/tools/gnu/gnudeps_flags.py +1 -1
- {conan-2.23.0 → conan-2.25.0}/conan/tools/gnu/gnutoolchain.py +7 -2
- {conan-2.23.0 → conan-2.25.0}/conan/tools/google/bazel.py +1 -1
- {conan-2.23.0 → conan-2.25.0}/conan/tools/meson/meson.py +1 -1
- {conan-2.23.0 → conan-2.25.0}/conan/tools/meson/toolchain.py +9 -3
- {conan-2.23.0 → conan-2.25.0}/conan/tools/microsoft/msbuild.py +1 -1
- {conan-2.23.0 → conan-2.25.0}/conan/tools/microsoft/nmakedeps.py +1 -1
- {conan-2.23.0 → conan-2.25.0}/conan/tools/microsoft/nmaketoolchain.py +15 -10
- {conan-2.23.0 → conan-2.25.0}/conan/tools/microsoft/toolchain.py +4 -4
- {conan-2.23.0 → conan-2.25.0}/conan/tools/premake/premake.py +2 -1
- {conan-2.23.0 → conan-2.25.0}/conan/tools/premake/premakedeps.py +1 -1
- {conan-2.23.0 → conan-2.25.0}/conan/tools/qbs/qbs.py +1 -1
- {conan-2.23.0 → conan-2.25.0}/conan/tools/ros/rosenv.py +1 -1
- {conan-2.23.0 → conan-2.25.0}/conan/tools/sbom/spdx_licenses.py +0 -1
- conan-2.25.0/conan/tools/system/__init__.py +1 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/system/package_manager.py +8 -7
- conan-2.25.0/conan/tools/system/python_manager.py +138 -0
- {conan-2.23.0 → conan-2.25.0/conan.egg-info}/PKG-INFO +1 -1
- {conan-2.23.0 → conan-2.25.0}/conan.egg-info/SOURCES.txt +9 -7
- {conan-2.23.0 → conan-2.25.0}/conan.egg-info/requires.txt +0 -2
- {conan-2.23.0 → conan-2.25.0}/conans/migrations.py +1 -1
- {conan-2.23.0 → conan-2.25.0}/conans/requirements_dev.txt +0 -1
- conan-2.23.0/conan/api/subapi/config.py +0 -189
- conan-2.23.0/conan/api/subapi/install.py +0 -106
- conan-2.23.0/conan/tools/cmake/__init__.py +0 -31
- conan-2.23.0/conan/tools/system/__init__.py +0 -1
- conan-2.23.0/conan/tools/system/pip_manager.py +0 -73
- {conan-2.23.0 → conan-2.25.0}/LICENSE.md +0 -0
- {conan-2.23.0 → conan-2.25.0}/MANIFEST.in +0 -0
- {conan-2.23.0 → conan-2.25.0}/README.md +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/api/__init__.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/api/input.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/api/model/__init__.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/api/model/refs.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/api/model/remote.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/api/subapi/__init__.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/api/subapi/audit.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/api/subapi/command.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/api/subapi/export.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/api/subapi/list.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/api/subapi/local.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/api/subapi/profiles.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/api/subapi/remotes.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/api/subapi/remove.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/cli/__init__.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/cli/commands/__init__.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/cli/commands/audit.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/cli/commands/build.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/cli/commands/create.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/cli/commands/download.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/cli/commands/editable.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/cli/commands/export.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/cli/commands/export_pkg.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/cli/commands/graph.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/cli/commands/inspect.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/cli/commands/install.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/cli/commands/list.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/cli/commands/pkglist.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/cli/commands/profile.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/cli/commands/remote.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/cli/commands/run.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/cli/commands/search.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/cli/commands/source.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/cli/commands/test.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/cli/commands/upload.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/cli/commands/version.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/cli/exit_codes.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/cli/formatters/__init__.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/cli/formatters/audit/__init__.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/cli/formatters/graph/__init__.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/cli/formatters/graph/build_order_html.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/cli/formatters/graph/graph.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/cli/formatters/graph/graph_info_text.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/cli/formatters/graph/info_graph_dot.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/cli/formatters/list/__init__.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/cli/formatters/list/list.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/cli/formatters/list/search_table_html.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/cli/formatters/report/__init__.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/cli/formatters/report/diff.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/cli/printers/__init__.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/cli/printers/graph.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/cps/__init__.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/errors.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/__init__.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/api/__init__.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/api/audit/__init__.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/api/audit/providers.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/api/config/__init__.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/api/detect/__init__.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/api/detect/detect_vs.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/api/export.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/api/install/__init__.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/api/install/generators.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/api/list/__init__.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/api/list/query_parse.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/api/local/__init__.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/api/local/editable.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/api/migrations.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/api/new/__init__.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/api/new/alias_new.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/api/new/autoools_exe.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/api/new/autotools_lib.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/api/new/bazel_7_exe.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/api/new/bazel_7_lib.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/api/new/bazel_exe.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/api/new/bazel_lib.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/api/new/cmake_exe.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/api/new/cmake_lib.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/api/new/header_lib.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/api/new/local_recipes_index.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/api/new/meson_exe.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/api/new/meson_lib.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/api/new/msbuild_exe.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/api/new/msbuild_lib.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/api/new/premake_exe.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/api/new/premake_lib.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/api/new/qbs_lib.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/api/new/workspace.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/api/profile/__init__.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/api/profile/detect.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/api/remotes/__init__.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/api/remotes/encrypt.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/api/remotes/localdb.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/api/upload.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/cache/__init__.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/cache/conan_reference_layout.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/cache/db/__init__.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/cache/home_paths.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/conan_app.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/deploy.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/errors.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/graph/__init__.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/graph/build_mode.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/graph/compatibility.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/graph/compute_pid.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/graph/install_graph.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/graph/profile_node_definer.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/graph/provides.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/graph/range_resolver.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/internal_tools.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/loader.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/methods.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/model/__init__.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/model/conan_file.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/model/conanfile_interface.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/model/info.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/model/pkg_type.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/model/profile.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/model/recipe_ref.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/model/requires.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/model/settings.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/model/version.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/model/version_range.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/rest/__init__.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/rest/auth_manager.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/rest/caching_file_downloader.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/rest/client_routes.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/rest/conan_requester.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/rest/download_cache.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/rest/file_downloader.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/rest/remote_credentials.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/rest/rest_client_local_recipe_index.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/runner/__init__.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/runner/docker.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/runner/output.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/runner/ssh.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/runner/wsl.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/source.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/subsystems.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/util/config_parser.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/util/dates.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/internal/util/runners.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/test/__init__.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/test/assets/__init__.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/test/assets/autotools.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/test/assets/cmake.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/test/assets/premake.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/test/assets/sources.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/test/assets/visual_project_files.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/test/utils/__init__.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/test/utils/env.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/test/utils/file_server.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/test/utils/profiles.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/test/utils/scm.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/test/utils/server_launcher.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/__init__.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/android/__init__.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/android/utils.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/apple/__init__.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/apple/apple.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/build/__init__.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/build/compiler.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/build/cppstd.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/build/cpu.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/build/cross_building.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/build/flags.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/build/stdcpp_library.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/cmake/cmake.py +0 -0
- {conan-2.23.0/conan/tools/cmake/cmakedeps2 → conan-2.25.0/conan/tools/cmake/cmakeconfigdeps}/__init__.py +0 -0
- {conan-2.23.0/conan/tools/cmake/cmakedeps2 → conan-2.25.0/conan/tools/cmake/cmakeconfigdeps}/targets.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/cmake/cmakedeps/__init__.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/cmake/cmakedeps/templates/config_version.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/cmake/cmakedeps/templates/macros.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/cmake/cmakedeps/templates/target_configuration.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/cmake/cmakedeps/templates/targets.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/cmake/layout.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/cmake/toolchain/__init__.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/cmake/toolchain/blocks.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/cmake/toolchain/toolchain.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/cmake/utils.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/cps/__init__.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/cps/cps_deps.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/env/__init__.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/env/virtualbuildenv.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/env/virtualrunenv.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/files/__init__.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/files/conandata.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/files/patches.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/files/symlinks/__init__.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/files/symlinks/symlinks.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/gnu/__init__.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/gnu/autotoolsdeps.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/gnu/get_gnu_triplet.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/gnu/makedeps.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/gnu/pkgconfig.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/gnu/pkgconfigdeps.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/google/__init__.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/google/bazeldeps.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/google/layout.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/google/toolchain.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/intel/__init__.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/intel/intel_cc.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/layout/__init__.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/meson/__init__.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/meson/helpers.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/microsoft/__init__.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/microsoft/layout.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/microsoft/msbuilddeps.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/microsoft/subsystems.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/microsoft/visual.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/premake/__init__.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/premake/constants.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/premake/toolchain.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/qbs/__init__.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/qbs/common.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/qbs/qbsdeps.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/qbs/qbsprofile.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/ros/__init__.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/sbom/__init__.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/sbom/cyclonedx.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/scm/__init__.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/scm/git.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/scons/__init__.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan/tools/scons/sconsdeps.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan.egg-info/dependency_links.txt +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan.egg-info/entry_points.txt +0 -0
- {conan-2.23.0 → conan-2.25.0}/conan.egg-info/top_level.txt +0 -0
- {conan-2.23.0 → conan-2.25.0}/conans/__init__.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conans/conan.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conans/conan_server.py +0 -0
- {conan-2.23.0 → conan-2.25.0}/conans/requirements.txt +0 -0
- {conan-2.23.0 → conan-2.25.0}/conans/requirements_runner.txt +0 -0
- {conan-2.23.0 → conan-2.25.0}/conans/requirements_server.txt +0 -0
- {conan-2.23.0 → conan-2.25.0}/pyproject.toml +0 -0
- {conan-2.23.0 → conan-2.25.0}/setup.cfg +0 -0
- {conan-2.23.0 → conan-2.25.0}/setup.py +0 -0
|
@@ -64,7 +64,8 @@ class ConanAPI:
|
|
|
64
64
|
#: Used to get latest refs and list refs of recipes and packages
|
|
65
65
|
self.list: ListAPI = ListAPI(self)
|
|
66
66
|
self.profiles = ProfilesAPI(self, self._api_helpers)
|
|
67
|
-
|
|
67
|
+
#: Used to install binaries, sources, deploy packages and more
|
|
68
|
+
self.install: InstallAPI = InstallAPI(self, self._api_helpers)
|
|
68
69
|
self.graph = GraphAPI(self, self._api_helpers)
|
|
69
70
|
#: Used to export recipes and pre-compiled package binaries to the Conan cache
|
|
70
71
|
self.export: ExportAPI = ExportAPI(self, self._api_helpers)
|
|
@@ -74,13 +75,16 @@ class ConanAPI:
|
|
|
74
75
|
self.upload: UploadAPI = UploadAPI(self, self._api_helpers)
|
|
75
76
|
#: Used to download recipes and packages from remotes
|
|
76
77
|
self.download: DownloadAPI = DownloadAPI(self)
|
|
77
|
-
|
|
78
|
-
self.
|
|
78
|
+
#: Used to interact wit the packages storage cache
|
|
79
|
+
self.cache: CacheAPI = CacheAPI(self, self._api_helpers)
|
|
80
|
+
#: Used to read and manage lockfile files
|
|
81
|
+
self.lockfile: LockfileAPI = LockfileAPI(self)
|
|
79
82
|
self.local = LocalAPI(self, self._api_helpers)
|
|
80
|
-
|
|
83
|
+
#: Used to check vulnerabilities of dependencies
|
|
84
|
+
self.audit: AuditAPI = AuditAPI(self)
|
|
81
85
|
# Now, lazy loading of editables
|
|
82
86
|
self.workspace = WorkspaceAPI(self)
|
|
83
|
-
self.report = ReportAPI(self, self._api_helpers)
|
|
87
|
+
self.report: ReportAPI = ReportAPI(self, self._api_helpers)
|
|
84
88
|
|
|
85
89
|
@property
|
|
86
90
|
def home_folder(self) -> str:
|
|
@@ -41,10 +41,6 @@ class MultiPackagesList:
|
|
|
41
41
|
for k, v in other.lists.items():
|
|
42
42
|
self.lists.setdefault(k, PackagesList()).merge(v)
|
|
43
43
|
|
|
44
|
-
def keep_outer(self, other):
|
|
45
|
-
for namespace, other_pkg_list in other.lists.items():
|
|
46
|
-
self.lists.get(namespace, PackagesList()).keep_outer(other_pkg_list)
|
|
47
|
-
|
|
48
44
|
@staticmethod
|
|
49
45
|
def load(file):
|
|
50
46
|
""" Create an instance of the class from a serialized JSON file path pointed by ``file``."""
|
|
@@ -96,7 +92,6 @@ class MultiPackagesList:
|
|
|
96
92
|
if not os.path.isfile(graphfile):
|
|
97
93
|
raise ConanException(f"Graph file not found: {graphfile}")
|
|
98
94
|
try:
|
|
99
|
-
base_context = context.split("-")[0] if context else None
|
|
100
95
|
graph = json.loads(load(graphfile))
|
|
101
96
|
# Check if input json is a graph file
|
|
102
97
|
if "graph" not in graph:
|
|
@@ -107,15 +102,7 @@ class MultiPackagesList:
|
|
|
107
102
|
)
|
|
108
103
|
|
|
109
104
|
mpkglist = MultiPackagesList._define_graph(graph, graph_recipes, graph_binaries,
|
|
110
|
-
context=
|
|
111
|
-
if context == "build-only":
|
|
112
|
-
host = MultiPackagesList._define_graph(graph, graph_recipes, graph_binaries,
|
|
113
|
-
context="host")
|
|
114
|
-
mpkglist.keep_outer(host)
|
|
115
|
-
elif context == "host-only":
|
|
116
|
-
build = MultiPackagesList._define_graph(graph, graph_recipes, graph_binaries,
|
|
117
|
-
context="build")
|
|
118
|
-
mpkglist.keep_outer(build)
|
|
105
|
+
context=context)
|
|
119
106
|
return mpkglist
|
|
120
107
|
except JSONDecodeError as e:
|
|
121
108
|
raise ConanException(f"Graph file invalid JSON: {graphfile}\n{e}")
|
|
@@ -130,6 +117,7 @@ class MultiPackagesList:
|
|
|
130
117
|
|
|
131
118
|
@staticmethod
|
|
132
119
|
def _define_graph(graph, graph_recipes=None, graph_binaries=None, context=None):
|
|
120
|
+
base_context = context.split("-")[0] if context else None
|
|
133
121
|
pkglist = MultiPackagesList()
|
|
134
122
|
cache_list = PackagesList()
|
|
135
123
|
if graph_recipes is None and graph_binaries is None:
|
|
@@ -141,7 +129,7 @@ class MultiPackagesList:
|
|
|
141
129
|
|
|
142
130
|
pkglist.lists["Local Cache"] = cache_list
|
|
143
131
|
for node in graph["graph"]["nodes"].values():
|
|
144
|
-
if
|
|
132
|
+
if base_context and node['context'] != base_context:
|
|
145
133
|
continue
|
|
146
134
|
|
|
147
135
|
# We need to add the python_requires too
|
|
@@ -189,8 +177,32 @@ class MultiPackagesList:
|
|
|
189
177
|
if any(b == "*" or b == binary for b in binaries):
|
|
190
178
|
cache_list.add_ref(ref) # Binary listed forces recipe listed
|
|
191
179
|
cache_list.add_pref(pref, node["info"])
|
|
180
|
+
# Now filter possible exclusive contexts once that we know how they are distributed
|
|
181
|
+
MultiPackagesList._filter_exclusive_context(pkglist, graph, context)
|
|
192
182
|
return pkglist
|
|
193
183
|
|
|
184
|
+
@staticmethod
|
|
185
|
+
def _filter_exclusive_context(mpkglist, graph, context):
|
|
186
|
+
if context not in ("host-only", "build-only"):
|
|
187
|
+
return
|
|
188
|
+
|
|
189
|
+
pref_contexts = {}
|
|
190
|
+
for node in graph["graph"]["nodes"].values():
|
|
191
|
+
if node["package_id"] is not None:
|
|
192
|
+
pref = node["ref"] + ":" + node["package_id"]
|
|
193
|
+
pref_contexts.setdefault(pref, set()).add(node['context'])
|
|
194
|
+
|
|
195
|
+
opposite_context = "build" if context == "host-only" else "host"
|
|
196
|
+
for remote, pkglist in mpkglist.lists.items():
|
|
197
|
+
for pref, contexts in pref_contexts.items():
|
|
198
|
+
if opposite_context in contexts:
|
|
199
|
+
pref = PkgReference.loads(pref)
|
|
200
|
+
if pkglist.has_rref(pref.ref):
|
|
201
|
+
rev_dict = pkglist.recipe_dict(pref.ref)
|
|
202
|
+
rev_dict.get("packages", {}).pop(pref.package_id, None)
|
|
203
|
+
if len(rev_dict.get("packages", {})) == 0:
|
|
204
|
+
pkglist._data.pop(str(pref.ref), None)
|
|
205
|
+
|
|
194
206
|
|
|
195
207
|
class PackagesList:
|
|
196
208
|
""" A collection of recipes, revisions and packages."""
|
|
@@ -203,6 +215,7 @@ class PackagesList:
|
|
|
203
215
|
|
|
204
216
|
def merge(self, other):
|
|
205
217
|
assert isinstance(other, PackagesList)
|
|
218
|
+
|
|
206
219
|
def recursive_dict_update(d, u): # TODO: repeated from conandata.py
|
|
207
220
|
for k, v in u.items():
|
|
208
221
|
if isinstance(v, dict):
|
|
@@ -212,15 +225,6 @@ class PackagesList:
|
|
|
212
225
|
return d
|
|
213
226
|
recursive_dict_update(self._data, other._data)
|
|
214
227
|
|
|
215
|
-
def keep_outer(self, other):
|
|
216
|
-
assert isinstance(other, PackagesList)
|
|
217
|
-
if not self._data:
|
|
218
|
-
return
|
|
219
|
-
|
|
220
|
-
for ref, info in other._data.items():
|
|
221
|
-
if self._data.get(ref, {}) == info:
|
|
222
|
-
self._data.pop(ref)
|
|
223
|
-
|
|
224
228
|
def split(self):
|
|
225
229
|
"""
|
|
226
230
|
Returns a list of PackageList, split one per reference.
|
|
@@ -334,6 +338,10 @@ class PackagesList:
|
|
|
334
338
|
"""
|
|
335
339
|
return self._data[str(ref)]["revisions"][ref.revision]
|
|
336
340
|
|
|
341
|
+
def has_rref(self, ref: RecipeReference) -> bool:
|
|
342
|
+
# Checks if the PackagesList contains the given RecipeReference.
|
|
343
|
+
return str(ref) in self._data and ref.revision in self._data[str(ref)].get("revisions", {})
|
|
344
|
+
|
|
337
345
|
def package_dict(self, pref: PkgReference):
|
|
338
346
|
""" Gives read/write access to the dictionary containing a specific PkgReference
|
|
339
347
|
information
|
|
@@ -135,17 +135,17 @@ class ConanOutput:
|
|
|
135
135
|
@classmethod
|
|
136
136
|
def valid_log_levels(cls):
|
|
137
137
|
return {"quiet": LEVEL_QUIET, # -vquiet 80
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
138
|
+
"error": LEVEL_ERROR, # -verror 70
|
|
139
|
+
"warning": LEVEL_WARNING, # -vwaring 60
|
|
140
|
+
"notice": LEVEL_NOTICE, # -vnotice 50
|
|
141
|
+
"status": LEVEL_STATUS, # -vstatus 40
|
|
142
|
+
None: LEVEL_VERBOSE, # -v 30
|
|
143
|
+
"verbose": LEVEL_VERBOSE, # -vverbose 30
|
|
144
|
+
"debug": LEVEL_DEBUG, # -vdebug 20
|
|
145
|
+
"v": LEVEL_DEBUG, # -vv 20
|
|
146
|
+
"trace": LEVEL_TRACE, # -vtrace 10
|
|
147
|
+
"vv": LEVEL_TRACE # -vvv 10
|
|
148
|
+
}
|
|
149
149
|
|
|
150
150
|
@classmethod
|
|
151
151
|
def define_log_level(cls, v):
|
|
@@ -6,13 +6,14 @@ import tempfile
|
|
|
6
6
|
|
|
7
7
|
from conan.api.model import PackagesList
|
|
8
8
|
from conan.api.output import ConanOutput
|
|
9
|
-
from conan.internal.api.uploader import compress_files
|
|
9
|
+
from conan.internal.api.uploader import compress_files, get_compress_level
|
|
10
10
|
from conan.internal.cache.cache import PkgCache
|
|
11
11
|
from conan.internal.cache.conan_reference_layout import (EXPORT_SRC_FOLDER, EXPORT_FOLDER,
|
|
12
12
|
SRC_FOLDER, METADATA,
|
|
13
13
|
DOWNLOAD_EXPORT_FOLDER)
|
|
14
14
|
from conan.internal.cache.home_paths import HomePaths
|
|
15
15
|
from conan.internal.cache.integrity_check import IntegrityChecker
|
|
16
|
+
from conan.internal.paths import COMPRESSIONS
|
|
16
17
|
from conan.internal.rest.download_cache import DownloadCache
|
|
17
18
|
from conan.errors import ConanException
|
|
18
19
|
from conan.api.model import PkgReference
|
|
@@ -22,48 +23,140 @@ from conan.internal.util.files import rmdir, mkdir, remove, save
|
|
|
22
23
|
|
|
23
24
|
|
|
24
25
|
class CacheAPI:
|
|
26
|
+
""" This CacheAPI is used to interact with the packages storage cache
|
|
27
|
+
|
|
28
|
+
Note that the Conan packages cache is exclusively **read-only** for user code. Only Conan
|
|
29
|
+
can write or modify the folders and files in the Conan cache. In general, when a method
|
|
30
|
+
returns a folder, it is mostly for debugging purposes and read-only access, but never to
|
|
31
|
+
modify the contents of the cache.
|
|
32
|
+
"""
|
|
25
33
|
|
|
26
34
|
def __init__(self, conan_api, api_helpers):
|
|
27
35
|
self._conan_api = conan_api
|
|
28
36
|
self._api_helpers = api_helpers
|
|
29
37
|
|
|
30
38
|
def export_path(self, ref: RecipeReference):
|
|
39
|
+
"""Returns the path of the recipe conanfile and exported files in the Conan cache
|
|
40
|
+
|
|
41
|
+
This folder is exclusively for **read-only** access, typically for debugging purposes,
|
|
42
|
+
it is completely forbidden to modify any of its contents.
|
|
43
|
+
|
|
44
|
+
:param ref: RecipeReference. If it includes recipe revision, that exact revision will be
|
|
45
|
+
returned, if it doesn't include recipe revision, it will return the latest revision one.
|
|
46
|
+
:return: path to the folder, as a string
|
|
47
|
+
:raises: ConanExcepcion if the folder doesn't exist
|
|
48
|
+
"""
|
|
49
|
+
|
|
31
50
|
cache = PkgCache(self._conan_api.cache_folder, self._api_helpers.global_conf)
|
|
32
51
|
ref = _resolve_latest_ref(cache, ref)
|
|
33
52
|
ref_layout = cache.recipe_layout(ref)
|
|
34
53
|
return _check_folder_existence(ref, "export", ref_layout.export())
|
|
35
54
|
|
|
36
55
|
def recipe_metadata_path(self, ref: RecipeReference):
|
|
56
|
+
"""Returns the path of the recipe metadata files in the Conan cache
|
|
57
|
+
|
|
58
|
+
Exceptionally, adding or modifying the files within this folder is allowed, as
|
|
59
|
+
the metadata files are not taken into account into the computation of the recipe hash
|
|
60
|
+
(recipe revision).
|
|
61
|
+
|
|
62
|
+
:param ref: RecipeReference. If it includes recipe revision, that exact revision will be
|
|
63
|
+
returned, if it doesn't include recipe revision, it will return the latest revision one.
|
|
64
|
+
:return: path to the folder, as a string
|
|
65
|
+
:raises: ConanExcepcion if the folder doesn't exist
|
|
66
|
+
"""
|
|
37
67
|
cache = PkgCache(self._conan_api.cache_folder, self._api_helpers.global_conf)
|
|
38
68
|
ref = _resolve_latest_ref(cache, ref)
|
|
39
69
|
ref_layout = cache.recipe_layout(ref)
|
|
40
70
|
return _check_folder_existence(ref, "metadata", ref_layout.metadata())
|
|
41
71
|
|
|
42
72
|
def export_source_path(self, ref: RecipeReference):
|
|
73
|
+
"""Returns the path of the exported sources in the Conan cache
|
|
74
|
+
|
|
75
|
+
Note that the exported sources only exist in the cache when the package has been created
|
|
76
|
+
locally or built from source.
|
|
77
|
+
|
|
78
|
+
This folder is exclusively for **read-only** access, typically for debugging purposes,
|
|
79
|
+
it is completely forbidden to modify any of its contents.
|
|
80
|
+
|
|
81
|
+
:param ref: RecipeReference. If it includes recipe revision, that exact revision will be
|
|
82
|
+
returned, if it doesn't include recipe revision, it will return the latest revision one.
|
|
83
|
+
:return: path to the folder, as a string
|
|
84
|
+
:raises: ConanExcepcion if the folder doesn't exist
|
|
85
|
+
"""
|
|
43
86
|
cache = PkgCache(self._conan_api.cache_folder, self._api_helpers.global_conf)
|
|
44
87
|
ref = _resolve_latest_ref(cache, ref)
|
|
45
88
|
ref_layout = cache.recipe_layout(ref)
|
|
46
89
|
return _check_folder_existence(ref, "export_sources", ref_layout.export_sources())
|
|
47
90
|
|
|
48
91
|
def source_path(self, ref: RecipeReference):
|
|
92
|
+
"""Returns the path of the temporary source folder in the Conan cache
|
|
93
|
+
|
|
94
|
+
Note that the source folder only exist in the cache when the package has been created
|
|
95
|
+
locally or built from source.
|
|
96
|
+
|
|
97
|
+
This folder is exclusively for **read-only** access, typically for debugging purposes,
|
|
98
|
+
it is completely forbidden to modify any of its contents.
|
|
99
|
+
|
|
100
|
+
:param ref: RecipeReference. If it includes recipe revision, that exact revision will be
|
|
101
|
+
returned, if it doesn't include recipe revision, it will return the latest revision one.
|
|
102
|
+
:return: path to the folder, as a string
|
|
103
|
+
:raises: ConanExcepcion if the folder doesn't exist
|
|
104
|
+
"""
|
|
49
105
|
cache = PkgCache(self._conan_api.cache_folder, self._api_helpers.global_conf)
|
|
50
106
|
ref = _resolve_latest_ref(cache, ref)
|
|
51
107
|
ref_layout = cache.recipe_layout(ref)
|
|
52
108
|
return _check_folder_existence(ref, "source", ref_layout.source())
|
|
53
109
|
|
|
54
110
|
def build_path(self, pref: PkgReference):
|
|
111
|
+
"""Returns the path of the temporary build folder in the Conan cache
|
|
112
|
+
|
|
113
|
+
Note that the build folder only exist in the cache when the package has been created
|
|
114
|
+
locally or built from source.
|
|
115
|
+
|
|
116
|
+
This folder is exclusively for **read-only** access, typically for debugging purposes,
|
|
117
|
+
it is completely forbidden to modify any of its contents.
|
|
118
|
+
|
|
119
|
+
:param pref: PkgReference. If it includes recipe revision, that exact revision will be
|
|
120
|
+
returned, if it doesn't include recipe revision, it will return the latest revision one.
|
|
121
|
+
Exactly same behavior for the package revision.
|
|
122
|
+
:return: path to the folder, as a string
|
|
123
|
+
:raises: ConanExcepcion if the folder doesn't exist
|
|
124
|
+
"""
|
|
55
125
|
cache = PkgCache(self._conan_api.cache_folder, self._api_helpers.global_conf)
|
|
56
126
|
pref = _resolve_latest_pref(cache, pref)
|
|
57
127
|
ref_layout = cache.pkg_layout(pref)
|
|
58
128
|
return _check_folder_existence(pref, "build", ref_layout.build())
|
|
59
129
|
|
|
60
130
|
def package_metadata_path(self, pref: PkgReference):
|
|
131
|
+
"""Returns the path of the package metadata folder in the Conan cache
|
|
132
|
+
|
|
133
|
+
Exceptionally, adding or modifying the files within this folder is allowed, as
|
|
134
|
+
the metadata files are not taken into account into the computation of the package hash
|
|
135
|
+
(package revision).
|
|
136
|
+
|
|
137
|
+
:param pref: PkgReference. If it includes recipe revision, that exact revision will be
|
|
138
|
+
returned, if it doesn't include recipe revision, it will return the latest revision one.
|
|
139
|
+
Exactly same behavior for the package revision.
|
|
140
|
+
:return: path to the folder, as a string
|
|
141
|
+
:raises: ConanExcepcion if the folder doesn't exist
|
|
142
|
+
"""
|
|
61
143
|
cache = PkgCache(self._conan_api.cache_folder, self._api_helpers.global_conf)
|
|
62
144
|
pref = _resolve_latest_pref(cache, pref)
|
|
63
145
|
ref_layout = cache.pkg_layout(pref)
|
|
64
146
|
return _check_folder_existence(pref, "metadata", ref_layout.metadata())
|
|
65
147
|
|
|
66
148
|
def package_path(self, pref: PkgReference):
|
|
149
|
+
"""Returns the path of the package folder in the Conan cache
|
|
150
|
+
|
|
151
|
+
This folder is exclusively for **read-only** access, typically for debugging purposes,
|
|
152
|
+
it is completely forbidden to modify any of its contents.
|
|
153
|
+
|
|
154
|
+
:param pref: PkgReference. If it includes recipe revision, that exact revision will be
|
|
155
|
+
returned, if it doesn't include recipe revision, it will return the latest revision one.
|
|
156
|
+
Exactly same behavior for the package revision.
|
|
157
|
+
:return: path to the folder, as a string
|
|
158
|
+
:raises: ConanExcepcion if the folder doesn't exist
|
|
159
|
+
"""
|
|
67
160
|
cache = PkgCache(self._conan_api.cache_folder, self._api_helpers.global_conf)
|
|
68
161
|
pref = _resolve_latest_pref(cache, pref)
|
|
69
162
|
ref_layout = cache.pkg_layout(pref)
|
|
@@ -71,17 +164,29 @@ class CacheAPI:
|
|
|
71
164
|
return ref_layout.finalize()
|
|
72
165
|
return _check_folder_existence(pref, "package", ref_layout.package())
|
|
73
166
|
|
|
74
|
-
def check_integrity(self, package_list):
|
|
75
|
-
"""
|
|
167
|
+
def check_integrity(self, package_list, return_pkg_list=False):
|
|
168
|
+
"""
|
|
169
|
+
Check if the recipes and packages are corrupted
|
|
170
|
+
|
|
171
|
+
:param package_list: PackagesList to check
|
|
172
|
+
:param return_pkg_list: If True, return a PackagesList with corrupted artifacts
|
|
173
|
+
:return: PackagesList with corrupted artifacts if return_pkg_list is True
|
|
174
|
+
:raises: ConanExcepcion if there are corrupted artifacts and return_pkg_list is False
|
|
175
|
+
"""
|
|
76
176
|
cache = PkgCache(self._conan_api.cache_folder, self._api_helpers.global_conf)
|
|
77
177
|
checker = IntegrityChecker(cache)
|
|
78
|
-
checker.check(package_list)
|
|
178
|
+
corrupted_pkg_list = checker.check(package_list)
|
|
179
|
+
if return_pkg_list:
|
|
180
|
+
return corrupted_pkg_list
|
|
181
|
+
if corrupted_pkg_list:
|
|
182
|
+
raise ConanException("There are corrupted artifacts, check the error logs")
|
|
79
183
|
|
|
80
184
|
def clean(self, package_list, source=True, build=True, download=True, temp=True,
|
|
81
|
-
backup_sources=False):
|
|
185
|
+
backup_sources=False) -> None:
|
|
82
186
|
"""
|
|
83
187
|
Remove non critical folders from the cache, like source, build and download (.tgz store)
|
|
84
188
|
folders.
|
|
189
|
+
|
|
85
190
|
:param package_list: the package lists that should be cleaned
|
|
86
191
|
:param source: boolean, remove the "source" folder if True
|
|
87
192
|
:param build: boolean, remove the "build" folder if True
|
|
@@ -104,6 +209,12 @@ class CacheAPI:
|
|
|
104
209
|
info = os.path.join(folder, "p", "conaninfo.txt")
|
|
105
210
|
if not os.path.exists(manifest) or not os.path.exists(info):
|
|
106
211
|
rmdir(folder)
|
|
212
|
+
|
|
213
|
+
# Temporary name (not named) until we have clarity if this is the same as the "t"
|
|
214
|
+
# temporary (for exports) or not
|
|
215
|
+
if os.path.exists(os.path.join(cache.store, "d")):
|
|
216
|
+
rmdir(os.path.join(cache.store, "d"))
|
|
217
|
+
|
|
107
218
|
if backup_sources:
|
|
108
219
|
backup_files = self._conan_api.cache.get_backup_sources(package_list, exclude=False,
|
|
109
220
|
only_upload=False)
|
|
@@ -128,13 +239,31 @@ class CacheAPI:
|
|
|
128
239
|
if download:
|
|
129
240
|
rmdir(pref_layout.download_package())
|
|
130
241
|
|
|
131
|
-
def save(self, package_list,
|
|
242
|
+
def save(self, package_list: PackagesList, path, no_source=False) -> None:
|
|
243
|
+
"""Create a compressed archive with recipes and packages from the Conan cache that
|
|
244
|
+
can be later restored in another cache.
|
|
245
|
+
|
|
246
|
+
Do not manipulate the contents of the resulting archive, as it also contains metadata,
|
|
247
|
+
and modifying the contents would be equivalent to modify the Conan package cache, which
|
|
248
|
+
is forbidden.
|
|
249
|
+
|
|
250
|
+
:param package_list: PackagesList containing the recipes and packages to add
|
|
251
|
+
to the compressed archive
|
|
252
|
+
:param path: The archive file to generate. Based on the extension of the file, different
|
|
253
|
+
compression formats can be used (.tgz, .txz and .tzst, the latter only for Python>=3.14).
|
|
254
|
+
:param no_source: If True, the source folders in the cache will not be added to the archive.
|
|
255
|
+
:return:
|
|
256
|
+
"""
|
|
132
257
|
global_conf = self._api_helpers.global_conf
|
|
133
258
|
cache = PkgCache(self._conan_api.cache_folder, global_conf)
|
|
134
259
|
cache_folder = cache.store # Note, this is not the home, but the actual package cache
|
|
135
260
|
out = ConanOutput()
|
|
136
|
-
mkdir(os.path.dirname(
|
|
137
|
-
|
|
261
|
+
mkdir(os.path.dirname(path))
|
|
262
|
+
tgz_name = os.path.basename(path)
|
|
263
|
+
compressformat = next((e for e in COMPRESSIONS if tgz_name.endswith(e)), None)
|
|
264
|
+
if not compressformat:
|
|
265
|
+
raise ConanException(f"Unsupported compression format for {tgz_name}")
|
|
266
|
+
compresslevel = get_compress_level(compressformat, global_conf)
|
|
138
267
|
tar_files: dict[str, str] = {} # {path_in_tar: abs_path}
|
|
139
268
|
|
|
140
269
|
for ref, packages in package_list.items():
|
|
@@ -148,12 +277,12 @@ class CacheAPI:
|
|
|
148
277
|
for f in (EXPORT_FOLDER, EXPORT_SRC_FOLDER, SRC_FOLDER):
|
|
149
278
|
if f == SRC_FOLDER and no_source:
|
|
150
279
|
continue
|
|
151
|
-
|
|
152
|
-
if os.path.exists(
|
|
153
|
-
tar_files[f"{recipe_folder}/{f}"] =
|
|
154
|
-
|
|
155
|
-
if os.path.exists(
|
|
156
|
-
tar_files[f"{recipe_folder}/{DOWNLOAD_EXPORT_FOLDER}/{METADATA}"] =
|
|
280
|
+
cachepath = os.path.join(cache_folder, recipe_folder, f)
|
|
281
|
+
if os.path.exists(cachepath):
|
|
282
|
+
tar_files[f"{recipe_folder}/{f}"] = cachepath
|
|
283
|
+
cachepath = os.path.join(cache_folder, recipe_folder, DOWNLOAD_EXPORT_FOLDER, METADATA)
|
|
284
|
+
if os.path.exists(cachepath):
|
|
285
|
+
tar_files[f"{recipe_folder}/{DOWNLOAD_EXPORT_FOLDER}/{METADATA}"] = cachepath
|
|
157
286
|
|
|
158
287
|
for pref in packages:
|
|
159
288
|
pref_layout = cache.pkg_layout(pref)
|
|
@@ -177,11 +306,18 @@ class CacheAPI:
|
|
|
177
306
|
pkglist_path = os.path.join(tempfile.gettempdir(), "pkglist.json")
|
|
178
307
|
save(pkglist_path, serialized)
|
|
179
308
|
tar_files["pkglist.json"] = pkglist_path
|
|
180
|
-
compress_files(tar_files,
|
|
181
|
-
compresslevel, recursive=True)
|
|
309
|
+
compress_files(tar_files, tgz_name, os.path.dirname(path), compresslevel, recursive=True)
|
|
182
310
|
remove(pkglist_path)
|
|
311
|
+
ConanOutput().success(f"Created cache save file: {path}")
|
|
312
|
+
|
|
313
|
+
def restore(self, path) -> PackagesList:
|
|
314
|
+
"""Restore a compressed archive with recipes and packages previously saved from another
|
|
315
|
+
Conan cache into the currently active Conan cache.
|
|
183
316
|
|
|
184
|
-
|
|
317
|
+
:param path: The archive file to restore. Based on the extension of the file, different
|
|
318
|
+
compression formats can be used (.tgz, .txz and .tzst, the latter only for Python>=3.14).
|
|
319
|
+
:return: a PackageLists with the recipes and packages that have been restored to the cache
|
|
320
|
+
"""
|
|
185
321
|
if not os.path.isfile(path):
|
|
186
322
|
raise ConanException(f"Restore archive doesn't exist in {path}")
|
|
187
323
|
|
|
@@ -253,11 +389,15 @@ class CacheAPI:
|
|
|
253
389
|
|
|
254
390
|
def get_backup_sources(self, package_list=None, exclude=True, only_upload=True):
|
|
255
391
|
"""Get list of backup source files currently present in the cache,
|
|
256
|
-
either all of them if no argument, or filtered by those belonging to the references
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
392
|
+
either all of them if no argument, or filtered by those belonging to the references
|
|
393
|
+
in the package_list
|
|
394
|
+
|
|
395
|
+
:param package_list: a PackagesList object to filter backup files from (The files should
|
|
396
|
+
have been downloaded form any of the references in the package_list)
|
|
397
|
+
:param exclude: if True, exclude the sources that come from URLs present the
|
|
398
|
+
core.sources:exclude_urls global conf
|
|
399
|
+
:param only_upload: if True, only return the files for packages that are set to be uploaded
|
|
400
|
+
:return: A list of files that need to be uploaded
|
|
261
401
|
"""
|
|
262
402
|
config = self._api_helpers.global_conf
|
|
263
403
|
download_cache_path = config.get("core.sources:download_cache")
|
|
@@ -269,6 +409,8 @@ class CacheAPI:
|
|
|
269
409
|
return download_cache.get_backup_sources_files(excluded_urls, package_list, only_upload)
|
|
270
410
|
|
|
271
411
|
def path_to_ref(self, path):
|
|
412
|
+
# This method is explicitly not publicly documented, as mostly a command helper for
|
|
413
|
+
# debugging, it shouldn't be used in any real API usage
|
|
272
414
|
cache = PkgCache(self._conan_api.cache_folder, self._api_helpers.global_conf)
|
|
273
415
|
result = cache.path_to_ref(path)
|
|
274
416
|
if result is None:
|