diff options
| author | Alexis Métaireau <alexis@notmyidea.org> | 2017-03-21 15:08:42 +0100 |
|---|---|---|
| committer | Alexis Métaireau <alexis@notmyidea.org> | 2017-03-28 17:41:34 +0200 |
| commit | d1facecc69e3a2638b508b4120094873cdb7bcf2 (patch) | |
| tree | 1bcd60ed8e58280a8cc18139473a9d5cddf83452 /Makefile | |
| parent | a354973f1f9c2dd602a4c28e90540fdbf4020064 (diff) | |
| download | ihatemoney-mirror-d1facecc69e3a2638b508b4120094873cdb7bcf2.zip ihatemoney-mirror-d1facecc69e3a2638b508b4120094873cdb7bcf2.tar.gz ihatemoney-mirror-d1facecc69e3a2638b508b4120094873cdb7bcf2.tar.bz2 | |
Create a Makefile to ease development
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..cb2a1c7 --- /dev/null +++ b/Makefile @@ -0,0 +1,39 @@ +VIRTUALENV = virtualenv --python=python3 +SPHINX_BUILDDIR = docs/_build +VENV := $(shell echo $${VIRTUAL_ENV-.venv}) +PYTHON = $(VENV)/bin/python3 +DEV_STAMP = $(VENV)/.dev_env_installed.stamp +DOC_STAMP = $(VENV)/.doc_env_installed.stamp +INSTALL_STAMP = $(VENV)/.install.stamp +TEMPDIR := $(shell mktemp -d) + +all: install +install: $(INSTALL_STAMP) +$(INSTALL_STAMP): + $(VENV)/bin/pip install -U pip + $(VENV)/bin/pip install -r requirements.txt + touch $(INSTALL_STAMP) + +virtualenv: $(PYTHON) +$(PYTHON): + $(VIRTUALENV) $(VENV) + +install-dev: $(INSTALL_STAMP) $(DEV_STAMP) +$(DEV_STAMP): $(PYTHON) dev-requirements.txt + $(VENV)/bin/pip install -Ur dev-requirements.txt + touch $(DEV_STAMP) + +serve: $(INSTALL_STAMP) + cd budget; ../$(PYTHON) run.py + +test: $(DEV_STAMP) + cd budget; ../$(PYTHON) tests.py + +release: $(DEV_STAMP) + $(VENV)/bin/fullrelease + +build-requirements: + $(VIRTUALENV) $(TEMPDIR) + $(TEMPDIR)/bin/pip install -U pip + $(TEMPDIR)/bin/pip install -Ue "." + $(TEMPDIR)/bin/pip freeze | grep -v -- '-e' > requirements.txt |
