GithubHelp home page GithubHelp logo

zhaoyf22 / conan Goto Github PK

View Code? Open in Web Editor NEW

This project forked from conan-io/conan

0.0 0.0 0.0 25.52 MB

Conan - The open-source C and C++ package manager

Home Page: https://conan.io

License: MIT License

Python 100.00%

conan's Introduction

JFrog | Conan 2.0 Logo

Conan

Decentralized, open-source (MIT), C/C++ package manager.

Conan is a package manager for C and C++ developers:

  • It is fully decentralized. Users can host their packages on their servers, privately. Integrates with Artifactory and Bintray.
  • Portable. Works across all platforms, including Linux, OSX, Windows (with native and first-class support, WSL, MinGW), Solaris, FreeBSD, embedded and cross-compiling, docker, WSL
  • Manage binaries. It can create, upload and download binaries for any configuration and platform, even cross-compiling, saving lots of time in development and continuous integration. The binary compatibility can be configured and customized. Manage all your artifacts in the same way on all platforms.
  • Integrates with any build system, including any proprietary and custom one. Provides tested support for major build systems (CMake, MSBuild, Makefiles, Meson, etc).
  • Extensible: Its python based recipes, together with extensions points allows for great power and flexibility.
  • Large and active community, especially in Github (https://github.com/conan-io/conan) and Slack (https://cpplang-inviter.cppalliance.org/ #conan channel). This community also creates and maintains packages in ConanCenter and Bincrafters repositories in Bintray.
  • Stable. Used in production by many companies, since 1.0 there is a commitment not to break package recipes and documented behavior.

This is the developer/maintainer documentation. For user documentation, go to https://docs.conan.io

develop2
Build Status Develop

Setup

You can run Conan from source in Windows, MacOS, and Linux:

  • Install pip following pip docs.

  • Clone Conan repository:

    $ git clone https://github.com/conan-io/conan.git conan-io

    Note: repository directory name matters, some directories are known to be problematic to run tests (e.g. conan). conan-io directory name was tested and guaranteed to be working.

  • Install in editable mode

    $ cd conan-io && sudo pip install -e .

    If you are in Windows, using sudo is not required.

  • You are ready, try to run Conan:

    $ conan --help
    
    Consumer commands
      install    Installs the requirements specified in a recipe (conanfile.py or conanfile.txt).
      ...
    
      Conan commands. Type "conan <command> -h" for help

Contributing to the project

Feedback and contribution are always welcome in this project. Please read our contributing guide. Also, if you plan to contribute, please add some testing for your changes. You can read the Conan tests guidelines section for some advise on how to write tests for Conan.

Running the tests

Install python requirements

$ python -m pip install -r conans/requirements_server.txt
$ python -m pip install -r conans/requirements_dev.txt

If you are not Windows and you are not using a python virtual environment, you will need to run these commands using sudo.

Before you can run the tests, you need to set a few environment variables first.

$ export PYTHONPATH=$PYTHONPATH:$(pwd)

On Windows it would be (while being in the Conan root directory):

$ set PYTHONPATH=.

Conan test suite defines and configure some required tools (CMake, Ninja, etc) in the conftest.py and allows to define a custom conftest_user.py. Some specific versions, like cmake>=3.15 are necessary.

You can run the tests like this:

$ python -m pytest .

A few minutes later it should print OK:

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

OK

To run specific tests, you can specify the test name too, something like:

$ python -m pytest conans/test/unittests/client/cmd/export_test.py::ExportTest::test_export_warning -s

The -s argument can be useful to see some output that otherwise is captured by pytest.

Also, you can run tests against an instance of Artifactory. Those tests should add the attribute artifactory_ready.

$ python -m pytest . -m artifactory_ready

Some environment variables have to be defined to run them. For example, for an Artifactory instance that is running on the localhost with default user and password configured, the variables could take the values:

$ export CONAN_TEST_WITH_ARTIFACTORY=1
$ export ARTIFACTORY_DEFAULT_URL=http://localhost:8081/artifactory
$ export ARTIFACTORY_DEFAULT_USER=admin
$ export ARTIFACTORY_DEFAULT_PASSWORD=password

ARTIFACTORY_DEFAULT_URL is the base url for the Artifactory repo, not one for a specific repository. Running the tests with a real Artifactory instance will create repos on the fly so please use a separate server for testing purposes.

License

MIT LICENSE

conan's People

Contributors

memsharded avatar lasote avatar czoido avatar jgsogo avatar danimtb avatar sse4 avatar franramirez688 avatar rubenrbs avatar uilianries avatar jcar87 avatar tapia avatar pvicente avatar climblinne avatar minimonium avatar tivek avatar ericlemanissier avatar spaceim avatar solvingj avatar tru avatar psy-kai avatar nicememory avatar astralien3000 avatar liberforce avatar cctechwiz avatar tonka3000 avatar grisumbras avatar sixten-hilborn avatar dragly avatar e-i-n-s avatar azriel91 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.