-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
40 lines (31 loc) · 1.02 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
config: clean setup install
test: lint ut at
all: test build
PY3 = python3
VENV = .venv/$(shell basename $$PWD)
VENV_PY3 = .venv/$(shell basename $$PWD)/bin/python3
clean:
@echo "---- Doing cleanup ----"
@rm -rf .venv .mypy_cache .pytest_cache *.egg-info build dist
@mkdir -p .venv
setup:
@echo "---- Setting up virtualenv ----"
@$(PY3) -m venv $(VENV)
@echo "---- Installing dependencies and app itself in editable mode ----"
@$(VENV_PY3) -m pip install --upgrade pip wheel setuptools
install:
@echo "---- Installing package in virtualenv ---- "
@$(VENV_PY3) -m pip install -e .[dev]
lint:
@echo "---- Running linter ---- "
@$(VENV_PY3) -m mypy --ignore-missing-imports mpyk
ut:
@echo "---- Running unit tests ---- "
@$(VENV_PY3) -m pytest -ra -v -s test/unit
at:
@echo "---- Running acceptance tests ---- "
@$(VENV_PY3) -m pytest -ra -v -s test/acceptance
build:
@echo "---- Building distributable package ---- "
@$(VENV_PY3) setup.py sdist --dist-dir ./dist
.PHONY: all config test build clean setup install lint ut at