Skip to content

Commit 83858b7

Browse files
committed
Auto-group pip invocations
1 parent 80d81c5 commit 83858b7

1 file changed

Lines changed: 17 additions & 11 deletions

File tree

ci-support.sh

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,12 @@ print_status_message()
218218
}
219219
220220
221+
cipip
222+
{
223+
with_output_group "pip $*" "$PY_EXE" -m pip "$@"
224+
}
225+
226+
221227
create_and_set_up_virtualenv()
222228
{
223229
with_output_group "virtualenv" create_and_set_up_virtualenv_inner
@@ -242,8 +248,8 @@ create_and_set_up_virtualenv_inner()
242248
esac
243249
244250
245-
$PY_EXE -m pip install --upgrade pip
246-
$PY_EXE -m pip install setuptools wheel toml
251+
cipip install --upgrade pip
252+
cipip install setuptools wheel toml
247253
}
248254
249255
@@ -275,7 +281,7 @@ handle_extra_install()
275281
{
276282
if test "$EXTRA_INSTALL" != ""; then
277283
for i in $EXTRA_INSTALL ; do
278-
with_echo "$PY_EXE" -m pip install "$i"
284+
cipip install "$i"
279285
done
280286
fi
281287
}
@@ -329,7 +335,7 @@ pip_install_project_inner()
329335
fi
330336
fi
331337
332-
with_echo "$PY_EXE" -m pip install -v $PROJECT_INSTALL_FLAGS .
338+
cipip install -v $PROJECT_INSTALL_FLAGS .
333339
}
334340
335341
@@ -502,7 +508,7 @@ test_py_project()
502508
return
503509
fi
504510
505-
$PY_EXE -m pip install pytest pytest-github-actions-annotate-failures
511+
cipip install pytest pytest-github-actions-annotate-failures
506512
507513
# Needed for https://github.com/utgwkk/pytest-github-actions-annotate-failures
508514
export PYTEST_RUN_PATH=test
@@ -512,7 +518,7 @@ test_py_project()
512518
if [[ "${PY_EXE}" == pypy* ]]; then
513519
CISUPPORT_PARALLEL_PYTEST=no
514520
else
515-
$PY_EXE -m pip install pytest-xdist
521+
cipip install pytest-xdist
516522
fi
517523
518524
AK_PROJ_NAME="$(get_proj_name)"
@@ -676,9 +682,9 @@ build_docs()
676682
# Two separate installs to trick sphinx into not precisely enforcing dependencies.
677683
# At the time of this writing, furo says it only works with sphinx 3.x.
678684
# (but it seems 4.x is OK!) -AK, 2021-05-20
679-
with_echo $PY_EXE -m pip install furo sphinx-copybutton
685+
cipip install furo sphinx-copybutton
680686
681-
with_echo $PY_EXE -m pip install "sphinx$CI_SUPPORT_SPHINX_VERSION_SPECIFIER" \
687+
cipip install "sphinx$CI_SUPPORT_SPHINX_VERSION_SPECIFIER"
682688
683689
if test "$1" = "--no-check"; then
684690
(cd doc; with_echo make html)
@@ -778,7 +784,7 @@ install_and_run_flake8()
778784
echo "-----------------------------------------------------------------"
779785
fi
780786
781-
${PY_EXE} -m pip install "${FLAKE8_PACKAGES[@]}"
787+
cipip install "${FLAKE8_PACKAGES[@]}"
782788
${PY_EXE} -m flake8 "$@"
783789
}
784790
@@ -795,7 +801,7 @@ run_pylint()
795801
curl -o .pylintrc.yml "${ci_support}/.pylintrc-default.yml"
796802
fi
797803
798-
$PY_EXE -m pip install pylint PyYAML pytest
804+
cipip install pylint PyYAML pytest
799805
800806
PYLINT_RUNNER_ARGS="--jobs=4 --yaml-rcfile=.pylintrc.yml"
801807
@@ -813,7 +819,7 @@ run_pylint()
813819
814820
function setup_asv
815821
{
816-
pip install asv
822+
cipip install asv
817823
818824
if [[ ! -f ~/.asv-machine.json ]]; then
819825
asv machine --yes

0 commit comments

Comments
 (0)