This repository has been archived by the owner on May 3, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
/
Makefile
69 lines (52 loc) · 1.45 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
APPNAME = pylonshq
DEPS =
HERE = $(shell pwd)
BIN = $(HERE)/bin
VIRTUALENV = virtualenv
NOSE = bin/nosetests -s --with-xunit
TESTS = $(APPNAME)/tests
PYTHON = $(HERE)/bin/python
BUILDAPP = $(HERE)/bin/buildapp
BUILDRPMS = $(HERE)/bin/buildrpms
PYPI = http://pypi.python.org/simple
PYPIOPTIONS = -i $(PYPI)
INSTALL = $(HERE)/bin/pip install
PIP_CACHE = /tmp/pip_cache
INSTALLOPTIONS = --download-cache $(PIP_CACHE) -U -i $(PYPI)
ifdef PYPIEXTRAS
PYPIOPTIONS += -e $(PYPIEXTRAS)
INSTALLOPTIONS += -f $(PYPIEXTRAS)
endif
ifdef PYPISTRICT
PYPIOPTIONS += -s
ifdef PYPIEXTRAS
HOST = `python -c "import urlparse; print urlparse.urlparse('$(PYPI)')[1] + ',' + urlparse.urlparse('$(PYPIEXTRAS)')[1]"`
else
HOST = `python -c "import urlparse; print urlparse.urlparse('$(PYPI)')[1]"`
endif
endif
INSTALL += $(INSTALLOPTIONS)
SW = sw
BUILD_DIRS = bin build deps include lib lib64
.PHONY: all build test
all: build
$(BIN)/python:
python $(SW)/virtualenv.py --no-site-packages --distribute .
rm distribute-0.6.19.tar.gz
$(BIN)/pip install -U pip
$(BIN)/pip: $(BIN)/python
$(BIN)/nosetests:
$(INSTALL) nose
$(INSTALL) coverage
$(BIN)/paster: lib $(BIN)/pip
$(INSTALL) -r requirements.txt
$(PYTHON) setup.py develop
clean-env:
rm -rf $(BUILD_DIRS)
clean: clean-env
build: $(BIN)/pip
$(INSTALL) -r requirements.txt
$(PYTHON) setup.py develop
test: $(BIN)/nosetests
$(NOSE) --with-coverage --cover-package=pylonshq --cover-erase \
--cover-inclusive $(APPNAME)