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 PIL_URL ?= http://effbot.org/downloads/Imaging-$(PIL_VERSION).tar.gz
9 ###########################################################################
14 PYTHON = $(BASEDIR)/$(PYTHON_DIR)/bin/python
15 EASY_INSTALL = $(BASEDIR)/$(PYTHON_DIR)/bin/easy_install
16 PASTER = $(BASEDIR)/$(PYTHON_DIR)/bin/paster
21 aptitude install build-essential zlibc libjpeg62-dev libfreetype6-dev
23 .PHONY: python-unpack python-build python setuptools eggs pil-unpack pil-build pil buildout \
24 bootstrap update update-nonet shell init otherinit
26 python-unpack: $(PYTHON_DIR)/Python-$(PYTHON_VERSION)/README
27 $(PYTHON_DIR)/Python-$(PYTHON_VERSION)/README:
29 wget "$(PYTHON_URL)" -O $(PYTHON_DIR)/python.tgz
30 tar -C $(PYTHON_DIR) -xzf $(PYTHON_DIR)/python.tgz
31 rm -f $(PYTHON_DIR)/python.tgz
33 python-build: $(PYTHON)
35 cd $(PYTHON_DIR)/Python-$(PYTHON_VERSION) && ./configure --prefix=$(BASEDIR)/$(PYTHON_DIR)
36 cd $(PYTHON_DIR)/Python-$(PYTHON_VERSION) && make
37 cd $(PYTHON_DIR)/Python-$(PYTHON_VERSION) && make install
39 python: python-unpack python-build
41 setuptools: $(EASY_INSTALL)
43 mkdir $(PYTHON_DIR)/Extensions
44 wget $(SETUPTOOLS_URL) -O $(PYTHON_DIR)/Extensions/ez_setup.py
45 cd $(PYTHON_DIR)/Extensions && $(PYTHON) ez_setup.py
48 $(EASY_INSTALL) ZopeSkel
49 $(EASY_INSTALL) zc.buildout
51 pil-unpack: $(PYTHON_DIR)/Extensions/Imaging-$(PIL_VERSION)/README
52 $(PYTHON_DIR)/Extensions/Imaging-$(PIL_VERSION)/README:
53 wget $(PIL_URL) -O $(PYTHON_DIR)/Extensions/pil.tgz
54 tar -C $(PYTHON_DIR)/Extensions -xzf $(PYTHON_DIR)/Extensions/pil.tgz
55 rm -f $(PYTHON_DIR)/Extensions/pil.tgz
57 pil-build: $(PYTHON_DIR)/bin/pilconvert.py
58 $(PYTHON_DIR)/bin/pilconvert.py:
59 cd $(PYTHON_DIR)/Extensions/Imaging-$(PIL_VERSION) && $(PYTHON) setup.py install
61 pil: pil-unpack pil-build
63 buildout: buildout.cfg
65 $(PASTER) create --no-interactive -t plone3_buildout . zope_password=admin
68 sed -i -e '1s/^#!.*\/python/#!$(subst /,\/,$(PYTHON))/' $(PYTHON_DIR)/bin/*
69 $(PYTHON) bootstrap.py
72 @echo "python/" >.gitignore
73 @echo "var/" >>.gitignore
74 @echo "bin/" >>.gitignore
75 @echo "develop-eggs/" >>.gitignore
76 @echo "downloads/" >>.gitignore
77 @echo "eggs/" >>.gitignore
78 @echo "fake-eggs/" >>.gitignore
79 @echo "parts/" >>.gitignore
80 @echo "/.installed.cfg" >>.gitignore
81 @echo "*.pyc" >>.gitignore
84 @PATH=$(BASEDIR)/$(PYTHON_DIR)/bin:$(BASEDIR)/bin:$$PATH $$SHELL
86 init: python setuptools pil eggs buildout otherinit otherupdate bootstrap update .gitignore
95 update-nonet: otherupdate