Created by Ivan (capiscuas@gmail.com)
Description
Due that the auroville modules had an installation file dependent for Tryton2.4 and the latest stable Tryton was already 2.6, I decided to create 3 different virtual environments in 3 diferent folders.
~/workspace/tryton24/ -> Tryton2.4 with old auroville modules and the health module(not supported yet Nov 2012 for 2.6)
~/workspace/tryton26/ -> Tryton2.6 to migrate the auroville modules and continue development
~/workspace/tryton27/ -> Tryton2.7 Development code , to check the latest features and be able to improve/send patches to the main Tryton project.
The following script will create the different environment depending on the variable version.
TOFINISH
trytond.conf (attachment)
#!/bin/bash version=2.6 #In case you want to work with 2.6, delete the trytond_health module (from modules folder and local/lib/python2.7/site-packages/ folder) sudo apt-get -y install python-setuptools python-pip sudo pip install virtualenv sudo apt-get -y install libxml2-dev sudo apt-get -y install libxslt1-dev sudo apt-get -y install python-gtk2 #sudo apt-get -y install libpq-dev #postgresql sudo apt-get -y install python-dev sudo apt-get -y install sqlite3 libsqlite3-dev # sqlite mkdir -p ~/workspace/tryton/db mkdir -p ~/workspace/tryton/log cp trytond.conf ~/workspace/tryton/ #Download trytond.conf from the attachment. cd ~/workspace/tryton$version virtualenv --system-site-packages env source env/bin/activate #pip install trytond_health #uncomment if using <2.6 pip install --upgrade http://downloads2.tryton.org/2.6/tryton-2.6.0.tar.gz pip install --upgrade http://downloads2.tryton.org/2.6/trytond-2.6.1.tar.gz pip install --upgrade http://downloads2.tryton.org/2.6/trytond_account-2.6.1.tar.gz pip install --upgrade http://downloads2.tryton.org/2.6/trytond_company-2.6.0.tar.gz pip install --upgrade http://downloads2.tryton.org/2.6/trytond_country-2.6.0.tar.gz pip install --upgrade http://downloads2.tryton.org/2.6/trytond_currency-2.6.1.tar.gz pip install --upgrade http://downloads2.tryton.org/2.6/trytond_product-2.6.0.tar.gz touch db/tryton.sqlite trytond -c trytond.conf -d tryton --init=all cat<<EOF > tryton.sh #!/bin/bash cd ~/workspace/tryton source env/bin/activate trytond -c trytond.conf & tryton killall trytond EOF chmod +x ~/workspace/tryton/tryton.sh ln -s env/lib/python2.7/site-packages/trytond/modules . mkdir -p ~/.config/tryton/$version/ cat<<EOF > ~/.config/tryton/$version/profiles.cfg [DEFAULT] port = 8000 [local] host = localhost port = 8000 database = tryton username = admin EOF exit 0
If you want to use different Trytond(server) instances at the same time, you should change the PORT number at the tytrond.conf file.