forked from johnpaulett/python-hl7
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
36 lines (26 loc) · 802 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
31
32
33
34
35
36
.PHONY: test tests build docs lint upload
BIN = env/bin
PYTHON = $(BIN)/python
PIP = $(BIN)/pip
SPHINXBUILD = $(shell pwd)/env/bin/sphinx-build
env: requirements.txt
test -f $(PYTHON) || virtualenv --no-site-packages env
$(PIP) install -U -r requirements.txt
$(PYTHON) setup.py develop
tests: env
$(BIN)/tox
# Alias for old-style invocation
test: tests
build:
$(PYTHON) setup.py sdist
clean-docs:
cd docs; make clean
docs:
cd docs; make html SPHINXBUILD=$(SPHINXBUILD); make man SPHINXBUILD=$(SPHINXBUILD); make doctest SPHINXBUILD=$(SPHINXBUILD)
lint:
# F821 -- Ignore doctest examples
$(BIN)/flake8 --ignore=F821 hl7
# E501 -- hl7 sample messages can be long, ignore long lines in tests
$(BIN)/flake8 --ignore=E501 tests
upload: build
$(PYTHON) setup.py sdist register upload