Schema Sync Installation Instructions

Standard Installation

     Download SchemaSync-0.9.2
         
     tar xvzf SchemaSync-0.9.2.tar.gz
     cd SchemaSync-0.9.2
     python setup.py install
     

Installing without root access

To install Schema Sync and it's dependancies without root access, we need to create a virtual environment where the app can live. We'll be using virtualenv. virtualenv creates an isolated environment under your account, in the directory of your choice. This new virtual environment cannot interfere with Python programs running elsewhere on the system.
            
                
            Download VirtualEnv
            tar xvzf virtualenv-tip.gz
            mv virtualenv/virtualenv.py ./  # we only need the virtualenv.py script
            rm virtualenv-tip.gz            # cleanup
            rm -r virtualenv/               # cleanup
            
            

Now that we have VirtualEnv, we can create a virtual environment for the application (or multiple applications). For this example, we will setup an environment just for schemasync. You can optionally pass --no-site-packages to virtualenv.py so your virtual environment will not inherit the packages already installed on your system. If MySQLdb is already installed on the system and you pass this option, you will need to re-install it in your environment.

            
            python virtualenv.py schemasync     # optionally pass --no-site-packages
            source schemasync/bin/activate      # activate the environment
            mkdir schemasync/src                # create a src dir for any packages we download
            cd schemasync/src
            
            # If you need MySQLdb for this env, install it now
            
            # Install schemasync (auto installs schemaobject 0.5.3)
            Download SchemaSync-0.9.2
            tar xvzf SchemaSync-0.9.2.tar.gz
            cd SchemaSync-0.9.2
            python setup.py install
            
            # to deactivate this environment, just type deactivate
            
            
Notes: Before you can use schemasync, you will need to activate this environment. To uninstall schemasync, just deactivate the environment and remove the schemasync env directory we created. You can find more info on using virtualenv here and here.


Installing the latest development version

            git clone git://github.com/mmatuson/SchemaSync.git
            cd SchemaSync
            sudo python setup.py install
            

Upgrading Schema Sync

If you installed Schema Sync using setup.py install, you can upgrade Schema Sync by deleting the schemasync directory from your Python site-packages (or virtualenv) and re-installing the new version.

Where are my site-packages stored?
The location of the site-packages directory depends on the operating system, and the location in which Python was installed. To find out your system’s site-packages location, execute the following:
                 
python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()"
                 
Note that this should be run from a shell prompt, not a Python interactive prompt.
Thanks to the Django install page for these helpful instructions.