-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
36 lines (27 loc) · 1.03 KB
/
Copy pathMakefile
File metadata and controls
36 lines (27 loc) · 1.03 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
.PHONY: all clean clean-serve serve runserver wheel
# NOTEBOOK_VERSION Mathics3-Live version. The wheel name has this number in it.
NOTEBOOK_VERSION ?= 1.0.1.dev0
PYTHON ?= python
HTTP_PORT ?= 8000
NOTEBOOK_WHEEL=pypi/Mathics3_notebook_frontends-$(NOTEBOOK_VERSION)-py3-none-any.whl
#: Build everything
all: clean $(NOTEBOOK_WHEEL)
jupyter lite build --contents content --output-dir dist
cp -f index.html dist/index.html
register-kernel:
$(PYTHON3) ./install-kernel.py
#: Remove Jupyter Cache file
clean:
rm $(NOTEBOOK_WHEEL) || true;
jupyter lite doithtmlclean
rm -fr _output || true
rm .jupyterlite.doit.db || true;
#: Make Build everything
$(NOTEBOOK_WHEEL):
cd Mathics3-notebook-frontends && python3 -m build
cp -f Mathics3-notebook-frontends/dist/[Mm]athics3_notebook_frontends-${NOTEBOOK_VERSION}-py3-none-any.whl $@
#: Start a HTTP webserver running Mathics3-live
runserver serve: all
cd dist && python3 -m http.server $(HTTP_PORT)
#: Clean Jupyter cache and start a HTTP webserver running Mathics3-live
clean-serve: all serve