diskimage-builder/elements/pypi/extra-data.d/00-mount-pypi-mirror
Robert Collins 97bc5d7853 Allow using a pypi mirror to install via pip.
Using a custom pypi mirror can be very convenient, making image builds
substantially faster - because we create multiple virtual
environments we benefit more than single-virtualenv users would.

Change-Id: I997daf1f9477c447e1fb30818aea9e80a49b31a6
2013-08-10 22:07:30 +12:00

10 lines
198 B
Bash
Executable File

#!/bin/bash
set -eu
MIRROR_SOURCE=~/.cache/image-create/pypi/mirror/
MIRROR_TARGET=$TMP_MOUNT_PATH/tmp/pypi
sudo mkdir -p $MIRROR_TARGET
sudo mount --bind $MIRROR_SOURCE $TMP_MOUNT_PATH/tmp/pypi