blob: 8affd9dc6e56b6db7930d257ab1a6880063631e2 [file] [log] [blame]
Filip Pytlounfff50fc2015-06-24 14:57:21 +02001============
2Installation
3============
4
5For Debian users (including Ubuntu)
6-----------------------------------
7|reclass| has been `packaged for Debian`_. To use it, just install it with
8APT::
9
10 $ apt-get install reclass [reclass-doc]
11
12.. _packaged for Debian: http://packages.debian.org/search?keywords=reclass
13
14For ArchLinux users
15-------------------
16|reclass| is `available for ArchLinux`_, thanks to Niels Abspoel.
17Dowload the tarball_ from ``aur`` or ``yaourt``::
18
19 $ yaourt -S reclass
20
21or::
22
23 $ tar xvzf reclass-git.tar.gz
24 $ cd reclass-git; makepkg
25 $ sudo pacman -U reclass-git-<git-commit-hash>.tar.gz
26
27.. _available for ArchLinux: https://aur.archlinux.org/packages/reclass-git/
28.. _tarball: https://aur.archlinux.org/packages/re/reclass-git/reclass-git.tar.gz
29
30Other distributions
31-------------------
32Developers of other distributions are cordially invited to package |reclass|
33themselves and `write to the mailing list
34<mailto:reclass@pantsfullofunix.net>`_ to have details included here. Or send
35a patch!
36
37From source
38-----------
39|reclass| is currently maintained `on Github
40<http://github.com/madduck/reclass>`_, so to obtain the source, run::
41
42 $ git clone https://github.com/madduck/reclass.git
43
44or::
45
46 $ git clone ssh://git@github.com:madduck/reclass.git
47
48If you want a tarball, please `obtain it from the Debian archive`_.
49
50.. _obtain it from the Debian archive: http://http.debian.net/debian/pool/main/r/reclass/
51
52Before you can use |reclass|, you need to install it into a place where Python
53can find it. The following step should install the package to ``/usr/local``::
54
55 $ python setup.py install
56
57If you want to install to a different location, use --prefix like so::
58
59 $ python setup.py install --prefix=/opt/local
60
61.. todo::
62
63 These will install the ``reclass-salt`` and ``reclass-ansible`` adapters to
64 ``$prefix/bin``, but they should go to ``$prefix/share/reclass``. How can
65 setup.py be told to do so? It would be better for consistency if this was
66 done "upstream", rather than fixed by the distros.
67
68Just make sure that the destination is in the Python module search path, which
69you can check like this::
70
71 $ python -c 'import sys; print sys.path'
72
73More options can be found in the output of
74
75::
76
77 $ python setup.py install --help
78 $ python setup.py --help
79 $ python setup.py --help-commands
80 $ python setup.py --help [cmd]
81
82If you just want to run |reclass| from source, e.g. because you are going to be
83making and testing changes, install it in "development mode"::
84
85 $ python setup.py develop
86
87To uninstall (the rm call is necessary due to `a bug in setuptools`_)::
88
89 $ python setup.py develop --uninstall
90 $ rm /usr/local/bin/reclass*
91
92`Uninstallation currently isn't possible`_ for packages installed to
93/usr/local as per the above method, unfortunately. The following should do::
94
95 $ rm -r /usr/local/lib/python*/dist-packages/reclass* /usr/local/bin/reclass*
96
97.. _a bug in setuptools: http://bugs.debian.org/714960
98.. _Uninstallation currently isn't possible: http://bugs.python.org/issue4673
99
100.. include:: substs.inc