Requirements ------------ You need Python 2.4 or 2.3. I haven't tested 2.3 support much, though. You should also have enough to build an extension module. Various features need other things, but if you don't have them it shouldn't affect the rest of the profiler: * PyDot to display graphs. * Pyrex to scan more types accurately (currently, only files). * The Python sources to compile a patched version, to use the annotate.groupby and annotate.findcreators functions. If you change anything, you might need: * HappyDoc to generate documentation. Patching Python (optional, but very helpful) -------------------------------------------- Extract the Python source somewhere. Then: cd path-to-python-source patch -p0 < path-to-sizer/src/cpython/patch Then you need to do the configure; make; make install dance. You might want to use the --prefix option to configure to point at somewhere you have write access to, so you can install the patched version locally and without overwriting anything. For example, I use ./configure --prefix=/home/nick/python-patched; make; make install which puts the interpreter at /home/nick/python-patched/bin/python. Configuring the profiler ------------------------ There are a few changes you might want to make before building the profiler: 1. Choose a viewer for the Postscript files generated by the graph module. If you look in src/graph.py, you'll see: format = { "extension": ".ps", "command": "ggv", "format": "ps", "scale": 1.0 } If you don't have ggv, you can change this to some other Postscript viewer. You could also change the format of the generated files to something else, for example "dot". 2. If you have HappyDoc, switch on documentation building. You can do this by changing the line UPDATE_DOCS?=0 in the Makefile to UPDATE_DOCS?=1. Building and installing ----------------------- If you patched Python, run make PYTHON=path-to-python-interpreter otherwise, just run make. Then run make install, possibly as root, to install the profiler. Where from here? ---------------- Look at the README :-)