File size: 6,238 Bytes
362a075
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
Conan
=====

A distributed, open source, package manager.

+------------------------+-------------------------+----------------------+-----------------------+
| **master (linux/osx)** | **develop (linux/osx)** | **master (windows)** | **develop** (windows) |
+========================+=========================+======================+=======================+
| |Build Status1|        | |Build Status2|         | |Build status3|      | |Build status4|       |
+------------------------+-------------------------+----------------------+-----------------------+

+------------------------+---------------------------+--------------------------------------------------+
| **Coverage develop**   | **Coverage master**       | **Coverage graph**                               |
+========================+===========================+==================================================+
| |Develop coverage|     | |Master coverage|         |      |Coverage graph|                            |
+------------------------+---------------------------+--------------------------------------------------+




Setup
======

From binaries
-------------

We have installers for `most platforms here <http://conan.io>`__ but you
can run **conan** from sources if you want


From pip
--------

Conan is compatible with Python 2 and Python 3.

- Install pip following `pip docs`_

- Install conan:

::

    $ pip install conan


From Homebrew (OSx)
-------------------

- Install Homebrew following `brew homepage`_.

::

    $ brew update
    $ brew install conan



From source
-----------

You can run **conan** client and server in Windows, MacOS, and Linux.

Install *python and pip*, search in google instructions for your operating system.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Clone conan repository
~~~~~~~~~~~~~~~~~~~~~~

::

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

Install python requirements
~~~~~~~~~~~~~~~~~~~~~~~~~~~

For running the client:

::

    $ sudo pip install -r conans/requirements.txt

Server:

::

    $ sudo apt-get install python-dev
    $ sudo pip install -r conans/requirements_server.txt

Development:

::

    $ sudo pip install -r conans/requirements_dev.txt

Running the tests
~~~~~~~~~~~~~~~~~~

Make sure that the Python requirements have been installed.

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):

::

    $ export PYTHONPATH=.

Ensure that your ``cmake`` has version 2.8 or later. You can see the
version with the following command:

::

    $ cmake --version

The appropriate values of ``CONAN_COMPILER`` and
``CONAN_COMPILER_VERSION`` depend on your operating system and your
requirements.

These should work for the GCC from ``build-essential`` on Ubuntu 14.04:

::

    $ export CONAN_COMPILER=gcc
    $ export CONAN_COMPILER_VERSION=4.8

These should work for OS X:

::

    $ export CONAN_COMPILER=clang
    $ export CONAN_COMPILER_VERSION=3.5

Finally, there are some tests that use conan to package Go-lang
libraries, so you might **need to install go-lang** in your computer and
add it to the path.

You can run the actual tests like this:

::

    $ nosetests .


There are a couple of test attributes defined, as ``slow``, or ``golang`` that you can use
to filter the tests, and do not execute them:

::

    $ nosetests . -a !golang

A few minutes later it should print ``OK``:

::

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

    OK

Create a launcher
~~~~~~~~~~~~~~~~~

Conan entry point is "conans.conan.main" module. Fill the absolute path
of the cloned repository folder:

::

    #!/usr/bin/env python
    import sys
    sys.path.append('/home/user/conan') # EDIT!!

    from conans.conan import main
    main(sys.argv[1:])

If you are a Windows user, you can name this file "conan.py" and create
a file "conan.bat" that calls the python module:

::

    CALL python C:/Users/user/conan.py %*

Then add that 'conan' file to your PATH and you are ready:

::

    $ conan --help

    Conan commands. Type $conan "command" -h for help
      build      calls your project conanfile.py "build" method.
      export     copies a conanfile.py and associated (export) files to your local store,
      install    install in the local store the given requirements.
      remove     Remove any folder from your local/remote store
      search     show local/remote packages
      test       build and run your package test. Must have conanfile.py with "test"
      upload     uploads a conanfile or binary packages from the local store to any remote.
      user       shows or change the current user 

License
-------

`MIT LICENSE <./LICENSE.md>`__

.. |Build Status1| image:: https://travis-ci.org/conan-io/conan.svg?branch=master
   :target: https://travis-ci.org/conan-io/conan
.. |Build Status2| image:: https://travis-ci.org/conan-io/conan.svg?branch=develop
   :target: https://travis-ci.org/conan-io/conan
.. |Build status3| image:: https://ci.appveyor.com/api/projects/status/dae0ple27akmpgj4/branch/master?svg=true
   :target: https://ci.appveyor.com/project/ConanCIintegration/conan/branch/master
.. |Build status4| image:: https://ci.appveyor.com/api/projects/status/dae0ple27akmpgj4/branch/develop?svg=true
   :target: https://ci.appveyor.com/project/ConanCIintegration/conan/branch/develop
.. _`pip docs`: https://pip.pypa.io/en/stable/installing/
.. _`brew homepage`: http://brew.sh/
.. |Develop coverage| image:: https://codecov.io/gh/conan-io/conan/branch/develop/graph/badge.svg
   :target: https://codecov.io/gh/conan-io/conan/branch/develop
.. |Master coverage| image:: https://codecov.io/gh/conan-io/conan/branch/master/graph/badge.svg
   :target: https://codecov.io/gh/conan-io/conan/branch/master
.. |Coverage graph| image:: https://codecov.io/gh/conan-io/conan/branch/develop/graphs/tree.svg
   :height: 50px
   :width: 50 px
   :alt: Conan develop coverage