-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
39 lines (30 loc) · 1.12 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
PROJECT=acky
PYTHON := /usr/bin/env python
PYTHON_VERSION=$(shell $(PYTHON) -c 'from __future__ import print_function; import sys; print(sys.version_info[0])')
ACKY_VERSION=$(shell $(PYTHON) -c 'from __future__ import print_function; import acky; print(acky.__version__)')
default:
@echo "install: install the package and scripts"
@echo "clean: remove build/test artifacts"
@echo "lint: check syntax"
@echo "test: run unit tests"
@echo
@echo "Python Version: $(PYTHON_VERSION)"
@echo " Acky Version: $(ACKY_VERSION)"
install:
python setup.py install
clean:
find . -name \*.pyc -exec rm -f {} \;
find . -depth -type d -name __pycache__ -exec rm -rf {} \;
rm -rf build dist $(PROJECT).egg-info
lint:
@echo Checking for Python syntax...
flake8 --ignore=E123,E501 $(PROJECT) && echo OK
test:
@echo Running tests...
nosetests --with-coverage --cover-package=$(PROJECT)
wheel: dist/acky-$(ACKY_VERSION)-py$(PYTHON_VERSION)-none-any.whl
sdist: dist/acky-$(ACKY_VERSION).tar.gz
dist/acky-$(ACKY_VERSION)-py$(PYTHON_VERSION)-none-any.whl:
$(PYTHON) setup.py bdist_wheel
dist/acky-$(ACKY_VERSION).tar.gz:
$(PYTHON) setup.py sdist