-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
63 lines (50 loc) · 1.23 KB
/
Makefile
File metadata and controls
63 lines (50 loc) · 1.23 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Set the default target to 'help'
.DEFAULT_GOAL := help
# Define variables
PACKAGE_NAME := fancy_calcy
PYTHON := python3
PIP := pip
PYLINT := pylint
MAKE := make
# Define targets
.PHONY: help
help:
@echo "Please use 'make <target>' where <target> is one of:"
@echo " build to build the python package"
@echo " rebuild to build the python package"
@echo " clean to remove build artifacts"
@echo " install to install the package and its dependencies"
@echo " uninstall to uninstall the package"
@echo " install-dev to install the package and its dependencies in editable mode"
@echo " test to run the test suite"
@echo " lint to run the linter"
.PHONY: build
build:
$(PYTHON) setup.py bdist_wheel
.PHONY: rebuild
rebuild:
$(MAKE) clean
$(MAKE) build
$(MAKE) install-dev
.PHONY: clean
clean:
rm -rf build/
rm -rf dist/
rm -rf *.egg-info
rm -rf test_folder
.PHONY: install
install:
$(PIP) install dist/fancy_calcy-*py3*.whl
.PHONY: uninstall
uninstall:
$(PIP) uninstall fancy_calcy
.PHONY: install-dev
install-dev:
$(PIP) install -e dist/fancy_calcy*.whl
.PHONY: test
test:
$(PYTHON) -m unittest discover tests -v
@echo "Unit tests passed!"
.PHONY: lint
lint:
$(PYLINT) .