-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
69 lines (48 loc) · 1.55 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
NOSETEST_ARGS?=
PROJECT_NAME=Fast Queue
PROJECT_TAG=fast_queue
PYTHON_MODULES=fast_queue
OK=\033[32m[OK]\033[39m
FAIL=\033[31m[FAIL]\033[39m
CHECK=@if [ $$? -eq 0 ]; then echo "${OK}"; else echo "${FAIL}"; cat ${DEBUG} ; fi
WGET=wget -q
default: python.mk github.mk
@$(MAKE) -C . test
ifeq "true" "${shell test -f python.mk && echo true}"
include python.mk
endif
ifeq "true" "${shell test -f github.mk && echo true}"
include github.mk
endif
python.mk:
@${WGET} https://raw.githubusercontent.com/gutomaia/makery/master/python.mk && touch $@
github.mk:
@${WGET} https://raw.githubusercontent.com/gutomaia/makery/master/github.mk && touch $@
.git/hooks/pre-commit: misc/hooks/pre-commit
@echo "Instaling pre-commit hook: \c"
@mkdir -p .git/hooks && \
cp misc/hooks/pre-commit $@ && \
touch $@
${CHECK}
${CHECKPOINT_DIR}/setup.py: setup.py
${VIRTUALENV} python setup.py develop && \
touch $@
dependencies: ${REQUIREMENTS} ${CHECKPOINT_DIR}/setup.py
build: dependencies python_build
test: build ${REQUIREMENTS_TEST}
${VIRTUALENV} nosetests ${NOSETEST_ARGS} ${PYTHON_MODULES}
dist/.dist.check: .requirements.txt.check
@mkdir -p dist && touch $@
dist: python_egg python_wheel
trash:
@find analytics -iname "*.pyc" | \
xargs -I [] sh -c "echo [] | \
sed 's/.pyc$$/.py/g'" | \
xargs -I [] sh -c "test -f [] || (echo Removing compiled []c: && rm []c)"
clean: python_clean
@rm -rf build dist
@rm -rf plugins
purge: clean python_purge
@rm python.mk
@rm -rf *.egg-info
.PHONY: venv dependencies python_dependencies build run dist egg wheel docker clean