2018-06-13 20:12:52 +02:00
|
|
|
#!/usr/bin/env bash
|
2018-06-07 02:58:31 +02:00
|
|
|
|
|
|
|
set -e
|
|
|
|
set -o pipefail
|
|
|
|
|
|
|
|
PYTHON=python
|
|
|
|
while [ $# -gt 0 ]; do
|
|
|
|
case "$1" in
|
|
|
|
-python)
|
|
|
|
PYTHON=$2
|
|
|
|
shift
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "Usage: Usage: ${0##*/} [-python /path/to/bin/python]"
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
shift
|
|
|
|
done
|
|
|
|
|
|
|
|
cd /tmp
|
|
|
|
|
2021-05-26 20:02:47 +02:00
|
|
|
curl -# -LO https://bootstrap.pypa.io/pip/get-pip.py
|
2022-01-03 18:37:52 +01:00
|
|
|
# https://github.com/pypa/setuptools/issues/2993
|
|
|
|
export SETUPTOOLS_USE_DISTUTILS=stdlib
|
2023-09-30 14:25:32 +02:00
|
|
|
# Add --break-system-packages to fix change since python 3.11: https://stackoverflow.com/a/75722775/10152334
|
|
|
|
${PYTHON} get-pip.py --ignore-installed --break-system-packages
|
2018-06-07 02:58:31 +02:00
|
|
|
rm get-pip.py
|
|
|
|
|
2023-09-30 14:25:32 +02:00
|
|
|
${PYTHON} -m pip install --break-system-packages --upgrade --ignore-installed setuptools
|
|
|
|
${PYTHON} -m pip install --break-system-packages --ignore-installed conan meson
|
2021-07-01 12:58:57 +02:00
|
|
|
# Purge cache to save space: https://stackoverflow.com/questions/37513597/is-it-safe-to-delete-cache-pip-directory
|
|
|
|
${PYTHON} -m pip cache purge
|