mirror of
https://github.com/Hopiu/django-model-utils.git
synced 2026-03-16 20:00:23 +00:00
Merge pull request #386 from jazzband/improve-makefile
Improve Makefile to handle VENV creation if needed.
This commit is contained in:
commit
82dfed6a84
4 changed files with 33 additions and 21 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -9,3 +9,4 @@ htmlcov/
|
|||
docs/_build/
|
||||
.idea/
|
||||
.eggs/
|
||||
.venv/
|
||||
|
|
|
|||
37
Makefile
37
Makefile
|
|
@ -1,21 +1,32 @@
|
|||
VIRTUALENV = virtualenv --python=python3
|
||||
PYTHON = $(VENV)/bin/python
|
||||
VENV := $(shell echo $${VIRTUAL_ENV-.venv})
|
||||
INSTALL_STAMP = $(VENV)/.install.stamp
|
||||
|
||||
all: init docs test
|
||||
|
||||
init:
|
||||
python setup.py develop
|
||||
pip install tox coverage Sphinx
|
||||
init: $(INSTALL_STAMP)
|
||||
$(INSTALL_STAMP): $(PYTHON) setup.py
|
||||
$(VENV)/bin/pip install -e .
|
||||
$(VENV)/bin/pip install tox coverage Sphinx
|
||||
touch $(INSTALL_STAMP)
|
||||
|
||||
test:
|
||||
coverage erase
|
||||
tox
|
||||
coverage html
|
||||
virtualenv: $(PYTHON)
|
||||
$(PYTHON):
|
||||
$(VIRTUALENV) $(VENV)
|
||||
|
||||
test: init
|
||||
$(VENV)/bin/coverage erase
|
||||
$(VENV)/bin/tox
|
||||
$(VENV)/bin/coverage html
|
||||
|
||||
docs: documentation
|
||||
|
||||
documentation:
|
||||
python setup.py build_sphinx
|
||||
documentation: init
|
||||
$(PYTHON) setup.py build_sphinx
|
||||
|
||||
messages:
|
||||
python translations.py make
|
||||
messages: init
|
||||
$(PYTHON) translations.py make
|
||||
|
||||
compilemessages:
|
||||
python translations.py compile
|
||||
compilemessages: init
|
||||
$(PYTHON) translations.py compile
|
||||
|
|
|
|||
Loading…
Reference in a new issue