Updating installation instructions
authorFrederic Massart <fred@moodle.com>
Thu, 17 Mar 2016 10:10:30 +0000 (18:10 +0800)
committerFrederic Massart <fred@moodle.com>
Thu, 17 Mar 2016 10:10:43 +0000 (18:10 +0800)
README.rst

index cad5fbe..04086da 100644 (file)
@@ -32,17 +32,17 @@ Installation
 Python package
 --------------
 
-You need the `pip <http://www.pip-installer.org/en/latest/installing.html>`_ to do this::
+On Debian-based systems, install the following packages::
+
+    sudo apt-get install python-pip libmysqlclient-dev libpq-dev python-dev
+
+Use `pip <http://www.pip-installer.org/en/latest/installing.html>`_::
 
     sudo pip install moodle-sdk
     mdk init
 
 That's it!
 
-On Debian-based systems, you will probably need to install the following packages::
-
-    sudo apt-get install python-pip libmysqlclient-dev libpq-dev python-dev
-
 
 Homebrew
 --------
@@ -50,63 +50,35 @@ Homebrew
 Using `Homebrew <http://brew.sh/>`_, please refer to this `formula <https://github.com/danpoltawski/homebrew-mdk>`_.
 
 
-Git
----
-
-Clone the repository
-~~~~~~~~~~~~~~~~~~~~
-
-::
-
-    cd /opt
-    sudo git clone git://github.com/FMCorz/mdk.git moodle-sdk
-
-Install the dependencies
-~~~~~~~~~~~~~~~~~~~~~~~~
-
-You will need the tool `pip <http://www.pip-installer.org/en/latest/installing.html>`_ to install the packages required by Python.
+For development
+---------------
 
-::
+Clone the repository::
 
-    sudo pip install -r /opt/moodle-sdk/requirements.txt
+    git clone git://github.com/FMCorz/mdk.git moodle-sdk
 
-On Debian-based systems, you will probably need to install the following packages::
+On Debian-based systems, you will need to install the following packages::
 
     sudo apt-get install python-pip libmysqlclient-dev libpq-dev python-dev
 
-Make executable and accessible
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-::
-
-    sudo chmod +x /opt/moodle-sdk/mdk.py
-    sudo ln -s /opt/moodle-sdk/mdk.py /usr/local/bin/mdk
-
-Set up the basics
-~~~~~~~~~~~~~~~~~
-
-Assuming that you are using Apache, which is set up to serve the files from /var/www, leave the default values as they are in ``mdk init``, except for your remote and the database passwords.
-
-::
+Then from the directory where you cloned the repository::
 
-    mkdir ~/www
-    sudo ln -s ~/www /var/www/m
+    sudo python setup.py develop
     mdk init
 
-You're all set.
 
-Optional
-~~~~~~~~
+Bash completion
+~~~~~~~~~~~~~~~
 
 To activate bash completion::
 
-    sudo ln -s /opt/moodle-sdk/extra/bash_completion /etc/bash_completion.d/moodle-sdk
+    sudo ln -s /path/to/moodle-sdk/extra/bash_completion /etc/bash_completion.d/moodle-sdk
 
 To activate goto commands (``gt`` and ``gtd``), add the following to ~/.bashrc::
 
-    if [ -f /opt/moodle-sdk/extra/goto_instance ]; then
-        . /opt/moodle-sdk/extra/goto_instance
-        . /opt/moodle-sdk/extra/goto_instance.bash_completion
+    if [ -f /path/to/moodle-sdk/extra/goto_instance ]; then
+        . /path/to/moodle-sdk/extra/goto_instance
+        . /path/to/moodle-sdk/extra/goto_instance.bash_completion
     fi