From e284eaa0ae268f124f786de9bfd807c85faeaf2b Mon Sep 17 00:00:00 2001 From: Mike Kolesnik Date: Mon, 11 Dec 2023 11:14:37 +0200 Subject: [PATCH] Fix linting image build failure due to PEP 668 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pip had a check enabled that fails the install due to packages being managed by the OS. The added flag ignores this check. Otherwise, the build fails with: ``` 11.85 × This environment is externally managed 11.85 ╰─> 11.85 The system-wide python installation should be maintained using the 11.85 system package manager (apk) only. ... 11.85 note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages. 11.85 hint: See PEP 668 for the detailed specification. ``` Signed-off-by: Mike Kolesnik --- package/Dockerfile.shipyard-linting | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/Dockerfile.shipyard-linting b/package/Dockerfile.shipyard-linting index b93ecca53..7d995b809 100644 --- a/package/Dockerfile.shipyard-linting +++ b/package/Dockerfile.shipyard-linting @@ -29,7 +29,7 @@ ENV MARKDOWNLINT_VERSION=0.33.0 \ RUN apk add --no-cache bash findutils git grep make nodejs py3-six shellcheck upx yamllint yq && \ apk add --no-cache --virtual installers npm py3-pip && \ npm install -g markdownlint-cli@${MARKDOWNLINT_VERSION} && \ - pip install gitlint==${GITLINT_VERSION} && \ + pip install --break-system-packages gitlint==${GITLINT_VERSION} && \ find /usr/bin/ -type f -executable -newercc /proc -size +1M \( -execdir upx {} \; -o -true \) && \ find /usr/lib/ -name __pycache__ -type d -exec rm -rf {} + && \ apk del installers