Skip to content

Commit

Permalink
CI: Replace calls to pip3 with python3 -m pip
Browse files Browse the repository at this point in the history
This is a better way to call the "right" version of pip rather than
trusting path handling around pip3 being available.
  • Loading branch information
Spindel committed Apr 18, 2024
1 parent f61aed8 commit 31b9a43
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ caramel:test:
stage: test
image: ${PYTHON_IMAGE}
before_script:
- pip3 install .
- python3 -m pip install .
script:
- python3 -W error::DeprecationWarning -m unittest discover

caramel:systest:
stage: test
image: ${BUILD_IMAGE}
before_script:
- pip3 install .
- python3 -m pip install .
script:
- make systest

Expand All @@ -47,25 +47,25 @@ 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/'

caramel:black:
stage: test
image: ${PYTHON_IMAGE}
before_script:
- pip3 install black
- python3 -m pip install black
script:
- black --check --diff caramel/ tests/

caramel:flake:
stage: test
image: ${PYTHON_IMAGE}
before_script:
- pip3 install flake8
- python3 -m pip install flake8
script:
- flake8 caramel/ tests/

Expand All @@ -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 $?
Expand All @@ -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/'
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 31b9a43

Please sign in to comment.