-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
44 lines (32 loc) · 996 Bytes
/
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
# Makefile for development.
VIRTUALENV = virtualenv
VENV := $(shell echo $${VIRTUAL_ENV-.venv})
ROOT_DIR := $(shell pwd)
PYTHON = $(VENV)/bin/python
NOSE = $(VENV)/bin/nosetests
DEV_STAMP = $(VENV)/.dev_env_installed.stamp
INSTALL_STAMP = $(VENV)/.install.stamp
PROJECT = $(shell $(PYTHON) -c "import setup; print(setup.NAME)")
.IGNORE: clean
.PHONY: all install virtualenv tests
all: install
develop: install-dev
install: $(INSTALL_STAMP)
$(INSTALL_STAMP): $(PYTHON) setup.py
$(VENV)/bin/pip install -Ue .
touch $(INSTALL_STAMP)
install-dev: $(INSTALL_STAMP) $(DEV_STAMP)
$(DEV_STAMP): $(PYTHON) dev-requirements.txt
$(VENV)/bin/pip install -Ur dev-requirements.txt
touch $(DEV_STAMP)
virtualenv: $(PYTHON)
$(PYTHON):
virtualenv $(VENV)
clean:
find $(ROOT_DIR)/ -name "*.pyc" -delete
find $(ROOT_DIR)/ -name ".noseids" -delete
distclean: clean
rm -rf $(ROOT_DIR)/*.egg-info
test: install-dev
$(NOSE) --config $(ROOT_DIR)/etc/nose.cfg $(PROJECT)
rm -f $(ROOT_DIR)/.coverage