Skip to content

Consider extracting the driver library to a standalone package #695

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

Open
hchargois opened this issue Feb 24, 2025 · 1 comment
Open

Consider extracting the driver library to a standalone package #695

hchargois opened this issue Feb 24, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@hchargois
Copy link
Contributor

hchargois commented Feb 24, 2025

If one wants to build a custom app for their smartscreen by using the driver library code, it is currently very annoying to do so because:

  1. the driver library is part of the whole project which contains many more dependencies (UI libs, sensor libs...) that are not useful for the driver itself
  2. the project is not properly packaged and published to PyPI like a normal Python package

I think you should consider extracting the driver library to its own repository, add the proper packaging info, and publish it to PyPI. Actually, maybe a dedicated repo is not required and some custom build/packaging could do the trick to extract just the driver with just its required deps and make a package out of that.

FYI, I did an extract of the driver myself here: hchargois/smartscreen-driver and published it to PyPI. I also fixed all the PEP8 naming violations and simplified the code by removing all the widgets which don't really belong in the driver IMO. The driver in my repo only exposes a paint() (aka DisplayPILImage) to push bitmaps to the screen. I made that repo for my own use out of necessity, I'm not very much interested in maintaining it.

@hchargois hchargois added the enhancement New feature or request label Feb 24, 2025
@mathoudebine
Copy link
Owner

Indeed this would be better as a real standalone library in pip. I thought about it a while ago but it seemed most people use the System Monitor so I didn't find it a priority at that time.

I will have a look at your implementation and the docs to see if it is possible without another repository to maintain

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants