Skip to content

Commit 7fd05c4

Browse files
author
Dan
committed
Updated readme, setup.py
1 parent d08ce30 commit 7fd05c4

File tree

3 files changed

+161
-4
lines changed

3 files changed

+161
-4
lines changed

README.rst

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,17 @@ Frequently asked questions
6565
Why should I use this module and not, for example, `fabric <https://github.com/fabric/fabric>`_?
6666

6767
:A:
68+
ParallelSSH's design goals and motivation are to provide a *library* for running *asynchronous* SSH commands in parallel with **no** load induced on the system by doing so with the intended usage being completely programmatic and non-interactive - Fabric provides none of these goals.
69+
6870
Fabric is a port of `Capistrano <https://github.com/capistrano/capistrano>`_ from ruby to python. Its design goals are to provide a faithful port of capistrano with its `tasks` and `roles` to python with interactive command line being the intended usage. Its use as a library is non-standard and in `many <https://github.com/fabric/fabric/issues/521>`_ `cases <https://github.com/fabric/fabric/pull/674>`_ `just <https://github.com/fabric/fabric/pull/1215>`_ `plain <https://github.com/fabric/fabric/issues/762>`_ `broken <https://github.com/fabric/fabric/issues/1068>`_.
6971

7072
Furthermore, its parallel commands use a combination of both threads and processes with extremely high CPU usage and system load while running. Fabric currently stands at over 6,000 lines of code, majority of which is untested, particularly if used as a library as opposed to less than 700 lines of code mostly consisting of documentation strings currently in `ParallelSSH` with over 80% code test coverage.
71-
72-
ParallelSSH's design goals and motivation are to provide a *library* for running *asynchronous* SSH commands in parallel with **no** load induced on the system by doing so with the intended usage being completely programmatic and non-interactive - Fabric provides none of these goals.
73+
74+
:Q:
75+
Is Windows supported?
76+
77+
:A:
78+
Yes. Pip versions >= 8.0 are required for binary package installation of `gevent`, a dependency of `ParallelSSH`. Though `ParallelSSH` is pure python code and will run on any platform that has a working Python interpreter, its `gevent` dependency contains native code which either needs a binary package to be provided for the platform or to be built from source. Binary packages for `gevent` are provided for OSX, Linux and Windows platforms as of this time of writing.
7379

7480
:Q:
7581
Are SSH agents used?
@@ -87,7 +93,7 @@ Frequently asked questions
8793
Is tunneling/proxying supported?
8894

8995
:A:
90-
ParallelSSH natively supports tunelling through an intermediate SSH server. Connecting to a remote host is accomplished via an SSH tunnel using the SSH's protocol direct TCP tunneling feature, using local port forwarding. This is done natively in python and tunnel connections are asynchronous like all other connections in the ParallelSSH library. For example, client -> proxy SSH server -> remote SSH destination.
96+
Yes, `ParallelSSH` natively supports tunelling through an intermediate SSH server. Connecting to a remote host is accomplished via an SSH tunnel using the SSH's protocol direct TCP tunneling feature, using local port forwarding. This is done natively in python and tunnel connections are asynchronous like all other connections in the ParallelSSH library. For example, client -> proxy SSH server -> remote SSH destination.
9197

9298
Use the `proxy_host` and `proxy_port` parameters to configure your proxy.
9399

@@ -110,6 +116,7 @@ Frequently asked questions
110116
:A:
111117
There is a public `ParallelSSH Google group <https://groups.google.com/forum/#!forum/parallelssh>`_ setup for this purpose - both posting and viewing are open to the public.
112118

119+
113120
********
114121
SFTP/SCP
115122
********

