-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
56 lines (43 loc) · 1.32 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
PYLINT=pylint
PIP3=/home/chops/local/bin/pip3
PYLINT3=/home/chopps/local/bin/pylint3
PYTEST3=/home/chopps/local/bin/py.test
PYTHON3=/home/chopps/local/bin/python3
PIP=/home/chops/venv/bin/pip
PYLINT=/home/chopps/venv/bin/pylint
PYTEST=/home/chopps/venv/bin/py.test
PYTHON=python
TSFILE=.lint-timestamp
check:
@echo Running lint on changes XRUT with PYLINT=$(PYLINT)
@OK=YES; for f in $$(git status | awk '/^[ \t]+(modified|new file): +.*.py$$/{print $$2}'); do if [[ $$f -nt $(TSFILE) ]]; then echo "=== $$f"; if ! $(PYLINT) -r n --rcfile=pylintrc $$f; then OK=NO; fi; fi; done; if [[ $$OK = YES ]]; then touch $(TSFILE); fi
clean:
find . -name '*.pyc' -exec rm {} +
$(PYTHON) setup.py clean
$(PYTHON3) setup.py clean
rm -rf bulid
install:
$(PIP) install -e .
$(PIP3) install -e .
uninstall:
$(PIP) uninstall -y pyisis
$(PIP3) uninstall -y pyisis
lint2:
@for f in $$(find pyisis -name '*.py'); do \
echo "=== Linting $$f"; \
$(PYLINT) -r n --rcfile=pylintrc $$f; \
done
lint3:
@for f in $$(find pyisis -name '*.py'); do \
echo "=== Linting $$f"; \
$(PYLINT3) -r n --rcfile=pylintrc $$f; \
done
test: lint2 test2 lint3 test3
test2:
@echo "Running python v2 tests"
$(PYTEST) -v --doctest-modules
test3:
@echo "Running python v3 tests"
$(PYTEST3) -v --doctest-modules
docker:
docker build --network=host -t pyisis .