awslogs icon indicating copy to clipboard operation
awslogs copied to clipboard

Allow awslogs to be directly executed with python3 -m

Open tometzky opened this issue 1 year ago • 0 comments

It is not always obvious where awslogs binary will be installed.

For example if installed with python3 -m venv .venv --system-site-packages && .venv/bin/pip3 install awslogs it can be in .venv/bin/ or ~/.local/bin or /usr/local/bin or elsewhere, depending on if and how it was installed before.

It might but won't always be in PATH. It might but won't always be accessible with .venv/bin/awslogs. And using --system-site-packages saves time and bandwidth, if boto3 if already installed (11MiB).

Usually python3 can find the module easily, but it can't run it:

$ .venv/bin/python3 -m awslogs --help
/var/tmp/.venv/bin/python3: No module named awslogs.__main__; 'awslogs' is a package and cannot be directly executed

It would be nice to enable awslogs module to be directly executed with python3 -m awslogs.

tometzky avatar Jul 03 '23 15:07 tometzky