Installing Amara
These are generic notes, for a Linux-like OS. Please check below for any notes on your specific OS.
Install Mercurial
Optional, but recommended: install setuptools
- Update or create .pydistutils.cfg if you'd like to customize things for installing in your home directory, for example:
[install] install_lib = ~/lib/python/$py_version_short/site-packages install_scripts = ~/bin
mkdir $HOME/lib/python/2.5/site-packages
easy_install amara
#Make sure you're using the expected version: should be *Amara-2.0*.egg
python -c "import amara; print amara.__file__"
If you are having trouble getting the right Amara version try uncommenting any older Amara versions in any active easy-install.pth
#Then start experimenting
python -c "import amara;doc=amara.parse('<a/>');print doc.xml_first_child.xml_qname"
You can also run some performance exercises: Amara2/Performance
You can also run the test suite:
From source code, using virtualenv
#The following is only needed once
virtualenv --no-site-packages $AKARATEST #
source $AKARATEST/bin/activate
#You now have a subshell with a clean Python slate, and you can install Amara2 here:
mkdir $AKARATEST/src
cd $AKARATEST/src
hg clone http://hg.4suite.org/amara/trunk amara
cd amara
python setup.py install
cd $AKARATEST #Do not import/run Amara from its source dir
#Then each time you want to go back to the sandbox:
cd $AKARATEST
source $AKARATEST/bin/activate
#Then start experimenting
python -c "import amara;doc=amara.parse('<a/>');print doc.xml_first_child.xml_qname"
#To get updates as they come, change to the Amara directory and...
cd $AKARATEST/src/amara
hg pull; hg up
python setup.py install
cd $AKARATEST #Do not import/run Amara from its source dir
More specific notes
Mac
See Amara2/Mac
