Conan是一个去中心化、开源(MIT)、C/C++包管理器。
它是完全去中心化的,用户可以私下将他们的包托管在他们的服务器上适用于所有平台,包括Linux、OSX、Windows、Solaris、FreeBSD、Docker、WSL管理二进制文件。它可以为任何配置和平台创建、上传和下载二进制文件,甚至交叉编译,节省大量的开发和持续集成时间。与任何构建系统集成,包括任何专有和自定义系统。可扩展:具有强大的功能和灵活性设置$pipinstallconan安装开发版本可以在Windows、macOS和Linux中运行Conan客户端和服务器
安装pip
克隆Conan仓库:
$gitclonehttps://github.com/conan-io/conan.gitconan-io注意:存储库目录名称很重要,已知某些目录在运行测试时会出现问题以可编辑模式安装
$cdconan-io&&sudopipinstall-e.如果安装在Windows中,则不需要使用sudo
尝试运行Conan:
$conan--helpConsumercommandsinstallInstallstherequirementsspecifiedinarecipe(conanfile.pyorconanfile.txt).configManagesConanconfiguration.getGetsafileorlistadirectoryofagivenreferenceorpackage.infoGetsinformationaboutthedependencygraphofarecipe.searchSearchespackagerecipesandbinariesinthelocalcacheoraremote.Unlessaremoteisspecifiedonlythelocalcacheissearched.CreatorcommandsnewCreatesanewpackagerecipetemplatewitha'conanfile.py'andoptionally,'test_package'testingfiles.createBuildsabinarypackageforarecipe(conanfile.py).uploadUploadsarecipeandbinarypackagestoaremote.exportCopiestherecipe(conanfile.py&associatedfiles)toyourlocalcache.export-pkgExportsarecipe,thencreatesapackagefromlocalsourceandbuildfolders.testTestsapackageconsumingitfromaconanfile.pywithatest()method.PackagedevelopmentcommandssourceCallsyourlocalconanfile.py'source()'method.buildCallsyourlocalconanfile.py'build()'method.packageCallsyourlocalconanfile.py'package()'method.editableManageseditablepackages(packagesthatresideintheuserworkspace,butareconsumedasiftheywereinthecache).workspaceManagesaworkspace(asetofpackagesconsumedfromtheuserworkspacethatbelongstothesameproject).MisccommandsprofileListsprofilesinthe'.conan/profiles'folder,orshowsprofiledetails.remoteManagestheremotelistandthepackagerecipesassociatedwitharemote.userAuthenticatesagainstaremotewithuser/pass,cachingtheauthtoken.importsCallsyourlocalconanfile.pyorconanfile.txt'imports'method.copyCopiesconanrecipesandpackagestoanotheruser/channel.removeRemovespackagesorbinariesmatchingpatternfromlocalcacheorremote.aliasCreatesandexportsan'aliaspackagerecipe'.downloadDownloadsrecipeandbinariestothelocalcache,withoutusingsettings.inspectDisplaysconanfileattributes,likename,version,andoptions.Workslocally,inlocalcacheandremote.helpShowshelpforaspecificcommand.lockGeneratesandmanipulateslockfiles.frogarianConanTheFrogarianConancommands.Type"conan<command>-h"forhelp
评论