
It may be required to install library from source code that is present in upper-constraints.txt. Just clone your libraries before building images into loci/data directory and trigger build with KEEP_ALL_WHEELS=True Change-Id: Ia7d17285d11c3a10a42eb3d572a19e45f8511bbf
38 lines
1.1 KiB
Bash
Executable File
38 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
set -ex
|
|
|
|
case ${distro} in
|
|
ubuntu)
|
|
apt-get purge -y --auto-remove \
|
|
git \
|
|
patch \
|
|
python3-virtualenv \
|
|
virtualenv
|
|
rm -rf /var/lib/apt/lists/*
|
|
;;
|
|
centos)
|
|
# We should be removing 'patch' here, but that breaks
|
|
# centos as it tries to rip out systemd for some reason
|
|
yum -y autoremove \
|
|
git \
|
|
python-virtualenv \
|
|
python3-virtualenv
|
|
yum clean all
|
|
;;
|
|
*)
|
|
echo "Unknown distro: ${distro}"
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
# Changing this option allows python to use libraries outside of the
|
|
# virtualenv > 20 if they do not exist inside the venv. This is a requirement
|
|
# for using python-rbd which is not pip installable and is only available
|
|
# in packaged form.
|
|
sed -i 's/\(include-system-site-packages\).*/\1 = true/g' /var/lib/openstack/pyvenv.cfg
|
|
rm -rf /tmp/* /root/.cache /etc/machine-id
|
|
find /usr/ /var/ \( -name "*.pyc" -o -name "__pycache__" \) -delete
|
|
# Remove sources added to image
|
|
rm -rf /opt/loci/data/*
|