forked from pinterest/singer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
50 lines (34 loc) · 1.33 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
.PHONY: schemas
clean: clean_pyc
rm -f topic.*
rm -rf build
rm -rf dist
clean_pyc:
find . -name "*.pyc" -delete
install_pip_runtime_dependencies:
pip install -r ./requirements.txt
uninstall_pip_runtime_dependencies:
pip freeze | grep -v "^-f" | xargs pip uninstall -y
install_lint_dependencies:
pip install -r ./requirements_lint.txt
lint: install_lint_dependencies
./tools/pyflakes.sh
./tools/pep8.sh
test_unittests: install_pip_runtime_dependencies
nosetests
test: test_unittests
update_schemas:
rm -rf $(SCHEMASPATH)
git clone ssh://[email protected]/diffusion/S/thrift-schemas.git $(SCHEMASPATH)
SCHEMASPATH = schemas_src
THRIFT_0_8_BIN ?= thrift
THRIFT_FILES = singer_if
COMPILE_THRIFT = $(THRIFT_0_8_BIN) -r --verbose -I schemas_src/commons/thrift -I schemas_src/schemas/thrift -I schemas_src -out thrift_logger --gen py:dynamic,dynbase=TBase,dynimport='from thrift.protocol.TBase import TBase; from thrift.protocol.TBase import TExceptionBase; from thrift.Thrift import TApplicationException',slots schemas_src/schemas/thrift/$(thrift_file).thrift
compile_schemas:
sh ./test_thrift_version.sh $(THRIFT_0_8_BIN) "Thrift version 0.8.0"
$(foreach thrift_file, $(THRIFT_FILES), \
$(COMPILE_THRIFT);) \
rm -f __init__.py
clean_schemas:
rm -rf $(SCHEMASPATH)
schemas: update_schemas compile_schemas clean_schemas