blob: d96cab27be4fe2cbf1e6544e082c91d3a019deff [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-------------------
16|reclass| is `available for ArchLinux`_, thanks to Niels Abspoel. More
17information about installing to come.
18
19.. _available for ArchLinux: https://aur.archlinux.org/packages/reclass-git/
20
martin f. krafft8acd49d2013-08-26 21:22:25 +020021Other distributions
22-------------------
23Developers of other distributions are cordially invited to package |reclass|
martin f. krafft5a8d02f2013-08-28 12:04:22 +020024themselves and `write to the mailing list
25<mailto:reclass@pantsfullofunix.net>`_ to have details included here. Or send
26a patch!
martin f. krafft8acd49d2013-08-26 21:22:25 +020027
28From source
29-----------
30|reclass| is currently maintained `on Github
31<http://github.com/madduck/reclass>`_, so to obtain the source, run::
32
33 $ git clone https://github.com/madduck/reclass.git
34
35or::
36
37 $ git clone ssh://git@github.com:madduck/reclass.git
38
martin f. krafftc0e99032013-08-27 18:21:57 +020039If you want a tarball, please `obtain it from the Debian archive`_.
40
41.. _obtain it from the Debian archive: http://http.debian.net/debian/pool/main/r/reclass/
42
martin f. krafft8acd49d2013-08-26 21:22:25 +020043Before you can use |reclass|, you need to install it into a place where Python
martin f. krafft5a8d02f2013-08-28 12:04:22 +020044can find it. The following step should install the package to ``/usr/local``::
martin f. krafft8acd49d2013-08-26 21:22:25 +020045
46 $ python setup.py install
47
48If you want to install to a different location, use --prefix like so::
49
50 $ python setup.py install --prefix=/opt/local
51
martin f. krafftcc8851d2013-08-27 13:43:16 +020052.. todo::
53
54 These will install the ``reclass-salt`` and ``reclass-ansible`` adapters to
55 ``$prefix/bin``, but they should go to ``$prefix/share/reclass``. How can
56 setup.py be told to do so? It would be better for consistency if this was
57 done "upstream", rather than fixed by the distros.
58
martin f. krafft8acd49d2013-08-26 21:22:25 +020059Just make sure that the destination is in the Python module search path, which
60you can check like this::
61
62 $ python -c 'import sys; print sys.path'
63
64More options can be found in the output of
65
66::
67
68 $ python setup.py install --help
69 $ python setup.py --help
70 $ python setup.py --help-commands
71 $ python setup.py --help [cmd]
72
73If you just want to run |reclass| from source, e.g. because you are going to be
74making and testing changes, install it in "development mode"::
75
76 $ python setup.py develop
77
78To uninstall (the rm call is necessary due to `a bug in setuptools`_)::
79
80 $ python setup.py develop --uninstall
81 $ rm /usr/local/bin/reclass*
82
83`Uninstallation currently isn't possible`_ for packages installed to
84/usr/local as per the above method, unfortunately. The following should do::
85
86 $ rm -r /usr/local/lib/python*/dist-packages/reclass* /usr/local/bin/reclass*
87
88.. _a bug in setuptools: http://bugs.debian.org/714960
89.. _Uninstallation currently isn't possible: http://bugs.python.org/issue4673
90
91.. include:: substs.inc