forked from micha030201/flaskbb-plugin-vanity
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
47 lines (36 loc) · 1.37 KB
/
Copy pathMakefile
File metadata and controls
47 lines (36 loc) · 1.37 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
.PHONY: clean help test lint format dist upload update-translations compile-translations add-translation
help:
@echo " clean remove unwanted stuff"
@echo " test run the testsuite"
@echo " lint check the source for style errors"
@echo " format sort imports and reformat the code"
@echo " dist creates distribution packages"
@echo " upload uploads a new version of the wheel package to PyPI"
@echo " update-translations updates the translations"
@echo " compile-translations compiles the translations"
@echo " add-translation adds a new language to the translations"
clean:
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
find . -name '__pycache__' -exec rm -rf {} +
test:
pytest
lint:
ruff check
format:
ruff check --fix --select I
ruff check --fix
ruff format
dist:
uv build
upload: dist
uv publish
update-translations:
pybabel extract -F babel.cfg -k lazy_gettext -o like/translations/messages.pot .
pybabel update -i like/translations/messages.pot -d like/translations/
add-translation:
@read -p "Enter new language shortcode:" lang; \
pybabel init -i like/translations/messages.pot -d like/translations/ -l $$lang
compile-translations:
pybabel compile -d like/translations/