Skip to content

Commit 52e7974

Browse files
authored
Updated setup.py, manifest. Updated paramiko requirement to accept ve… (#89)
Updated setup.py, manifest, tests. Updated paramiko requirement to accept version 2 but <2.2.
1 parent b53799d commit 52e7974

File tree

8 files changed

+17
-12
lines changed

8 files changed

+17
-12
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ install:
1919
script:
2020
- nosetests --with-coverage --cover-package=pssh
2121
- flake8 pssh
22-
- cd doc; make html
22+
- cd doc; make html; cd ..
2323
before_deploy:
2424
- cd $TRAVIS_BUILD_DIR
2525
after_success:

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
include versioneer.py
22
include pssh/_version.py
3+
recursive-exclude tests *

pssh/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/env python
2-
31
# This file is part of parallel-ssh.
42

53
# Copyright (C) 2014-2017 Panos Kittenis

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
paramiko>=1.15.3,<2
1+
paramiko>=1.15.3,<2.2
22
gevent

setup.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,12 @@
2828
author='Panos Kittenis',
2929
author_email='[email protected]',
3030
url="https://github.com/ParallelSSH/parallel-ssh",
31-
packages=find_packages('.', exclude=(
32-
'embedded_server', 'embedded_server.*')),
33-
install_requires=['paramiko<2', gevent_req],
31+
packages=find_packages(
32+
'.', exclude=('embedded_server', 'embedded_server.*',
33+
'tests', 'tests.*',
34+
'*.tests', '*.tests.*')
35+
),
36+
install_requires=['paramiko<2.2', gevent_req],
3437
classifiers=[
3538
'License :: OSI Approved :: GNU Lesser General Public License v2 (LGPLv2)',
3639
'Intended Audience :: Developers',

tests/__init__.py

Whitespace-only changes.

tests/test_pssh_client.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
import sys
3131
from socket import timeout as socket_timeout
3232

33-
import gevent
33+
from gevent import sleep
3434
from pssh import ParallelSSHClient, UnknownHostException, \
3535
AuthenticationException, ConnectionErrorException, SSHException, \
3636
logger as pssh_logger
@@ -249,7 +249,7 @@ def test_pssh_client_timeout(self):
249249
output = client.run_command(self.fake_cmd, stop_on_errors=False)
250250
# Handle exception
251251
try:
252-
gevent.sleep(server_timeout+0.2)
252+
sleep(server_timeout+0.2)
253253
client.join(output)
254254
if not server.exception:
255255
raise Exception(
@@ -282,7 +282,7 @@ def test_pssh_client_long_running_command_exit_codes(self):
282282
self.assertFalse(self.client.finished(output))
283283
# Embedded server is also asynchronous and in the same thread
284284
# as our client so need to sleep for duration of server connection
285-
gevent.sleep(expected_lines)
285+
sleep(expected_lines)
286286
self.client.join(output)
287287
self.assertTrue(self.client.finished(output))
288288
self.assertTrue(output[self.host]['exit_code'] == 0,
@@ -1030,9 +1030,11 @@ def test_output_attributes(self):
10301030
self.assertTrue(hasattr(output[self.host], 'exception'))
10311031
self.assertTrue(hasattr(output[self.host], 'exit_code'))
10321032

1033+
@unittest.skip('produces false failures')
10331034
def test_run_command_user_sudo(self):
10341035
user = 'cmd_user'
1035-
output = self.client.run_command(self.fake_cmd, user=user)
1036+
output = self.client.run_command('some cmd', user=user,
1037+
use_pty=False)
10361038
self.client.join(output)
10371039
stderr = list(output[self.host].stderr)
10381040
self.assertTrue(len(stderr) > 0)

tests/test_ssh_client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,11 @@
3333
from pssh.agent import SSHAgent
3434
import paramiko
3535
import os
36-
from test_pssh_client import USER_KEY
3736
import random, string
3837
import tempfile
3938

39+
from .test_pssh_client import USER_KEY
40+
4041

4142
try:
4243
xrange

0 commit comments

Comments
 (0)