forked from choppsv1/pysshutil
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
41 lines (31 loc) · 963 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
#
# December 16, 2014 Christian E. Hopps <[email protected]>
#
PIP=pip
PYLINT=pylint
PYTEST=py.test
PYTHON=python
CASSFILE=docker run --net=host repo.dev.terastrm.net:5000/cassfile:latest
TSFILE=.lint-timestamp
check:
@echo Running lint on changes 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
rm -rf bulid
install:
$(PIP) install -e .
uninstall:
$(PIP) uninstall -y sshutil
lint:
@for f in $$(find sshutil tests -name '*.py'); do \
echo "=== Linting $$f"; \
$(PYLINT) -r n --rcfile=pylintrc $$f; \
done
test: lint run-test
run-test:
@echo "Running python tests"
$(PYTEST) -v --doctest-modules
pypi-upload:
python setup.py sdist upload