nickstenning / honcho

Honcho: a python clone of Foreman. For managing Procfile-based applications.
http://pypi.python.org/pypi/honcho
MIT License
1.59k stars 145 forks source link

Allow `python -m honcho` to act the same as `honcho` ? #199

Closed hartym closed 5 years ago

hartym commented 6 years ago

All is in the title, a lot of python tools (pip, gunicorn, virualenv, venv, ...) are having the same CLI behaviour whether they're called using the setuptools entrypoint, or called with their package's "main". The benefit of having both interfaces is that one can run the package even if he does not have his path setup correctly for a given virtualenv. I just need to know the python interpreter path, and can use libraries from there

If we run python -m honcho today, it prints: No module named honcho.__main__; 'honcho' is a package and cannot be directly executed

What I propose is that python -m honcho becomes equivalent to honcho, in a given environment.

If you are ok for this, I can handle implementation, which should be trivial (it's basically only creating a __main__.py file in honcho's package root and calling the same thing as does the setuptools entrypoint there).

Let me know.

nickstenning commented 6 years ago

This seems very reasonable to me. If you want to send a PR, please feel free!

hartym commented 6 years ago

Pull request: #202

hartym commented 6 years ago

(py 2.6 /3.3 failing, will have a look asap)