Remove TRACK_DEPENDS
This was added in 2012 with I89677fd54635e82b10ab674ddeb9ffb3f1a755f0, but I can not see it being used anywhere currently. It's use of virtualenv's has become problematic in a python2 deprecated world, but since it is not used, remove it to avoid further confusion. Change-Id: I65d44d24f449436ca6229928eee2c5a021793055
This commit is contained in:
parent
4143ce6fc9
commit
bcb2c30c31
@ -27,7 +27,6 @@
|
||||
# - ``RECLONE``
|
||||
# - ``REQUIREMENTS_DIR``
|
||||
# - ``STACK_USER``
|
||||
# - ``TRACK_DEPENDS``
|
||||
# - ``http_proxy``, ``https_proxy``, ``no_proxy``
|
||||
#
|
||||
|
||||
@ -44,7 +43,6 @@ declare -A -g GITREPO
|
||||
declare -A -g GITBRANCH
|
||||
declare -A -g GITDIR
|
||||
|
||||
TRACK_DEPENDS=${TRACK_DEPENDS:-False}
|
||||
KILL_PATH="$(which kill)"
|
||||
|
||||
# Save these variables to .stackenv
|
||||
@ -2075,11 +2073,7 @@ function _safe_permission_operation {
|
||||
return 0
|
||||
fi
|
||||
|
||||
if [[ $TRACK_DEPENDS = True ]]; then
|
||||
sudo_cmd="env"
|
||||
else
|
||||
sudo_cmd="sudo"
|
||||
fi
|
||||
sudo_cmd="sudo"
|
||||
|
||||
$xtrace
|
||||
$sudo_cmd $@
|
||||
|
51
inc/python
51
inc/python
@ -175,7 +175,7 @@ function disable_python3_package {
|
||||
|
||||
# Wrapper for ``pip install`` to set cache and proxy environment variables
|
||||
# Uses globals ``OFFLINE``, ``PIP_VIRTUAL_ENV``,
|
||||
# ``PIP_UPGRADE``, ``TRACK_DEPENDS``, ``*_proxy``,
|
||||
# ``PIP_UPGRADE``, ``*_proxy``,
|
||||
# Usage:
|
||||
# pip_install pip_arguments
|
||||
function pip_install {
|
||||
@ -219,37 +219,28 @@ function pip_install {
|
||||
# this works (for now...)
|
||||
local package_dir=${!#%\[*\]}
|
||||
|
||||
if [[ $TRACK_DEPENDS = True && ! "$@" =~ virtualenv ]]; then
|
||||
# TRACK_DEPENDS=True installation creates a circular dependency when
|
||||
# we attempt to install virtualenv into a virtualenv, so we must global
|
||||
# that installation.
|
||||
source $DEST/.venv/bin/activate
|
||||
local cmd_pip=$DEST/.venv/bin/pip
|
||||
if [[ -n ${PIP_VIRTUAL_ENV:=} && -d ${PIP_VIRTUAL_ENV} ]]; then
|
||||
local cmd_pip=$PIP_VIRTUAL_ENV/bin/pip
|
||||
local sudo_pip="env"
|
||||
else
|
||||
if [[ -n ${PIP_VIRTUAL_ENV:=} && -d ${PIP_VIRTUAL_ENV} ]]; then
|
||||
local cmd_pip=$PIP_VIRTUAL_ENV/bin/pip
|
||||
local sudo_pip="env"
|
||||
else
|
||||
local cmd_pip
|
||||
cmd_pip=$(get_pip_command $PYTHON2_VERSION)
|
||||
local sudo_pip="sudo -H"
|
||||
if python3_enabled; then
|
||||
# Special case some services that have experimental
|
||||
# support for python3 in progress, but don't claim support
|
||||
# in their classifier
|
||||
echo "Check python version for : $package_dir"
|
||||
if python3_disabled_for ${package_dir##*/}; then
|
||||
echo "Explicitly using $PYTHON2_VERSION version to install $package_dir based on DISABLED_PYTHON3_PACKAGES"
|
||||
else
|
||||
# For everything that is not explicitly blacklisted with
|
||||
# DISABLED_PYTHON3_PACKAGES, assume it supports python3
|
||||
# and we will let pip sort out the install, regardless of
|
||||
# the package being local or remote.
|
||||
echo "Using $PYTHON3_VERSION version to install $package_dir based on default behavior"
|
||||
sudo_pip="$sudo_pip LC_ALL=en_US.UTF-8"
|
||||
cmd_pip=$(get_pip_command $PYTHON3_VERSION)
|
||||
fi
|
||||
local cmd_pip
|
||||
cmd_pip=$(get_pip_command $PYTHON2_VERSION)
|
||||
local sudo_pip="sudo -H"
|
||||
if python3_enabled; then
|
||||
# Special case some services that have experimental
|
||||
# support for python3 in progress, but don't claim support
|
||||
# in their classifier
|
||||
echo "Check python version for : $package_dir"
|
||||
if python3_disabled_for ${package_dir##*/}; then
|
||||
echo "Explicitly using $PYTHON2_VERSION version to install $package_dir based on DISABLED_PYTHON3_PACKAGES"
|
||||
else
|
||||
# For everything that is not explicitly blacklisted with
|
||||
# DISABLED_PYTHON3_PACKAGES, assume it supports python3
|
||||
# and we will let pip sort out the install, regardless of
|
||||
# the package being local or remote.
|
||||
echo "Using $PYTHON3_VERSION version to install $package_dir based on default behavior"
|
||||
sudo_pip="$sudo_pip LC_ALL=en_US.UTF-8"
|
||||
cmd_pip=$(get_pip_command $PYTHON3_VERSION)
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
24
stack.sh
24
stack.sh
@ -796,19 +796,6 @@ if [[ "$OFFLINE" != "True" ]]; then
|
||||
PYPI_ALTERNATIVE_URL=${PYPI_ALTERNATIVE_URL:-""} $TOP_DIR/tools/install_pip.sh
|
||||
fi
|
||||
|
||||
TRACK_DEPENDS=${TRACK_DEPENDS:-False}
|
||||
|
||||
# Install Python packages into a virtualenv so that we can track them
|
||||
if [[ $TRACK_DEPENDS = True ]]; then
|
||||
echo_summary "Installing Python packages into a virtualenv $DEST/.venv"
|
||||
pip_install -U virtualenv
|
||||
|
||||
rm -rf $DEST/.venv
|
||||
virtualenv --system-site-packages $DEST/.venv
|
||||
source $DEST/.venv/bin/activate
|
||||
$DEST/.venv/bin/pip freeze > $DEST/requires-pre-pip
|
||||
fi
|
||||
|
||||
# Do the ugly hacks for broken packages and distros
|
||||
source $TOP_DIR/tools/fixup_stuff.sh
|
||||
fixup_all
|
||||
@ -997,17 +984,6 @@ fi
|
||||
# osc commands. Alias dies with stack.sh.
|
||||
install_oscwrap
|
||||
|
||||
if [[ $TRACK_DEPENDS = True ]]; then
|
||||
$DEST/.venv/bin/pip freeze > $DEST/requires-post-pip
|
||||
if ! diff -Nru $DEST/requires-pre-pip $DEST/requires-post-pip > $DEST/requires.diff; then
|
||||
echo "Detect some changes for installed packages of pip, in depend tracking mode"
|
||||
cat $DEST/requires.diff
|
||||
fi
|
||||
echo "Ran stack.sh in depend tracking mode, bailing out now"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
# Syslog
|
||||
# ------
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user