Merge "don't use pip -e install for libraries"
This commit is contained in:
commit
3fe7337971
2
clean.sh
2
clean.sh
@ -40,7 +40,6 @@ source $TOP_DIR/lib/rpc_backend
|
|||||||
|
|
||||||
source $TOP_DIR/lib/tls
|
source $TOP_DIR/lib/tls
|
||||||
|
|
||||||
source $TOP_DIR/lib/oslo
|
|
||||||
source $TOP_DIR/lib/horizon
|
source $TOP_DIR/lib/horizon
|
||||||
source $TOP_DIR/lib/keystone
|
source $TOP_DIR/lib/keystone
|
||||||
source $TOP_DIR/lib/glance
|
source $TOP_DIR/lib/glance
|
||||||
@ -84,7 +83,6 @@ if [[ -d $TOP_DIR/extras.d ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Clean projects
|
# Clean projects
|
||||||
cleanup_oslo
|
|
||||||
cleanup_cinder
|
cleanup_cinder
|
||||||
cleanup_glance
|
cleanup_glance
|
||||||
cleanup_keystone
|
cleanup_keystone
|
||||||
|
@ -1239,6 +1239,19 @@ function pip_install {
|
|||||||
&& $SUDO_PIP rm -rf ${pip_build_tmp}
|
&& $SUDO_PIP rm -rf ${pip_build_tmp}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# this should be used if you want to install globally, all libraries should
|
||||||
|
# use this, especially *oslo* ones
|
||||||
|
function setup_install {
|
||||||
|
local project_dir=$1
|
||||||
|
setup_package_with_req_sync $project_dir
|
||||||
|
}
|
||||||
|
|
||||||
|
# this should be used for projects which run services, like all services
|
||||||
|
function setup_develop {
|
||||||
|
local project_dir=$1
|
||||||
|
setup_package_with_req_sync $project_dir -e
|
||||||
|
}
|
||||||
|
|
||||||
# ``pip install -e`` the package, which processes the dependencies
|
# ``pip install -e`` the package, which processes the dependencies
|
||||||
# using pip before running `setup.py develop`
|
# using pip before running `setup.py develop`
|
||||||
#
|
#
|
||||||
@ -1247,8 +1260,9 @@ function pip_install {
|
|||||||
#
|
#
|
||||||
# Uses globals ``TRACK_DEPENDS``, ``REQUIREMENTS_DIR``, ``UNDO_REQUIREMENTS``
|
# Uses globals ``TRACK_DEPENDS``, ``REQUIREMENTS_DIR``, ``UNDO_REQUIREMENTS``
|
||||||
# setup_develop directory
|
# setup_develop directory
|
||||||
function setup_develop {
|
function setup_package_with_req_sync {
|
||||||
local project_dir=$1
|
local project_dir=$1
|
||||||
|
local flags=$2
|
||||||
|
|
||||||
# Don't update repo if local changes exist
|
# Don't update repo if local changes exist
|
||||||
# Don't use buggy "git diff --quiet"
|
# Don't use buggy "git diff --quiet"
|
||||||
@ -1260,7 +1274,7 @@ function setup_develop {
|
|||||||
$SUDO_CMD python update.py $project_dir)
|
$SUDO_CMD python update.py $project_dir)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
setup_develop_no_requirements_update $project_dir
|
setup_package $project_dir $flags
|
||||||
|
|
||||||
# We've just gone and possibly modified the user's source tree in an
|
# We've just gone and possibly modified the user's source tree in an
|
||||||
# automated way, which is considered bad form if it's a development
|
# automated way, which is considered bad form if it's a development
|
||||||
@ -1281,12 +1295,15 @@ function setup_develop {
|
|||||||
# using pip before running `setup.py develop`
|
# using pip before running `setup.py develop`
|
||||||
# Uses globals ``STACK_USER``
|
# Uses globals ``STACK_USER``
|
||||||
# setup_develop_no_requirements_update directory
|
# setup_develop_no_requirements_update directory
|
||||||
function setup_develop_no_requirements_update {
|
function setup_package {
|
||||||
local project_dir=$1
|
local project_dir=$1
|
||||||
|
local flags=$2
|
||||||
|
|
||||||
pip_install -e $project_dir
|
pip_install $flags $project_dir
|
||||||
# ensure that further actions can do things like setup.py sdist
|
# ensure that further actions can do things like setup.py sdist
|
||||||
|
if [[ "$flags" == "-e" ]]; then
|
||||||
safe_chown -R $STACK_USER $1/*.egg-info
|
safe_chown -R $STACK_USER $1/*.egg-info
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ function install_infra {
|
|||||||
|
|
||||||
# Install pbr
|
# Install pbr
|
||||||
git_clone $PBR_REPO $PBR_DIR $PBR_BRANCH
|
git_clone $PBR_REPO $PBR_DIR $PBR_BRANCH
|
||||||
setup_develop $PBR_DIR
|
setup_install $PBR_DIR
|
||||||
}
|
}
|
||||||
|
|
||||||
# Restore xtrace
|
# Restore xtrace
|
||||||
|
31
lib/oslo
31
lib/oslo
@ -34,44 +34,29 @@ TASKFLOW_DIR=$DEST/taskflow
|
|||||||
|
|
||||||
# install_oslo() - Collect source and prepare
|
# install_oslo() - Collect source and prepare
|
||||||
function install_oslo {
|
function install_oslo {
|
||||||
# TODO(sdague): remove this once we get to Icehouse, this just makes
|
|
||||||
# for a smoother transition of existing users.
|
|
||||||
cleanup_oslo
|
|
||||||
|
|
||||||
git_clone $CLIFF_REPO $CLIFF_DIR $CLIFF_BRANCH
|
git_clone $CLIFF_REPO $CLIFF_DIR $CLIFF_BRANCH
|
||||||
setup_develop $CLIFF_DIR
|
setup_install $CLIFF_DIR
|
||||||
|
|
||||||
git_clone $OSLOCFG_REPO $OSLOCFG_DIR $OSLOCFG_BRANCH
|
git_clone $OSLOCFG_REPO $OSLOCFG_DIR $OSLOCFG_BRANCH
|
||||||
setup_develop $OSLOCFG_DIR
|
setup_install $OSLOCFG_DIR
|
||||||
|
|
||||||
git_clone $OSLOMSG_REPO $OSLOMSG_DIR $OSLOMSG_BRANCH
|
git_clone $OSLOMSG_REPO $OSLOMSG_DIR $OSLOMSG_BRANCH
|
||||||
setup_develop $OSLOMSG_DIR
|
setup_install $OSLOMSG_DIR
|
||||||
|
|
||||||
git_clone $OSLORWRAP_REPO $OSLORWRAP_DIR $OSLORWRAP_BRANCH
|
git_clone $OSLORWRAP_REPO $OSLORWRAP_DIR $OSLORWRAP_BRANCH
|
||||||
setup_develop $OSLORWRAP_DIR
|
setup_install $OSLORWRAP_DIR
|
||||||
|
|
||||||
git_clone $OSLOVMWARE_REPO $OSLOVMWARE_DIR $OSLOVMWARE_BRANCH
|
git_clone $OSLOVMWARE_REPO $OSLOVMWARE_DIR $OSLOVMWARE_BRANCH
|
||||||
setup_develop $OSLOVMWARE_DIR
|
setup_install $OSLOVMWARE_DIR
|
||||||
|
|
||||||
git_clone $PYCADF_REPO $PYCADF_DIR $PYCADF_BRANCH
|
git_clone $PYCADF_REPO $PYCADF_DIR $PYCADF_BRANCH
|
||||||
setup_develop $PYCADF_DIR
|
setup_install $PYCADF_DIR
|
||||||
|
|
||||||
git_clone $STEVEDORE_REPO $STEVEDORE_DIR $STEVEDORE_BRANCH
|
git_clone $STEVEDORE_REPO $STEVEDORE_DIR $STEVEDORE_BRANCH
|
||||||
setup_develop $STEVEDORE_DIR
|
setup_install $STEVEDORE_DIR
|
||||||
|
|
||||||
git_clone $TASKFLOW_REPO $TASKFLOW_DIR $TASKFLOW_BRANCH
|
git_clone $TASKFLOW_REPO $TASKFLOW_DIR $TASKFLOW_BRANCH
|
||||||
setup_develop $TASKFLOW_DIR
|
setup_install $TASKFLOW_DIR
|
||||||
}
|
|
||||||
|
|
||||||
# cleanup_oslo() - purge possibly old versions of oslo
|
|
||||||
function cleanup_oslo {
|
|
||||||
# this means we've got an old oslo installed, lets get rid of it
|
|
||||||
if ! python -c 'import oslo.config' 2>/dev/null; then
|
|
||||||
echo "Found old oslo.config... removing to ensure consistency"
|
|
||||||
local PIP_CMD=$(get_pip_command)
|
|
||||||
pip_install oslo.config
|
|
||||||
sudo $PIP_CMD uninstall -y oslo.config
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Restore xtrace
|
# Restore xtrace
|
||||||
|
@ -40,10 +40,10 @@ function install_stackforge {
|
|||||||
cleanup_stackforge
|
cleanup_stackforge
|
||||||
|
|
||||||
git_clone $WSME_REPO $WSME_DIR $WSME_BRANCH
|
git_clone $WSME_REPO $WSME_DIR $WSME_BRANCH
|
||||||
setup_develop_no_requirements_update $WSME_DIR
|
setup_package $WSME_DIR
|
||||||
|
|
||||||
git_clone $PECAN_REPO $PECAN_DIR $PECAN_BRANCH
|
git_clone $PECAN_REPO $PECAN_DIR $PECAN_BRANCH
|
||||||
setup_develop_no_requirements_update $PECAN_DIR
|
setup_package $PECAN_DIR
|
||||||
}
|
}
|
||||||
|
|
||||||
# cleanup_stackforge() - purge possibly old versions of stackforge libraries
|
# cleanup_stackforge() - purge possibly old versions of stackforge libraries
|
||||||
|
Loading…
Reference in New Issue
Block a user