-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.dev.yml
98 lines (78 loc) · 2.35 KB
/
Taskfile.dev.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
version: "3"
output: prefixed # = [interleaved, group, prefixed] # ref:
vars:
VAR1: "some-var"
# global env:
env:
ENV1: testing
################################################################################################
tasks:
setup:
cmds:
- curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
- pyenv install 3.9.9
- pyenv virtualenv 3.9.9 py39-toolbox
- pyenv local py39-toolbox
- pip install --upgrade pip
- pip install -U pipx
- pipx ensurepath
- pipx --version
#
# fix: https://stackoverflow.com/questions/43067039/pyinstaller-error-oserror-python-library-not-found-libpython3-4mu-so-1-0-lib
#
install:py:
cmds:
- env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install 3.10.6 # fix for pyinstaller
install:pdm:
cmds:
# - curl -sSL https://pdm-project.org/install-pdm.py | python3 -
# - brew install pdm # 不要用, 会额外装一堆大便进来!
# - pip install --user pdm
- pip install pipx # 基于 pyenv
- pipx install pdm[all] # 基于 pyenv
- pdm --version
install:rye:
cmds:
- curl -sSf https://rye-up.com/get | bash # set shell env: export PATH="$HOME/.rye/bin:$PATH"
- rye --version
install:poetry:
cmds:
- curl -sSL https://install.python-poetry.org | python3 -
# - pipx install poetry
- poetry --version
- poetry config virtualenvs.in-project true
- poetry config --list
install:poetry:clean:
cmds:
- curl -sSL https://install.python-poetry.org | python3 - --uninstall
- curl -sSL https://install.python-poetry.org | python3 -
- poetry --version
install:tools:
cmds:
- pipx install cookiecutter
- cookiecutter --version
- task: install:poetry
install:
cmds:
- pip3 install -r requirements.txt
install:dev:
cmds:
- pip3 install -r requirements-dev.txt
init:
cmds:
- task init:env
- task install
init:env:
cmds:
- cp .env.local .env
pdm:config:
cmds:
- pdm config venv.backend venv -l # set env backend
pdm:venv:activate:
aliases: [ "venv" ]
cmds:
- pdm venv activate
# ref: https://pdm-project.org/latest/usage/venv/#activate-a-virtualenv
pdm:init:
cmds:
- eval (pdm venv activate)