本文档翻译自:https://docs.conan.io/en/latest/reference/commands/misc/imports.html

    1. $ conan imports [-h] [-if INSTALL_FOLDER] [-imf IMPORT_FOLDER] [-u] path

    调用您本地的conanfile.py或conanfile.txt的“ imports”方法。
    它需要预先安装,并且在–install-folder(默认为当前目录)中具有conanbuildinfo.txt生成的文件。

    1. positional arguments:
    2. path Path to a folder containing a conanfile.py or to a
    3. recipe file e.g., my_folder/conanfile.py With --undo
    4. option, this parameter is the folder containing the
    5. conan_imports_manifest.txt file generated in a
    6. previous execution. e.g.: conan imports
    7. ./imported_files --undo
    8. optional arguments:
    9. -h, --help show this help message and exit
    10. -if INSTALL_FOLDER, --install-folder INSTALL_FOLDER
    11. Directory containing the conaninfo.txt and
    12. conanbuildinfo.txt files (from previous 'conan
    13. install'). Defaulted to --build-folder
    14. -imf IMPORT_FOLDER, --import-folder IMPORT_FOLDER
    15. Directory to copy the artifacts to. By default it will
    16. be the current directory
    17. -u, --undo Undo imports. Remove imported files

    imports()方法可能使用来自指定配置文件的设置,选项和环境变量,以及来自conanfile要求中已声明的deps_XXX_info对象的依赖项信息。
    运行conan install时,所有这些信息分别自动保存在conaninfo.txt和conanbuildinfo.txt文件中。 这些文件必须位于指定的—install-folder中。

    Examples
    从当前目录中的当前conanfile导入文件:

    1. $ conan install . --no-imports # Creates the conanbuildinfo.txt
    2. $ conan imports .

    删除复制的文件(撤消导入):

    1. $ conan imports . --undo