-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
43 lines (30 loc) · 1.07 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
.PHONY: test
BUILDID=$(shell date +"%Y%m%d%H%M")
COMMITID=$(shell git rev-parse --short HEAD)
PYPISERVER:=storage
PYTHON_PKG=amqpclient
SDIST=build
MANIFEST=factory.manifest
PYTHON:=python3
manifest:
echo name=$(shell $(PYTHON) setup.py --name) > $(MANIFEST) && \
echo version=$(shell $(PYTHON) setup.py --version) >> $(MANIFEST) && \
echo buildid=$(BUILDID) >> $(MANIFEST) && \
echo commitid=$(COMMITID) >> $(MANIFEST)
lint:
@flake8 $(PYTHON_PKG)
autopep8:
@autopep8 -v --in-place -r --max-line-length=120 $(AUTOPEP8_EXTRA_ARGS) $(PYTHON_PKG)
test: lint
@echo "INFO: tests requires a running amqp server"
$(PYTHON) -m amqpclient.tests.test_async_subscriber --host $(AMQP_HOST) --reconnect-delay=0
$(PYTHON) -m amqpclient.tests.test_async_rpc_worker --host $(AMQP_HOST) --reconnect-delay=0
$(PYTHON) -m amqpclient.tests.test_async_rpc_client --host $(AMQP_HOST) --reconnect-delay=0
deliver:
twine upload -r $(PYPISERVER) $(DIST)/*
dist: manifest
mkdir -p $(SDIST)
rm -rf *.egg-info
$(PYTHON) setup.py sdist --dist-dir=$(DIST)
clean:
rm -rf $(SDIST) *.egg-info