Cannot be used as a standalone script when installed via pip
Closed this issue · 4 comments
Hi,
PR #65 has introduced a very convenient way of using the project with python -m autotyping
.
However, it doesn't work when installing the project via pip 🥲 :
$ pip install git+https://github.com/JelleZijlstra/autotyping@master
[...]
$ python -m autotyping --safe foo.py
python: No module named autotyping.__main__; 'autotyping' is a package and cannot be directly executed
The file __main__.py
is indeed missing from the distributed package.
Also, it would be even more awesome if the project was providing a cli entrypoint, so that autotyping
could be used as a command 🥳 .
If you stumble upon this issue and you impatiently want to use this project without libcst.tool
, cloning the repository and installing it with pip install -e .
works.
Would you be interested in contributing a PR? It would be good to add the entrypoint too.
I'd probably cut a release after this is fixed (cc @hauntsaninja in case you were thinking of contributing other changes).
Sure, I can open a PR
I can confirm it works, thanks 🙌 !