summaryrefslogtreecommitdiffstats
path: root/test/lib/ansible_test/_internal/executor.py
diff options
context:
space:
mode:
authorMatt Clay <matt@mystile.com>2020-01-23 20:47:08 +0100
committerMatt Clay <matt@mystile.com>2020-01-23 22:21:15 +0100
commit8b63da7b43ec23a3bb80ad1f54493cd0cc4b4ca6 (patch)
tree5506bedcf2270d054430d5cc16ac71a75360cd80 /test/lib/ansible_test/_internal/executor.py
parentUpdate examples in documentation for env lookup plugin (#62662) (diff)
downloadansible-8b63da7b43ec23a3bb80ad1f54493cd0cc4b4ca6.tar.xz
ansible-8b63da7b43ec23a3bb80ad1f54493cd0cc4b4ca6.zip
Fix ansible-test egg-info directory detection.
Diffstat (limited to 'test/lib/ansible_test/_internal/executor.py')
-rw-r--r--test/lib/ansible_test/_internal/executor.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/lib/ansible_test/_internal/executor.py b/test/lib/ansible_test/_internal/executor.py
index 42d1f917db..caed48d93c 100644
--- a/test/lib/ansible_test/_internal/executor.py
+++ b/test/lib/ansible_test/_internal/executor.py
@@ -292,6 +292,15 @@ def generate_egg_info(args):
if args.explain:
return
+ ansible_version = get_ansible_version()
+
+ # inclusion of the version number in the path is optional
+ # see: https://setuptools.readthedocs.io/en/latest/formats.html#filename-embedded-metadata
+ egg_info_path = ANSIBLE_LIB_ROOT + '-%s.egg-info' % ansible_version
+
+ if os.path.exists(egg_info_path):
+ return
+
egg_info_path = ANSIBLE_LIB_ROOT + '.egg-info'
if os.path.exists(egg_info_path):