/usr/share/tripleo-image-elements/openstack-clients/bin/install-openstack-client is in python-tripleo-image-elements 0.7.1-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | #!/bin/bash
set -eux
client=$1
repo=python-${client}client
client_manifest=$(get-pip-manifest ${repo})
venv_base=/opt/stack/venvs
# We would like to use --system-site-packages here but if requirements.txt
# contains libraries that are installed globally with versions that don't
# satisfy our requirements.txt, we end up using the incorrect global library.
# Because the global site-packages appears first in sys.path
# TODO : Add this back in when we are using virtualenv >= 1.11
virtualenv $venv_base/$repo
set +u
source $venv_base/$repo/bin/activate
set -u
pushd /opt/stack/$repo
if [ -n "$client_manifest" ]; then
use-pip-manifest $client_manifest
else
# Need setuptools>=1.0 to manage connections when
# downloading from pypi using http_proxy and https_proxy
pip install -U 'setuptools>=1.0'
# bug #1293812 : Avoid easy_install triggering on pbr.
pip install -U 'pbr>=0.5.21,<1.0'
if [ -e requirements.txt ]; then
pip install -r requirements.txt
elif [ -e tools/pip-requires ]; then
pip install -r tools/pip-requires
fi
fi
# Always replay this, as we cannot use the entry this would generate in the manifest
python setup.py develop
# Write the manifest of what was installed
write-pip-manifest $repo
ln -s $venv_base/$repo/bin/$client /usr/local/bin/$client
popd
set +u
deactivate
set -u
|