Merge "Simplify pip install"
This commit is contained in:
commit
ebc7b0ed25
14
stack.sh
14
stack.sh
@ -756,7 +756,19 @@ git_clone $REQUIREMENTS_REPO $REQUIREMENTS_DIR $REQUIREMENTS_BRANCH
|
||||
echo_summary "Installing package prerequisites"
|
||||
source $TOP_DIR/tools/install_prereqs.sh
|
||||
|
||||
# Configure an appropriate Python environment
|
||||
# Configure an appropriate Python environment.
|
||||
#
|
||||
# NOTE(ianw) 2021-08-11 : We install the latest pip here because pip
|
||||
# is very active and changes are not generally reflected in the LTS
|
||||
# distros. This often involves important things like dependency or
|
||||
# conflict resolution, and has often been required because the
|
||||
# complicated constraints etc. used by openstack have tickled bugs in
|
||||
# distro versions of pip. We want to find these problems as they
|
||||
# happen, rather than years later when we try to update our LTS
|
||||
# distro. Whilst it is clear that global installations of upstream
|
||||
# pip are less and less common, with virtualenv's being the general
|
||||
# approach now; there are a lot of devstack plugins that assume a
|
||||
# global install environment.
|
||||
if [[ "$OFFLINE" != "True" ]]; then
|
||||
PYPI_ALTERNATIVE_URL=${PYPI_ALTERNATIVE_URL:-""} $TOP_DIR/tools/install_pip.sh
|
||||
fi
|
||||
|
@ -111,14 +111,6 @@ function configure_pypi_alternative_url {
|
||||
|
||||
}
|
||||
|
||||
# Setuptools 8 implements PEP 440, and 8.0.4 adds a warning triggered any time
|
||||
# pkg_resources inspects the list of installed Python packages if there are
|
||||
# non-compliant version numbers in the egg-info (for example, from distro
|
||||
# system packaged Python libraries). This is off by default after 8.2 but can
|
||||
# be enabled by uncommenting the lines below.
|
||||
#PYTHONWARNINGS=$PYTHONWARNINGS,always::RuntimeWarning:pkg_resources
|
||||
#export PYTHONWARNINGS
|
||||
|
||||
# Show starting versions
|
||||
get_versions
|
||||
|
||||
@ -135,19 +127,9 @@ if is_fedora && [[ ${DISTRO} == f* ]]; then
|
||||
# installed; this *should* remain separate under /usr/local and not break
|
||||
# if python3-pip is later installed.
|
||||
# For general sanity, we just use the packaged pip. It should be
|
||||
# recent enough anyway.
|
||||
install_package python3-pip
|
||||
elif is_fedora || is_suse; then
|
||||
# Python in suse/centos depends on the python-pip package; because
|
||||
# of the split "system-python" uninstalling python3-pip also
|
||||
# uninstalls the user python3 package which is bad and leaves us
|
||||
# without a python to use. Just install over.
|
||||
install_get_pip
|
||||
# recent enough anyway. This is included via rpms/general
|
||||
continue
|
||||
else
|
||||
# Remove packaged pip, and install the latest upstream.
|
||||
if is_package_installed python3-pip ; then
|
||||
uninstall_package python3-pip
|
||||
fi
|
||||
install_get_pip
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user