Fix ansible-test egg-info directory detection. (#69403)

(cherry picked from commit 8b63da7b43)

Co-authored-by: Matt Clay <matt@mystile.com>
pull/69409/head
Felix Fontein 5 years ago committed by GitHub
parent 153de5ee49
commit 4744f31023
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

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

Loading…
Cancel
Save