Development/InstallationOnCentOS_VirtaualEnv

Following are instructions for installing Transifex with virtualenv on a platform CentOS.

Install Transifex with virtualenv on CentOS
===========================================

Setup virtualenv
----------------

Install virtualenv and setup an instance inside the env itself.::

  export DEVEL=/home/devel
  # Enable EPEL and install necessary stuff
  rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm
  yum install python-setuptools

  # Replace 2.4 with your version of python
  mkdir -p $DEVEL/env/default/lib/python2.4/site-packages/
  export PYTHONPATH=$DEVEL/env/default/lib/python2.4/site-packages/
  easy_install --prefix $DEVEL/env/default virtualenv
  easy_install --prefix $DEVEL/env/default virtualenvwrapper

Initialize the virtualenv::

  source ~/.bashrc
  cd $DEVEL/env
  python $DEVEL/env/default/bin/virtualenv default


Switch to virtualenv
--------------------

To use virtualenv, add the following to your `~/.bashrc` file, replacing `/home/devel` with your choice of $DEVEL setting above::

  # Python Virtualenv stuff
  export WORKON_HOME="/home/devel/env/"
  export PATH="$PATH:$WORKON_HOME/default/bin/"
  source $WORKON_HOME/default/bin/virtualenvwrapper_bashrc

Finally, any time you'd like to use the virtual env::

  workon default


Install dependencies
--------------------

Something like the following can be used to install application dependencies.::

  (workon default)
  easy_install Django Markdown python-openid django-authopenid django-pagination polib
  easy_install -f http://transifex.org/files/eggs/ contact_form tagging

  # If using python prior to 2.5 you don't have built-in  sqlite support 
  yum install python-sqlite2

  mkdir -p $DEVEL/sources
  cd $DEVEL/sources

Test
----

To test your settings::

  hg clone http://code.transifex.org/mainline
  cd mainline
  python manage.py syncdb
  python manage.py shell