willprice / python-omxplayer-wrapper

:tv: Control OMXPlayer, the Raspberry Pi media player, from Python
http://python-omxplayer-wrapper.readthedocs.io
GNU Lesser General Public License v3.0
253 stars 71 forks source link

player.py requires mock, but it is not included with lib_deps #157

Closed superlou closed 5 years ago

superlou commented 5 years ago

Issue Report

Description

The example in the docs fails if mock isn't installed on the user's system. This is fixed by installing mock. Mock is included with the test dependencies, but not lib_deps. I'd create a PR to simply add it to the installation dependencies, but I'm not sure if the intent is to require mock for all users.

Problem reproduction

sudo pip3 install omxplayer-wrapper
python3
>>> import omxplayer
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.5/dist-packages/omxplayer/__init__.py", line 1, in <module>
    from omxplayer.player import OMXPlayer
  File "/usr/local/lib/python3.5/dist-packages/omxplayer/player.py", line 10, in <module>
    from mock import Mock
ImportError: No module named 'mock'

Environment details

Software Version
python-omxplayer-wrapper 1.11.0
python-dbus (dpkg -s python-dbus) 1.2.0-3
python (python --version) 3.5.2
omxplayer (omxplayer --version) (currently starting up on Linux Mint and moving to RPi once the application's testable features are ready)

willprice commented 5 years ago

Thanks for the report @superlou, You're quite right, this shouldn't be required. I'll remove this import and release a new version :+1:

willprice commented 5 years ago

OK, v0.3.2 is out, should fix this, let me know if not.

superlou commented 5 years ago

That fixed it, thanks!