From e46f22db7fcb6e9aae5922d650eda14a15231fb8 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Sun, 3 Dec 2017 10:21:26 -0600 Subject: [PATCH] Add workaround for openstacksdk in check_libs_from_git python-openstacksdk does not match its pip name which is openstacksdk. So setting python-openstacksdk in LIBS_FROM_GIT leads to devstack thinking there is a problem. Put in a workaround for now. It would be better to either: a) rename python-openstacksdk repo to openstacksdk b) rename the pip name for openstacksdk back to python-openstacksdk c) add general support in the various GIT hashes for a pip name Change-Id: I57cf95763d54ad2060a4ce2af91c3ba18ca04db0 --- inc/python | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/inc/python b/inc/python index 9938f98545..2e4eff02ea 100644 --- a/inc/python +++ b/inc/python @@ -407,6 +407,12 @@ function use_library_from_git { function lib_installed_from_git { local name=$1 local safe_name + # TODO(mordred) This is a special case for python-openstacksdk, where the + # repo name and the pip name do not match. We should either add systemic + # support for providing aliases, or we should rename the git repo. + if [[ $name == 'python-openstacksdk' ]] ; then + name=openstacksdk + fi safe_name=$(python -c "from pkg_resources import safe_name; \ print(safe_name('${name}'))") # Note "pip freeze" doesn't always work here, because it tries to