Verbatim:Development/Dev Instance

From MozillaWiki
Jump to navigation Jump to search

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.4--2.6 installed (Mozilla is currently running 2.4 in production)
  • grab an svn checkout of the Pootle trunk:
  • 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|6] pootle-env
    • cd 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 pootle
      • python setup.py install
  • Initialize the database by running the ./PootleServer script once.
    • Note for OS X users: At this point I got an error that lxml was not installed. Running easy_install lxml didn'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.tgz
      • cd lxml-2.2.1
      • python setup.py build --static-deps
      • python 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.
  • You can run the pootle server later by using ./manage.py runserver PORTNUMBER (if you omit PORTNUMBER, it'll default to 8000) [2]