mirror of
https://github.com/ansible/awx.git
synced 2026-05-21 15:57:52 -02:30
simplify awxkit dependencies
- remove flake8 as an install requirements (it's only used for tests) - vendor toposort, which is Apache 2.0 licensed (and very small) - change websocket-client to a setuptools optional dependency, which you can install via: pip install "./awxkit[websockets]" - add `jq` and `tabulate` under an additional optional setuptools dependency: pip install "./awxkit[formatting]" - remove `cryptography`, which is only used for random RSA generation (unused by the CLI)
This commit is contained in:
@@ -7,8 +7,6 @@ import json
|
||||
import ssl
|
||||
import urllib.parse
|
||||
|
||||
import websocket
|
||||
|
||||
from awxkit.config import config
|
||||
|
||||
|
||||
@@ -53,6 +51,9 @@ class WSClient(object):
|
||||
# Subscription group types
|
||||
|
||||
def __init__(self, token=None, hostname='', port=443, secure=True, session_id=None, csrftoken=None):
|
||||
# delay this import, because this is an optional dependency
|
||||
import websocket
|
||||
|
||||
if not hostname:
|
||||
result = urllib.parse.urlparse(config.base_url)
|
||||
secure = result.scheme == 'https'
|
||||
|
||||
Reference in New Issue
Block a user