conan 2.15.0__tar.gz → 2.16.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.15.0/conan.egg-info → conan-2.16.0}/PKG-INFO +1 -1
- {conan-2.15.0 → conan-2.16.0}/conan/__init__.py +1 -1
- {conan-2.15.0 → conan-2.16.0}/conan/api/output.py +2 -2
- {conan-2.15.0 → conan-2.16.0}/conan/api/subapi/audit.py +2 -0
- {conan-2.15.0 → conan-2.16.0}/conan/api/subapi/cache.py +3 -3
- {conan-2.15.0 → conan-2.16.0}/conan/api/subapi/graph.py +25 -0
- {conan-2.15.0 → conan-2.16.0}/conan/api/subapi/new.py +66 -1
- {conan-2.15.0 → conan-2.16.0}/conan/api/subapi/remotes.py +27 -5
- {conan-2.15.0 → conan-2.16.0}/conan/cli/cli.py +1 -0
- {conan-2.15.0 → conan-2.16.0}/conan/cli/commands/audit.py +30 -3
- {conan-2.15.0 → conan-2.16.0}/conan/cli/commands/graph.py +16 -22
- {conan-2.15.0 → conan-2.16.0}/conan/cli/commands/list.py +9 -3
- conan-2.16.0/conan/cli/commands/new.py +28 -0
- {conan-2.15.0 → conan-2.16.0}/conan/cli/commands/profile.py +7 -4
- {conan-2.15.0 → conan-2.16.0}/conan/cli/commands/remote.py +20 -40
- {conan-2.15.0 → conan-2.16.0}/conan/cli/formatters/audit/vulnerabilities.py +33 -35
- {conan-2.15.0 → conan-2.16.0}/conan/cli/formatters/graph/graph.py +4 -13
- {conan-2.15.0 → conan-2.16.0}/conan/cli/printers/graph.py +22 -17
- {conan-2.15.0 → conan-2.16.0}/conan/internal/api/audit/providers.py +49 -38
- {conan-2.15.0 → conan-2.16.0}/conan/internal/api/detect/detect_api.py +5 -2
- {conan-2.15.0 → conan-2.16.0}/conan/internal/api/uploader.py +3 -3
- {conan-2.15.0 → conan-2.16.0}/conan/internal/cache/cache.py +2 -4
- {conan-2.15.0 → conan-2.16.0}/conan/internal/cache/integrity_check.py +3 -3
- {conan-2.15.0 → conan-2.16.0}/conan/internal/default_settings.py +23 -19
- {conan-2.15.0 → conan-2.16.0}/conan/internal/model/conf.py +9 -1
- {conan-2.15.0 → conan-2.16.0}/conan/internal/model/cpp_info.py +27 -3
- {conan-2.15.0 → conan-2.16.0}/conan/internal/model/info.py +12 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/model/layout.py +1 -4
- {conan-2.15.0 → conan-2.16.0}/conan/internal/model/requires.py +4 -5
- {conan-2.15.0 → conan-2.16.0}/conan/test/utils/tools.py +2 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/apple/apple.py +27 -2
- {conan-2.15.0 → conan-2.16.0}/conan/tools/cmake/cmakedeps2/cmakedeps.py +8 -1
- {conan-2.15.0 → conan-2.16.0}/conan/tools/cmake/cmakedeps2/target_configuration.py +3 -1
- {conan-2.15.0 → conan-2.16.0}/conan/tools/cmake/toolchain/blocks.py +2 -6
- {conan-2.15.0 → conan-2.16.0}/conan/tools/gnu/autotoolstoolchain.py +9 -6
- {conan-2.15.0 → conan-2.16.0}/conan/tools/gnu/gnutoolchain.py +40 -28
- {conan-2.15.0 → conan-2.16.0}/conan/tools/meson/toolchain.py +7 -1
- {conan-2.15.0 → conan-2.16.0}/conan/tools/microsoft/layout.py +6 -6
- {conan-2.15.0 → conan-2.16.0}/conan/tools/microsoft/msbuild.py +11 -16
- {conan-2.15.0 → conan-2.16.0}/conan/tools/microsoft/msbuilddeps.py +7 -7
- {conan-2.15.0 → conan-2.16.0}/conan/tools/microsoft/toolchain.py +4 -7
- {conan-2.15.0 → conan-2.16.0}/conan/tools/microsoft/visual.py +8 -0
- conan-2.16.0/conan/tools/sbom/__init__.py +1 -0
- conan-2.16.0/conan/tools/sbom/cyclonedx.py +201 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/scm/git.py +3 -2
- {conan-2.15.0 → conan-2.16.0/conan.egg-info}/PKG-INFO +1 -1
- {conan-2.15.0 → conan-2.16.0}/conans/client/graph/graph.py +3 -3
- {conan-2.15.0 → conan-2.16.0}/conans/client/graph/graph_binaries.py +2 -1
- {conan-2.15.0 → conan-2.16.0}/conans/client/graph/install_graph.py +2 -2
- {conan-2.15.0 → conan-2.16.0}/conans/client/graph/proxy.py +3 -1
- {conan-2.15.0 → conan-2.16.0}/conans/client/installer.py +4 -1
- {conan-2.15.0 → conan-2.16.0}/conans/client/rest/auth_manager.py +5 -4
- {conan-2.15.0 → conan-2.16.0}/conans/client/rest_client_local_recipe_index.py +7 -5
- {conan-2.15.0 → conan-2.16.0}/conans/model/package_ref.py +2 -1
- conan-2.15.0/conan/cli/commands/new.py +0 -83
- conan-2.15.0/conan/tools/sbom/__init__.py +0 -1
- conan-2.15.0/conan/tools/sbom/cyclonedx.py +0 -101
- {conan-2.15.0 → conan-2.16.0}/LICENSE.md +0 -0
- {conan-2.15.0 → conan-2.16.0}/MANIFEST.in +0 -0
- {conan-2.15.0 → conan-2.16.0}/README.md +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/api/__init__.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/api/conan_api.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/api/input.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/api/model/__init__.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/api/model/list.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/api/model/refs.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/api/model/remote.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/api/subapi/__init__.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/api/subapi/command.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/api/subapi/config.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/api/subapi/download.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/api/subapi/export.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/api/subapi/install.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/api/subapi/list.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/api/subapi/local.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/api/subapi/lockfile.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/api/subapi/profiles.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/api/subapi/remove.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/api/subapi/search.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/api/subapi/upload.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/api/subapi/workspace.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/cli/__init__.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/cli/args.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/cli/command.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/cli/commands/__init__.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/cli/commands/build.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/cli/commands/cache.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/cli/commands/config.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/cli/commands/create.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/cli/commands/download.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/cli/commands/editable.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/cli/commands/export.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/cli/commands/export_pkg.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/cli/commands/inspect.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/cli/commands/install.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/cli/commands/lock.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/cli/commands/pkglist.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/cli/commands/remove.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/cli/commands/search.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/cli/commands/source.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/cli/commands/test.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/cli/commands/upload.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/cli/commands/version.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/cli/commands/workspace.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/cli/exit_codes.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/cli/formatters/__init__.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/cli/formatters/audit/__init__.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/cli/formatters/graph/__init__.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/cli/formatters/graph/build_order_html.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/cli/formatters/graph/graph_info_text.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/cli/formatters/graph/info_graph_dot.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/cli/formatters/graph/info_graph_html.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/cli/formatters/list/__init__.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/cli/formatters/list/list.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/cli/formatters/list/search_table_html.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/cli/printers/__init__.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/cps/__init__.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/cps/cps.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/errors.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/__init__.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/api/__init__.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/api/audit/__init__.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/api/config/__init__.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/api/config/config_installer.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/api/detect/__init__.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/api/detect/detect_vs.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/api/export.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/api/install/__init__.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/api/install/generators.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/api/list/__init__.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/api/list/query_parse.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/api/local/__init__.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/api/local/editable.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/api/new/__init__.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/api/new/alias_new.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/api/new/autoools_exe.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/api/new/autotools_lib.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/api/new/basic.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/api/new/bazel_7_exe.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/api/new/bazel_7_lib.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/api/new/bazel_exe.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/api/new/bazel_lib.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/api/new/cmake_exe.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/api/new/cmake_lib.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/api/new/local_recipes_index.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/api/new/meson_exe.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/api/new/meson_lib.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/api/new/msbuild_exe.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/api/new/msbuild_lib.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/api/new/qbs_lib.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/api/new/workspace.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/api/profile/__init__.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/api/profile/detect.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/api/profile/profile_loader.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/api/remotes/__init__.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/api/remotes/encrypt.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/api/remotes/localdb.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/cache/__init__.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/cache/conan_reference_layout.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/cache/db/__init__.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/cache/db/cache_database.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/cache/db/packages_table.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/cache/db/recipes_table.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/cache/db/table.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/cache/home_paths.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/conan_app.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/deploy.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/errors.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/internal_tools.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/methods.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/model/__init__.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/model/conan_file.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/model/conanfile_interface.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/model/dependencies.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/model/lockfile.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/model/manifest.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/model/options.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/model/pkg_type.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/model/profile.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/model/recipe_ref.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/model/settings.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/model/version.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/model/version_range.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/model/workspace.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/paths.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/runner/__init__.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/runner/docker.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/runner/output.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/runner/ssh.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/internal/runner/wsl.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/test/__init__.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/test/assets/__init__.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/test/assets/autotools.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/test/assets/cmake.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/test/assets/genconanfile.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/test/assets/sources.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/test/assets/visual_project_files.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/test/utils/__init__.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/test/utils/artifactory.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/test/utils/env.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/test/utils/file_server.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/test/utils/mocks.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/test/utils/profiles.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/test/utils/scm.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/test/utils/server_launcher.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/test/utils/test_files.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/__init__.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/android/__init__.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/android/utils.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/apple/__init__.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/apple/xcodebuild.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/apple/xcodedeps.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/apple/xcodetoolchain.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/build/__init__.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/build/cppstd.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/build/cpu.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/build/cross_building.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/build/cstd.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/build/flags.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/build/stdcpp_library.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/cmake/__init__.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/cmake/cmake.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/cmake/cmakedeps/__init__.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/cmake/cmakedeps/cmakedeps.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/cmake/cmakedeps/templates/__init__.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/cmake/cmakedeps/templates/config.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/cmake/cmakedeps/templates/config_version.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/cmake/cmakedeps/templates/macros.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/cmake/cmakedeps/templates/target_configuration.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/cmake/cmakedeps/templates/target_data.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/cmake/cmakedeps/templates/targets.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/cmake/cmakedeps2/__init__.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/cmake/cmakedeps2/config.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/cmake/cmakedeps2/config_version.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/cmake/cmakedeps2/targets.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/cmake/layout.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/cmake/presets.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/cmake/toolchain/__init__.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/cmake/toolchain/toolchain.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/cmake/utils.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/cps/__init__.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/cps/cps_deps.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/env/__init__.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/env/environment.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/env/virtualbuildenv.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/env/virtualrunenv.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/files/__init__.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/files/conandata.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/files/copy_pattern.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/files/files.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/files/packager.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/files/patches.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/files/symlinks/__init__.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/files/symlinks/symlinks.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/gnu/__init__.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/gnu/autotools.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/gnu/autotoolsdeps.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/gnu/get_gnu_triplet.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/gnu/gnudeps_flags.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/gnu/makedeps.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/gnu/pkgconfig.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/gnu/pkgconfigdeps.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/google/__init__.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/google/bazel.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/google/bazeldeps.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/google/layout.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/google/toolchain.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/intel/__init__.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/intel/intel_cc.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/layout/__init__.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/meson/__init__.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/meson/helpers.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/meson/meson.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/microsoft/__init__.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/microsoft/nmakedeps.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/microsoft/nmaketoolchain.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/microsoft/subsystems.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/premake/__init__.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/premake/premake.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/premake/premakedeps.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/qbs/__init__.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/qbs/common.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/qbs/qbs.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/qbs/qbsdeps.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/qbs/qbsprofile.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/ros/__init__.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/ros/rosenv.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/scm/__init__.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/scons/__init__.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/scons/sconsdeps.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/system/__init__.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan/tools/system/package_manager.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan.egg-info/SOURCES.txt +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan.egg-info/dependency_links.txt +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan.egg-info/entry_points.txt +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan.egg-info/requires.txt +0 -0
- {conan-2.15.0 → conan-2.16.0}/conan.egg-info/top_level.txt +0 -0
- {conan-2.15.0 → conan-2.16.0}/conans/__init__.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conans/client/__init__.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conans/client/downloaders/__init__.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conans/client/downloaders/caching_file_downloader.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conans/client/downloaders/download_cache.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conans/client/downloaders/file_downloader.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conans/client/graph/__init__.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conans/client/graph/build_mode.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conans/client/graph/compatibility.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conans/client/graph/compute_pid.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conans/client/graph/graph_builder.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conans/client/graph/graph_error.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conans/client/graph/profile_node_definer.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conans/client/graph/provides.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conans/client/graph/python_requires.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conans/client/graph/range_resolver.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conans/client/hook_manager.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conans/client/loader.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conans/client/loader_txt.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conans/client/migrations.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conans/client/pkg_sign.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conans/client/remote_manager.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conans/client/rest/__init__.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conans/client/rest/client_routes.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conans/client/rest/conan_requester.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conans/client/rest/file_uploader.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conans/client/rest/remote_credentials.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conans/client/rest/rest_client.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conans/client/rest/rest_client_v2.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conans/client/rest/rest_routes.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conans/client/source.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conans/client/subsystems.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conans/conan.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conans/conan_server.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conans/migrations.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conans/model/__init__.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conans/model/recipe_ref.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conans/requirements.txt +0 -0
- {conan-2.15.0 → conan-2.16.0}/conans/requirements_dev.txt +0 -0
- {conan-2.15.0 → conan-2.16.0}/conans/requirements_runner.txt +0 -0
- {conan-2.15.0 → conan-2.16.0}/conans/requirements_server.txt +0 -0
- {conan-2.15.0 → conan-2.16.0}/conans/util/__init__.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conans/util/config_parser.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conans/util/dates.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conans/util/files.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conans/util/locks.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conans/util/runners.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/conans/util/thread.py +0 -0
- {conan-2.15.0 → conan-2.16.0}/pyproject.toml +0 -0
- {conan-2.15.0 → conan-2.16.0}/setup.cfg +0 -0
- {conan-2.15.0 → conan-2.16.0}/setup.py +0 -0
|
@@ -207,9 +207,9 @@ class ConanOutput:
|
|
|
207
207
|
self._write_message(msg, fg=Color.BLUE)
|
|
208
208
|
return self
|
|
209
209
|
|
|
210
|
-
def debug(self, msg):
|
|
210
|
+
def debug(self, msg, fg=Color.MAGENTA, bg=None):
|
|
211
211
|
if self._conan_output_level <= LEVEL_DEBUG:
|
|
212
|
-
self._write_message(msg, fg=
|
|
212
|
+
self._write_message(msg, fg=fg, bg=bg)
|
|
213
213
|
return self
|
|
214
214
|
|
|
215
215
|
def verbose(self, msg, fg=None, bg=None):
|
|
@@ -24,7 +24,7 @@ class CacheAPI:
|
|
|
24
24
|
|
|
25
25
|
def export_path(self, ref: RecipeReference):
|
|
26
26
|
cache = PkgCache(self.conan_api.cache_folder, self.conan_api.config.global_conf)
|
|
27
|
-
ref
|
|
27
|
+
ref = _resolve_latest_ref(cache, ref)
|
|
28
28
|
ref_layout = cache.recipe_layout(ref)
|
|
29
29
|
return _check_folder_existence(ref, "export", ref_layout.export())
|
|
30
30
|
|
|
@@ -36,13 +36,13 @@ class CacheAPI:
|
|
|
36
36
|
|
|
37
37
|
def export_source_path(self, ref: RecipeReference):
|
|
38
38
|
cache = PkgCache(self.conan_api.cache_folder, self.conan_api.config.global_conf)
|
|
39
|
-
ref
|
|
39
|
+
ref = _resolve_latest_ref(cache, ref)
|
|
40
40
|
ref_layout = cache.recipe_layout(ref)
|
|
41
41
|
return _check_folder_existence(ref, "export_sources", ref_layout.export_sources())
|
|
42
42
|
|
|
43
43
|
def source_path(self, ref: RecipeReference):
|
|
44
44
|
cache = PkgCache(self.conan_api.cache_folder, self.conan_api.config.global_conf)
|
|
45
|
-
ref
|
|
45
|
+
ref = _resolve_latest_ref(cache, ref)
|
|
46
46
|
ref_layout = cache.recipe_layout(ref)
|
|
47
47
|
return _check_folder_existence(ref, "source", ref_layout.source())
|
|
48
48
|
|
|
@@ -5,6 +5,7 @@ from conans.client.graph.graph import Node, RECIPE_CONSUMER, CONTEXT_HOST, RECIP
|
|
|
5
5
|
CONTEXT_BUILD, BINARY_MISSING
|
|
6
6
|
from conans.client.graph.graph_binaries import GraphBinariesAnalyzer
|
|
7
7
|
from conans.client.graph.graph_builder import DepsGraphBuilder
|
|
8
|
+
from conans.client.graph.install_graph import InstallGraph, ProfileArgs
|
|
8
9
|
from conans.client.graph.profile_node_definer import initialize_conanfile_profile, consumer_definer
|
|
9
10
|
from conan.errors import ConanException
|
|
10
11
|
from conan.api.model import RecipeReference
|
|
@@ -212,3 +213,27 @@ class GraphAPI:
|
|
|
212
213
|
or (missing and ref_matches(node.ref, missing, is_consumer=None))):
|
|
213
214
|
return node.ref, node.conanfile.info
|
|
214
215
|
raise ConanException("There is no missing binary")
|
|
216
|
+
|
|
217
|
+
@staticmethod
|
|
218
|
+
def build_order(deps_graph, order_by="recipe", reduce=False, profile_args=None):
|
|
219
|
+
install_graph = InstallGraph(deps_graph, order_by=order_by,
|
|
220
|
+
profile_args=ProfileArgs.from_args(profile_args))
|
|
221
|
+
if reduce:
|
|
222
|
+
if order_by is None:
|
|
223
|
+
raise ConanException("--reduce needs --order-by argument defined")
|
|
224
|
+
install_graph.reduce()
|
|
225
|
+
return install_graph
|
|
226
|
+
|
|
227
|
+
@staticmethod
|
|
228
|
+
def build_order_merge(files, reduce=False):
|
|
229
|
+
result = InstallGraph.load(files[0])
|
|
230
|
+
if result.reduced:
|
|
231
|
+
raise ConanException(f"Reduced build-order file cannot be merged: {files[0]}")
|
|
232
|
+
for f in files[1:]:
|
|
233
|
+
install_graph = InstallGraph.load(f)
|
|
234
|
+
if install_graph.reduced:
|
|
235
|
+
raise ConanException(f"Reduced build-order file cannot be merged: {f}")
|
|
236
|
+
result.merge(install_graph)
|
|
237
|
+
if reduce:
|
|
238
|
+
result.reduce()
|
|
239
|
+
return result
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import fnmatch
|
|
2
2
|
import os
|
|
3
|
+
import shutil
|
|
3
4
|
|
|
4
5
|
from jinja2 import Template, StrictUndefined, UndefinedError, Environment, meta
|
|
5
6
|
|
|
7
|
+
from conan.api.output import ConanOutput
|
|
6
8
|
from conan.errors import ConanException
|
|
7
|
-
from conans.util.files import load
|
|
9
|
+
from conans.util.files import load, save
|
|
8
10
|
from conan import __version__
|
|
9
11
|
|
|
10
12
|
|
|
@@ -14,6 +16,69 @@ class NewAPI:
|
|
|
14
16
|
def __init__(self, conan_api):
|
|
15
17
|
self.conan_api = conan_api
|
|
16
18
|
|
|
19
|
+
def save_template(self, template, defines=None, output_folder=None, force=False):
|
|
20
|
+
"""
|
|
21
|
+
Save the 'template' files in the output_folder, replacing the template variables
|
|
22
|
+
with the 'defines'
|
|
23
|
+
:param template: The name of the template to use
|
|
24
|
+
:param defines: A list with the 'k=v' variables to replace in the template
|
|
25
|
+
:param output_folder: The folder where the template files will be saved, cwd if None
|
|
26
|
+
:param force: If True, overwrite the files if they already exist, otherwise raise an error
|
|
27
|
+
"""
|
|
28
|
+
# Manually parsing the remainder
|
|
29
|
+
definitions = {}
|
|
30
|
+
for u in defines or []:
|
|
31
|
+
try:
|
|
32
|
+
k, v = u.split("=", 1)
|
|
33
|
+
except ValueError:
|
|
34
|
+
raise ConanException(f"Template definitions must be 'key=value', received {u}")
|
|
35
|
+
k = k.replace("-", "") # Remove possible "--name=value"
|
|
36
|
+
# For variables that only show up once, no need for list to keep compatible behaviour
|
|
37
|
+
if k in definitions:
|
|
38
|
+
if isinstance(definitions[k], list):
|
|
39
|
+
definitions[k].append(v)
|
|
40
|
+
else:
|
|
41
|
+
definitions[k] = [definitions[k], v]
|
|
42
|
+
else:
|
|
43
|
+
definitions[k] = v
|
|
44
|
+
|
|
45
|
+
files = self.get_template(template) # First priority: user folder
|
|
46
|
+
is_builtin = False
|
|
47
|
+
if not files: # then, try the templates in the Conan home
|
|
48
|
+
files = self.get_home_template(template)
|
|
49
|
+
if files:
|
|
50
|
+
template_files, non_template_files = files
|
|
51
|
+
else:
|
|
52
|
+
template_files = self.get_builtin_template(template)
|
|
53
|
+
non_template_files = {}
|
|
54
|
+
is_builtin = True
|
|
55
|
+
|
|
56
|
+
if not template_files and not non_template_files:
|
|
57
|
+
raise ConanException(f"Template doesn't exist or not a folder: {template}")
|
|
58
|
+
|
|
59
|
+
if is_builtin and template == "workspace": # hardcoded for the workspace special case
|
|
60
|
+
definitions["name"] = "liba"
|
|
61
|
+
template_files = self.render(template_files, definitions)
|
|
62
|
+
|
|
63
|
+
# Saving the resulting files
|
|
64
|
+
output = ConanOutput()
|
|
65
|
+
output_folder = output_folder or os.getcwd()
|
|
66
|
+
# Making sure they don't overwrite existing files
|
|
67
|
+
for f, v in sorted(template_files.items()):
|
|
68
|
+
path = os.path.join(output_folder, f)
|
|
69
|
+
if os.path.exists(path) and not force:
|
|
70
|
+
raise ConanException(f"File '{f}' already exists, and --force not defined, aborting")
|
|
71
|
+
save(path, v)
|
|
72
|
+
output.success("File saved: %s" % f)
|
|
73
|
+
|
|
74
|
+
# copy non-templates
|
|
75
|
+
for f, v in sorted(non_template_files.items()):
|
|
76
|
+
path = os.path.join(output_folder, f)
|
|
77
|
+
if os.path.exists(path) and not force:
|
|
78
|
+
raise ConanException(f"File '{f}' already exists, and --force not defined, aborting")
|
|
79
|
+
shutil.copy2(v, path)
|
|
80
|
+
output.success("File saved: %s" % f)
|
|
81
|
+
|
|
17
82
|
@staticmethod
|
|
18
83
|
def get_builtin_template(template_name):
|
|
19
84
|
from conan.internal.api.new.basic import basic_file
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import fnmatch
|
|
2
2
|
import json
|
|
3
3
|
import os
|
|
4
|
+
from collections import OrderedDict
|
|
4
5
|
from urllib.parse import urlparse
|
|
5
6
|
|
|
6
7
|
from conan.api.model import Remote, LOCAL_RECIPES_INDEX
|
|
@@ -8,6 +9,7 @@ from conan.api.output import ConanOutput
|
|
|
8
9
|
from conan.internal.cache.home_paths import HomePaths
|
|
9
10
|
from conan.internal.conan_app import ConanBasicApp
|
|
10
11
|
from conans.client.rest.conan_requester import ConanRequester
|
|
12
|
+
from conans.client.rest.remote_credentials import RemoteCredentials
|
|
11
13
|
from conans.client.rest_client_local_recipe_index import add_local_recipes_index_remote, \
|
|
12
14
|
remove_local_recipes_index_remote
|
|
13
15
|
from conan.internal.api.remotes.localdb import LocalDB
|
|
@@ -29,14 +31,14 @@ class RemotesAPI:
|
|
|
29
31
|
|
|
30
32
|
def __init__(self, conan_api):
|
|
31
33
|
# This method is private, the subapi is not instantiated by users
|
|
32
|
-
self.
|
|
34
|
+
self._conan_api = conan_api
|
|
33
35
|
self._home_folder = conan_api.home_folder
|
|
34
36
|
self._remotes_file = HomePaths(self._home_folder).remotes_path
|
|
35
37
|
# Wraps an http_requester to inject proxies, certs, etc
|
|
36
|
-
self._requester = ConanRequester(self.
|
|
38
|
+
self._requester = ConanRequester(self._conan_api.config.global_conf, self._conan_api.cache_folder)
|
|
37
39
|
|
|
38
40
|
def reinit(self):
|
|
39
|
-
self._requester = ConanRequester(self.
|
|
41
|
+
self._requester = ConanRequester(self._conan_api.config.global_conf, self._conan_api.cache_folder)
|
|
40
42
|
|
|
41
43
|
def list(self, pattern=None, only_enabled=True):
|
|
42
44
|
"""
|
|
@@ -224,9 +226,29 @@ class RemotesAPI:
|
|
|
224
226
|
:param username: the user login as ``str``
|
|
225
227
|
:param password: password ``str``
|
|
226
228
|
"""
|
|
227
|
-
app = ConanBasicApp(self.
|
|
229
|
+
app = ConanBasicApp(self._conan_api)
|
|
228
230
|
app.remote_manager.authenticate(remote, username, password)
|
|
229
231
|
|
|
232
|
+
def login(self, remotes, username=None, password=None):
|
|
233
|
+
creds = RemoteCredentials(self._conan_api.cache_folder, self._conan_api.config.global_conf)
|
|
234
|
+
|
|
235
|
+
ret = OrderedDict()
|
|
236
|
+
for r in remotes:
|
|
237
|
+
previous_info = self.user_info(r)
|
|
238
|
+
|
|
239
|
+
if username is not None and password is not None:
|
|
240
|
+
user, password = username, password
|
|
241
|
+
else:
|
|
242
|
+
user, password, _ = creds.auth(r, username)
|
|
243
|
+
if username is not None and username != user:
|
|
244
|
+
raise ConanException(f"User '{username}' doesn't match user '{user}' in "
|
|
245
|
+
f"credentials.json or environment variables")
|
|
246
|
+
|
|
247
|
+
self.user_login(r, user, password)
|
|
248
|
+
info = self.user_info(r)
|
|
249
|
+
ret[r.name] = {"previous_info": previous_info, "info": info}
|
|
250
|
+
return ret
|
|
251
|
+
|
|
230
252
|
def user_logout(self, remote: Remote):
|
|
231
253
|
"""
|
|
232
254
|
Logout from the given :ref:`Remote <conan.api.model.Remote>`
|
|
@@ -247,7 +269,7 @@ class RemotesAPI:
|
|
|
247
269
|
def user_auth(self, remote: Remote, with_user=False, force=False):
|
|
248
270
|
# TODO: Review
|
|
249
271
|
localdb = LocalDB(self._home_folder)
|
|
250
|
-
app = ConanBasicApp(self.
|
|
272
|
+
app = ConanBasicApp(self._conan_api)
|
|
251
273
|
if with_user:
|
|
252
274
|
user, token, _ = localdb.get_login(remote.url)
|
|
253
275
|
if not user:
|
|
@@ -20,10 +20,31 @@ def _add_provider_arg(subparser):
|
|
|
20
20
|
subparser.add_argument("-p", "--provider", help="Provider to use for scanning")
|
|
21
21
|
|
|
22
22
|
|
|
23
|
+
def _parse_error_threshold(result: dict, error_level: float) -> None:
|
|
24
|
+
"""Mark the result as error if any of the vulnerabilities has a severity greater than or equal to
|
|
25
|
+
The error_level reflects the severity level configured by the user. As it uses float and CVSS
|
|
26
|
+
score is limited to 10.0, users can use any higher number to skip it.
|
|
27
|
+
|
|
28
|
+
:param result: Conan audit scan result. It's expected to find cvss there
|
|
29
|
+
:param error_level: Threshold to raise an error in case of matching the severity level
|
|
30
|
+
:return: None
|
|
31
|
+
"""
|
|
32
|
+
if "conan_error" not in result:
|
|
33
|
+
for ref in result["data"]:
|
|
34
|
+
for edge in result["data"][ref]["vulnerabilities"]["edges"]:
|
|
35
|
+
preferred_base_score = float(edge["node"]["cvss"].get("preferredBaseScore", 0.0))
|
|
36
|
+
if preferred_base_score >= error_level:
|
|
37
|
+
result.update(
|
|
38
|
+
{"conan_error":
|
|
39
|
+
f"The package {ref} has a CVSS score {preferred_base_score} and "
|
|
40
|
+
f"exceeded the threshold severity level {error_level}."})
|
|
41
|
+
break
|
|
42
|
+
|
|
43
|
+
|
|
23
44
|
@conan_subcommand(formatters={"text": text_vuln_formatter,
|
|
24
45
|
"json": json_vuln_formatter,
|
|
25
46
|
"html": html_vuln_formatter})
|
|
26
|
-
def audit_scan(conan_api: ConanAPI, parser, subparser, *args):
|
|
47
|
+
def audit_scan(conan_api: ConanAPI, parser, subparser, *args) -> dict:
|
|
27
48
|
"""
|
|
28
49
|
Scan a given recipe for vulnerabilities in its dependencies.
|
|
29
50
|
"""
|
|
@@ -32,6 +53,10 @@ def audit_scan(conan_api: ConanAPI, parser, subparser, *args):
|
|
|
32
53
|
# TODO: Do we then want to hide it in the --help?
|
|
33
54
|
subparser.add_argument("--build-require", action='store_true', default=False,
|
|
34
55
|
help='Whether the provided reference is a build-require')
|
|
56
|
+
subparser.add_argument("-sl", "--severity-level", action="store", default=9.0, type=float,
|
|
57
|
+
help="Set threshold for severity level to raise an error. "
|
|
58
|
+
"By default raises an error for any critical CVSS (9.0 or higher). "
|
|
59
|
+
" Use 100.0 to disable it.")
|
|
35
60
|
|
|
36
61
|
_add_provider_arg(subparser)
|
|
37
62
|
args = parser.parse_args(*args)
|
|
@@ -65,11 +90,13 @@ def audit_scan(conan_api: ConanAPI, parser, subparser, *args):
|
|
|
65
90
|
deps_graph.report_graph_error()
|
|
66
91
|
|
|
67
92
|
if deps_graph.error:
|
|
68
|
-
return {"
|
|
93
|
+
return {"conan_error": deps_graph.error}
|
|
69
94
|
|
|
70
95
|
provider = conan_api.audit.get_provider(args.provider or CONAN_CENTER_AUDIT_PROVIDER_NAME)
|
|
71
96
|
|
|
72
|
-
|
|
97
|
+
scan_result = conan_api.audit.scan(deps_graph, provider)
|
|
98
|
+
_parse_error_threshold(scan_result, args.severity_level)
|
|
99
|
+
return scan_result
|
|
73
100
|
|
|
74
101
|
|
|
75
102
|
@conan_subcommand(formatters={"text": text_vuln_formatter,
|
|
@@ -12,7 +12,6 @@ from conan.cli.formatters.graph.graph_info_text import format_graph_info
|
|
|
12
12
|
from conan.cli.printers import print_profiles
|
|
13
13
|
from conan.cli.printers.graph import print_graph_packages, print_graph_basic
|
|
14
14
|
from conan.errors import ConanException
|
|
15
|
-
from conans.client.graph.install_graph import InstallGraph, ProfileArgs
|
|
16
15
|
|
|
17
16
|
|
|
18
17
|
def explain_formatter_text(data):
|
|
@@ -111,13 +110,8 @@ def graph_build_order(conan_api, parser, subparser, *args):
|
|
|
111
110
|
|
|
112
111
|
out = ConanOutput()
|
|
113
112
|
out.title("Computing the build order")
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
profile_args=ProfileArgs.from_args(args))
|
|
117
|
-
if args.reduce:
|
|
118
|
-
if args.order_by is None:
|
|
119
|
-
raise ConanException("--reduce needs --order-by argument defined")
|
|
120
|
-
install_graph.reduce()
|
|
113
|
+
install_graph = conan_api.graph.build_order(deps_graph, args.order_by, args.reduce,
|
|
114
|
+
profile_args=args)
|
|
121
115
|
install_order_serialized = install_graph.install_build_order()
|
|
122
116
|
if args.order_by is None: # legacy
|
|
123
117
|
install_order_serialized = install_order_serialized["order"]
|
|
@@ -144,21 +138,12 @@ def graph_build_order_merge(conan_api, parser, subparser, *args): # noqa
|
|
|
144
138
|
if not args.file or len(args.file) < 2:
|
|
145
139
|
raise ConanException("At least 2 files are needed to be merged")
|
|
146
140
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
for f in args.file[1:]:
|
|
151
|
-
install_graph = InstallGraph.load(make_abs_path(f))
|
|
152
|
-
if install_graph.reduced:
|
|
153
|
-
raise ConanException(f"Reduced build-order file cannot be merged: {f}")
|
|
154
|
-
result.merge(install_graph)
|
|
155
|
-
|
|
156
|
-
if args.reduce:
|
|
157
|
-
result.reduce()
|
|
141
|
+
files = [make_abs_path(f) for f in args.file]
|
|
142
|
+
result = conan_api.graph.build_order_merge(files, args.reduce)
|
|
143
|
+
|
|
158
144
|
install_order_serialized = result.install_build_order()
|
|
159
145
|
if getattr(result, "legacy"):
|
|
160
146
|
install_order_serialized = install_order_serialized["order"]
|
|
161
|
-
|
|
162
147
|
return {"build_order": install_order_serialized,
|
|
163
148
|
"conan_error": result.get_errors()}
|
|
164
149
|
|
|
@@ -236,13 +221,22 @@ def graph_info(conan_api, parser, subparser, *args):
|
|
|
236
221
|
base_folder = args.deployer_folder or os.getcwd()
|
|
237
222
|
conan_api.install.deploy(deps_graph, args.deployer, None, base_folder)
|
|
238
223
|
|
|
224
|
+
warn_msg = None
|
|
225
|
+
missing = set(str(n.ref.name) for n in deps_graph.nodes if n.binary == "Missing")
|
|
226
|
+
invalid = set(str(n.ref.name) for n in deps_graph.nodes if n.binary == "Invalid")
|
|
227
|
+
if missing or invalid:
|
|
228
|
+
warn_msg = "There are some error(s) in the graph:"
|
|
229
|
+
if missing:
|
|
230
|
+
warn_msg += f"\n - Missing packages: {', '.join(missing)}"
|
|
231
|
+
if invalid:
|
|
232
|
+
warn_msg += f"\n - Invalid packages: {', '.join(invalid)}"
|
|
233
|
+
|
|
239
234
|
return {"graph": deps_graph,
|
|
240
235
|
"field_filter": args.filter,
|
|
241
236
|
"package_filter": args.package_filter,
|
|
242
237
|
"conan_api": conan_api,
|
|
243
238
|
"conan_error": str(deps_graph.error) if deps_graph.error else None,
|
|
244
|
-
|
|
245
|
-
"conan_warning": InstallGraph(deps_graph).get_errors() if not deps_graph.error else None}
|
|
239
|
+
"conan_warning": warn_msg}
|
|
246
240
|
|
|
247
241
|
|
|
248
242
|
@conan_subcommand(formatters={"text": explain_formatter_text,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import json
|
|
2
|
+
import datetime
|
|
2
3
|
|
|
3
4
|
from conan.api.conan_api import ConanAPI
|
|
4
5
|
from conan.api.model import ListPattern, MultiPackagesList
|
|
@@ -7,7 +8,6 @@ from conan.cli import make_abs_path
|
|
|
7
8
|
from conan.cli.command import conan_command, OnceArgument
|
|
8
9
|
from conan.cli.formatters.list import list_packages_html
|
|
9
10
|
from conan.errors import ConanException
|
|
10
|
-
from conans.util.dates import timestamp_to_str
|
|
11
11
|
|
|
12
12
|
# Keep them so we don't break other commands that import them, but TODO: Remove later
|
|
13
13
|
remote_color = Color.BRIGHT_BLUE
|
|
@@ -19,6 +19,12 @@ field_color = Color.BRIGHT_YELLOW
|
|
|
19
19
|
value_color = Color.CYAN
|
|
20
20
|
|
|
21
21
|
|
|
22
|
+
def _format_timestamp_human(timestamp):
|
|
23
|
+
# used by ref.repr_humantime() to print human readable time
|
|
24
|
+
return datetime.datetime.fromtimestamp(int(timestamp),
|
|
25
|
+
datetime.timezone.utc).strftime('%Y-%m-%d %H:%M:%S UTC')
|
|
26
|
+
|
|
27
|
+
|
|
22
28
|
def print_serial(item, indent=None, color_index=None):
|
|
23
29
|
indent = "" if indent is None else (indent + " ")
|
|
24
30
|
color_index = 0 if color_index is None else (color_index + 1)
|
|
@@ -78,7 +84,7 @@ def print_list_text(results):
|
|
|
78
84
|
for k, v in item.items():
|
|
79
85
|
if isinstance(v, dict) and v.get("timestamp"):
|
|
80
86
|
timestamp = v.pop("timestamp")
|
|
81
|
-
k = f"{k} ({
|
|
87
|
+
k = f"{k} ({_format_timestamp_human(timestamp)})"
|
|
82
88
|
result[k] = format_timestamps(v)
|
|
83
89
|
return result
|
|
84
90
|
return item
|
|
@@ -108,7 +114,7 @@ def prepare_pkglist_compact(pkglist):
|
|
|
108
114
|
new_rrev = f"{ref}#{rrev}"
|
|
109
115
|
timestamp = rrev_info.pop("timestamp", None)
|
|
110
116
|
if timestamp:
|
|
111
|
-
new_rrev += f"%{timestamp} ({
|
|
117
|
+
new_rrev += f"%{timestamp} ({_format_timestamp_human(timestamp)})"
|
|
112
118
|
|
|
113
119
|
packages = rrev_info.pop("packages", None)
|
|
114
120
|
if packages:
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import os
|
|
2
|
+
|
|
3
|
+
from conan.cli.command import conan_command
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
@conan_command(group="Creator")
|
|
7
|
+
def new(conan_api, parser, *args):
|
|
8
|
+
"""
|
|
9
|
+
Create a new example recipe and source files from a template.
|
|
10
|
+
"""
|
|
11
|
+
parser.add_argument("template", help="Template name, "
|
|
12
|
+
"either a predefined built-in or a user-provided one. "
|
|
13
|
+
"Available built-in templates: basic, cmake_lib, cmake_exe, "
|
|
14
|
+
"meson_lib, meson_exe, msbuild_lib, msbuild_exe, bazel_lib, bazel_exe, "
|
|
15
|
+
"autotools_lib, autotools_exe, local_recipes_index, workspace. "
|
|
16
|
+
"E.g. 'conan new cmake_lib -d name=hello -d version=0.1'. "
|
|
17
|
+
"You can define your own templates too by inputting an absolute path "
|
|
18
|
+
"as your template, or a path relative to your conan home folder."
|
|
19
|
+
)
|
|
20
|
+
parser.add_argument("-d", "--define", action="append",
|
|
21
|
+
help="Define a template argument as key=value, e.g., -d name=mypkg")
|
|
22
|
+
parser.add_argument("-f", "--force", action='store_true',
|
|
23
|
+
help="Overwrite file if it already exists")
|
|
24
|
+
parser.add_argument("-o", "--output", help="Output folder for the generated files",
|
|
25
|
+
default=os.getcwd())
|
|
26
|
+
|
|
27
|
+
args = parser.parse_args(*args)
|
|
28
|
+
conan_api.new.save_template(args.template, args.define, args.output, args.force)
|
|
@@ -6,7 +6,6 @@ from conan.cli.command import conan_command, conan_subcommand
|
|
|
6
6
|
from conan.cli.formatters import default_json_formatter
|
|
7
7
|
from conan.cli.args import add_profiles_args
|
|
8
8
|
from conan.errors import ConanException
|
|
9
|
-
from conans.util.files import save
|
|
10
9
|
|
|
11
10
|
|
|
12
11
|
def _print_profiles(profiles):
|
|
@@ -92,11 +91,15 @@ def profile_detect(conan_api, parser, subparser, *args):
|
|
|
92
91
|
"change in future Conan versions.")
|
|
93
92
|
ConanOutput().warning("Use your own profile files for stability.")
|
|
94
93
|
ConanOutput().success(f"Saving detected profile to {profile_pathname}")
|
|
95
|
-
|
|
94
|
+
dir_path = os.path.dirname(profile_pathname)
|
|
95
|
+
if dir_path:
|
|
96
|
+
os.makedirs(dir_path, exist_ok=True)
|
|
97
|
+
with open(profile_pathname, "w", encoding="utf-8", newline="") as f:
|
|
98
|
+
f.write(contents)
|
|
96
99
|
|
|
97
100
|
|
|
98
101
|
@conan_subcommand(formatters={"text": profiles_list_cli_output, "json": default_json_formatter})
|
|
99
|
-
def profile_list(conan_api, parser, subparser, *args):
|
|
102
|
+
def profile_list(conan_api, parser, subparser, *args): # noqa
|
|
100
103
|
"""
|
|
101
104
|
List all profiles in the cache.
|
|
102
105
|
"""
|
|
@@ -105,7 +108,7 @@ def profile_list(conan_api, parser, subparser, *args):
|
|
|
105
108
|
|
|
106
109
|
|
|
107
110
|
@conan_command(group="Consumer")
|
|
108
|
-
def profile(conan_api, parser, *args):
|
|
111
|
+
def profile(conan_api, parser, *args): # noqa
|
|
109
112
|
"""
|
|
110
113
|
Manage profiles.
|
|
111
114
|
"""
|