Mucho Tools - famish99/MuchoCorazon GitHub Wiki
This page will document the external tools necessary to run the MuchoCorazon webapp.
PyPy
The server is running on PyPy which is an optimized Python interpreter written in Python with JIT abilities. We're using pypy-1.9, which is compatible with the Python 2.7.2 spec.
Installing PyPy
This is the preferred route to installation. On most modern machines, the dependencies should just be met. Grab the latest PyPy release here.
All binary versions are packaged in a tar.bz2 or zip file. When uncompressed, they run in-place. For now you can uncompress them either somewhere in your home directory or, say, in /opt, and if you want, put a symlink from somewhere like /usr/local/bin/pypy to /path/to/pypy-1.9/bin/pypy. Do not move or copy the executable pypy outside the tree – put a symlink to it, otherwise it will not find its libraries.
Building PyPy
If you're having issue getting PyPy to work, here are some things you may need to install. The libraries outlined below are commonly missing/out of date on older machines. If you're feeling really adventurous, you can build PyPy from scratch, the instructions are here.
libexpat
This can be compiled normally.
openssl 0.9.8
openssl 0.9.8 which if must be built manually done like so, otherwise the shared libraries will not be created. (This library may not be necessary if using PyPy 1.9).
./configure shared --prefix=/path/to/
make
make install
libbz2
libbz2 is odd in the fact it has no configure script. It must be made, then the .so must be manually copied over.
make -f Makefile-libbz2-so
make
make install PREFIX=/path/to/
cp libbz2.so* /path/to/lib
Memcached
From the memcached site:
Free & open source, high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load. Memcached is an in-memory key-value store for small chunks of arbitrary data (strings, objects) from results of database calls, API calls, or page rendering.
We're using memcached version 1.4.13. We're running a memcached instance on tmtrac to store rendered pages to speedup report access. It can be used to store generated database queries as well, and in future versions of TantoCuore, we plan to support some form of query caching.
Python/PyPy Packages
We're using these packages within PyPy to operate. Most of these can be installed by downloading the files then running sudo pypy setup.py install
.
The following are needed for development/testing purposes:
- Django 1.5.1 GitHub Django Site
- django-social-auth (Provides OAuth mechanisms to common social networks) GitHub (Deprecated)
- Newer version of django-social-auth [GitHub] https://github.com/omab/python-social-auth
- Cache Machine (django-cache-machine-0.6 to provide memcache caching to QuerySets) GitHub, Docs
- django-picklefield 0.2.1 (Allow us to serialize data into the database) GitHub
- sqlite3 (for testing/dev purposes before migrating to full MySQL backend, usually built into PyPy)
- memcache (using python-memcached v1.48 implementation) Project Home
- Python Imaging Library (PIL) 1.1.7 (needed for Django ImageField support http://www.pythonware.com/products/pil/)
- https://pypi.python.org/pypi/Pillow/2.3.0
These packages will only be necessary once it's rolled to production web service.