Files
loci/scripts/setup_pip.sh
Sam Yaple 2e2f31c5ea Add python3 support
Not all projects support python3 yet (swift being the worst offender)
and some only have partial support. Nova doesnt support python3 with xen
yet, but it does for everything else.

With this patch a full python3 deploy of openstack *should* be possible.
For now, at least it all builds.

Change-Id: Id03bbae1063b21e949085a3ef8f8c7534d2db3ff
2017-10-28 09:32:43 -04:00

22 lines
631 B
Bash
Executable File

#!/bin/bash
set -ex
if [[ "${PYTHON3}" == "no" ]]; then
TMP_VIRTUALENV="virtualenv"
else
TMP_VIRTUALENV="python3 -m virtualenv --python=python3"
fi
# NOTE(SamYaple): This little dance allows us to install the latest pip and
# setuptools without get_pip.py or the python-pip package (which is in epel on
# centos)
if (( $(${TMP_VIRTUALENV} --version | cut -d. -f1) >= 14 )); then
SETUPTOOLS="--no-setuptools"
fi
${TMP_VIRTUALENV} --extra-search-dir=/tmp/wheels ${SETUPTOOLS} /tmp/venv
source /tmp/venv/bin/activate
pip install --upgrade virtualenv
hash -r
virtualenv --extra-search-dir=/tmp/wheels /var/lib/openstack