From 19d85e621bc82570a9934fd34ac4b7d46f680996 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Behmo?= Date: Sun, 26 Apr 2020 00:24:45 +0200 Subject: [PATCH] Fix "distribution was not found and is required by kubernetes" in CI When running "python setup.py install" in CI, we were getting "requests distribution was not found and is required by kubernetes" errors. I can reproduce this issue locally. The error disappears after the same command is run a second time. This is a similar issue: https://github.com/pypa/setuptools/issues/498 --- .gitlab-ci.yml | 6 +++--- Makefile | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9656461..f43ff99 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,7 +9,7 @@ test: script: - apk add --no-cache make - make ci-install-alpine-requirements - - python setup.py install + - pip install . - make ci-install-python-requirements - make test @@ -17,7 +17,7 @@ build:images: script: - apk add --no-cache make - make ci-install-alpine-requirements - - python setup.py install + - pip install . - make ci-build-images tags: - private @@ -49,7 +49,7 @@ deploy:images: script: - apk add --no-cache make - make ci-install-alpine-requirements - - python setup.py install + - pip install . - make ci-push-images only: - tags diff --git a/Makefile b/Makefile index 0862140..6e42a4a 100644 --- a/Makefile +++ b/Makefile @@ -76,7 +76,7 @@ ci-install-alpine-requirements: ## Install requirements for a python:alpine imag ci-install-python-requirements: ## Install requirements pip3 install --upgrade pip pip3 install setuptools==44.0.0 - python3 setup.py install + pip install . pip3 install -r requirements/dev.txt ci-install-plugins: ci-install-python-requirements ## Install all supported plugins