forked from Netflix/bless
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
53 lines (44 loc) · 1.42 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
test: lint
@echo "--> Running Python tests"
py.test tests || exit 1
@echo ""
develop:
@echo "--> Installing dependencies"
pip install -r requirements.txt
pip install "file://`pwd`#egg=bless[tests]"
@echo ""
dev-docs:
# todo the docs, so typical, right?
clean:
@echo "--> Cleaning pyc files"
find . -name "*.pyc" -delete
rm -rf ./publish ./htmlcov
@echo ""
lint:
@echo "--> Linting Python files"
PYFLAKES_NODOCTEST=1 flake8 bless
@echo ""
coverage:
@echo "--> Running Python tests with coverage"
coverage run --branch --source=bless -m py.test tests || exit 1
coverage html
@echo ""
publish:
rm -rf ./publish/bless_lambda/
mkdir -p ./publish/bless_lambda
cp -r ./bless ./publish/bless_lambda/
mv ./publish/bless_lambda/bless/aws_lambda/* ./publish/bless_lambda/
cp -r ./aws_lambda_libs/. ./publish/bless_lambda/
cp -r ./lambda_configs/. ./publish/bless_lambda/
cd ./publish/bless_lambda && zip -r ../bless_lambda.zip .
compile:
yum install -y gcc libffi-devel openssl-devel python27-virtualenv
virtualenv /tmp/venv
/tmp/venv/bin/pip install --upgrade pip setuptools
/tmp/venv/bin/pip install -e .
cp -r /tmp/venv/lib/python2.7/site-packages/. ./aws_lambda_libs
cp -r /tmp/venv/lib64/python2.7/site-packages/. ./aws_lambda_libs
lambda-deps:
@echo "--> Compiling lambda dependencies"
docker run --rm -it -v ${CURDIR}:/src -w /src amazonlinux make compile
.PHONY: develop dev-docs clean test lint coverage publish