Fix ansible-test egg-info directory detection.

This commit is contained in:
Matt Clay 2020-01-23 11:47:08 -08:00
parent 913037731f
commit 8b63da7b43
2 changed files with 11 additions and 0 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- ansible-test is now able to find its ``egg-info`` directory when it contains the Ansible version number

View file

@ -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):