Last active
September 27, 2015 12:28
-
-
Save witsch/1270246 to your computer and use it in GitHub Desktop.
convenience Makefile for the "collective" Python buildout
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# set up python buildout & development tools | |
version = 2.7 | |
python = bin/python$(version) | |
defaults = bin/python bin/virtualenv | |
tools = buildout pep8 pyflakes mkrelease checkversions igor pytest tox devpi | |
namespace = | |
all: $(defaults) $(tools) | |
tools: $(tools) | |
buildout: namespace=zc. | |
mkrelease: namespace=jarn. | |
checkversions: namespace=z3c. | |
igor: namespace=mr. | |
$(tools): tools/bin/pip | |
$? install --upgrade $(namespace)$@ | |
ln -sf ../tools/bin/$@ bin | |
tools/bin/pip: $(python) | |
virtualenv-$(version) --no-site-packages --distribute tools | |
$(defaults): $(python) | |
ln -s $@*$(version) $@ | |
$(python): python/bin/install-links | |
mkdir -p bin | |
python/bin/install-links | |
python/bin/install-links: python/bin/buildout | |
cd python && bin/buildout -U install-links:prefix=$(PWD) | |
python/bin/buildout: python/buildout.cfg | |
cd python && python bootstrap.py | |
python/buildout.cfg: | |
git clone https://github.com/collective/buildout.python python | |
clean: | |
rm -rf python | |
.PHONY: all tools clean $(tools) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Drop this Makefile into a directory, e.g.
~/Development
, runmake
, add<dir>/bin
to your$PATH
and start coding...