Installer-emerge » Historique » Version 9

Farid Smai, 06/04/2014 18:32

1 2 Farid Smai
h1. Installer _emerge_
2 1 Farid Smai
3 4 Farid Smai
4 4 Farid Smai
h2. Prérequis
5 4 Farid Smai
6 6 Farid Smai
h3. Dépendances nécessaires
7 6 Farid Smai
8 7 Farid Smai
En l'absence des éléments suivants, le package _emerge_ ne sera pas fonctionnel :
9 7 Farid Smai
10 6 Farid Smai
* Python 2.7
11 9 Farid Smai
12 6 Farid Smai
* Numpy
13 9 Farid Smai
14 6 Farid Smai
* Scipy
15 6 Farid Smai
16 6 Farid Smai
Plus d'informations sur l'installation de Python et des packages Numpy et Scipy ici : [[installer-python]]
17 6 Farid Smai
18 6 Farid Smai
h3. Utilitaires (optionnels) pour l'installation
19 6 Farid Smai
20 6 Farid Smai
* "pip":http://www.pip-installer.org/ est un utilitaire pour l'installation et la gestion de packages Python.
21 9 Farid Smai
22 6 Farid Smai
* "virtualenv":http://www.virtualenv.org/ est un utilitaire pour créer des environnements Python isolés.
23 9 Farid Smai
24 6 Farid Smai
* "conda":http://conda.pydata.org/ n'est pas restreint aux packages Python et combine les fonctionnalités de pip et virtualenv.
25 3 Farid Smai
26 1 Farid Smai
27 4 Farid Smai
h2. Installation
28 1 Farid Smai
29 7 Farid Smai
L'installation du package _emerge_ consiste en deux étapes:
30 9 Farid Smai
31 8 Farid Smai
* La récupération des sources sur le dépôt. Ceci requiert actuellement une [[wiki#Comment-accéder-aux-sources-du-projet-|inscription]].
32 9 Farid Smai
33 7 Farid Smai
* L'installation proprement dite du package dans l'environnement Python.
34 7 Farid Smai
35 4 Farid Smai
h3. Avec pip
36 3 Farid Smai
37 7 Farid Smai
pip permet de réaliser les deux étapes en une opération :
38 7 Farid Smai
39 3 Farid Smai
<pre>
40 3 Farid Smai
pip install -e svn+https://forge.brgm.fr/svnrepository/omc#egg=emerge
41 3 Farid Smai
</pre>
42 1 Farid Smai
43 7 Farid Smai
La copie du dépôt se trouve alors dans le répertoire @CWD/src/emerge@. Ici @CWD@ désigne le chemin depuis lequel a été lancé la commande @pip@.
44 1 Farid Smai
45 7 Farid Smai
46 7 Farid Smai
Il est aussi possible de dissocier les deux étapes. On utilise alors @svn@ pour copier le dépôt et @pip@ pour installer :
47 7 Farid Smai
48 3 Farid Smai
<pre>
49 3 Farid Smai
svn checkout https://forge.brgm.fr/svnrepository/omc
50 5 Farid Smai
pip install -e omc
51 1 Farid Smai
</pre>
52 1 Farid Smai
53 7 Farid Smai
Par défaut, la copie du dépôt se trouvera dans le répertoire @CWD/omc@.
54 7 Farid Smai
55 7 Farid Smai
56 1 Farid Smai
h3. Sans pip
57 7 Farid Smai
58 7 Farid Smai
On peut se passer de pip pour l'étape d'installation. Dans ce cas, on fera:
59 3 Farid Smai
60 3 Farid Smai
<pre>
61 3 Farid Smai
svn checkout https://forge.brgm.fr/svnrepository/omc
62 3 Farid Smai
cd omc/
63 3 Farid Smai
python setup.py develop
64 3 Farid Smai
</pre>