Installer-emerge » Historique » Version 8

Farid Smai, 05/04/2014 14:24

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 6 Farid Smai
* Numpy
12 6 Farid Smai
* Scipy
13 6 Farid Smai
14 6 Farid Smai
Plus d'informations sur l'installation de Python et des packages Numpy et Scipy ici : [[installer-python]]
15 6 Farid Smai
16 6 Farid Smai
h3. Utilitaires (optionnels) pour l'installation
17 6 Farid Smai
18 6 Farid Smai
* "pip":http://www.pip-installer.org/ est un utilitaire pour l'installation et la gestion de packages Python.
19 6 Farid Smai
* "virtualenv":http://www.virtualenv.org/ est un utilitaire pour créer des environnements Python isolés.
20 6 Farid Smai
* "conda":http://conda.pydata.org/ n'est pas restreint aux packages Python et combine les fonctionnalités de pip et virtualenv.
21 3 Farid Smai
22 1 Farid Smai
23 4 Farid Smai
h2. Installation
24 1 Farid Smai
25 7 Farid Smai
L'installation du package _emerge_ consiste en deux étapes:
26 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]].
27 7 Farid Smai
* L'installation proprement dite du package dans l'environnement Python.
28 7 Farid Smai
29 4 Farid Smai
h3. Avec pip
30 3 Farid Smai
31 7 Farid Smai
pip permet de réaliser les deux étapes en une opération :
32 7 Farid Smai
33 3 Farid Smai
<pre>
34 3 Farid Smai
pip install -e svn+https://forge.brgm.fr/svnrepository/omc#egg=emerge
35 3 Farid Smai
</pre>
36 1 Farid Smai
37 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@.
38 1 Farid Smai
39 7 Farid Smai
40 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 :
41 7 Farid Smai
42 3 Farid Smai
<pre>
43 3 Farid Smai
svn checkout https://forge.brgm.fr/svnrepository/omc
44 5 Farid Smai
pip install -e omc
45 1 Farid Smai
</pre>
46 1 Farid Smai
47 7 Farid Smai
Par défaut, la copie du dépôt se trouvera dans le répertoire @CWD/omc@.
48 7 Farid Smai
49 7 Farid Smai
50 1 Farid Smai
h3. Sans pip
51 7 Farid Smai
52 7 Farid Smai
On peut se passer de pip pour l'étape d'installation. Dans ce cas, on fera:
53 3 Farid Smai
54 3 Farid Smai
<pre>
55 3 Farid Smai
svn checkout https://forge.brgm.fr/svnrepository/omc
56 3 Farid Smai
cd omc/
57 3 Farid Smai
python setup.py develop
58 3 Farid Smai
</pre>