-
Notifications
You must be signed in to change notification settings - Fork 1
/
Taskfile.yml
54 lines (50 loc) · 1.12 KB
/
Taskfile.yml
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
# https://taskfile.dev/
version: "3"
vars:
PYTHON_BIN: python3.7
VENVS: .venvs/
FLIT_ENV: "{{.VENVS}}flit"
TEST_ENV: "{{.VENVS}}test"
TESTS_PATH: tests/
env:
FLIT_ROOT_INSTALL: "1"
tasks:
venv:create:
status:
- "test -f {{.ENV}}/bin/activate"
cmds:
- "{{.PYTHON_BIN}} -m venv {{.ENV}}"
- "{{.ENV}}/bin/python3 -m pip install -U pip setuptools wheel"
flit:init:
status:
- "test -f {{.FLIT_ENV}}/bin/flit"
deps:
- task: venv:create
vars:
ENV: "{{.FLIT_ENV}}"
cmds:
- "{{.FLIT_ENV}}/bin/python3 -m pip install flit"
flit:install:
sources:
- pyproject.toml
- "{{.ENV}}/bin/activate"
deps:
- flit:init
- task: venv:create
vars:
ENV: "{{.ENV}}"
cmds:
- >
{{.FLIT_ENV}}/bin/flit install
--python={{.ENV}}/bin/python3
--deps=production
--symlink
--extras={{.EXTRA}}
pytest:run:
deps:
- task: flit:install
vars:
ENV: "{{.TEST_ENV}}"
EXTRA: test
cmds:
- "{{.TEST_ENV}}/bin/pytest {{.ARGS}} {{.TESTS_PATH}}"