-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
147 lines (126 loc) · 3.39 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
PYTHON = python
INSTALL = install
DEVELOP = develop
TARGET = setup.py
TEST_DEPLOY = sdist bdist_wheel upload --repository pypitest --sign
TEST_REGISTER = register --repository pypitest
DEPLOY = sdist bdist_wheel upload --repository pypi --sign
REGISTER = register --repository pypi
BUILD_GARBAGE = build/ dist/
CHECK = check --metadata --restructuredtext --strict
CLEAN = clean
UNINSTALL = --uninstall
BUILD = sdist bdist_wheel
ENVIROMENT = *.egg-info *.env
PYNSTALLER_ARGS = --onefile --noconsole
PROJECT = rentalcar
all: install
@make clean
check:
@echo "+===============+"
@echo "| CHECK |"
@echo "+===============+"
$(PYTHON) $(TARGET) $(CHECK)
@echo "ok!"
clean-environment:
@echo "+===============+"
@echo "| CLEAN ENV |"
@echo "+===============+"
rm -rfv $(ENVIROMENT)
clean-build:
@echo "+===============+"
@echo "| CLEAN BUILD |"
@echo "+===============+"
$(PYTHON) $(TARGET) $(CLEAN)
find . -name __pycache__ -or -name *.pyc| xargs rm -rfv;
rm -rfv $(BUILD_GARBAGE)
clean:
@make clean-build
@make clean-environment
install:
@echo "+===============+"
@echo "| INSTALL |"
@echo "+===============+"
$(PYTHON) $(TARGET) $(INSTALL)
build:
@echo "+===============+"
@echo "| BUILD |"
@echo "+===============+"
$(PYTHON) $(TARGET) $(BUILD)
develop:
@echo "+===============+"
@echo "| DEVELOP |"
@echo "+===============+"
$(PYTHON) $(TARGET) $(DEVELOP)
test-register:
@make check
@echo "+===============+"
@echo "| TEST-REGISTER |"
@echo "+===============+"
$(PYTHON) $(TARGET) $(TEST_REGISTER)
develop-uninstall:
@echo "+===============+"
@echo "| DEV UNINSTALL |"
@echo "+===============+"
$(PYTHON) $(TARGET) $(DEVELOP) $(UNINSTALL)
@make clean
test-deploy:
@make check
@echo "+===============+"
@echo "| TEST-DEPLOY |"
@echo "+===============+"
$(PYTHON) $(TARGET) $(TEST_DEPLOY)
deploy:
@make check
@echo "+===============+"
@echo "| DEPLOY |"
@echo "+===============+"
$(PYTHON) $(TARGET) $(DEPLOY)
register:
@make check
@echo "+===============+"
@echo "| REGISTER |"
@echo "+===============+"
$(PYTHON) $(TARGET) $(REGISTER)
pyinstaller:
@echo "+===============+"
@echo "| PYINSTALLER |"
@echo "+===============+"
$(PYTHON) build.py
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 "make develop:"
@echo " install in develop mode (symlink)"
@echo
@echo "make develop-uninstall:"
@echo " uninstall develop files and clean build"
@echo
@echo "make test-register:"
@echo " test register using the testPyPI server "
@echo
@echo "test-deploy:"
@echo " test deploy using the testPyPI server"
@echo
@echo "deploy:"
@echo " deploy to PyPY"
@echo
@echo "register:"
@echo " register to PyPI"
@echo
@echo "pyinstaller:"
@echo " Generate a standalone executable for the current host platform"
.PHONY = all check clean-environment clean-build clean install build develop test-register develop-uninstall test-deploy deploy register help