mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 10:00:01 -03:30
* Adjust the awx-manage script to make use of importlib removing the deprecation warning. * Synlink awx-manage in docker-compose No longer need to rebuild docker-compose devel image to load change for `tools/docker-compose/awx-manage` in development environment --------- Co-authored-by: Hao Liu <44379968+TheRealHaoLiu@users.noreply.github.com>
20 lines
484 B
Plaintext
Executable File
20 lines
484 B
Plaintext
Executable File
#!/usr/bin/awx-python
|
|
import sys
|
|
from importlib.metadata import distribution
|
|
|
|
|
|
def load_entry_point(dist, group, name):
|
|
dist_name, _, _ = dist.partition('==')
|
|
matches = (
|
|
entry_point
|
|
for entry_point in distribution(dist_name).entry_points
|
|
if entry_point.group == group and entry_point.name == name
|
|
)
|
|
return next(matches).load()
|
|
|
|
|
|
if __name__ == '__main__':
|
|
sys.exit(
|
|
load_entry_point('awx', 'console_scripts', 'awx-manage')()
|
|
)
|