forked from vcon-dev/vcon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
27 lines (20 loc) · 867 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
PIP_LAYER_PACKAGES= python-jose cryptography hsslms vcon
PIP_LAYER_PACKAGES_ZIPS = $(addprefix layers/,$(PIP_LAYER_PACKAGES:=.zip))
LAYER_PATH = "python/lib/python3.8/site-packages"
LAYER_PATH_ROOT = "python"
layers: ${PIP_LAYER_PACKAGES_ZIPS}
@echo "layers: ${PIP_LAYER_PACKAGES_ZIPS}"
layers/%.zip:
@echo "Making $@"
@if [ ! -d "layers" ]; then mkdir layers; fi
@(cd /tmp; mkdir -p ${LAYER_PATH}; pip3 install $* -t ${LAYER_PATH} > /dev/null; zip $*.zip -r ${LAYER_PATH_ROOT} > /dev/null; rm -rf ${LAYER_PATH_ROOT})
@mv /tmp/$*.zip layers
layers/vcon.zip: vcon vcon/__init__.py vcon/security.py
@echo "Making $@"
@if [ ! -d "layers" ]; then mkdir layers; fi
@mkdir -p /tmp/${LAYER_PATH}
@cp -rp vcon /tmp/${LAYER_PATH}
@(cd /tmp; zip vcon.zip -r ${LAYER_PATH_ROOT} > /dev/null; rm -rf ${LAYER_PATH_ROOT})
@mv /tmp/vcon.zip layers
test:
pytest -v