forked from bear/parsedatetime
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
77 lines (63 loc) · 1.71 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
.PHONY: docs test
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
BREWPATH = $(shell brew --prefix)
PYICU_LD = -L${BREWPATH}/opt/icu4c/lib
PYICU_CPP = -I${BREWPATH}/opt/icu4c/include
ICU_VER = 58.2
else
PYICU_LD =
PYICU_CPP =
ICU_VER =
endif
help:
@echo " env install all production dependencies"
@echo " dev install all dev and production dependencies (virtualenv is assumed)"
@echo " clean remove unwanted stuff"
@echo " lint check style with flake8"
@echo " test run tests"
@echo " build generate source and wheel dist files"
@echo " upload generate source and wheel dist files and upload them"
env:
pip install -U pip
dev: env
pip install -Uqr requirements.testing.txt | tee
@echo "on OS X use homebrew to install icu4c"
LDFLAGS=${PYICU_LD} CPPFLAGS=${PYICU_CPP} ICU_VERSION=${ICU_VER} \
pip install -U pyicu
pyenv install -s 2.6.9
pyenv install -s 2.7.11
pyenv install -s 3.6.1
pyenv install -s pypy-5.3
pyenv local 2.6.9 2.7.11 3.6.1 pypy-5.3
info:
@python --version
@pyenv --version
@pip --version
clean:
rm -fr build
rm -fr dist
find . -name '*.pyc' -exec rm -f {} \;
find . -name '*.pyo' -exec rm -f {} \;
find . -name '*~' -exec rm -f {} \;
docs:
epydoc --html --config epydoc.conf
lint:
flake8 parsedatetime > violations.flake8.txt
test: lint
python setup.py test
tox: clean
tox
coverage: clean
@coverage run --source=parsedatetime setup.py test
@coverage html
@coverage report
ci: tox coverage
CODECOV_TOKEN=`cat .codecov-token` codecov
build: clean
python setup.py check
python setup.py sdist
python setup.py bdist_wheel
upload: clean
python setup.py sdist upload
python setup.py bdist_wheel upload