forked from Nextdoor/kingpin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
43 lines (32 loc) · 940 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
42
43
HERE = $(shell pwd)
BIN = $(HERE)/bin
BUILD_DIRS = bin .build build include lib lib64 man share package *.egg
.PHONY: all build clean test docs
all: build
build: .build
.build: requirements.test.txt
python setup.py install
pip install -r requirements.test.txt
touch .build
clean:
find . -type f -name '*.pyc' -exec rm "{}" \;
rm -f kingpin.zip
rm -rf $(BUILD_DIRS)
$(MAKE) -C docs clean
test: build docs
python setup.py test pep8 pyflakes
integration: build
PYFLAKES_NODOCTEST=True python setup.py integration pep8 pyflakes
pack: kingpin.zip
@python kingpin.zip --help 2>&1 >/dev/null && echo Success || echo Fail
kingpin.zip:
rm -rf zip
mkdir -p zip
pip install --process-dependency-links --target ./zip ./
find ./zip -name '*.pyc' -delete
find ./zip -name '*.egg-info' | xargs rm -rf
cd zip; ln -sf kingpin/bin/deploy.py ./__main__.py
cd zip; zip -9mrv ../kingpin.zip .
rm -rf zip
docs:
$(MAKE) -C docs html