diff --git a/utils.sh b/utils.sh index d2283d3..1d5066e 100755 --- a/utils.sh +++ b/utils.sh @@ -147,8 +147,9 @@ get_dependencies() MOULINETTE_DEPENDENCIES=$(curl https://raw.githubusercontent.com/YunoHost/moulinette/$debian_version-$ynh_version/debian/control 2> /dev/null | sed -n '/^Depends:/,/^\w/{//!p}' | sed -e "s/,//g" -e "s/[(][^)]*[)]//g" -e "s/ | \S\+//g" | tr "\n" " ") # Same as above, except that all dependencies are in the same line SSOWAT_DEPENDENCIES=$(curl https://raw.githubusercontent.com/YunoHost/ssowat/$debian_version-$ynh_version/debian/control 2> /dev/null | grep '^Depends:' | sed 's/Depends://' | sed -e "s/,//g" -e "s/[(][^)]*[)]//g" -e "s/ | \S\+//g" | tr "\n" " ") - BUILD_DEPENDENCIES="git-buildpackage postfix python-setuptools python-pip" - PIP_PKG="mock pip pytest pytest-cov pytest-mock pytest-sugar requests-mock tox ansi2html black" + BUILD_DEPENDENCIES="git-buildpackage postfix python-setuptools python-pip python3-pip" + PIP_PKG="mock pip pytest pytest-cov pytest-mock pytest-sugar requests-mock tox ansi2html" + PIP3_PKG="pip black" } rebuild_base_containers() @@ -190,6 +191,7 @@ rebuild_base_containers() # Pre install dependencies lxc exec "$base_image_to_rebuild-tmp" -- /bin/bash -c "DEBIAN_FRONTEND=noninteractive SUDO_FORCE_REMOVE=yes apt-get --assume-yes -o Dpkg::Options::=\"--force-confold\" install --assume-yes $YUNOHOST_DEPENDENCIES $YUNOHOST_RECOMMENDS $MOULINETTE_DEPENDENCIES $SSOWAT_DEPENDENCIES $BUILD_DEPENDENCIES" lxc exec "$base_image_to_rebuild-tmp" -- /bin/bash -c "pip install -U $PIP_PKG" + lxc exec "$base_image_to_rebuild-tmp" -- /bin/bash -c "pip3 install -U $PIP3_PKG" rotate_image "$base_image_to_rebuild-tmp" "$base_image_to_rebuild-before-install" @@ -230,6 +232,7 @@ update_image() { lxc exec "$image_to_update-tmp" -- /bin/bash -c "DEBIAN_FRONTEND=noninteractive SUDO_FORCE_REMOVE=yes apt-get --assume-yes -o Dpkg::Options::=\"--force-confold\" install --assume-yes $YUNOHOST_DEPENDENCIES $YUNOHOST_RECOMMENDS $MOULINETTE_DEPENDENCIES $SSOWAT_DEPENDENCIES $BUILD_DEPENDENCIES" lxc exec "$image_to_update-tmp" -- /bin/bash -c "pip install -U $PIP_PKG" + lxc exec "$image_to_update-tmp" -- /bin/bash -c "pip3 install -U $PIP3_PKG" rotate_image "$image_to_update-tmp" "$image_to_update"