-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
32 lines (25 loc) · 813 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
PYLINTOPTIONS = -E
INSTALLOPTS = --quiet
PIPOPTIONS = -q
VIRTUALENV = var
SOURCES = $(wildcard pyhkal/*.py) $(wildcard contrib/*.py) $(wildcard bin/*) \
setup.py
VIRTUAL = . $(VIRTUALENV)/bin/activate &&
.PHONY: run test pylint clean
run: install
@echo "Running PyHKAL.."
$(VIRTUAL) twistd -n $(T) pyhkal config.yaml
test: install
$(VIRTUAL) cd $(VIRTUALENV) && trial pyhkal.test
# trial runs pyhkal/ directory otherwise
pylint: install
$(VIRTUAL) pip install pylint
$(VIRTUAL) cd $(VIRTUALENV) && pylint $(PYLINTOPTIONS) pyhkal
$(VIRTUALENV):
virtualenv --distribute --no-site-packages "$(VIRTUALENV)"
install: $(VIRTUALENV) $(SOURCES)
$(VIRTUAL) python setup.py $(INSTALLOPTS) install
clean:
rm -rf "$(VIRTUALENV)"
rm -rf build/ dist/ PyHKAL.egg-info/
rm -f pip-log.txt MANIFEST twistd.pid