相当于自动运行前面的所有命令,不同的是生成的目录和文件 在 本地的缓存: ~/.conan/… ,而不是在当前文件。
现在我们知道我们已经完成了配方的所有步骤。 因此,现在将尝试运行配方并将其完全放入本地缓存中。
通常的命令是conan create,它基本上使用test_package文件夹的conan test执行先前的命令:
$ conan create . user/channel
即使使用此命令,如果某些操作无效,程序包创建者也可以遍历本地缓存。 这可以通过--keep-source和--keep-build标志来完成。
如果在跟踪中看到source()方法已正确执行,但包创建最终失败,则可以在下次使用--keep-source创建conan create时跳过source()方法:
$ conan create . user/channel --keep-sourcehello/1.1@user/channel: A new conanfile.py version was exportedhello/1.1@user/channel: Folder: C:\Users\conan\.conan\data\hello\1.1\user\channel\exporthello/1.1@user/channel (test package): Installing C:\Users\conan\repos\features\package_development_flow\test_package\conanfile.pyRequirementshello/1.1@user/channel from localPackageshello/1.1@user/channel:6cc50b139b9c3d27b3e9042d5f5372d327b3a9f7hello/1.1@user/channel: WARN: Forced build from sourcehello/1.1@user/channel: Building your package in C:\Users\conan\.conan\data\hello\1.1\user\channel\build\6cc50b139b9c3d27b3e9042d5f5372d327b3a9f7hello/1.1@user/channel: Configuring sources in C:\Users\conan\.conan\data\hello\1.1\user\channel\sourceCloning into 'hello'...remote: Counting objects: 17, done.remote: Total 17 (delta 0), reused 0 (delta 0), pack-reused 17Unpacking objects: 100% (17/17), done.Switched to a new branch 'static_shared'Branch 'static_shared' set up to track remote branch 'static_shared' from 'origin'.hello/1.1@user/channel: Copying sources to build folderhello/1.1@user/channel: Generator cmake created conanbuildinfo.cmakehello/1.1@user/channel: Calling build()...
如果您发现库的构建也正确,您也可以使用 --hold-build标志跳过build() 步骤:
$ conan create . user/channel --keep-build
