From f51be0504b8929457b27f92e3d9a5a0381937dfd Mon Sep 17 00:00:00 2001 From: Elod Illes Date: Wed, 27 Feb 2019 13:21:58 +0100 Subject: [PATCH] Explanatory comment for Editable Git install This patch is a follow up for patch: I3573c067f63a09f22377612f53c80c80252965e4 Comment explains the string matching lines for the pip freeze output. Change-Id: Ifc5b2ae002859c1ca7405c8e1f64380b311e983d --- roles/tox/library/tox_install_sibling_packages.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/roles/tox/library/tox_install_sibling_packages.py b/roles/tox/library/tox_install_sibling_packages.py index 7d894f81a..c8081149f 100644 --- a/roles/tox/library/tox_install_sibling_packages.py +++ b/roles/tox/library/tox_install_sibling_packages.py @@ -106,6 +106,10 @@ def get_installed_packages(tox_python): frozen_pkgs = subprocess.check_output( [tox_python, '-m', 'pip', '-qqq', 'freeze'] ) + # Matches strings of the form: + # 1. '==' + # 2. '# Editable Git install with no remote (==)' + # both results: return [x[x.find('(') + 1:].split('==')[0] for x in frozen_pkgs.split('\n') if '==' in x]