-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
48 lines (39 loc) · 1.05 KB
/
Makefile
File metadata and controls
48 lines (39 loc) · 1.05 KB
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
SHELL=/bin/bash
PYTHON=python3
PYTHON_ENV=env
HOST=localhost
PORT=8080
LOG_LEVEL=info
SHELL_SERVER_URL=file://socket
.PHONY: clean freeze shell server shell-server
# environment #################################################################
$(PYTHON_ENV)/.created: REQUIREMENTS.txt
rm -rf $(PYTHON_ENV) && \
$(PYTHON) -m venv $(PYTHON_ENV) && \
. $(PYTHON_ENV)/bin/activate && \
pip install pip --upgrade && \
pip install -r ./REQUIREMENTS.txt && \
date > $(PYTHON_ENV)/.created
env: $(PYTHON_ENV)/.created
clean:
rm -rf $(PYTHON_ENV)
freeze: env
. $(PYTHON_ENV)/bin/activate && \
pip freeze
shell: env
. $(PYTHON_ENV)/bin/activate && \
rlpython
# lona ########################################################################
server: env
. $(PYTHON_ENV)/bin/activate && \
lona run-server \
--project-root=lona_project \
-s settings.py \
--host $(HOST) \
--port $(PORT) \
--log-level=$(LOG_LEVEL) \
--shell-server-url=$(SHELL_SERVER_URL) \
$(args)
server-shell: env
. $(PYTHON_ENV)/bin/activate && \
rlpython $(SHELL_SERVER_URL) $(args)