-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
62 lines (51 loc) · 1.53 KB
/
Makefile
File metadata and controls
62 lines (51 loc) · 1.53 KB
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
# Shell to use with Make
SHELL := /bin/bash
# Set important Paths
PROJECT := btrdbextras
LOCALPATH := $(CURDIR)/$(PROJECT)
# Sphinx configuration
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SPHINXBUILDDIR = docs/build
SPHINXSOURCEDIR = docs/source
# Export targets not associated with files
.PHONY: test grpc
# Clean build files
clean:
find . -name "*.pyc" -print0 | xargs -0 rm -rf
find . -name "__pycache__" -print0 | xargs -0 rm -rf
find . -name ".DS_Store" -print0 | xargs -0 rm -rf
-rm -rf docs/build
-rm -rf htmlcov
-rm -rf .pytest_cache
-rm -rf .coverage
-rm -rf build
-rm -rf dist
-rm -rf $(PROJECT).egg-info
-rm -rf .eggs
-rm -rf site
-rm -rf docs/build
-rm -rf platform-builds meta.yaml
# Generate new grpc code
grpc:
@echo Generating files:
python -m grpc_tools.protoc -I btrdbextras/eventproc/protobuff --python_out=btrdbextras/eventproc/protobuff --grpc_python_out=btrdbextras/eventproc/protobuff btrdbextras/eventproc/protobuff/api.proto
@echo
@echo Fixing import statements:
sed -i'.bak' 's/api_pb2 as api__pb2/btrdbextras.eventproc.protobuff.api_pb2 as api__pb2/' btrdbextras/eventproc/protobuff/api_pb2_grpc.py
# Targets for testing
test:
python setup.py test
# Build the universal wheel and source distribution
build:
python setup.py sdist bdist_wheel
# Install the package from source
install:
python setup.py install
# Deploy to PyPI
deploy:
# python setup.py register
twine upload dist/* --verbose
# Build html version of docs
html:
$(SPHINXBUILD) -b html $(SPHINXOPTS) $(SPHINXSOURCEDIR) $(SPHINXBUILDDIR)