forked from internetarchive/liveweb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
41 lines (26 loc) · 872 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
PROJECT_NAME=$(shell basename $(PWD))
# If VENV_ROOT is defined in the environment, use it to find the VENV
# directory, else consider the current dir as the venv dir.
VENV_ROOT ?= $(shell dirname $(PWD))
# Use the active virtualenv or the one inside the project
VIRTUAL_ENV ?= $(VENV_ROOT)/$(PROJECT_NAME)
VENV=$(VIRTUAL_ENV)
# host:port of the liveweb proxy.
# This is used by the wayback.
LIVEWEB_ADDRESS=localhost:7070
WAYBACK_ADDRESS=:8080
CONFIG=config.ini
UWSGI=$(VENV)/bin/uwsgi -H$(VENV)
.PHONY: docs
run:
$(VENV)/bin/liveweb-proxy -c $(CONFIG)
venv:
virtualenv --no-site-packages $(VENV)
$(VENV)/bin/pip install -r requirements.txt
$(VENV)/bin/python setup.py develop
test:
$(VENV)/bin/py.test liveweb/
wayback:
$(UWSGI) --http ${WAYBACK_ADDRESS} --wsgi liveweb.tools.wayback --pyargv $(LIVEWEB_ADDRESS)
docs:
cd docs && make html