docker-py uses 'import websockets' if not run under python3, when using python2_7 the websockets library does not get installed (doesn't even seem available). So the docker-py lib is not usable. Reproducible: Always Steps to Reproduce: 1.emerge docker-py 2.python -c 'import docker' Actual Results: Traceback (most recent call last): File "<string>", line 1, in <module> File "/usr/lib64/python2.7/site-packages/docker/__init__.py", line 20, in <module> from .client import Client # flake8: noqa File "/usr/lib64/python2.7/site-packages/docker/client.py", line 31, in <module> import websocket ImportError: No module named websocket nyx ~ # Expected Results: no errors installing gevent-websocket does not seem to fix the issue either
My current workaround is installing pip and then doing: pip install websocket-client
(In reply to Brian Coca from comment #1) > My current workaround is installing pip and then doing: > > pip install websocket-client That's installing outside portage. websocket-client is not in portage which kind of explains things in part. Can you not eselect py3 for this package?
No, the app I needed it for is python2 As I mentioned I found a workaround, I submitted the ticket to either remove python2 support from the package or add websocket as a dependency (and yes, add it to portage).
I'm working on adding this to the tree as part of getting fig into the tree. I should be ready to add it this coming Saturday if nothing comes up. I can go ahead and update this issue and appropriate ebuilds when I get that added. Let me know if there are any objections to me taking this issue and feel free to try the ebuild from the app-emulation/fig branch of my overlay.
*websocket-client-0.17.0 (31 Aug 2014) *websocket-client-0.11.0 (31 Aug 2014) 31 Aug 2014; Alex Brandt <alunduil@gentoo.org> +websocket-client-0.11.0.ebuild, +websocket-client-0.17.0.ebuild, +metadata.xml: New ebuild for websocket-client. Ebuild written by me. Partial fix for bug #520912
This bug still requires websocket-client to be added as a dependency on dev-python/docker-py-0.3.2. It is clearly listed as a dependency in it's requirements.txt for the version in the tree: https://github.com/docker/docker-py/blob/0.3.2/requirements.txt It is not currently listed as a dependency of that ebuild. Should I go ahead and add that portion; thus, resolving this issue or are we going to leave the dependency out? As Brian (the reporter) mentioned: "…either remove python2 support from the package [docker-py] or add websocket as a dependency…"
silly me, had a "can't see the forest for the trees' moment 01 Sep 2014; Ian Delaney <idella4@gentoo.org> docker-py-0.3.2.ebuild: add dep to support py2.7, fixes Bug #520912 by B. Coca