forked from gpodder/mygpo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
52 lines (39 loc) · 1.67 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
all: help
help:
@echo 'make test run tests and show coverage report'
@echo 'make clean clean up files'
dev-config:
mkdir -p envs/dev
echo django.core.mail.backends.console.EmailBackend > envs/dev/EMAIL_BACKEND
echo secret > envs/dev/SECRET_KEY
echo postgres://mygpo:mygpo@localhost/mygpo > envs/dev/DATABASE_URL
echo True > envs/dev/DEBUG
test: envs/dev/MEDIA_ROOT
# assume defined media root directory, empty before running tests
rm -rf $(shell cat envs/dev/MEDIA_ROOT)
mkdir -p $(shell cat envs/dev/MEDIA_ROOT)
envdir envs/dev/ python -Wd -m pytest --cov=mygpo/ --cov-branch
coverage report --show-missing
update-po:
envdir envs/dev python manage.py makemessages \
--ignore=doc/* --ignore=envs/* --ignore=media/* --ignore=venv/* \
--ignore=res/* --ignore=tools/* --ignore=mygpo/*/migrations/* \
--ignore=static/* --all
compilemessages:
envdir envs/dev/ python manage.py compilemessages
notebook:
envdir envs/dev/ python manage.py shell_plus --notebook
clean:
git clean -fX
install-deps:
sudo yum module install postgresql:15/server
sudo yum module install python39
sudo dnf install python39-devel
sudo dnf install libpq-devel libjpeg-devel zlib-devel libwebp-devel \
make automake autoconf gcc gcc-c++ binutils gdb gcc-gdb-plugins glibc-devel libtool strace bison flex cmake python3.11 python3-virtualenv python3-gevent python3.11-devel python3.11-pip python3.11-pip-wheel libffi-devel \
gettext git redis
format-code:
black --target-version py38 --skip-string-normalization mygpo/
check-code-format:
black --check --target-version py38 --skip-string-normalization mygpo/
.PHONY: all help test clean unittest coverage install-deps format-code