-
Notifications
You must be signed in to change notification settings - Fork 188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow to run with pipx
#500
Comments
Hi @felipecrs - The issue is that tinytuya is primarily a library, not a command line tool. The
However, since TinyTuya does have a CLI, it seems like there may be a way to trigger it. If someone has some time to explore, it looks like there might be a way based on how setup is configured. I'll flag this. |
Not sure if it's going to help with this any, but a couple months ago I rewrote the CLI to use argparse. I was almost done but then work kept me really busy for a few weeks and I completely forgot where I was with it T_T Anyway, looking at https://pipx.pypa.io/stable/how-pipx-works/#__tabbed_1_3 it seems just a couple lines in setup.py should do it. |
Good idea. I'm slowly converting my other projects over to that. My only hesitation with tinytuya is related to it being a CLI breaking change for some of the options. But it is probably time and we can signal that with a major version update. Having said that, It looks like I was able to get it to work with some updates to setup.py and main.py. I uploaded a pre-release version: pipx install "tinytuya==1.13.3b1" Can you give that a try @felipecrs ? |
I'll need to double-check but I think I got it so none of the options changed. The only possible issue is everything except the debug switch needs to come after the command (allowing them both before and after is a pain to implement).
|
Awesome, it works like a charm! |
I don't know what it takes to make it work better with
pipx
, but it would be super nice if possible.I am no Python expert. Maybe you just need to declare the tinytuya executable/binary in some manifest? Also, not sure about this "normalizer" thing.
The text was updated successfully, but these errors were encountered: