-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
justfile
46 lines (34 loc) · 859 Bytes
/
justfile
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
src_dir := justfile_dir() / 'src'
scripts_dir := justfile_dir() / 'scripts'
python := 'python3'
_pythonpath := env('PYTHONPATH', '')
export PYTHONPATH := if _pythonpath == '' { src_dir } else { src_dir + ':' + _pythonpath }
@_list:
just --list --unsorted
@clean:
find {{src_dir}} -depth -name '__pycache__' -type d -exec rm -rf '{}' \;
find {{src_dir}} -name '*.py[co]' -type f -delete
rm -rf build dist {{src_dir}}/*.egg-info
dist: clean
{{python}} -m build
exe: clean
{{python}} {{scripts_dir}}/build_exe.py
pyz: clean
{{python}} {{scripts_dir}}/build_pyz.py
fix:
isort .
lint:
isort . -c
flake8
[positional-arguments]
@test *args:
pytest "${@}"
[positional-arguments]
@tox *args:
tox run "${@}"
[positional-arguments]
@run *args:
{{python}} -m dl_plus "${@}"
[positional-arguments]
@cmd *args:
just run --cmd "${@}"