From 31b9a438d5d26f583625afddc56da3a6f3c668cd Mon Sep 17 00:00:00 2001 From: "D.S. Ljungmark" Date: Mon, 30 Jan 2023 14:15:16 +0100 Subject: [PATCH] CI: Replace calls to pip3 with python3 -m pip This is a better way to call the "right" version of pip rather than trusting path handling around pip3 being available. --- .gitlab-ci.yml | 16 ++++++++-------- Makefile | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 37e752a..b1e770b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -29,7 +29,7 @@ caramel:test: stage: test image: ${PYTHON_IMAGE} before_script: - - pip3 install . + - python3 -m pip install . script: - python3 -W error::DeprecationWarning -m unittest discover @@ -37,7 +37,7 @@ caramel:systest: stage: test image: ${BUILD_IMAGE} before_script: - - pip3 install . + - python3 -m pip install . script: - make systest @@ -47,9 +47,9 @@ rebase:test: needs: - caramel:test script: - - pip3 install . + - python3 -m pip install . - git every - -x 'pip3 install --editable .' + -x 'python3 -m pip install --editable .' -x 'flake8 caramel/ tests/' -x 'black --check caramel/ tests/' @@ -57,7 +57,7 @@ caramel:black: stage: test image: ${PYTHON_IMAGE} before_script: - - pip3 install black + - python3 -m pip install black script: - black --check --diff caramel/ tests/ @@ -65,7 +65,7 @@ caramel:flake: stage: test image: ${PYTHON_IMAGE} before_script: - - pip3 install flake8 + - python3 -m pip install flake8 script: - flake8 caramel/ tests/ @@ -83,7 +83,7 @@ caramel:pylint: when: always image: ${PYTHON_IMAGE} before_script: - - pip3 install pylint pylint-exit + - python3 -m pip install pylint pylint-exit - python3 setup.py develop script: - pylint --rcfile=setup.cfg caramel/ tests/ || pylint-exit --error-fail $? @@ -98,6 +98,6 @@ rebase:check: - python3 -m pip install black flake8 # Always install "." first to track possible dependency changes - git every - -x 'pip3 install --editable .' + -x 'python3 -m pip install --editable .' -x 'flake8 caramel/ tests/' -x 'black --check caramel/ tests/' diff --git a/Makefile b/Makefile index fd5e861..56c2bef 100644 --- a/Makefile +++ b/Makefile @@ -49,7 +49,7 @@ venv-install: $(CARAMEL_TOOL) $(CARAMEL_TOOL): $(PYTHON3) setup.py @$(BOLD); echo "Install caramel and its dependencies in venv: $(VENV)";\ $(BLR); - $(VENV)/bin/pip3 install -e . + $(VENV)/bin/python3 -m pip install -e . cp development.ini $(VENV)/development.ini mkdir $(VENV)/example_ca @$(BLR)