blob: fefccf5cf2a2c8c13823054e6fcd558dd7daf986 [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
10 $ apt-get install reclass
11
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
31Before you can use |reclass|, you need to install it into a place where Python
32can find it. Unless you installed a package from your distribution, the
33following step should install the package to /usr/local::
34
35 $ python setup.py install
36
37If you want to install to a different location, use --prefix like so::
38
39 $ python setup.py install --prefix=/opt/local
40
martin f. krafftcc8851d2013-08-27 13:43:16 +020041.. todo::
42
43 These will install the ``reclass-salt`` and ``reclass-ansible`` adapters to
44 ``$prefix/bin``, but they should go to ``$prefix/share/reclass``. How can
45 setup.py be told to do so? It would be better for consistency if this was
46 done "upstream", rather than fixed by the distros.
47
martin f. krafft8acd49d2013-08-26 21:22:25 +020048Just make sure that the destination is in the Python module search path, which
49you can check like this::
50
51 $ python -c 'import sys; print sys.path'
52
53More options can be found in the output of
54
55::
56
57 $ python setup.py install --help
58 $ python setup.py --help
59 $ python setup.py --help-commands
60 $ python setup.py --help [cmd]
61
62If you just want to run |reclass| from source, e.g. because you are going to be
63making and testing changes, install it in "development mode"::
64
65 $ python setup.py develop
66
67To uninstall (the rm call is necessary due to `a bug in setuptools`_)::
68
69 $ python setup.py develop --uninstall
70 $ rm /usr/local/bin/reclass*
71
72`Uninstallation currently isn't possible`_ for packages installed to
73/usr/local as per the above method, unfortunately. The following should do::
74
75 $ rm -r /usr/local/lib/python*/dist-packages/reclass* /usr/local/bin/reclass*
76
77.. _a bug in setuptools: http://bugs.debian.org/714960
78.. _Uninstallation currently isn't possible: http://bugs.python.org/issue4673
79
80.. include:: substs.inc