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