-
Notifications
You must be signed in to change notification settings - Fork 225
/
Makefile
44 lines (38 loc) · 1.04 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
TEST_ARGS ?=
TEST_ENVS ?=
TEST_REBUILD ?= yes
# target: help - Display callable targets.
.PHONY: help
help:
@echo "Reference card for usual actions in development environment."
@echo "Here are available targets:"
@egrep -o "^# target: (.+)" [Mm]akefile | sed 's/# target: / * /'
# target: install - Install workalendar in your current env
.PHONY: install
install:
pip install -e ./
# target: tox_install - Install tox in your current env
.PHONY: tox_install
tox_install:
pip install tox --upgrade
# target: test - run tox tests.
# target: Use TEST_ENVS and TEST_ARGS to target your tests more precisely.
# target: WARNING: tox should be installed in your current env.
# shall we rebuild the env or not?
ifeq (${TEST_REBUILD},"yes")
TOX_COMMAND=tox -r
else
TOX_COMMAND=tox
endif
.PHONY: test
test:
ifneq (${TEST_ENVS},)
${TOX_COMMAND} -e ${TEST_ENVS} -- ${TEST_ARGS}
else
${TOX_COMMAND} -- ${TEST_ARGS}
endif
# target: package - build packages for further upload
.PHONY: package
package:
rm -Rf build/
python setup.py sdist bdist_wheel