martin f. krafft | 8acd49d | 2013-08-26 21:22:25 +0200 | [diff] [blame] | 1 | ============ |
| 2 | Installation |
| 3 | ============ |
| 4 | |
| 5 | For Debian users (including Ubuntu) |
| 6 | ----------------------------------- |
| 7 | |reclass| has been `packaged for Debian`_. To use it, just install it with |
| 8 | APT:: |
| 9 | |
martin f. krafft | 03266f6 | 2013-08-27 22:03:30 +0200 | [diff] [blame] | 10 | $ apt-get install reclass [reclass-doc] |
martin f. krafft | 8acd49d | 2013-08-26 21:22:25 +0200 | [diff] [blame] | 11 | |
| 12 | .. _packaged for Debian: http://packages.debian.org/search?keywords=reclass |
| 13 | |
martin f. krafft | 5a8d02f | 2013-08-28 12:04:22 +0200 | [diff] [blame^] | 14 | For ArchLinux users |
| 15 | ------------------- |
| 16 | |reclass| is `available for ArchLinux`_, thanks to Niels Abspoel. More |
| 17 | information about installing to come. |
| 18 | |
| 19 | .. _available for ArchLinux: https://aur.archlinux.org/packages/reclass-git/ |
| 20 | |
martin f. krafft | 8acd49d | 2013-08-26 21:22:25 +0200 | [diff] [blame] | 21 | Other distributions |
| 22 | ------------------- |
| 23 | Developers of other distributions are cordially invited to package |reclass| |
martin f. krafft | 5a8d02f | 2013-08-28 12:04:22 +0200 | [diff] [blame^] | 24 | themselves and `write to the mailing list |
| 25 | <mailto:reclass@pantsfullofunix.net>`_ to have details included here. Or send |
| 26 | a patch! |
martin f. krafft | 8acd49d | 2013-08-26 21:22:25 +0200 | [diff] [blame] | 27 | |
| 28 | From 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 | |
| 35 | or:: |
| 36 | |
| 37 | $ git clone ssh://git@github.com:madduck/reclass.git |
| 38 | |
martin f. krafft | c0e9903 | 2013-08-27 18:21:57 +0200 | [diff] [blame] | 39 | If 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. krafft | 8acd49d | 2013-08-26 21:22:25 +0200 | [diff] [blame] | 43 | Before you can use |reclass|, you need to install it into a place where Python |
martin f. krafft | 5a8d02f | 2013-08-28 12:04:22 +0200 | [diff] [blame^] | 44 | can find it. The following step should install the package to ``/usr/local``:: |
martin f. krafft | 8acd49d | 2013-08-26 21:22:25 +0200 | [diff] [blame] | 45 | |
| 46 | $ python setup.py install |
| 47 | |
| 48 | If you want to install to a different location, use --prefix like so:: |
| 49 | |
| 50 | $ python setup.py install --prefix=/opt/local |
| 51 | |
martin f. krafft | cc8851d | 2013-08-27 13:43:16 +0200 | [diff] [blame] | 52 | .. 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. krafft | 8acd49d | 2013-08-26 21:22:25 +0200 | [diff] [blame] | 59 | Just make sure that the destination is in the Python module search path, which |
| 60 | you can check like this:: |
| 61 | |
| 62 | $ python -c 'import sys; print sys.path' |
| 63 | |
| 64 | More 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 | |
| 73 | If you just want to run |reclass| from source, e.g. because you are going to be |
| 74 | making and testing changes, install it in "development mode":: |
| 75 | |
| 76 | $ python setup.py develop |
| 77 | |
| 78 | To 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 |