Plugin submodule and entrypoints
This merge request adds a fix and an addition regarding executables and entrypoints.
The fix: In setup.py I needed to declare the plugins submodule as a package, otherwise if you don't run locklost within the repo directory, I've run into the particular issue (at least on python 2, not sure about python 3):
Traceback (most recent call last):
File "/usr/lib64/python2.7/runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "build/bdist.linux-x86_64/egg/locklost/__main__.py", line 10, in <module>
File "build/bdist.linux-x86_64/egg/locklost/analyze.py", line 8, in <module>
ImportError: No module named plugins
The addition: In setup.py I've added an entrypoint to allow calling the locklost package directly. What this does is allow you to do the usual thing:
python -m locklost [commands]
But in addition, you can also do:
locklost [commands]
Edited by Patrick Godwin