-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
76 lines (61 loc) · 1.66 KB
/
Makefile
File metadata and controls
76 lines (61 loc) · 1.66 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
###################################################################
# Makefile for django project
#
# useful targets:
# make build ----------------- builds an env to work in
# make destroy ----------------- destroys the virtualenv
# make package ----------------- builds dist package
# make distribute ----------------- distributes via twine to pypi
# make clean ----------------- cleans everything created from runtime and testing
# make tests ----------------- runs all tests, linters and coverage
# make lint ----------------- run linter against source code
# make format ----------------- run code formatters (iSort)
#
#
#
#
###################################################################
PYTHON := env/bin/python
MANAGE := env/bin/manage.py
PIP := env/bin/pip
TOX := env/bin/tox
ISORT := env/bin/isort
.PHONY: build
build: build-env
.PHONY: build-env
build-env:
/usr/bin/env python3.6 -m venv env
$(PYTHON) -m pip install --upgrade pip
#$(PYTHON) -m pip install -e .
.PHONY: destroy
destroy: clean
rm -fr env
.PHONY: package
package:
$(PYTHON) setup.py sdist bdist_wheel
.PHONY: distribute
distribute:
$(PYTHON) -m twine upload dist/*
.PHONY: clean
clean: clean-pyc clean-tests clean-egg
.PHONY: clean-pyc
clean-pyc:
find . -name '*.pyc' | xargs /bin/rm -f
.PHONY: clean-egg
clean-egg:
find . -type d -name '*egg-info' | xargs /bin/rm -fr
.PHONY: clean-tests
clean-tests:
/bin/rm -fr .tox
.PHONY: freeze
freeze:
$(PYTHON) -m pip freeze --exclude-editable > requirements.txt
.PHONY: tests
tests:
$(TOX)
.PHONY: lint
lint:
$(TOX) -e flake8
.PHONY: format
format:
$(ISORT) -rc src/