<commit_before>============
Installation
============

This guide is the Satchmo installation process. It is meant to be a cookbook approach for
most users. Advanced users may wish to modify this in order to integrate into their own projects. For the
truly impatient, you may look at the :doc:`Quick Start <quickstart>` for the fastest way to get a store up and
running.

This guide assumes you are working on a unix variant and that you are installing it somewhere into a directory
you have write access to. In the below example, we use :file:`/home/user/src`. You are expected to modify the path to fit your needs.

.. warning::
   You must have Django 1.1.x properly installed.

A Quick Note About Installing Dependencies
------------------------------------------

Python allows you to install applications in multiple ways: you can use the
commands :command:`easy_install` or :command:`pip`; you may also manually
install them by:

  - linking the packages into your site-packages directory, or
  - use .pth files to add each to your python path.

All of these will work fine with Satchmo, but in the interest of keeping this as
straightforward as possible, we show how to install the packages with either:

  - :command:`easy_install`, or
  - :command:`python setup.py install` on a source code checkout (with mercurial)

.. note::
    The provided egg and tar files by the various dependencies may not be the
    most current installation, so you should ensure that the version recommended
    by satchmo (see :doc:`requirements`) is available via
    :command:`easy_install` before proceeding.

Installing Dependencies
-----------------------

#. Install setuputils by following the instructions on the easy_install_ page.
   After installation, you should be able to run :command:`easy_install`
   directly (assuming the install directory is in you $PATH).

#. Install required dependencies (this may vary based on your OS of choice)::

        easy_install pycrypto
        easy_install http://www.satchmoproject.com/snapshots/trml2pdf-1.2.tar.gz
        easy_install django-registration
        easy_install PyYAML

   .. note::
      If you have Python 2.4 installed, you will need to install elementtree also::

        easy_install elementtree

#. Install Python Imaging Library. There are multiple options for installing
   this application; please use one of the options below:

   - Download the binary from the `PIL site`_ and install.

   - Use your distribution's package manager. For Ubuntu::

       sudo apt-get install python-imaging

#. Install Reportlab based on the description for your OS `here <http://www.reportlab.com/software/opensource/rl-toolkit/download/>`_

#. Install django-threaded-multihost:

   - Check out from source::

       hg clone http://bitbucket.org/bkroeze/django-threaded-multihost/
       cd /path/to/django-threaded-multihost
       python setup.py install

#. Install django-app-plugins:

   - Check out the satchmo-enhanced version::

       hg clone http://bitbucket.org/bkroeze/django-caching-app-plugins/
       cd /path/to/django-caching-app-plugins
       python setup.py install

#. Install sorl-thumbnail:

   - Check out from source::

       hg clone https://sorl-thumbnail.googlecode.com/hg/ sorl-thumbnail
       cd /path/to/sorl-thumbnail
       python setup.py install

#. Install signals-ahoy:

   - Check out from source::

       hg clone http://bitbucket.org/bkroeze/django-signals-ahoy/
       cd /path/to/django-signals-ahoy
       python setup.py install

#. Install livesettings:

   - Check out from source::

       hg clone http://bitbucket.org/bkroeze/django-livesettings/
       cd /path/to/djang-livesettings
       python setup.py install

   .. versionadded:: 0.9.1

#. Install keyedcache:

   - Check out from source::

       hg clone http://bitbucket.org/bkroeze/django-keyedcache/
       cd /path/to/django-keyedcache
       python setup.py install

   .. versionadded:: 0.9.1

#. Satchmo has two types of documentation: Sphinx and docutils. Sphinx is used
   to generate this document, while docutils are useful for the auto-generated
   admin documentation.

   You may choose to install these dependencies by running::

     easy_install Sphinx
     easy_install docutils

#. Satchmo also uses South for database migrations. You may also install it::

     easy_install South

   .. versionadded:: 0.9.1

Installing Satchmo into your path
---------------------------------

1. Checkout the latest Satchmo release into :file:`/home/user/src`::

        hg clone http://bitbucket.org/chris1610/satchmo/

   .. note::
      If you are a bitbucket user, you may see a slightly different url than described above.
      You may use the generic url or one that is specific to your username. For the purposes
      of an install, either will work.

2. Install satchmo onto your system::

        cd /home/user/src/satchmo-trunk
        sudo python setup.py install

   .. note::
      An alternative to running the install is ensuring that :file:`/path/to/satchmo/apps` is on your python path.
      You may do this by placing a symbolic link to the source, adding a .pth file that points to your :file:`/satchmo/apps`
      location or modifying your PYTHONPATH environment variable.

.. highlight:: pycon
<commit_msg>docs/new_installation: add reference to migration.txt in south install section<commit_after>============
Installation
============

