-
Notifications
You must be signed in to change notification settings - Fork 16
/
Makefile
31 lines (28 loc) · 909 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
SWAGGER_CODEGEN_IMAGE := swaggerapi/swagger-codegen-cli:2.4.17
CURRENT_UID := $(shell id -u)
CURRENT_GID := $(shell id -g)
.PHONY: python
python:
rm -rf python/*
docker run -it --rm \
-v ${PWD}:/local \
--user ${CURRENT_UID}:${CURRENT_GID} \
${SWAGGER_CODEGEN_IMAGE} \
generate \
-i /local/swagger-v1alpha1.yml \
-t /local/templates/python \
-l python \
-c /local/config/python.json \
--additional-properties '[email protected],pyMinVersion=3.6.*,pyMaxVersion=3.9.*' \
--git-user-id 'SeldonIO' \
--git-repo-id 'seldon-deploy-sdk' \
-o /local/python
# Add extra files
cp -r ./templates/python/auth ./python/seldon_deploy_sdk/auth
cp -r ./templates/python/Makefile ./python/Makefile
# Generate licenses
mkdir python/licenses
make -C python licenses
# Apply patch
git apply templates/python/metadata_tags_metrics.patch
git apply templates/python/int_or_string.patch