Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions conan/internal/runner/ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,11 @@ def ssh_info(msg, error=False):
class SSHRunner:

def __init__(self, conan_api, command, host_profile, build_profile, args, raw_args):
from paramiko.config import SSHConfig
from paramiko.client import SSHClient
try:
from paramiko.config import SSHConfig
from paramiko.client import SSHClient
except ImportError:
raise ConanException("Paramiko is required for SSH runner, try installing it with 'pip install paramiko'")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would mention "if Conan is installed in a virtual environment, try to install the paramiko package`
Bear in mind that Conan can be installed in different ways:

  • a binary package from our website (we should make sure those binaries do contain both Docker/paramiko)
  • a local virtual env (either manually or via pipx)
  • a "system" package manager (e.g. homebrew, a linux distro)

For the first case, users can't do much (we should take care of it ourselves) - for the latter case, pip install paramiko may not work or break their system - so I wouldn't make a blanket pip install paramiko recommendation

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont know which requirements is the binary package using.
There exist an extra_requires on our setup.py which allow installing more requirements this way:

$ pip install conan[runners]

I'll change the message

self.conan_api = conan_api
self.command = command
self.host_profile = host_profile
Expand Down
Loading