Skip to content
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

python package for pip install #3

Closed
justyns opened this issue Aug 17, 2016 · 16 comments
Closed

python package for pip install #3

justyns opened this issue Aug 17, 2016 · 16 comments

Comments

@justyns
Copy link

justyns commented Aug 17, 2016

The installation instructions are pretty manual right now; it'd help if the project was set up as a normal pip-installable python package. Even just adding a setup.py should allow people to pip install it using the git url.

Adding a requirements.txt and changing the instructions to pip3 install -r requirements.txt would also be a good improvement over manually installing multiple dependencies.

@acockburn
Copy link
Member

Couldn't agree more - I am relatively new to Python and haven't done any of the above previously but I will add this to the next release. FWIW I am also working on a Docker file.

@MartinHjelmare
Copy link

@acockburn Do you want a PR for the python package structure, or do you want to do it yourself? I have a branch more or less ready.

@acockburn
Copy link
Member

I really appreciate you working on it but I regard this as a learning process and would really like to figure it out myself - perhaps I could ask you for feedback when I have something?

@MartinHjelmare
Copy link

Good call! I'm happy to answer questions as far as I'm able. I've pushed my branch to my fork, so you can take a look if you like when you're ready. I suggest reading some docs or blog first, though.

There is also the cookiecutter project which can setup a full project skeleton for you with optional test modules, travis, tox and pypi scripts.

@acockburn
Copy link
Member

Thanks for the pointers - I can forsee a lot of reading this weekend :)

@justyns
Copy link
Author

justyns commented Aug 19, 2016

I'll second @MartinHjelmare; if you need any help/feedback feel free to let me know too!

@acockburn
Copy link
Member

Thanks, much appreciated!

@jasonmhite
Copy link
Contributor

A note on this one... assuming you build a package such that it installs an executable to the standard system path (e.g. via the scripts argument to setup), that will make it much easier to write initscripts since you can rely on appdaemon being in $PATH.

I can contribute a systemd unit file to go alongside the existing initscript once it's done, it's only about 5 lines. I have one now that I'm using on Debian, but if AppDaemon is going to get packaged up I might as well wait.

@acockburn
Copy link
Member

Makes sense - I would like to have a look at your systemd script.

@acockburn
Copy link
Member

OK, this is done - thanks Martin for your example (which I pretty much used) as well as the additional assistance in answering my questions.

@jasonmhite - as currently constructed, an appdaemon executable is made available in "/usr/local/bin", at least that's where it ends up on Ubuntu, so in the path as requested.

@timdonovanuk
Copy link

Is appdaemon supposed to be easy to install using pip? I've just spent the last 30 minutes running appdaemon, seeing what "ImportError: No module named '' it gives this time, and then running pip to manually install the missing package. No end in sight either. Feel like I'm missing something. http://appdaemon.readthedocs.io/en/latest/INSTALL.html also has a few 404 links (Docker link, HA link).

@acockburn
Copy link
Member

It should be a single command - with possibly a couple of apt-get installs listed in the docs.

@timdonovanuk
Copy link

Ah! My apologies...maybe move that section up a bit...listing dependencies required to get something working right at the bottom of documentation is a little..unusual!

@acockburn
Copy link
Member

I can certainly do that :)

@timdonovanuk
Copy link

Thanks! Confirmed all working happily now :)

@acockburn
Copy link
Member

Great :)

acockburn pushed a commit that referenced this issue Jan 11, 2018
acockburn pushed a commit that referenced this issue Nov 30, 2018
Odianosen25 pushed a commit that referenced this issue Feb 23, 2021
Odianosen25 pushed a commit that referenced this issue Feb 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants