Skip to content

Commit 0da697b

Browse files
committed
Use pipx instead of python -m pip
1 parent 3531de3 commit 0da697b

File tree

4 files changed

+11
-29
lines changed

4 files changed

+11
-29
lines changed

ci/lib/common-dependencies.sh

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
AQTINSTALL_VERSION=3.1.0
22
AQTINSTALL_ARCHIVES="qtbase qtimageformats qtsvg qttranslations qttools"
33

4-
setup_python_cmd() {
5-
echo_title "Looking for a Python 3 + pip installation"
6-
for interpreter in python3 python ; do
7-
if $interpreter -m pip --version 2> /dev/null ; then
8-
echo "Found $interpreter"
9-
add_env_var PYTHON_CMD $interpreter
10-
return
11-
fi
12-
done
13-
die "Can't find a valid Python 3 installation."
4+
check_pipx() {
5+
echo_title "Looking for pipx"
6+
if command -v pipx 2> /dev/null ; then
7+
echo "Found pipx"
8+
return
9+
fi
10+
die "Can't find pipx."
1411
}
1512

1613
install_qt() {
@@ -23,9 +20,9 @@ install_qt() {
2320
if is_macos ; then
2421
aqt_args="mac desktop $QT_VERSION $QT_ARCH_MACOS"
2522
fi
26-
$PYTHON_CMD -m pip install aqtinstall==$AQTINSTALL_VERSION
23+
pipx install aqtinstall==$AQTINSTALL_VERSION
2724

28-
$PYTHON_CMD -m aqt install-qt \
25+
aqt install-qt \
2926
$aqt_args \
3027
--outputdir $qt_install_dir \
3128
--archives $AQTINSTALL_ARCHIVES
@@ -44,7 +41,7 @@ install_qt() {
4441

4542
install_cmake() {
4643
echo_title "Installing CMake"
47-
$PYTHON_CMD -m pip install cmake==$CMAKE_VERSION
44+
pipx install cmake==$CMAKE_VERSION
4845
}
4946

5047
install_ecm() {

ci/lib/common.sh

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -52,18 +52,6 @@ mkabsdir() {
5252
pop > /dev/null
5353
}
5454

55-
init_python_cmd() {
56-
echo_title "Looking for a Python 3 + pip installation"
57-
for interpreter in python3 python ; do
58-
if $interpreter -m pip --version 2> /dev/null ; then
59-
echo "Found $interpreter"
60-
export PYTHON_CMD=$interpreter
61-
return
62-
fi
63-
done
64-
die "Can't find a valid Python 3 installation."
65-
}
66-
6755
init_run_as_root() {
6856
RUN_AS_ROOT=""
6957
if is_windows ; then
@@ -127,7 +115,6 @@ install_prebuilt_executable() {
127115
}
128116

129117
detect_os
130-
init_python_cmd
131118
init_run_as_root
132119

133120
if is_macos ; then

ci/lib/linux-dependencies.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,5 @@ main() {
2323
die "Sorry, I don't know how to install the required packages on your distribution."
2424
fi
2525

26-
setup_python_cmd
2726
install_cmake
2827
}

ci/lib/macos-dependencies.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
main() {
2-
setup_python_cmd
32
install_qt
43
install_cmake
54
install_ecm
6-
pip3 install ds_store==1.1.2
5+
pipx install ds_store==1.1.2
76
}

0 commit comments

Comments
 (0)