--- /dev/null
+# -*- makefile -*-
+
+PYTHON_VERSION ?= 2.4.6
+PYTHON_URL ?= http://www.python.org/ftp/python/$(PYTHON_VERSION)/Python-$(PYTHON_VERSION).tgz
+SETUPTOOLS_URL ?= http://peak.telecommunity.com/dist/ez_setup.py
+
+###########################################################################
+
+PYTHON_DIR=python
+
+PYTHON = $(BASEDIR)/$(PYTHON_DIR)/bin/python
+EASY_INSTALL = $(BASEDIR)/$(PYTHON_DIR)/bin/easy_install
+PASTER = $(BASEDIR)/$(PYTHON_DIR)/bin/paster
+
+###########################################################################
+
+python-unpack: $(PYTHON_DIR)/Python-$(PYTHON_VERSION)/README
+$(PYTHON_DIR)/Python-$(PYTHON_VERSION)/README:
+ mkdir $(PYTHON_DIR)
+ wget "$(PYTHON_URL)" -O $(PYTHON_DIR)/python.tgz
+ tar -C $(PYTHON_DIR) -xzf $(PYTHON_DIR)/python.tgz
+ rm -f $(PYTHON_DIR)/python.tgz
+.PHONY: python-unpack
+
+python-build: $(PYTHON)
+$(PYTHON):
+ cd $(PYTHON_DIR)/Python-$(PYTHON_VERSION) && ./configure --prefix=$(BASEDIR)/$(PYTHON_DIR)
+ cd $(PYTHON_DIR)/Python-$(PYTHON_VERSION) && make
+ cd $(PYTHON_DIR)/Python-$(PYTHON_VERSION) && make install
+.PHONY: python-build
+
+python-rebuild: python-clean python-build
+.PHONY: python-rebuild
+
+python-clean:
+ cd $(PYTHON_DIR)/Python-$(PYTHON_VERSION) && make clean
+ rm -f $(PYTHON)
+.PHONY: python-clean
+
+python: python-unpack python-build
+.PHONY: python
+
+setuptools: $(EASY_INSTALL)
+$(EASY_INSTALL):
+ mkdir $(PYTHON_DIR)/Extensions
+ wget $(SETUPTOOLS_URL) -O $(PYTHON_DIR)/Extensions/ez_setup.py
+ cd $(PYTHON_DIR)/Extensions && $(PYTHON) ez_setup.py
+.PHONY: setuptools
+
+pybase: python setuptools
+.PHONY: pybase
+
+###########################################################################
+
+debdepends::
+ aptitude install build-essential zlibc
+
+eggs::
+ $(EASY_INSTALL) zc.buildout
+
+.gitignore::
+ @$(gitignore) /python/
+
+.env::
+ @$(env) PATH $(BASEDIR)/$(PYTHON_DIR)/bin
+
+clean:: python-clean
+
+setup:: pybase