appveyor.yml

Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
environment:
2+
global:
3+
# SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the
4+
# /E:ON and /V:ON options are not enabled in the batch script intepreter
5+
# See: http://stackoverflow.com/a/13751649/163740
6+
CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\appveyor\\run_with_env.cmd"
7+
8+
matrix:
9+
10+
# Pre-installed Python versions, which Appveyor may upgrade to
11+
# a later point release.
12+
13+
- PYTHON: "C:\\Python34-x64"
14+
PYTHON_VERSION: "3.4.x" # currently 3.4.3
15+
PYTHON_ARCH: "64"
16+
PYTHON_EXE: python
17+
18+
- PYTHON: "C:\\Python27-x64"
19+
PYTHON_VERSION: "2.7.x" # currently 2.7.11
20+
PYTHON_ARCH: "64"
21+
PYTHON_EXE: python
22+
23+
- PYTHON: "C:\\Python35-x64"
24+
PYTHON_VERSION: "3.5.x" # currently 3.5.1
25+
PYTHON_ARCH: "64"
26+
PYTHON_EXE: python
27+
28+
- PYTHON: "C:\\Python33-x64"
29+
PYTHON_VERSION: "3.3.x" # currently 3.3.5
30+
PYTHON_ARCH: "64"
31+
PYTHON_EXE: python
32+
33+
- PYTHON: "C:\\Python35"
34+
PYTHON_VERSION: "3.5.x" # currently 3.5.0
35+
PYTHON_ARCH: "32"
36+
PYTHON_EXE: python
37+
38+
- PYTHON: "C:\\Python27"
39+
PYTHON_VERSION: "2.7.x" # currently 2.7.11
40+
PYTHON_ARCH: "32"
41+
PYTHON_EXE: python
42+
43+
- PYTHON: "C:\\Python33"
44+
PYTHON_VERSION: "3.3.x" # currently 3.3.5
45+
PYTHON_ARCH: "32"
46+
PYTHON_EXE: python
47+
48+
- PYTHON: "C:\\Python34"
49+
PYTHON_VERSION: "3.4.x" # currently 3.4.3
50+
PYTHON_ARCH: "32"
51+
PYTHON_EXE: python
52+
53+
install:
54+
# If there is a newer build queued for the same PR, cancel this one.
55+
# The AppVeyor 'rollout builds' option is supposed to serve the same
56+
# purpose but it is problematic because it tends to cancel builds pushed
57+
# directly to master instead of just PR builds (or the converse).
58+
# credits: JuliaLang developers.
59+
- ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod `
60+
https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | `
61+
Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { `
62+
throw "There are newer queued builds for this pull request, failing early." }
63+
- ECHO "Filesystem root:"
64+
- ps: "ls \"C:/\""
65+
66+
- ECHO "Installed SDKs:"
67+
- ps: "ls \"C:/Program Files/Microsoft SDKs/Windows\""
68+
69+
# Install Python (from the official .msi of http://python.org) and pip when
70+
# not already installed.
71+
# PyPy portion based on https://github.com/wbond/asn1crypto/blob/master/appveyor.yml
72+
- ps:
73+
$env:PYTMP = "${env:TMP}\py";
74+
if (!(Test-Path "$env:PYTMP")) {
75+
New-Item -ItemType directory -Path "$env:PYTMP" | Out-Null;
76+
}
77+
if ("${env:PYTHON_ID}" -eq "pypy") {
78+
if (!(Test-Path "${env:PYTMP}\pypy-4.0.1-win32.zip")) {
79+
(New-Object Net.WebClient).DownloadFile('https://bitbucket.org/pypy/pypy/downloads/pypy-4.0.1-win32.zip', "${env:PYTMP}\pypy-4.0.1-win32.zip");
80+
}
81+
7z x -y "${env:PYTMP}\pypy-4.0.1-win32.zip" -oC:\ | Out-Null;
82+
if (!(Test-Path "${env:PYTMP}\get-pip.py")) {
83+
(New-Object Net.WebClient).DownloadFile('https://bootstrap.pypa.io/get-pip.py', "${env:PYTMP}\get-pip.py");
84+
}
85+
& "${env:PYTHON}\pypy.exe" "${env:PYTMP}\get-pip.py";
86+
87+
}
88+
elseif (-not(Test-Path($env:PYTHON))) {
89+
& appveyor\install.ps1;
90+
}
91+
92+
# Prepend newly installed Python to the PATH of this build (this cannot be
93+
# done from inside the powershell script as it would require to restart
94+
# the parent CMD process).
95+
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PYTHON%\\bin;%PATH%"
96+
- "SET PYEXE=%PYTHON%\\%PYTHON_EXE%.exe"
97+
98+
# Check that we have the expected version and architecture for Python
99+
- "%PYEXE% --version"
100+
- "%PYEXE% -c \"import struct; print(struct.calcsize('P') * 8)\""
101+
102+
# Upgrade to the latest version of pip to avoid it displaying warnings
103+
# about it being out of date.
104+
- "%CMD_IN_ENV% pip install --disable-pip-version-check --user --upgrade pip"
105+
106+
# Install the build dependencies of the project. If some dependencies contain
107+
# compiled extensions and are not provided as pre-built wheel packages,
108+
# pip will build them from source using the MSVC compiler matching the
109+
# target Python version and architecture
110+
# NOTE: psutil won't install under PyPy.
111+
- "%CMD_IN_ENV% pip install -r requirements.txt"
112+
113+
- ps: "if(Test-Path(\"${env:PYTHON}\\bin\")) {ls ${env:PYTHON}\\bin;}"
114+
- ps: "if(Test-Path(\"${env:PYTHON}\\Scripts\")) {ls ${env:PYTHON}\\Scripts;}"
115+
116+
cache:
117+
- "%TMP%\\py\\"
118+
119+
build_script:
120+
# Build the compiled extension
121+
- "%CMD_IN_ENV% %PYEXE% setup.py bdist_wheel bdist_wininst"
122+
- ps: "ls dist"
123+
# Now install the wheel.
124+
# I couldn't get wildcards to work for pip install, so stuff it
125+
# into a variable, using python to glob.
126+
- "%PYEXE% -c \"import glob; print(glob.glob('dist/*whl')[0])\" > whl.txt"
127+
- set /p PYWHL=<whl.txt
128+
- pip install %PYWHL%
129+
130+
test_script:
131+
# Run the project tests
132+
- %PYEXE% setup.py nosetests --with-coverage --cover-package=pssh
133+
- %PYEXE% -c 'import sys; sys.version_info >= (3,) and sys.exit(1)' || eval "2to3 -nw embedded_server/*.py && 2to3 tests/*.py -o tests3 -nw && cp tests/test_client_private_key* tests3/ && python setup.py nosetests -w tests3 --with-coverage --cover-package=pssh"
134+
135+
after_test:
136+
# We already built the wheel during build_script, because it's
137+
# much faster to do that and install from the wheel than to
138+
# rebuild it here (because we wind up re-building all the cython
139+
# code, even though it's already built on disk; our make.cmd is not smart)
140+
#- "%CMD_IN_ENV% %PYEXE% setup.py bdist_wheel bdist_wininst"
141+
- ps: "ls dist"
142+
143+
artifacts:
144+
# Archive the generated wheel package in the ci.appveyor.com build report.
145+
- path: dist\*
146+
147+
#on_success:
148+
# - TODO: upload the content of dist/*.whl to a public wheelhouse
149+
#

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,10 @@
3838
'Programming Language :: Python :: 3',
3939
'Programming Language :: Python :: 3.4',
4040
'Programming Language :: Python :: 3.5',
41-
'Topic :: Utilities',
41+
'Topic :: Software Development :: Libraries :: Python Modules',
4242
'Operating System :: POSIX :: Linux',
4343
'Operating System :: POSIX :: BSD',
44+
'Operating System :: Microsoft :: Windows',
4445
],
4546
**convert_2_to_3
4647
)

0 commit comments

Comments
 (0)