This guide is the Satchmo installation process. It is meant to be a cookbook approach for
most users. Advanced users may wish to modify this in order to integrate into their own projects. For the
truly impatient, you may look at the :doc:`Quick Start <quickstart>` for the fastest way to get a store up and
running.

This guide assumes you are working on a unix variant and that you are installing it somewhere into a directory
you have write access to. In the below example, we use :file:`/home/user/src`. You are expected to modify the path to fit your needs.

.. warning::
   You must have Django 1.1.x properly installed.

A Quick Note About Installing Dependencies
------------------------------------------

Python allows you to install applications in multiple ways: you can use the
commands :command:`easy_install` or :command:`pip`; you may also manually
install them by:

  - linking the packages into your site-packages directory, or
  - use .pth files to add each to your python path.

All of these will work fine with Satchmo, but in the interest of keeping this as
straightforward as possible, we show how to install the packages with either:

  - :command:`easy_install`, or
  - :command:`python setup.py install` on a source code checkout (with mercurial)

.. note::
    The provided egg and tar files by the various dependencies may not be the
    most current installation, so you should ensure that the version recommended
    by satchmo (see :doc:`requirements`) is available via
    :command:`easy_install` before proceeding.

Installing Dependencies
-----------------------

#. Install setuputils by following the instructions on the easy_install_ page.
   After installation, you should be able to run :command:`easy_install`
   directly (assuming the install directory is in you $PATH).

#. Install required dependencies (this may vary based on your OS of choice)::

        easy_install pycrypto
        easy_install http://www.satchmoproject.com/snapshots/trml2pdf-1.2.tar.gz
        easy_install django-registration
        easy_install PyYAML

   .. note::
      If you have Python 2.4 installed, you will need to install elementtree also::

        easy_install elementtree

#. Install Python Imaging Library. There are multiple options for installing
   this application; please use one of the options below:

   - Download the binary from the `PIL site`_ and install.

   - Use your distribution's package manager. For Ubuntu::

       sudo apt-get install python-imaging

#. Install Reportlab based on the description for your OS `here <http://www.reportlab.com/software/opensource/rl-toolkit/download/>`_

#. Install django-threaded-multihost:

   - Check out from source::

       hg clone http://bitbucket.org/bkroeze/django-threaded-multihost/
       cd /path/to/django-threaded-multihost
       python setup.py install

#. Install django-app-plugins:

   - Check out the satchmo-enhanced version::

       hg clone http://bitbucket.org/bkroeze/django-caching-app-plugins/
       cd /path/to/django-caching-app-plugins
       python setup.py install

#. Install sorl-thumbnail:

   - Check out from source::

       hg clone https://sorl-thumbnail.googlecode.com/hg/ sorl-thumbnail
       cd /path/to/sorl-thumbnail
       python setup.py install

#. Install signals-ahoy:

   - Check out from source::

       hg clone http://bitbucket.org/bkroeze/django-signals-ahoy/
       cd /path/to/django-signals-ahoy
       python setup.py install

#. Install livesettings:

   - Check out from source::

       hg clone http://bitbucket.org/bkroeze/django-livesettings/
       cd /path/to/djang-livesettings
       python setup.py install

   .. versionadded:: 0.9.1

#. Install keyedcache:

   - Check out from source::

       hg clone http://bitbucket.org/bkroeze/django-keyedcache/
       cd /path/to/django-keyedcache
       python setup.py install

   .. versionadded:: 0.9.1

#. Satchmo has two types of documentation: Sphinx and docutils. Sphinx is used
   to generate this document, while docutils are useful for the auto-generated
   admin documentation.

   You may choose to install these dependencies by running::

     easy_install Sphinx
     easy_install docutils

#. Satchmo also uses South for database migrations. You may also install it::

     easy_install South

   .. seealso::

      :doc:`migration` for more information on how migrations in Satchmo
      should be applied.

   .. versionadded:: 0.9.1

Installing Satchmo into your path
---------------------------------

1. Checkout the latest Satchmo release into :file:`/home/user/src`::

        hg clone http://bitbucket.org/chris1610/satchmo/

   .. note::
      If you are a bitbucket user, you may see a slightly different url than described above.
      You may use the generic url or one that is specific to your username. For the purposes
      of an install, either will work.

2. Install satchmo onto your system::

        cd /home/user/src/satchmo-trunk
        sudo python setup.py install

   .. note::
      An alternative to running the install is ensuring that :file:`/path/to/satchmo/apps` is on your python path.
      You may do this by placing a symbolic link to the source, adding a .pth file that points to your :file:`/satchmo/apps`
      location or modifying your PYTHONPATH environment variable.

.. highlight:: pycon

{'fraction_non_alphanumeric': 0.09342849198257484, 'fraction_numerical': 0.004078227824636203, 'mean_word_length': 2.9222101054162124, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2195067', 'n_tokens_mistral': 3047, 'n_tokens_neox': 2855, 'n_words': 1235}