3 PYTHON_VERSION ?= 2.4.6
4 PYTHON_URL ?= http://www.python.org/ftp/python/$(PYTHON_VERSION)/Python-$(PYTHON_VERSION).tgz
5 SETUPTOOLS_URL ?= http://peak.telecommunity.com/dist/ez_setup.py
7 ###########################################################################
11 PYTHON = $(BASEDIR)/$(PYTHON_DIR)/bin/python
12 EASY_INSTALL = $(BASEDIR)/$(PYTHON_DIR)/bin/easy_install
13 PASTER = $(BASEDIR)/$(PYTHON_DIR)/bin/paster
15 ###########################################################################
17 python-unpack: $(PYTHON_DIR)/Python-$(PYTHON_VERSION)/README
18 $(PYTHON_DIR)/Python-$(PYTHON_VERSION)/README:
20 wget "$(PYTHON_URL)" -O $(PYTHON_DIR)/python.tgz
21 tar -C $(PYTHON_DIR) -xzf $(PYTHON_DIR)/python.tgz
22 rm -f $(PYTHON_DIR)/python.tgz
25 python-build: $(PYTHON)
27 cd $(PYTHON_DIR)/Python-$(PYTHON_VERSION) && ./configure --prefix=$(BASEDIR)/$(PYTHON_DIR)
28 cd $(PYTHON_DIR)/Python-$(PYTHON_VERSION) && make
29 cd $(PYTHON_DIR)/Python-$(PYTHON_VERSION) && make install
32 python-rebuild: python-clean python-build
33 .PHONY: python-rebuild
36 cd $(PYTHON_DIR)/Python-$(PYTHON_VERSION) && make clean
40 python: python-unpack python-build
43 setuptools: $(EASY_INSTALL)
45 mkdir $(PYTHON_DIR)/Extensions
46 wget $(SETUPTOOLS_URL) -O $(PYTHON_DIR)/Extensions/ez_setup.py
47 cd $(PYTHON_DIR)/Extensions && $(PYTHON) ez_setup.py
50 pybase: python setuptools
53 ###########################################################################
56 aptitude install build-essential zlibc
59 $(EASY_INSTALL) zc.buildout
62 @$(gitignore) /python/
65 @$(env) PATH $(BASEDIR)/$(PYTHON_DIR)/bin