diff --git a/roles/tox/library/tox_install_sibling_packages.py b/roles/tox/library/tox_install_sibling_packages.py index 915186c1b..75a82eda7 100644 --- a/roles/tox/library/tox_install_sibling_packages.py +++ b/roles/tox/library/tox_install_sibling_packages.py @@ -115,9 +115,15 @@ def get_installed_packages(tox_python): # 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] + # 3. ' @ ' # PEP440, PEP508, PEP610 + # results + installed_packages = [] + for x in frozen_pkgs.split('\n'): + if '==' in x: + installed_packages.append(x[x.find('(') + 1:].split('==')[0]) + elif '@' in x: + installed_packages.append(x.split('@')[0].rstrip(' \t')) + return installed_packages def write_new_constraints_file(constraints, packages):