Correct generated files

Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
This commit is contained in:
phracek 2021-02-16 14:42:16 +00:00
commit 9c6def25bf
16 changed files with 757 additions and 319 deletions

View file

@ -27,10 +27,10 @@ function install_tool() {
# have your own PyPI mirror, it will take it from there. If this try fails, try it
# again with --isolated which ignores external pip settings (env vars, config file)
# and installs the tool from PyPI (needs internet connetion).
$VENV_DIR/bin/pip install -U $1$2 # Combines package name with [extras] or version specifier if is defined as $2```
if [ $? -ne 0 ]; then
# $1$2 combines package name with [extras] or version specifier if is defined as $2```
if ! $VENV_DIR/bin/pip install -U $1$2; then
echo "WARNING: Installation of $1 failed, trying again from official PyPI with pip --isolated install"
$VENV_DIR/bin/pip install -U $1$2 # Combines package name with [extras] or version specifier if is defined as $2```
$VENV_DIR/bin/pip install --isolated -U $1$2 # Combines package name with [extras] or version specifier if is defined as $2```
fi
mkdir -p $HOME/.local/bin
ln -s $VENV_DIR/bin/$1 $HOME/.local/bin/$1
@ -58,11 +58,17 @@ fix-permissions /opt/app-root -P
# * pip < 19.3 does not support manylinux2014 wheels. Only manylinux2014 wheels
# support platforms like ppc64le, aarch64 or armv7
echo "---> Upgrading pip to version 19.3.1 ..."
pip install -U "pip==19.3.1"
if ! pip install -U "pip==19.3.1"; then
echo "WARNING: Installation of 'pip==19.3.1' failed, trying again from official PyPI with pip --isolated install"
pip install --isolated -U "pip==19.3.1"
fi
if [[ ! -z "$UPGRADE_PIP_TO_LATEST" ]]; then
echo "---> Upgrading pip to latest version ..."
pip install -U pip setuptools wheel
if ! pip install -U pip setuptools wheel; then
echo "WARNING: Installation of the latest pip,setuptools and wheel failed, trying again from official PyPI with pip --isolated install"
pip install --isolated -U pip setuptools wheel
fi
fi
if [[ ! -z "$ENABLE_PIPENV" ]]; then

View file

@ -6,13 +6,13 @@ NAMESPACE=centos
cat <<EOF
This is a S2I python-3.7 ${DISTRO} base image:
To use it, install S2I: https://github.com/openshift/source-to-image
Sample invocation:
s2i build https://github.com/sclorg/s2i-python-container.git --context-dir=3.7/test/setup-test-app/ ${NAMESPACE}/python-37-${DISTRO}7 python-sample-app
There are multiple ways how to run the image, see documentation at:
https://github.com/sclorg/s2i-python-container/blob/master/3.7/README.md
To use it in Openshift, run:
oc new-app python:3.7~https://github.com/sclorg/s2i-python-container.git --context-dir=3.7/test/setup-test-app/
You can then run the resulting image via:
podman run -p 8080:8080 python-sample-app
oc get pods
oc exec <pod> -- curl 127.0.0.1:8080
EOF