-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
69 lines (56 loc) · 2.03 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
57
58
59
60
61
62
63
64
65
66
67
68
69
# Django Grass Makefile.
PYTHON2 = python
PYTHON3 = python3
ifdef PY3
PYTHON = $(PYTHON3)
else
PYTHON = $(PYTHON2)
endif
clean:
$(PYTHON) setup.py clean
rm -rfv .coverage build/ dist/ doc/_build MANIFEST
find . -name '*.pyc' -delete
find . -name '__pycache__' -type d -delete
cleanall: clean
rm -rfv $(VENV2) $(VENV3)
check: test lint
help:
@echo -e 'Django Grass - list of make targets:\n'
@echo 'make - Set up development and testing environment'
@echo 'make test - Run tests'
@echo 'make lint - Run linter and pep8'
@echo 'make check - Run tests, linter and pep8'
@echo 'make doc - Build Sphinx documentation'
@echo 'make opendoc - Build Sphinx documentation and open it in browser'
@echo 'make source - Create source package'
@echo 'make install - Install on local system'
@echo 'make shell - Enter Django interactive interpreter'
@echo 'make server - Run Django development server'
@echo 'make clean - Get rid of bytecode files, build dirs, dist files'
@echo 'make cleanall - Clean and also get rid of the virtualenvs'
@echo -e '\nDefine the env var PY3 to work using Python 3.'
@echo 'E.g. to create a Python 3 development environment:'
@echo ' - make PY3=1'
@echo 'E.g. to run tests and linter under Python 3:'
@echo ' - make check PY3=1'
@echo -e '\nWhen testing the application, define the env var'
@echo 'SKIP_SELENIUM to exclude integration tests, e.g.:'
@echo ' - make check SKIP_SELENIUM=1'
@echo -e '\nWhen running integration tests, by default all graphical'
@echo 'operations are performed in memory where possible. However,'
@echo 'it is possible to run tests using a visible browser instance'
@echo 'by defining the env var SHOW_BROWSER, e.g.:'
@echo ' - make check SHOW_BROWSER=1'
install:
$(PYTHON) setup.py install
lint: flake8
opendoc: doc
@firefox $(DOC_INDEX)
release: clean
$(PYTHON) setup.py register sdist upload
source:
$(PYTHON) setup.py sdist
test:
django-admin.py test grass --settings=settings
.PHONY: all doc clean cleanall check install lint opendoc release \
server shell source test