Skip to content

Commit 900c3e2

Browse files
authored
[WIP] - Libssh2 based clients (#86)
* Added ssh2 native library based parallel and single clients, library refactoring for code reuse. * Added openssh based embedded server for testing and test client keys. * Added get_last_output function and cmds attribute to parallel clients and tests. Updated changelog, documentation. * Added contribution guide, code of conduct, issue template.
1 parent 2e82198 commit 900c3e2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+12307
-940
lines changed

.appveyor.yml

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
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_BUILD_FOLDER%\\ci\\appveyor\\run_with_env.cmd"
7+
PYTHONUNBUFFERED: 1
8+
PYPI_USER:
9+
secure: 2m0jy6JD/R9RExIosOT6YA==
10+
PYPI_PASS:
11+
secure: x+dF0A8BZUf2IrPNRN1O0w==
12+
matrix:
13+
- PYTHON: "C:\\Python27"
14+
PYTHON_VERSION: "2.7"
15+
PYTHON_ARCH: "32"
16+
MSVC: "Visual Studio 9"
17+
18+
- PYTHON: "C:\\Python27-x64"
19+
PYTHON_VERSION: "2.7"
20+
PYTHON_ARCH: "64"
21+
MSVC: "Visual Studio 9"
22+
23+
- PYTHON: "C:\\Python34"
24+
PYTHON_VERSION: "3.4"
25+
PYTHON_ARCH: "32"
26+
MSVC: "Visual Studio 10"
27+
28+
- PYTHON: "C:\\Python34-x64"
29+
PYTHON_VERSION: "3.4"
30+
PYTHON_ARCH: "64"
31+
MSVC: "Visual Studio 10 Win64"
32+
33+
- PYTHON: "C:\\Python35"
34+
PYTHON_VERSION: "3.5"
35+
PYTHON_ARCH: "32"
36+
MSVC: "Visual Studio 14"
37+
38+
- PYTHON: "C:\\Python35-x64"
39+
PYTHON_VERSION: "3.5"
40+
PYTHON_ARCH: "64"
41+
MSVC: "Visual Studio 14 Win64"
42+
43+
- PYTHON: "C:\\Python36"
44+
PYTHON_VERSION: "3.6"
45+
PYTHON_ARCH: "32"
46+
MSVC: "Visual Studio 14"
47+
48+
- PYTHON: "C:\\Python36-x64"
49+
PYTHON_VERSION: "3.6"
50+
PYTHON_ARCH: "64"
51+
MSVC: "Visual Studio 14 Win64"
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 "Installed SDKs:"
64+
- ps: "ls \"C:/Program Files/Microsoft SDKs/Windows\""
65+
66+
# Prepend newly installed Python to the PATH of this build (this cannot be
67+
# done from inside the powershell script as it would require to restart
68+
# the parent CMD process).
69+
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
70+
71+
# Check that we have the expected version and architecture for Python
72+
- "python --version"
73+
- "python -c \"import struct; print(struct.calcsize('P') * 8)\""
74+
75+
# Upgrade to the latest version of pip to avoid it displaying warnings
76+
# about it being out of date.
77+
- "pip install --disable-pip-version-check --user --upgrade pip"
78+
79+
- git submodule update --init --recursive
80+
- "%CMD_IN_ENV% ci\\appveyor\\build_ssh2.bat"
81+
# Install the build dependencies of the project. If some dependencies contain
82+
# compiled extensions and are not provided as pre-built wheel packages,
83+
# pip will build them from source using the MSVC compiler matching the
84+
# target Python version and architecture
85+
- "%CMD_IN_ENV% pip install -r requirements.txt"
86+
- "%CMD_IN_ENV% pip install -U wheel setuptools twine"
87+
88+
build_script:
89+
# Build the compiled extension
90+
- "%CMD_IN_ENV% python setup.py build_ext -i"
91+
92+
test_script:
93+
- python -c "import pssh.native.ssh2"
94+
- python -c "import pssh.pssh2_client"
95+
96+
after_test:
97+
# If tests are successful, create binary packages for the project.
98+
- "%CMD_IN_ENV% python setup.py bdist_wheel"
99+
- mv dist/* .
100+
101+
artifacts:
102+
# Archive the generated packages in the ci.appveyor.com build report.
103+
- path: "*.whl"
104+
105+
deploy_script:
106+
- python ci/appveyor/pypi_upload.py *.whl

.codecov.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
ignore:
2+
- "embedded_server/.*"
3+
- "tests/.*"

.coveragerc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@ exclude_lines =
1919
raise NotImplementedError
2020
if __name__ == .__main__.:
2121
logger.debug
22+
continue

0 commit comments

Comments
 (0)