柯南C/C++包管理器

conan的Python项目详细描述


Logo

柯南

分散的、开放源码的(MIT)、C/C++包管理器。

柯南是C和C++开发人员的包管理器:

  • 它是完全分散的。用户可以在自己的服务器中私下托管他们的包。与手工艺品和托盘集成。
  • 便携式。适用于所有平台,包括Linux、OSX、Windows(具有本机和一级支持、WSL、MingW) solaris、freebsd、嵌入式和交叉编译、docker、wsl
  • 管理二进制文件。它能够为任何配置和平台创建、上传和下载二进制文件, 甚至交叉编译,节省大量开发时间和持续集成。二进制兼容性 可以配置和自定义。在所有平台上以完全相同的方式管理所有工件。
  • 与任何构建系统集成,包括任何无产阶级和定制系统。为主要构建系统提供经过测试的支持 (cmake、msbuild、makefiles、meson等)。
  • 可扩展性:其基于Python的菜谱,连同扩展点一起允许强大的灵活性和灵活性。
  • 大型活动社区,特别是在github(https://github.com/conan-io/conan)和slack(https://cpplang.now.sh/conan channel)中。 这个社区还创建和维护conan中心的包和bintray中的bincrafters存储库。
  • 稳定。许多公司在生产中使用,自1.0以来,有一个不破坏包配方和记录行为的承诺。
masterdevelopCoverageCode Climate
Build Status MasterBuild Status DevelopDevelop coverageDevelop climate

设置

请阅读https://docs.conan.io/en/latest/installation.html

从二进制文件

我们有most platforms here的安装程序,但您 如果需要,可以从源代码运行conan

来自pip

conan与python 2和python 3兼容。

  • pip docs之后安装pip。

  • 安装conan:

    $ pip install conan
    

您还可以使用test.pypi.org存储库安装开发(非稳定)conan版本:

$ pip install --index-url https://test.pypi.org/simple/ conan

来自自制(OSX)

  • brew homepage之后安装自制程序。

    $ brew update
    $ brew install conan
    

来源

您可以在windows、macos和linux中运行conan客户机和服务器。

  • pip docs之后安装pip。

  • clone conan存储库:

    $ git clone https://github.com/conan-io/conan.git
    
  • 在可编辑模式下安装

    $ cd conan && sudo pip install -e .
    

    如果您在windows中,则不需要使用sudo

  • 准备好了,请尝试运行conan:

    $ conan --help
    
    Consumer commands
      install    Installs the requirements specified in a conanfile (.py or .txt).
      config     Manages configuration. Edits the conan.conf or installs config files.
      get        Gets a file or list a directory of a given reference or package.
      info       Gets information about the dependency graph of a recipe.
      search     Searches package recipes and binaries in the local cache or in a remote.
    Creator commands
      new        Creates a new package recipe template with a 'conanfile.py'.
      create     Builds a binary package for recipe (conanfile.py) located in current dir.
      upload     Uploads a recipe and binary packages to a remote.
      export     Copies the recipe (conanfile.py & associated files) to your local cache.
      export-pkg Exports a recipe & creates a package with given files calling 'package'.
      test       Test a package, consuming it with a conanfile recipe with a test() method.
    Package development commands
      source     Calls your local conanfile.py 'source()' method.
      build      Calls your local conanfile.py 'build()' method.
      package    Calls your local conanfile.py 'package()' method.
    Misc commands
      profile    Lists profiles in the '.conan/profiles' folder, or shows profile details.
      remote     Manages the remote list and the package recipes associated to a remote.
      user       Authenticates against a remote with user/pass, caching the auth token.
      imports    Calls your local conanfile.py or conanfile.txt 'imports' method.
      copy       Copies conan recipes and packages to another user/channel.
      remove     Removes packages or binaries matching pattern from local cache or remote.
      alias      Creates and exports an 'alias recipe'.
      download   Downloads recipe and binaries to the local cache, without using settings.
    
    Conan commands. Type "conan <command> -h" for help
    

为项目做出贡献

在这个项目中,总是欢迎反馈和贡献。 请阅读我们的contributing guide

运行测试

使用毒物

$ tox

它将安装所需的要求并启动nose跳过一些繁重而缓慢的测试。 如果要运行完整的测试套件:

$ tox -e full

无毒物

安装python需求

$ pip install -r conans/requirements.txt
$ pip install -r conans/requirements_server.txt
$ pip install -r conans/requirements_dev.txt

仅在OSX中:

$ pip install -r conans/requirements_osx.txt # You can omit this one if not running OSX

如果您不是windows并且没有使用python虚拟环境,则需要运行以下命令 使用sudo的命令。

在运行测试之前,需要先设置几个环境变量。

$ exportPYTHONPATH=$PYTHONPATH:$(pwd)

在windows上(在conan根目录中时):

$ setPYTHONPATH=.

确保您的cmake版本为2.8或更高版本。你可以看到 具有以下命令的版本:

$ cmake --version

CONAN_COMPILERCONAN_COMPILER_VERSION的适当值取决于 操作系统和您的要求。

对于ubuntu 14.04上的build-essential中的gcc,这些应该是有效的:

$ exportCONAN_COMPILER=gcc
$ exportCONAN_COMPILER_VERSION=4.8

这些应该适用于OS X:

^{公关1二}$

最后,还有一些测试使用conan来打包go-lang 库,因此可能需要在计算机中安装go lang 添加到路径中。

您可以运行这样的实际测试:

$ nosetests .

定义了两个测试属性,可以使用slowgolang。 要筛选测试,而不执行它们:

$ nosetests . -a !golang

几分钟后它应该会打印OK

............................................................................................
----------------------------------------------------------------------
Ran 146 tests in 50.993s

OK

要运行特定的测试,也可以指定测试名称,例如:

$ nosetests conans.test.command.config_install_test:ConfigInstallTest.install_file_test --nocapture

参数--nocapture对于查看由nosetests捕获的其他输出非常有用。

许可证

MIT LICENSE

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
JavaJSonarray不会从SeekBar读取double   使用另一个类从Java中的2D数组打印用户输入   java ClassNotFoundException的原因   spring调用两个方法以返回Java中的不同页面   httpurlconnection Java禁止的代码错误,但浏览器错误(2)   java画布矩阵转换   java:在另一个java映射中使用“Map”作为值   java“未找到用于解密的证书”(Apache CXF,WSSecurity)   java如何查看JTable中选择的行   java在没有xmlwrappers的情况下重复xml元素序列集   java将垂直直方图打印到控制台   java Spring JDBCTemplate:构造不带特殊字符的JSON   java PayPal RestApi获取用户信息