Skip to content

Commit 63ac7c8

Browse files
committed
Don't overwrite existing pipx or poetry.
1 parent 0504b32 commit 63ac7c8

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ _dist_include="pytest.ini poetry.lock poetry.toml pyproject.toml Makefile build/
4343
# Example CI/CD targets are: dependencies, build, publish, deploy, clean, etc.
4444

4545
dependencies: # Install dependencies needed to build and test the project @Pipeline
46-
pip install --user pipx
47-
pipx install poetry
46+
scripts/dependencies.sh
4847

4948
build: # Build the project artefact @Pipeline
5049
# TODO: Implement the artefact build step

scripts/dependencies.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
3+
set -euo pipefail
4+
5+
if ! [ -x "$(command -v poetry)" ]; then
6+
if ! [ -x "$(command -v pipx)" ]; then
7+
echo "installing pipx"
8+
python -m pip install --user pipx --isolated
9+
python -m pipx ensurepath
10+
else
11+
echo "pipx found"
12+
fi
13+
echo "installing poetry"
14+
python -m pipx install poetry
15+
else
16+
echo "poetry found"
17+
fi

0 commit comments

Comments
 (0)