|
|
|
Development ::
To move around within this setup procedure, use these links:
|
|
| |
Setting up your Computer - Mac OS X 10.4
MySQL and MySQL for Python
Transana uses a database called MySQL to store all of the analytic data. MySQL is a very powerful, very popular, open-source database program. It is available at http://www.mysql.com, as are a number of tools for working with MySQL databases. MySQL is documented extensively at that site. We currently use version 5.1.28-rc for Transana development on the Mac, though you can use any version from 4.1 on when using Transana.
Transana uses MySQL for Python to connect to MySQL from within Python. MySQL for Python is available at http://sourceforge.net/projects/mysql-python. We currently use version 1.2.2 of MySQL for Python.
We deal with the installation of these two components together because they must be installed together as a pair.
Setting up MySQL for Python and MySQL
- Make sure your "/Library/Frameworks/Python.framework/Versions/Current/lib/python2.5/site-packages"
folder does not contain a MySQL_python "egg" file. If there is one, drag it to the Trash.
- Download and install MySQL 5.1.29-rc for OS X 10.4 (x86) (or whatever the latest release of the MySQL 5.1 line is.)
- Copy the contents of folder "/usr/local/mysql/share" to a folder called "share" in your program's source code folder. This folder contains the internationalization prompts for MySQL, and the prompt files must match the MySQL version being used.
- Download and unpack MySQL-python-1.2.2.tar.gz.
- Open a Terminal window and change to the folder where you unpacked MySQL for Python.
- Edit the site.cfg file. I had to enable the mysql_config line because it's not on my PATH. If you want to develop for the single-user version of Transana, you will also need to change the "embedded" line to indicate that you wan to build the embedded version of MySQL for Python.
- If a "build" folder exists in your MySQL for Python folder, delete it before proceeding. Also delete the "dist" folder if it exists. Previous builds can interfere with the build process, and if you are changing from single-user to multi-user development, failure to delete the build folder can cause a variety of mysterious failures.
- To further ensure that previous install attempts don't interfere with this install, type the command:
python setup.py clean
- To build MySQL for Python using MySQL 5.1.29-rc, type the command:
python setup.py build
- To install the MySQL for Python package to your Python installation, type the command:
python setup.py install
- Finally, when you start working on Transana, you will need to edit the TransanaConstants.py file. At approximately line 33 of this file, the "singleUserVersion" variable is declared. To work with this configuration of Embedded MySQL and MySQL for Python, the singleUserVersion variable must be set to True.
singleUserVersion = True
To work with server-based MySQL and that build of MySQL for Python, the singleUserVersion variable must be set to False.
singleUserVersion = False
Either way, it needs to match your MySQL for Python installation.
If you haven't already done so, you will need to set things up for the multi-user version of Transana if you intend to develop for the multi-user version. This process is described in the Transana Multi-user Installation Guide 2.30.
The next step is to set up Transana's Internationalization files.
|
|
|