forked from v3io/frames
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
97 lines (77 loc) · 2.18 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# Copyright 2018 Iguazio
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Exract min version ($$ is Makefile escape)
go_minver = $(shell go version | awk '{print $$3}' | awk -F. '{print $$2}')
ifeq ($(go_minver),11)
modflag = -mod=vendor
endif
all:
@echo Please pick a target
@egrep '^[^ :]+:' Makefile | \
grep -v all | \
sed -e 's/://' -e 's/^/ /' | \
sort
@false
test:
GO111MODULE=on go test -v $(testflags) $(modflag) ./...
build:
GO111MODULE=on go build -v $(modflag) ./...
test-python:
cd clients/py && $(MAKE) test
build-docker:
docker build -f ./cmd/framesd/Dockerfile -t quay.io/v3io/frames .
wheel:
cd clients/py && python setup.py bdist_wheel
update-tsdb-dep:
GO111MODULE=on go get github.com/v3io/v3io-tsdb@master
GO111MODULE=on go mod vendor
@echo "Done. Don't forget to commit ☺"
grpc: grpc-go grpc-py
grpc-go:
protoc frames.proto --go_out=plugins=grpc:pb
grpc-py:
cd clients/py && \
pipenv run python -m grpc_tools.protoc \
-I../.. --python_out=v3io_frames\
--grpc_python_out=v3io_frames \
../../frames.proto
python _scripts/fix_pb_import.py \
clients/py/v3io_frames/frames_pb2_grpc.py
pypi:
cd clients/py && \
pipenv run make upload
cloc:
cloc \
--exclude-dir=vendor,_t,.ipynb_checkpoints,_examples,_build \
.
update-go-deps:
go mod tidy
go mod vendor
git add vendor go.mod go.sum
@echo "Don't forget to test & commit"
update-py-deps:
cd clients/py && $(MAKE) update-deps
git add clients/py/Pipfile*
@echo "Don't forget to test & commit"
bench-go:
./_scripts/go_benchmark.py
bench-py:
./_scripts/py_benchmark.py
bench:
@echo Go
$(MAKE) bench-go
@echo Python
$(MAKE) bench-py
python-deps:
cd clients/py && $(MAKE) sync-deps