forked from ResearchObject/ro-crate-py
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
35 lines (24 loc) · 759 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
.DEFAULT_GOAL := install
SHELL := /bin/bash
PYTHON ?= python3
VENV_DIR ?= venv
IN_VENV = [ -f $(VENV_DIR)/bin/activate ] && . $(VENV_DIR)/bin/activate;
$(VENV_DIR):
$(PYTHON) -m venv $(VENV_DIR)
$(IN_VENV) pip install --upgrade pip
$(VENV_DIR)/bin/flake8: $(VENV_DIR)
$(IN_VENV) pip install flake8
$(VENV_DIR)/bin/pytest: $(VENV_DIR)
$(IN_VENV) pip install pytest
init-venv: $(VENV_DIR)
install: $(VENV_DIR)
$(IN_VENV) pip install -r requirements.txt
$(IN_VENV) pip install ./
lint: $(VENV_DIR)/bin/flake8
$(IN_VENV) flake8 --exclude $(VENV_DIR) ./
test: $(VENV_DIR)/bin/pytest install
$(IN_VENV) pytest test
# WARNING: removes ALL untracked files
clean:
git clean -fdx -e $(VENV_DIR)
.PHONY: init-venv install lint test clean $(VENV_DIR)