|Version 5 (modified by 9 years ago) (diff),|
You can run Django on PyPy, and it appears to be running reasonably well. By Django version 1.0 the current issues should have been resolved. For now you can get a project like Pinax from Django Hotclub up and running with a bit of extra work.
Check out PyPy
svn co http://codespeak.net/svn/pypy/dist pypy-dist
This checks out a pypy package and a py package(has py.test and other neat Python code) If you are using git to check out, check out the py repository separately or install py using easy_install.
PyPy runs on
- Windows 32bit
- Mac OS X Intel and PPC
- Linux 32bit and 64bit
Don't try this on a weak machine. It must have at least 1Gb memory and a 5Gb swap space or it will do a lot of swapping. 2Gb is plenty. Expect it to take 30-60 minutes
cd pypy/translator/goal ./translate.py --thread --gc=hybrid --batch targetpypystandalone --faassen --allworkingmodules --oldstyle
This will create a pypy-c executable in the current directory. The generated interpreter will use the modified and standard Python libraries bundled with the PyPy source code if a runtime library is not already on the PYTHONPATH.
To compile PyPy you need a couple of developer tools. Essentially,
- Python 2.5 or 2.4 with ctypes
- C Compiler (gcc or equivalent)
- C Libraries
And you should be good to go
Check out Django
Do a subversion checkout of django trunk.
svn co http://code.djangoproject.com/svn/django/trunk/ django-trunk
Once Django 1.0 is out, it should run on PyPy out of the box.
PyPy supports the 2.4 runtime library, so you have to be aware of code using 2.5 features.
Django only requires Python 2.3. So as such Django runs just fine on PyPy. But, be aware that many popular django applications depend on Python 2.5 runtime lib.
Getting the Pinax Django Hotclub project running we needed a couple of extra dependencies,
But these have now been included in PyPy during the EuroPython sprint (well done hpk & hruske).
If you try to run Pinax on cPython 2.4 you would have this dependency problem.
If you want to get the Pinax project up and running you need to check out the trunk
svn checkout http://django-hotclub.googlecode.com/svn/trunk/ django-hotclub
This checks out pinax and all the associated applications from Google Code. If you want to check out with git follow the instructions on the project wiki at
Make a link to pypy-c in /usr/shared/bin
pypy-c ./manage.py runserver --noreload }}