forked from ploomber/jupysql-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
47 lines (39 loc) · 1.28 KB
/
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
45
46
SHELL := /bin/bash
VENV := venv
ACTIVATE_VENV := source $(VENV)/bin/activate
VERSION := $(shell bin/print-version)
VERSION_UPSTREAM := $(shell jq -r .version package.json)
PACKAGE := jupysql_plugin
.PHONY: all
all: clean install launch
$(VENV)/bin/activate:
python3 -m venv $(VENV)
$(ACTIVATE_VENV) && pip install -r requirements.txt
$(ACTIVATE_VENV) pip install -r requirements.dev.txt
$(ACTIVATE_VENV) && pip uninstall -y ploomber-extension
.PHONY: install
install: $(VENV)/bin/activate
$(ACTIVATE_VENV) && jlpm install
$(ACTIVATE_VENV) && pip install -e .
$(ACTIVATE_VENV) && jupyter labextension develop . --overwrite
$(ACTIVATE_VENV) && jlpm build --minimize=false
.PHONY: wheel
wheel: dist/$(PACKAGE)-$(VERSION)-py3-none-any.whl
dist/$(PACKAGE)-$(VERSION)-py3-none-any.whl dist/$(PACKAGE)-$(VERSION).tar.gz: $(VENV)/bin/activate
$(ACTIVATE_VENV) && python3 -m build
mv dist/$(PACKAGE)-$(VERSION_UPSTREAM)-py3-none-any.whl dist/$(PACKAGE)-$(VERSION)-py3-none-any.whl
mv dist/$(PACKAGE)-$(VERSION_UPSTREAM).tar.gz dist/$(PACKAGE)-$(VERSION).tar.gz
.PHONY: launch
launch: $(VENV)/bin/activate
$(ACTIVATE_VENV) && jupyter-lab
.PHONY: clean
clean:
rm -rf \
.yarn \
dist/ \
lib \
$(PACKAGE)/_version.py \
$(PACKAGE)/labextension \
node_modules/ \
tsconfig.tsbuildinfo \
$(VENV)