forked from runfalk/spans
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
42 lines (31 loc) · 868 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
PYVER := $(shell python -c 'import sys; print("{0.major}.{0.minor}".format(sys.version_info))')
build: test doc sdist wheel
clean: clean-pyc clean-build
rm -rf .cache/
rm .coverage
clean-build:
rm -rf build/
rm -rf *.egg-info/
make -C doc/ clean
clean-pyc:
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -type d -name '__pycache__' -exec rmdir {} +
doc:
make -C doc/ html
test:
ifeq ($(PYVER), 2.7)
make -C doc/ doctest
else
@echo "Skipping doctests as they only work on Python 2.7 due to unicode literals"
endif
pytest
sdist:
python setup.py sdist
wheel:
python setup.py bdist_wheel
preview-readme:
python -c 'import setup; print(setup.long_desc)' > README.preview.rst
retext README.preview.rst
rm README.preview.rst
.PHONY : build clean clean-build clean-pyc doc test sdist wheel preview-readme upload