Install things in setup_develop with pip -e
We have some complex logic in here to try to do the right things with the requirements before doing the install of the package which still winds up being wrong in some cases. Since having written this code, we've learned that the logic we're trying to achieve is actually what pip install -e does. So just use that. We have to follow up with a chown of the resulting egg-info directory, because the sudo command will cause it to be written by root, which prevents subsequent commands from operating without privilege in the directory. Change-Id: Iffd068c94ef84475ebb30758bcf612075d225bea
This commit is contained in:
parent
74af8ed00f
commit
408a4a7d1c
26
functions
26
functions
@ -1126,9 +1126,9 @@ function service_check() {
|
||||
}
|
||||
|
||||
|
||||
# ``pip install`` the dependencies of the package before ``setup.py develop``
|
||||
# so pip and not distutils processes the dependency chain
|
||||
# Uses globals ``TRACK_DEPENDES``, ``*_proxy`
|
||||
# ``pip install -e`` the package, which processes the dependencies
|
||||
# using pip before running `setup.py develop`
|
||||
# Uses globals ``STACK_USER``, ``TRACK_DEPENDES``, ``*_proxy`
|
||||
# setup_develop directory
|
||||
function setup_develop() {
|
||||
if [[ $TRACK_DEPENDS = True ]]; then
|
||||
@ -1136,19 +1136,13 @@ function setup_develop() {
|
||||
else
|
||||
SUDO_CMD="sudo"
|
||||
fi
|
||||
for reqs_file in $1/requirements.txt $1/tools/pip-requires ; do
|
||||
if [ -f $reqs_file ] ; then
|
||||
pip_install -r $reqs_file
|
||||
fi
|
||||
done
|
||||
(cd $1; \
|
||||
python setup.py egg_info; \
|
||||
$SUDO_CMD \
|
||||
HTTP_PROXY=$http_proxy \
|
||||
HTTPS_PROXY=$https_proxy \
|
||||
NO_PROXY=$no_proxy \
|
||||
python setup.py develop \
|
||||
)
|
||||
$SUDO_CMD \
|
||||
HTTP_PROXY=$http_proxy \
|
||||
HTTPS_PROXY=$https_proxy \
|
||||
NO_PROXY=$no_proxy \
|
||||
pip install -e $1
|
||||
# ensure that further actions can do things like setup.py sdist
|
||||
$SUDO_CMD chown -R $STACK_USER $1/*.egg-info
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user