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

Make image processing dependencies optional #45

Closed
axlan opened this issue Mar 30, 2021 · 1 comment · Fixed by #46
Closed

Make image processing dependencies optional #45

axlan opened this issue Mar 30, 2021 · 1 comment · Fixed by #46
Assignees
Labels
enhancement New feature or request

Comments

@axlan
Copy link
Contributor

axlan commented Mar 30, 2021

This is a pretty minor feature, but when I was working with this library I just needed the API interface without any of the image processing. This made it a bit overkill to install the numpy, opencv, and pillow dependencies. It would be nice if these were configured as optional dependencies https://setuptools.readthedocs.io/en/latest/userguide/dependency_management.html#optional-dependencies or there was an easy way to leave them out.

The main change other then to setup.py would be to make reolinkapi/mixins/stream.py stub itself out if the dependencies are not installed and return exceptions if invoked. Possibly like:

try:
    import opencv
    # Normal implementation

except ImportError:
    # Stubbed out implementation
@Benehiko
Copy link
Member

Benehiko commented Mar 30, 2021

Hey @axlan

Thanks for using the library :)
Yeah unfortunately OpenCV was the best choice as a library to get RTSP streaming working. It's a headache and I've been wanting to remove the huge dependency for a while now, see #31 and #3

The changes you propose would be welcomed as it would definitely give the freedom to developers to choose what they would like :)

Just open a PR and I'll try get it merged as soon as possible ;)

@Benehiko Benehiko self-assigned this Mar 30, 2021
@Benehiko Benehiko added the enhancement New feature or request label Mar 30, 2021
@Benehiko Benehiko linked a pull request Apr 2, 2021 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants