Verbatim:Development/Dev Instance: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
m (added note about installing lxml) |
||
| Line 19: | Line 19: | ||
*** <code>python setup.py install</code> | *** <code>python setup.py install</code> | ||
* Initialize the database by running the <code>./PootleServer</code> script once. | * Initialize the database by running the <code>./PootleServer</code> script once. | ||
** '''Note for OS X users:''' At this point I got an error that lxml was not installed. Running <code>easy_install lxml</code> didn't work for me, but it might work for you. Instead what I had to do was download the [http://codespeak.net/lxml/lxml-2.2.1.tgz lxml .tqz] and then: | |||
***<code>tar -xvzf lxml-2.2.1.tgz</code> | |||
***<code>cd lxml-2.2.1</code> | |||
***<code>python setup.py build --static-deps</code> | |||
***<code>python setup.py install</code> | |||
**The issue apparently is that lxml requires newer versions of the libxml and libxslt libraries than the system offers. Building from source with the --static-deps flag will force lxml to download the versions it needs and link against those. More details are available on the [http://codespeak.net/lxml/build.html#building-lxml-on-macos-x lxml website]. | |||
* You can run the pootle server later by using <code>./manage.py runserver PORTNUMBER</code> (if you omit PORTNUMBER, it'll default to 8000) [http://translate.sourceforge.net/wiki/pootle/installation_1.3beta#running_pootle] | * You can run the pootle server later by using <code>./manage.py runserver PORTNUMBER</code> (if you omit PORTNUMBER, it'll default to 8000) [http://translate.sourceforge.net/wiki/pootle/installation_1.3beta#running_pootle] | ||
Revision as of 19:55, 19 June 2009
Verbatim » Development / Dev Instance
Setting up a Pootle development instance
Pootle's installation instructions are on the Pootle wiki. Make sure to follow the (django-based) installation instructions, not the ones referring to jToolkit.
- have Python 2.5 installed
- grab an svn checkout of the Pootle trunk:
svn co https://translate.svn.sourceforge.net/svnroot/translate/src/trunk pootle... orgit svn clone -Ttrunk https://translate.svn.sourceforge.net/svnroot/translate/src/ pootle- if you are using
git-svn, make sure to generate an emptydbsdirectory, as git won't pick up empty directories [1]
- create a clean Python environment for the application, using virtualenv (you don't want to install all required libs in your global python directory):
virtualenv --no-site-packages --python=path/to/python2.5 pootle-envcd pootle-env/. bin/activate
- Install the pre-requisites. Some notes:
- PyLucene and Xapian are not vital
- The translate toolkit is part of the Pootle project too, and while it comes with an svn checkout of the trunk you still need to install it:
cd pootlepython setup.py install
- Initialize the database by running the
./PootleServerscript once.- Note for OS X users: At this point I got an error that lxml was not installed. Running
easy_install lxmldidn't work for me, but it might work for you. Instead what I had to do was download the lxml .tqz and then:tar -xvzf lxml-2.2.1.tgzcd lxml-2.2.1python setup.py build --static-depspython setup.py install
- The issue apparently is that lxml requires newer versions of the libxml and libxslt libraries than the system offers. Building from source with the --static-deps flag will force lxml to download the versions it needs and link against those. More details are available on the lxml website.
- Note for OS X users: At this point I got an error that lxml was not installed. Running
- You can run the pootle server later by using
./manage.py runserver PORTNUMBER(if you omit PORTNUMBER, it'll default to 8000) [2]