forked from labsquare/cutevariant
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
69 lines (55 loc) · 2.01 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
test:
#python setup.py test --addopts "tests cutevariant -vv"
python -m pytest --doctest-modules tests cutevariant
coverage:
python setup.py test --addopts "--cov cutevariant tests"
run:
python -m cutevariant
fix_notepad:
# Remove non breaking spaces inserted by notepad.exe IDE
find ./cutevariant/ ./tests/ -type f -print0 | xargs -0 sed -i 's/\xc2\xa0//g'
black:
black cutevariant
doc:
$(MAKE) -C ./docs html
doc-deploy: doc
git add -f docs/build/html/
@# git commit -m "[doc] Update gh-pages"
git subtree push --prefix docs/build/html origin gh-pages
@# git reset --hard HEAD^1
# development & release cycle
fullrelease:
fullrelease
install_deps:
@# Skip quotes and other spaces with -0
@# Split on \n
@# Enclose args with quotes
python -c "import configparser; c = configparser.ConfigParser(); c.read('setup.cfg'); print('\n'.join([i for i in (c['options']['install_requires'] + c['options.extras_require']['dev']).split('\n') if i and 'PySide2' not in i]), end='')" | xargs -0 -d "\n" -I {} pip install '{}'
install:
@# Replacement for python setup.py develop which doesn't support extra_require keyword.
@# Install a project in editable mode.
pip install -e .[dev]
uninstall:
pip cutevariant uninstall
translations:
@echo "Search all python files..."
@echo "SOURCES += \\" > cutevariant.pro
@find ./cutevariant/ -name '*.py' -exec echo {} \\ \; >> cutevariant.pro
@echo . >> cutevariant.pro
@echo "TRANSLATIONS = cutevariant/assets/i18n/fr.ts" >> cutevariant.pro
@#pylupdate4 -noobsolete -verbose cutevariant.pro
pylupdate4 -verbose cutevariant.pro
@#pyside2-lupdate -verbose cutevariant.pro
@echo "\033[33;5mOpen linguist; do not forget to publish your translations before leaving it!\033[0m"
linguist cutevariant/assets/i18n/fr.ts
lrelease cutevariant.pro
check_setups:
pyroma .
check_code:
prospector cutevariant/
check-manifest
missing_doc:
# Remove D213 antagonist of D212
prospector cutevariant/ | grep "cutevariant/\|Line\|Missing docstring"
build_windows_blob:
python make_a_blob.py build_exe