-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
47 lines (39 loc) · 1.09 KB
/
Makefile
File metadata and controls
47 lines (39 loc) · 1.09 KB
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
47
# Variables
PACKAGE_NAME = qreward
WHEEL_FILE = ./dist/$(PACKAGE_NAME)-*.whl
# Targets
.PHONY: help
help:
@echo "Please use \`make <target>\` where <target> is one of"
@echo " test -- run local unit tests"
@echo " build -- build the package"
@echo " install -- install the package"
@echo " reinstall -- uninstall and reinstall the tool"
@echo " uninstall -- uninstall the package"
@echo " lint -- run both flake8"
@echo " clean -- clean up temporary files"
.PHONY: test
test:
@pytest -n auto -v tests/
.PHONY: build
build:
@python setup.py sdist bdist_wheel
.PHONY: install
install: build
@pip install $(WHEEL_FILE) --no-cache-dir
@$(MAKE) clean
.PHONY: reinstall
reinstall: build
@pip uninstall -y $(PACKAGE_NAME)
@pip install $(WHEEL_FILE) --no-cache-dir
@$(MAKE) clean
.PHONY: uninstall
uninstall:
@pip uninstall -y $(PACKAGE_NAME)
.PHONY: lint
lint:
@flake8 --exclude=build,examples,.venv
.PHONY: clean
clean:
@rm -rf htmlcov tests/htmlcov dist build $(PACKAGE_NAME).egg-info
@rm -f .coverage coverage.xml tests/.coverage tests/coverage.xml