##// END OF EJS Templates
makefiles: added gunicorn launch command
super-admin -
r1116:43468349 python3
parent child Browse files
Show More
@@ -1,103 +1,111 b''
1 # required for pushd to work..
1 2 #SHELL = /bin/bash
2 3
4
3 5 # set by: PATH_TO_OUTDATED_PACKAGES=/some/path/outdated_packages.py
4 6 OUTDATED_PACKAGES = ${PATH_TO_OUTDATED_PACKAGES}
5 7
6 8 .PHONY: clean
7 9 ## Cleanup compiled and cache py files
8 10 clean:
9 11 make test-clean
10 12 find . -type f \( -iname '*.c' -o -iname '*.pyc' -o -iname '*.so' -o -iname '*.orig' \) -exec rm '{}' ';'
11 13
12 14
13 15 .PHONY: test
14 16 ## run test-clean and tests
15 17 test:
16 18 make test-clean
17 19 make test-only
18 20
19 21
20 22 .PHONY: test-clean
21 23 ## run test-clean and tests
22 24 test-clean:
23 25 rm -rf coverage.xml htmlcov junit.xml pylint.log result
24 26 find . -type d -name "__pycache__" -prune -exec rm -rf '{}' ';'
25 27 find . -type f \( -iname '.coverage.*' \) -exec rm '{}' ';'
26 28
27 29
28 30 .PHONY: test-only
29 31 ## Run tests only without cleanup
30 32 test-only:
31 33 PYTHONHASHSEED=random \
32 34 py.test -x -vv -r xw -p no:sugar \
33 --cov-report=term-missing --cov-report=html --cov=vcsserver vcsserver
35 --cov-report=term-missing --cov-report=html \
36 --cov=vcsserver vcsserver
34 37
35 38
36 39 .PHONY: pip-packages
37 40 ## Show outdated packages
38 41 pip-packages:
39 42 python ${OUTDATED_PACKAGES}
40 43
41 44
42 45 .PHONY: build
43 46 ## Build sdist/egg
44 47 build:
45 48 python -m build
46 49
47 50
48 51 .PHONY: dev-env
49 52 ## make dev-env based on the requirements files and install develop of packages
50 53 dev-env:
51 54 pip install build virtualenv
52 55 pip wheel --wheel-dir=/home/rhodecode/.cache/pip/wheels -r requirements.txt -r requirements_test.txt -r requirements_debug.txt
53 56 pip install --no-index --find-links=/home/rhodecode/.cache/pip/wheels -r requirements.txt -r requirements_test.txt -r requirements_debug.txt
54 57 pip install -e .
55 58
56 59
57 60 .PHONY: dev-srv
58 61 ## run develop server instance
59 62 dev-srv:
60 63 pserve --reload .dev/dev.ini
61 64
62 65
66 .PHONY: dev-srv-g
67 ## run gunicorn multi process workers
68 dev-srv-g:
69 gunicorn --workers=4 --paste .dev/dev.ini --bind=0.0.0.0:10010 --worker-class=sync --threads=1 --config=configs/gunicorn_config.py --timeout=120
70
63 71 # Default command on calling make
64 72 .DEFAULT_GOAL := show-help
65 73
66 74 .PHONY: show-help
67 75 show-help:
68 76 @echo "$$(tput bold)Available rules:$$(tput sgr0)"
69 77 @echo
70 78 @sed -n -e "/^## / { \
71 79 h; \
72 80 s/.*//; \
73 81 :doc" \
74 82 -e "H; \
75 83 n; \
76 84 s/^## //; \
77 85 t doc" \
78 86 -e "s/:.*//; \
79 87 G; \
80 88 s/\\n## /---/; \
81 89 s/\\n/ /g; \
82 90 p; \
83 91 }" ${MAKEFILE_LIST} \
84 92 | LC_ALL='C' sort --ignore-case \
85 93 | awk -F '---' \
86 94 -v ncol=$$(tput cols) \
87 95 -v indent=19 \
88 96 -v col_on="$$(tput setaf 6)" \
89 97 -v col_off="$$(tput sgr0)" \
90 98 '{ \
91 99 printf "%s%*s%s ", col_on, -indent, $$1, col_off; \
92 100 n = split($$2, words, " "); \
93 101 line_length = ncol - indent; \
94 102 for (i = 1; i <= n; i++) { \
95 103 line_length -= length(words[i]) + 1; \
96 104 if (line_length <= 0) { \
97 105 line_length = ncol - indent - length(words[i]) - 1; \
98 106 printf "\n%*s ", -indent, " "; \
99 107 } \
100 108 printf "%s ", words[i]; \
101 109 } \
102 110 printf "\n"; \
103 111 }'
General Comments 0
You need to be logged in to leave comments. Login now