-
Notifications
You must be signed in to change notification settings - Fork 45
/
Copy pathMakefile
52 lines (41 loc) · 949 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
PYTHON?=python
NOSETESTS?=nosetests
TESTOPTS?=
FLAKE8?=flake8
RST2HTML?=rst2html
PYGMENTIZE?=pygmentize
SOURCES=sre_yield setup.py
.PHONY: all
all:
.PHONY: setup
setup:
$(PYTHON) -m pip install -Ur requirements-dev.txt
.PHONY: doctest
doctest: README.rst
$(PYTHON) -m doctest $<
.PHONY: test
test:
$(PYTHON) -m coverage run -m sre_yield.tests $(TESTOPTS)
$(PYTHON) -m coverage report
.PHONY: lint
lint:
$(FLAKE8) $(SOURCES)
.PHONY: clean
clean:
find sre_yield -name '*.py[co]' -delete
pygments.css:
$(PYGMENTIZE) -S emacs -f html > $@
%.html: %.rst pygments.css
$(RST2HTML) --stylesheet=/usr/share/docutils/writers/html4css1/html4css1.css,pygments.css $< > $@
.PHONY: bench
bench:
PYTHON=$(PYTHON) ./benchmarks/bench.sh
.PHONY: format
format:
isort --recursive -y sre_yield benchmarks setup.py
black sre_yield benchmarks setup.py
.PHONY: release
release:
rm -rf dist
$(PYTHON) setup.py sdist bdist_wheel
twine upload dist/*