-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (28 loc) · 836 Bytes
/
Makefile
File metadata and controls
39 lines (28 loc) · 836 Bytes
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
# SoftCropper Makefile
VENV ?= .venv
PYTHON := $(VENV)/bin/python3
PIP := $(VENV)/bin/pip3
PYTEST := PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 $(VENV)/bin/pytest
.PHONY: all venv install test clean build
all: test
venv:
@python3 -m venv $(VENV)
@$(VENV)/bin/python -m ensurepip --upgrade
@$(VENV)/bin/python -m pip install --upgrade pip
install: venv
@$(PIP) install --upgrade pip setuptools wheel twine build
@$(PIP) install -e .
@$(PIP) install pytest
test: install
@$(PYTEST) tests -v
build:
@rm -rf dist
@$(PYTHON) setup.py sdist bdist_wheel
deploy: install
@make build
@$(VENV)/bin/twine upload dist/*
clean:
@rm -rf $(VENV) dist *.egg-info __pycache__ .pytest_cache
@find . -type d -name "__pycache__" -exec rm -r {} +
@find . -type d -name "*.egg-info" -exec rm -r {} +
# pip install setuptools wheel twine build