mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Remove runtime usage of pkg_resources.
This should provide a startup time speed boost at the expense of making it harder to get ansible to use newer versions of packages than are provided by the platform.
This commit is contained in:
10
bin/ansible
10
bin/ansible
@@ -22,15 +22,7 @@ from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
__requires__ = ['ansible']
|
||||
try:
|
||||
import pkg_resources
|
||||
except Exception:
|
||||
# Use pkg_resources to find the correct versions of libraries and set
|
||||
# sys.path appropriately when there are multiversion installs. But we
|
||||
# have code that better expresses the errors in the places where the code
|
||||
# is actually used (the deps are optional for many code paths) so we don't
|
||||
# want to fail here.
|
||||
pass
|
||||
|
||||
|
||||
import os
|
||||
import shutil
|
||||
|
||||
@@ -6,10 +6,6 @@ from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
__requires__ = ['ansible']
|
||||
|
||||
try:
|
||||
import pkg_resources
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
import fcntl
|
||||
import hashlib
|
||||
|
||||
Reference in New Issue
Block a user