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 | ------------------- |
Niels Abspoel | b8c26c2 | 2013-08-28 19:15:06 +0200 | [diff] [blame] | 16 | |reclass| is `available for ArchLinux`_, thanks to Niels Abspoel. |
| 17 | Dowload the tarball_ from ``aur`` or ``yaourt``:: |
| 18 | |
| 19 | $ yaourt -S reclass |
| 20 | |
| 21 | or:: |
| 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. krafft | 5a8d02f | 2013-08-28 12:04:22 +0200 | [diff] [blame] | 26 | |
| 27 | .. _available for ArchLinux: https://aur.archlinux.org/packages/reclass-git/ |
Niels Abspoel | b8c26c2 | 2013-08-28 19:15:06 +0200 | [diff] [blame] | 28 | .. _tarball: https://aur.archlinux.org/packages/re/reclass-git/reclass-git.tar.gz |
martin f. krafft | 5a8d02f | 2013-08-28 12:04:22 +0200 | [diff] [blame] | 29 | |
martin f. krafft | 8acd49d | 2013-08-26 21:22:25 +0200 | [diff] [blame] | 30 | Other distributions |
| 31 | ------------------- |
| 32 | Developers of other distributions are cordially invited to package |reclass| |
martin f. krafft | 5a8d02f | 2013-08-28 12:04:22 +0200 | [diff] [blame] | 33 | themselves and `write to the mailing list |
| 34 | <mailto:reclass@pantsfullofunix.net>`_ to have details included here. Or send |
| 35 | a patch! |
martin f. krafft | 8acd49d | 2013-08-26 21:22:25 +0200 | [diff] [blame] | 36 | |
| 37 | From 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 | |
| 44 | or:: |
| 45 | |
| 46 | $ git clone ssh://git@github.com:madduck/reclass.git |
| 47 | |
martin f. krafft | c0e9903 | 2013-08-27 18:21:57 +0200 | [diff] [blame] | 48 | If 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. krafft | 8acd49d | 2013-08-26 21:22:25 +0200 | [diff] [blame] | 52 | 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] | 53 | 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] | 54 | |
| 55 | $ python setup.py install |
| 56 | |
| 57 | If you want to install to a different location, use --prefix like so:: |
| 58 | |
| 59 | $ python setup.py install --prefix=/opt/local |
| 60 | |
martin f. krafft | cc8851d | 2013-08-27 13:43:16 +0200 | [diff] [blame] | 61 | .. 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. krafft | 8acd49d | 2013-08-26 21:22:25 +0200 | [diff] [blame] | 68 | Just make sure that the destination is in the Python module search path, which |
| 69 | you can check like this:: |
| 70 | |
| 71 | $ python -c 'import sys; print sys.path' |
| 72 | |
| 73 | More 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 | |
| 82 | If you just want to run |reclass| from source, e.g. because you are going to be |
| 83 | making and testing changes, install it in "development mode":: |
| 84 | |
| 85 | $ python setup.py develop |
| 86 | |
| 87 | To 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 |