-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathMakefile
39 lines (29 loc) · 871 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
VENV = env
VENV_BIN = $(VENV)/bin
ifeq ($(OS), Windows_NT)
VENV_BIN=$(VENV)/Scripts
endif
.PHONY: all
all:
@echo "Run my targets individually!"
.PHONY: env
env: env/pyvenv.cfg
$(VENV)/pyvenv.cfg: dev-requirements.txt
python -m venv $(VENV)
$(VENV_BIN)/python -m pip install --upgrade pip
$(VENV_BIN)/python -m pip install --requirement dev-requirements.txt
.PHONY: develop
develop: env
. $(VENV_BIN)/activate && maturin develop --extras=dev
$(VENV_BIN)/python -m pip install --editable ./pyrage-stubs
.PHONY: test
test: develop
$(VENV_BIN)/python -m unittest
.PHONY: dist
dist: dist-pyrage dist-pyrage-stubs
.PHONY: dist-pyrage
dist-pyrage: env
docker run --rm -v $(shell pwd):/io ghcr.io/pyo3/maturin build --release --sdist --strip --out dist
.PHONY: dist-pyrage-stubs
dist-pyrage-stubs: env
$(VENV_BIN)/python -m build ./pyrage-stubs --outdir dist