Skip to content
Snippets Groups Projects
Commit 5fb37ae5 authored by Mark Goddard's avatar Mark Goddard
Browse files

Support editable virtualenv installation for development

An editable installation allows changes to be made to the source code
directly, and have those changes applied immediately without having to
reinstall.

    pip install -e /path/to/kolla-ansible

Change-Id: I023d96d25edd9d2fafd4415743e298af72a861a1
parent 2a2a6200
No related branches found
No related tags found
No related merge requests found
......@@ -73,7 +73,12 @@ function find_base_dir {
elif [[ ${dir_name} == "/usr/local/bin" ]]; then
BASEDIR=/usr/local/share/kolla-ansible
elif [[ -n ${VIRTUAL_ENV} ]] && [[ ${dir_name} == "${VIRTUAL_ENV}/bin" ]]; then
BASEDIR="${VIRTUAL_ENV}/share/kolla-ansible"
if test -f ${VIRTUAL_ENV}/lib/python*/site-packages/kolla-ansible.egg-link; then
# Editable install.
BASEDIR="$(head -n1 ${VIRTUAL_ENV}/lib/python*/site-packages/kolla-ansible.egg-link)"
else
BASEDIR="${VIRTUAL_ENV}/share/kolla-ansible"
fi
else
BASEDIR="$(dirname ${dir_name})"
fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment