Changes between Version 1 and Version 2 of DRM4G/Installation


Ignore:
Timestamp:
Aug 22, 2016 11:33:49 PM (5 years ago)
Author:
minondoa
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DRM4G/Installation

    v1 v2  
    11= DRM4G Installation =
    22There are several ways in which you can install DRM4G.
     3
    34
    45== pip ==
     
    3031
    3132
    32 === Install in custom directory ===
     33=== Install in custom directory === #customInstall
    3334
    3435Sometimes you will want to specify a certain directory in which to install DRM4G. To do that you'll have to bear in mind a couple of details.
     
    4849}}}
    4950
    50 This will install your binary files and libraries under this path, but DRM4G will still not be able to run.
     51This will install your binary files and libraries under the specified path, but DRM4G will still not be able to run.
    5152
    52 You want your system to be aware of where the DRM4G package is, so that python may be able to import it. You'll have to define the environment variable '''$PYTHONPATH''' defined, which will have to point to the library folder under the path you chose. At the end of the installation, it will inform you on how to do that.
     53* You want your system to be aware of where the DRM4G package is, so that python may be able to import it. You'll have to define the environment variable '''$PYTHONPATH''', which will have to point to the library folder under the path you chose. At the end of the installation, you'll se a message that will inform you on how to do that.
    5354
    54 The next step is to have it know that DRM4G has been installed. You'll have to make sure that the directory you choose is added in your environment variable '''$PATH'''. The folder we are interested in is the "''bin''" folder inside your directory.
     55* The next step is to have it know that DRM4G has been installed. You'll have to make sure that the directory you choose is added in your environment variable '''$PATH''' or you could have it added to your '''sys.path'''. The folder we are interested in is the "''bin''" folder inside your directory.
     56
     57During the installation, you will be prompted with a question about modifying your '''.profile''' or '''.bashrc''' file. If you accept, you will only have to define these two environment variables the first time.
     58 * Alternatively you can access the file yourself, which is under the home directory, and make the necessary changes.
     59
     60Finally, if you wish to define where your configuration and log files will be created, before starting DRM4G with `drm4g start` you should set the environment variable $DRM4G_DIR with whichever directory you wish.
     61{{{#!comment
     62This paragraph should maybe go in another section. Something called extras or something of the sort.
     63}}}
     64
     65
     66== Without pip ==
     67
     68First and foremost you would have to make sure you have installed the necessary requirements. Those are '''Py''''''''''Crypto''', '''Paramiko''' and '''docopt'''.
     69
    5570
    5671{{{
    5772#!sh
    58 $ export PATH=$PATH:/your/path/bin
     73sudo apt-get update
     74sudo apt-get install python-crypto
     75sudo apt-get install python-paramiko
     76sudo apt-get install python-docopt
     77}}}
     78{{{#!comment
     79The idea of not using pip is to not add another "dependency", but doing it like this I'm "forcing" the user to have apt
    5980}}}
    6081
     82Once that has been taken care of, you can download the source code from [[https://pypi.python.org/packages/33/67/99226fee402a4725fffefdd8d5102f4520175e60b349f53f734cd6836c2a/drm4g-2.5.0b1.tar.gz#md5=3bbbe1041212696ec0f951a3ec7f56f3|here]].
    6183
    62 Finally, if you wish to define where your configuration and log files will be created, before starting DRM4G with `drm4g start` you should set the environment variable $DRM4G_DIR with whichever directory you wish.
     84After you extract the package, in a terminal, head into the folder and run:
     85
     86* '''With root authorization''':  `sudo python setup.py install`
     87* '''In a virtual environment''':  `python setup.py install`
     88* '''Without root authorization''':  `python setup.py install --user`
     89
     90
     91=== Install in custom directory ===
     92
     93If you want to use a specific directory as the installation path, you can do it like this:
     94
     95{{{#!sh
     96python setup.py install --prefix=/your/path
     97}}}
     98
     99or
     100
     101{{{#!sh
     102python setup.py install --home=/your/path
     103}}}
     104
     105There are other considerations to have in mind, but they are the same as the ones explained [#customInstall above].