This commit is contained in:
Marc Beninca 2024-06-24 08:39:21 +02:00
parent b1579d654f
commit 10b499d979
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

41
pidd.sh
View file

@ -606,45 +606,36 @@ pidd_clean_packages_cache () {
pidd_install_python_modules () {
pidd_step "Install Python modules"
pidd_install_python_modules__root="$(mktemp --directory)" || exit
echo "${pidd_install_python_modules__root}"
for pidd_install_python_modules__repository \
in "${PIDD_GIT_MAIN}" "${PIDD_GIT_ROOT}" ; do
case "${pidd_install_python_modules__repository}" in
http*) pidd_install_python_modules__url="\
${pidd_install_python_modules__repository}" ;;
/*) pidd_install_python_modules__url="${PIDD_PROJECT_ROOT}\
${pidd_install_python_modules__repository}" ;;
*) pidd_install_python_modules__url="${PIDD_PROJECT_ROOT}\
/${PIDD_PROJECT_PATH}/${pidd_install_python_modules__repository}" ;;
pidd_ipm__root="$(mktemp --directory)" || exit
echo "${pidd_ipm__root}"
for pidd_ipm__repository in "${PIDD_GIT_MAIN}" "${PIDD_GIT_ROOT}" ; do
case "${pidd_ipm__repository}" in
http*) pidd_ipm__url="${pidd_ipm__repository}" ;;
/*) pidd_ipm__url="${PIDD_PROJECT_ROOT}${pidd_ipm__repository}" ;;
*) pidd_ipm__url="\
${PIDD_PROJECT_ROOT}/${PIDD_PROJECT_PATH}/${pidd_ipm__repository}" ;;
esac
pidd_install_python_modules__name="\
$(basename "${pidd_install_python_modules__url}")"
pidd_ipm__name="$(basename "${pidd_ipm__url}")"
pidd_split
echo "\
${pidd_install_python_modules__url}
${pidd_ipm__url}
"
git clone \
"${pidd_install_python_modules__url}" \
"${pidd_install_python_modules__root}\
/${pidd_install_python_modules__name}" \
"${pidd_ipm__url}" \
"${pidd_ipm__root}/${pidd_ipm__name}" \
|| exit
pidd_install_python_modules__path="\
${pidd_install_python_modules__root}\
/${pidd_install_python_modules__name}\
/${pidd_install_python_modules__name}"
pidd_ipm__path="${pidd_ipm__root}/${pidd_ipm__name}/${pidd_ipm__name}"
echo "\
${pidd_install_python_modules__path}
${pidd_ipm__path}
${PIDD_PYTHON_PACKAGES}"
cp --recursive \
"${pidd_install_python_modules__path}" "${PIDD_PYTHON_PACKAGES}" \
cp --recursive "${pidd_ipm__path}" "${PIDD_PYTHON_PACKAGES}" \
|| exit
done
pidd_split
pidd_ls "${PIDD_PYTHON_PACKAGES}"
pidd_split
pidd_rm "${pidd_install_python_modules__root}"
pidd_rm "${pidd_ipm__root}"
}
pidd_write_python_module () {