File tree 7 files changed +47
-31
lines changed
7 files changed +47
-31
lines changed Original file line number Diff line number Diff line change 71
71
with :
72
72
python-version-file : pyproject.toml
73
73
74
- - name : Install Poetry
75
- run : |
76
- pipx install \
77
- --python "$(which python)" \
78
- poetry
79
-
80
74
- name : Install Task
81
75
uses : arduino/setup-task@v2
82
76
with :
@@ -105,12 +99,6 @@ jobs:
105
99
with :
106
100
python-version-file : pyproject.toml
107
101
108
- - name : Install Poetry
109
- run : |
110
- pipx install \
111
- --python "$(which python)" \
112
- poetry
113
-
114
102
- name : Install Task
115
103
uses : arduino/setup-task@v2
116
104
with :
Original file line number Diff line number Diff line change 99
99
with :
100
100
python-version-file : pyproject.toml
101
101
102
- - name : Install Poetry
103
- run : |
104
- pipx install \
105
- --python "$(which python)" \
106
- poetry
107
-
108
102
- name : Install Task
109
103
uses : arduino/setup-task@v2
110
104
with :
Original file line number Diff line number Diff line change 53
53
with :
54
54
python-version-file : pyproject.toml
55
55
56
- - name : Install Poetry
57
- run : |
58
- pipx install \
59
- --python "$(which python)" \
60
- poetry
61
-
62
56
- name : Install Task
63
57
uses : arduino/setup-task@v2
64
58
with :
Original file line number Diff line number Diff line change 75
75
with :
76
76
python-version-file : pyproject.toml
77
77
78
- - name : Install Poetry
79
- run : |
80
- pipx install \
81
- --python "$(which python)" \
82
- poetry
83
-
84
78
- name : Install Task
85
79
uses : arduino/setup-task@v2
86
80
with :
Original file line number Diff line number Diff line change @@ -381,10 +381,42 @@ tasks:
381
381
-r "{{.STYLELINTRC_SCHEMA_PATH}}" \
382
382
-d "{{.PROJECT_FOLDER}}/{{.INSTANCE_PATH}}"
383
383
384
+ poetry:install :
385
+ desc : Install Poetry
386
+ run : once
387
+ vars :
388
+ PYTHON_PATH :
389
+ sh : task utility:normalize-path RAW_PATH="$(which python)"
390
+ cmds :
391
+ - |
392
+ if ! which pipx &>/dev/null; then
393
+ echo "pipx not found or not in PATH."
394
+ echo "Please install: https://pipx.pypa.io/stable/installation/#installing-pipx"
395
+ exit 1
396
+ fi
397
+ - |
398
+ if ! which yq &>/dev/null; then
399
+ echo "yq not found or not in PATH."
400
+ echo "Please install: https://github.com/mikefarah/yq/#install"
401
+ exit 1
402
+ fi
403
+ - |
404
+ pipx install \
405
+ --python "{{.PYTHON_PATH}}" \
406
+ "poetry==$( \
407
+ yq \
408
+ --input-format toml \
409
+ --output-format yaml \
410
+ '.tool.poetry.group.pipx.dependencies.poetry' \
411
+ < pyproject.toml
412
+ )"
413
+
384
414
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/poetry-task/Taskfile.yml
385
415
poetry:install-deps :
386
416
desc : Install dependencies managed by Poetry
387
417
run : when_changed
418
+ deps :
419
+ - task : poetry:install
388
420
cmds :
389
421
- |
390
422
poetry install \
Original file line number Diff line number Diff line change 87
87
# Install Poetry.
88
88
pipx install \
89
89
--python "$(which python)" \
90
- poetry==1.4.0
90
+ "poetry==$( \
91
+ yq \
92
+ --input-format toml \
93
+ --output-format yaml \
94
+ '.tool.poetry.group.pipx.dependencies.poetry' \
95
+ < pyproject.toml
96
+ )"
91
97
92
98
# Install Python dependencies.
93
99
poetry install \
Original file line number Diff line number Diff line change @@ -32,6 +32,14 @@ optional = true
32
32
[tool .poetry .group .external .dependencies ]
33
33
pyserial = " 3.5"
34
34
35
+ # The dependencies in this group are installed using pipx; NOT Poetry. The use of a `poetry` section is a hack required
36
+ # in order to be able to manage updates of these dependencies via Dependabot, as used for all other dependencies.
37
+ [tool .poetry .group .pipx ]
38
+ optional = true
39
+
40
+ [tool .poetry .group .pipx .dependencies ]
41
+ poetry = " 1.4.0"
42
+
35
43
[build-system ]
36
44
requires = [" poetry-core" ]
37
45
build-backend = " poetry.core.masonry.api"
You can’t perform that action at this time.
0 commit comments