feat: Refactor so that app can be packed with poetry build
DO NOT MERGE
#533
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Rather than have fiddly install instructions it would be better to use Python's packaging tools (e.g. poetry) to package this. That Python package can then be put inside of distro specific packages (e.g. a
.ipk
file that can be installed withopkg
on OpenWRT).@XavierChanth @Xlin123 this shouldn't be merged until #445 is resolved, and we should then apply the pattern of changes (rather than specific commits) found here.
- What I did
Refactored into a single script.
The other option would be to create an sshnpdpy package, and then another script (in another package) that would call into it, but that's more complexity and a less good user experience.
- How I did it
Copied the SSHNPDClient class from a separate lib directory into the (renamed) sshnpdpy.py script
Added a [tool.poetry.scripts] section to
pyproject.toml
, which defines the entry point.- How to verify it
@Xlin123 please try this out (on this branch) to get a feel for how things (will) work.
Run
poetry build
, which will createsshnpdpy-0.3.0-py3-none-any.whl
in thedist
directory.That can then be installed with
pip3 install dist/sshnpdpy-0.3.0-py3-none-any.whl
.And then run
sshnpdpy
- Description for the changelog
feat: Refactor so that app can be packed with
poetry build