-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathMakefile
114 lines (99 loc) · 2.51 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
PYTHON = python3
INSTALL = install
DEVELOP = develop
TARGET = setup.py
TESTS = tests/
DEPLOY = sdist bdist_wheel upload --repository pypi --sign
REGISTER = register --repository pypi
BUILD_GARBAGE = build/ dist/
EGG = *.egg-info
CHECK = check --metadata --restructuredtext --strict
CLEAN = clean
UNINSTALL = --uninstall
BUILD = sdist bdist_wheel
all: install
@make clean
dev-dependencies:
pip install -r requirements-dev.txt
check: check-tests check-package
check-package:
@echo "+===================+"
@echo "| PACKAGE INTEGRITY |"
@echo "+===================+"
$(PYTHON) $(TARGET) $(CHECK)
@echo "ok!"
check-tests:
@echo "+===============+"
@echo "| TESTS |"
@echo "+===============+"
$(PYTHON) $(TESTS)
@echo "ok!"
clean:
@echo "+===============+"
@echo "| CLEAN BUILD |"
@echo "+===============+"
$(PYTHON) $(TARGET) $(CLEAN)
find . -name __pycache__ -or -name *.pyc| xargs rm -rfv;
rm -rfv $(BUILD_GARBAGE)
install:
@echo "+===============+"
@echo "| INSTALL |"
@echo "+===============+"
$(PYTHON) $(TARGET) $(INSTALL)
build:
@echo "+===============+"
@echo "| BUILD |"
@echo "+===============+"
$(PYTHON) $(TARGET) $(BUILD)
develop:
@echo "+===============+"
@echo "| DEVELOP |"
@echo "+===============+"
$(PYTHON) $(TARGET) $(DEVELOP)
develop-uninstall:
@echo "+===============+"
@echo "| DEV UNINSTALL |"
@echo "+===============+"
$(PYTHON) $(TARGET) $(DEVELOP) $(UNINSTALL)
@make clean
rm -rfv $(EGG)
deploy: dev-dependencies check build
@make check
@echo "+===============+"
@echo "| DEPLOY |"
@echo "+===============+"
twine upload dist/*
register: dev-dependencies
@make check
@echo "+===============+"
@echo "| REGISTER |"
@echo "+===============+"
twine register
help:
@echo "+=============================================+"
@echo "| H E L P |"
@echo "+=============================================+"
@echo "----------------------------------------------"
@echo "make check:"
@echo " check the build pass on PyPI"
@echo
@echo "make clean:"
@echo " clean the build (build/ __pyache__, sdist/)"
@echo
@echo "make install:"
@echo " install the package in your system"
@echo
@echo "make build:"
@echo " build the package as egg-file"
@echo
@echo "make develop:"
@echo " install in develop mode (symlink)"
@echo
@echo "make develop-uninstall:"
@echo " uninstall develop files and clean build"
@echo
@echo "deploy:"
@echo " deploy to PyPY"
@echo
@echo "register:"
@echo " register to PyPI"