forked from fdr/heroku-wal-e
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
41 lines (34 loc) · 989 Bytes
/
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
ALLSPHINXOPTS= -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
MODULE=wal_e
VIRTUALENV=$(shell echo "$${VDIR:-'.env'}")
PYTHON=$(VIRTUALENV)/bin/python
all: $(VIRTUALENV)
$(VIRTUALENV): requirements.txt
@virtualenv --no-site-packages $(VIRTUALENV)
@$(VIRTUALENV)/bin/pip install -M -r requirements.txt
$(PYTHON) setup.py develop
touch $(VIRTUALENV)
.PHONY: help
# target: help - Display callable targets
help:
@egrep "^# target:" [Mm]akefile | sed -e 's/^# target: //g'
.PHONY: clean
# target: clean - Clean repo
clean:
@rm -rf build dist docs/_build
@rm -f *.py[co]
@rm -f *.orig
@rm -f */*.py[co]
@rm -f */*.orig
.PHONY: register
# target: register - Register module on PyPi
register:
$(PYTHON) setup.py register
.PHONY: upload
# target: upload - Upload module on PyPi
upload: clean
$(PYTHON) setup.py sdist upload || echo 'Upload already'
.PHONY: test
# target: test - Run module tests
test: clean
PATH=$(VIRTUALENV)/bin:$(PATH) $(PYTHON) setup.py test