blob: 8affd9dc6e56b6db7930d257ab1a6880063631e2 [file] [log] [blame]
martin f. krafft8acd49d2013-08-26 21:22:25 +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
martin f. krafft03266f62013-08-27 22:03:30 +020010 $ apt-get install reclass [reclass-doc]
martin f. krafft8acd49d2013-08-26 21:22:25 +020011
12.. _packaged for Debian: http://packages.debian.org/search?keywords=reclass
13
martin f. krafft5a8d02f2013-08-28 12:04:22 +020014For ArchLinux users
15-------------------
Niels Abspoelb8c26c22013-08-28 19:15:06 +020016|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
martin f. krafft5a8d02f2013-08-28 12:04:22 +020026
27.. _available for ArchLinux: https://aur.archlinux.org/packages/reclass-git/
Niels Abspoelb8c26c22013-08-28 19:15:06 +020028.. _tarball: https://aur.archlinux.org/packages/re/reclass-git/reclass-git.tar.gz
martin f. krafft5a8d02f2013-08-28 12:04:22 +020029
martin f. krafft8acd49d2013-08-26 21:22:25 +020030Other distributions
31-------------------
32Developers of other distributions are cordially invited to package |reclass|
martin f. krafft5a8d02f2013-08-28 12:04:22 +020033themselves and `write to the mailing list
34<mailto:reclass@pantsfullofunix.net>`_ to have details included here. Or send
35a patch!
martin f. krafft8acd49d2013-08-26 21:22:25 +020036
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
martin f. krafftc0e99032013-08-27 18:21:57 +020048If 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
martin f. krafft8acd49d2013-08-26 21:22:25 +020052Before you can use |reclass|, you need to install it into a place where Python
martin f. krafft5a8d02f2013-08-28 12:04:22 +020053can find it. The following step should install the package to ``/usr/local``::
martin f. krafft8acd49d2013-08-26 21:22:25 +020054
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
martin f. krafftcc8851d2013-08-27 13:43:16 +020061.. 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
martin f. krafft8acd49d2013-08-26 21:22:25 +020068Just 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