forked from arista-eosplus/pyeapi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
54 lines (41 loc) · 1.25 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
#!/usr/bin/make
# WARN: gmake syntax
########################################################
# Makefile for pyeapi
#
# useful targets:
# make sdist -- build python source distribution
# make pep8 -- pep8 checks
# make pyflakes -- pyflakes checks
# make tests -- run all of the tests
# make unittest -- runs the unit tests
# make systest -- runs the system tests
# make clean -- clean distutils
#
########################################################
# variable section
NAME = "pyeapi"
PYTHON=python
SITELIB = $(shell $(PYTHON) -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")
VERSION := $(shell cat VERSION)
########################################################
all: clean pep8 pyflakes tests
pep8:
-pep8 -r --ignore=E501,E221,W291,W391,E302,E251,E203,W293,E231,E303,E201,E225,E261,E241 pyeapi/ test/
pyflakes:
pyflakes pyeapi/ test/
clean:
@echo "Cleaning up distutils stuff"
rm -rf build
rm -rf dist
rm -rf MANIFEST
rm -rf *.egg-info
@echo "Cleaning up byte compiled python stuff"
find . -type f -regex ".*\.py[co]$$" -delete
sdist: clean
$(PYTHON) setup.py sdist
tests: unittest systest
unittest: clean
$(PYTHON) -m unittest discover test/unit -v
systest: clean
$(PYTHON) -m unittest discover test/system -v