Skip to content

Commit 69b3c0c

Browse files
authored
Libssh2 upgrade (#101)
Updated embedded libbsh2 version to 1.9.0 Re-generated C files with latest cython Updated appveyor and travis cfgs Updated docker wheel build for new libssh2 version Updated gitignore Updated changelog, travis cfg, readme Removed windows python 3.5 and 32 bit builds
1 parent e5fdd3e commit 69b3c0c

Some content is hidden

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

95 files changed

+7609
-3621
lines changed

.appveyor.yml

Lines changed: 6 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -12,57 +12,22 @@ environment:
1212
PYPI_PASS:
1313
secure: x+dF0A8BZUf2IrPNRN1O0w==
1414
matrix:
15-
- PYTHON: "C:\\Python27"
16-
PYTHON_VERSION: "2.7"
17-
PYTHON_ARCH: "32"
18-
MSVC: "Visual Studio 9"
19-
ARCH: i386
20-
SYSTEM_LIBSSH2: 1
21-
22-
- PYTHON: "C:\\Python27-x64"
23-
PYTHON_VERSION: "2.7"
24-
PYTHON_ARCH: "64"
25-
MSVC: "Visual Studio 9"
26-
ARCH: x64_86
27-
SYSTEM_LIBSSH2: 1
28-
29-
- PYTHON: "C:\\Python35"
30-
PYTHON_VERSION: "3.5"
31-
PYTHON_ARCH: "32"
32-
MSVC: "Visual Studio 14"
33-
ARCH: i386
34-
SYSTEM_LIBSSH2: 1
35-
36-
- PYTHON: "C:\\Python35-x64"
37-
PYTHON_VERSION: "3.5"
38-
PYTHON_ARCH: "64"
39-
MSVC: "Visual Studio 14 Win64"
40-
ARCH: x64_86
41-
SYSTEM_LIBSSH2: 1
42-
43-
- PYTHON: "C:\\Python36"
44-
PYTHON_VERSION: "3.6"
45-
PYTHON_ARCH: "32"
46-
MSVC: "Visual Studio 14"
47-
ARCH: i386
48-
SYSTEM_LIBSSH2: 1
49-
5015
- PYTHON: "C:\\Python36-x64"
5116
PYTHON_VERSION: "3.6"
5217
PYTHON_ARCH: "64"
5318
MSVC: "Visual Studio 14 Win64"
5419
ARCH: x64_86
5520
SYSTEM_LIBSSH2: 1
5621

57-
- PYTHON: "C:\\Python37"
22+
- PYTHON: "C:\\Python37-x64"
5823
PYTHON_VERSION: "3.7"
59-
PYTHON_ARCH: "32"
60-
MSVC: "Visual Studio 14"
61-
ARCH: i386
24+
PYTHON_ARCH: "64"
25+
MSVC: "Visual Studio 14 Win64"
26+
ARCH: x64_86
6227
SYSTEM_LIBSSH2: 1
6328

64-
- PYTHON: "C:\\Python37-x64"
65-
PYTHON_VERSION: "3.7"
29+
- PYTHON: "C:\\Python38-x64"
30+
PYTHON_VERSION: "3.8"
6631
PYTHON_ARCH: "64"
6732
MSVC: "Visual Studio 14 Win64"
6833
ARCH: x64_86

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,7 @@ dist
44
build
55
*~
66
*.so
7+
src
8+
wheelhouse
79
.idea/
810
ssh2/libssh2.so*

.travis.yml

Lines changed: 21 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ services:
1212
- docker
1313
python:
1414
- 2.7
15-
- 3.5
1615
- 3.6
1716
- 3.7
17+
- 3.8
1818
addons:
1919
apt:
2020
packages:
@@ -45,38 +45,24 @@ jobs:
4545
- &osx-wheels
4646
stage: build packages
4747
os: osx
48-
osx_image: xcode9.2
48+
osx_image: xcode11.6
4949
env:
50+
- PYENV: 3.6.11
5051
- SYSTEM_LIBSSH2: 1
5152
before_cache:
5253
- brew cleanup
5354
before_install:
5455
- brew update
5556
- brew install ccache
5657
- brew outdated openssl || travis_wait brew upgrade openssl || echo "y"
57-
- brew link --overwrite python@2 || brew install python@2 || brew link --overwrite python@2
58-
- which python2
59-
- python2 -c "from __future__ import print_function; import ssl; from platform import python_version; print(ssl.OPENSSL_VERSION); print(python_version())"
60-
- sudo -H pip2 install twine
58+
- sudo -H pip install twine
6159
- which twine
6260
- sudo ci/install-ssh2.sh
6361
- cp /usr/local/lib/libssh2* .
6462
- mkdir -p wheels
65-
install:
66-
- sudo -H pip2 install -U delocate wheel pip setuptools
67-
- ls -lh
63+
install: skip
6864
script:
69-
- pip2 wheel .
70-
- delocate-listdeps --all *.whl
71-
- delocate-wheel -v *.whl
72-
- delocate-listdeps --all *.whl
73-
- ls -l *.whl
74-
- rm -f *.dylib
75-
- pip2 install --user -v *.whl
76-
- pwd; mkdir temp; cd temp; pwd
77-
- python -c "from ssh2.session import Session; Session()"
78-
- cd ..; pwd
79-
- mv -f *.whl wheels/
65+
- travis_wait ./ci/travis/pyenv-wheel.sh
8066
after_success:
8167
- if [[ ! -z "$TRAVIS_TAG" ]]; then
8268
twine upload --skip-existing -u $PYPI_U -p $PYPI_P wheels/*.whl;
@@ -85,39 +71,45 @@ jobs:
8571
python: skip
8672

8773
- <<: *osx-wheels
88-
osx_image: xcode9.2
74+
osx_image: xcode11.3
75+
env:
76+
- PYENV: 3.6.11
77+
- SYSTEM_LIBSSH2: 1
78+
install: skip
79+
script:
80+
- travis_wait ./ci/travis/pyenv-wheel.sh
8981

9082
- <<: *osx-wheels
91-
osx_image: xcode9.2
83+
osx_image: xcode11.6
9284
env:
93-
- PYENV: 3.6.4
85+
- PYENV: 3.7.8
9486
- SYSTEM_LIBSSH2: 1
9587
install: skip
9688
script:
9789
- travis_wait ./ci/travis/pyenv-wheel.sh
9890

9991
- <<: *osx-wheels
100-
osx_image: xcode9.4
92+
osx_image: xcode11.3
10193
env:
102-
- PYENV: 3.6.4
94+
- PYENV: 3.7.8
10395
- SYSTEM_LIBSSH2: 1
10496
install: skip
10597
script:
10698
- travis_wait ./ci/travis/pyenv-wheel.sh
10799

108100
- <<: *osx-wheels
109-
osx_image: xcode9.2
101+
osx_image: xcode11.3
110102
env:
111-
- PYENV: 3.7.0
103+
- PYENV: 3.8.5
112104
- SYSTEM_LIBSSH2: 1
113105
install: skip
114106
script:
115107
- travis_wait ./ci/travis/pyenv-wheel.sh
116108

117109
- <<: *osx-wheels
118-
osx_image: xcode9.4
110+
osx_image: xcode11.6
119111
env:
120-
- PYENV: 3.7.0
112+
- PYENV: 3.8.5
121113
- SYSTEM_LIBSSH2: 1
122114
install: skip
123115
script:

Changelog.rst

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,27 @@
11
Change Log
22
=============
33

4+
0.19.0
5+
+++++++
6+
7+
Changes
8+
--------
9+
10+
* Updated embedded libssh2 version to ``1.9.0``.
11+
* Rebuilt sources with Cython ``0.29.21``.
12+
* Added support for Python 3.8 and 3.9.
13+
14+
Packaging
15+
----------
16+
17+
* Added Python 3.8 binary wheels for Linux, OSX and Windows.
18+
* Added Python 3.9 binary wheels for Linux.
19+
* Added OSX 10.14 and 10.15 wheels.
20+
* Removed OSX < 10.14 wheels.
21+
* Removed Python 2.7 OSX and Windows wheels.
22+
* Removed Python 3.5 OSX and Windows wheels.
23+
* Removed Windows 32-bit wheels.
24+
425
0.18.0
526
+++++++
627

README.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ Binary wheel packages are provided for Linux, OSX and Windows, all Python versio
3333
3434
pip install ssh2-python
3535
36-
`Conda <https://conda.io/miniconda.html>`_ is another installation option - see `documentation <http://ssh2-python.readthedocs.org/en/latest/>`_ for more detailed instructions.
37-
3836
For from source installation instructions, including building against system provided libssh2, `see documentation <https://ssh2-python.readthedocs.io/en/latest/installation.html#installation-from-source>`_.
3937

4038
For creating native system packages for Centos/RedHat, Ubuntu, Debian and Fedora, see `instructions in the documentation <http://ssh2-python.readthedocs.io/en/latest/installation.html#system-binary-packages>`_.
@@ -57,7 +55,7 @@ The library uses `Cython`_ based native code extensions as wrappers to ``libssh2
5755

5856
Extension features:
5957

60-
* Thread safe - GIL is released as much as possible
58+
* Thread safe - GIL is released as much as possible. Note that libssh2 does not support sharing sessions across threads
6159
* Very low overhead
6260
* Super fast as a consequence of the excellent C library it uses and prodigious use of native code
6361
* Object oriented - memory freed automatically and safely as objects are garbage collected by Python

ci/docker/manylinux/Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@ FROM quay.io/pypa/manylinux1_x86_64
33
ENV CMAKE cmake-2.8.11.1-5.4.x86_64
44
ENV OPENSSL openssl-1.1.1b
55
ENV SYSTEM_LIBSSH2 1
6+
ENV LIBSSH2_VERSION 1.9.0
67

78
RUN yum install zlib-devel -y
89

9-
ADD libssh2.tar.gz libssh2.tar.gz
10+
ADD libssh2-${LIBSSH2_VERSION}.tar.gz libssh2-${LIBSSH2_VERSION}.tar.gz
1011
ADD ${CMAKE}.rpm cmake.rpm
1112
ADD ${OPENSSL}.tar.gz ${OPENSSL}.tar.gz
1213
ADD local-perl-5.10.0-62.ep.x86_64.rpm local-perl.rpm
@@ -26,7 +27,8 @@ RUN cd ${OPENSSL}.tar.gz/${OPENSSL} && \
2627

2728
# Libssh2
2829
RUN mkdir -p build_libssh2 && cd build_libssh2 && \
29-
cmake ../libssh2.tar.gz/libssh2-master -DBUILD_SHARED_LIBS=ON -DENABLE_ZLIB_COMPRESSION=ON \
30+
cmake ../libssh2-${LIBSSH2_VERSION}.tar.gz/libssh2-libssh2-${LIBSSH2_VERSION} \
31+
-DBUILD_SHARED_LIBS=ON -DENABLE_ZLIB_COMPRESSION=ON \
3032
-DENABLE_CRYPT_NONE=ON -DENABLE_MAC_NONE=ON -DCMAKE_INSTALL_PREFIX=/usr && \
3133
cmake --build . --config Release --target install
3234

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:db257d41754b16518c3bd0c3b8dd08940ccbee5fc44cef7bfb052d930bcbbda3
3+
size 464513

ci/docker/manylinux/libssh2.tar.gz

Lines changed: 0 additions & 3 deletions
This file was deleted.

ci/travis/build-manylinux.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
docker_tag="parallelssh/ssh2-manylinux"
44

55
rm -rf build dist ssh2/libssh2.*
6+
python ci/appveyor/fix_version.py .
67

78
docker pull $docker_tag || echo
89
docker build --cache-from $docker_tag ci/docker/manylinux -t $docker_tag
910
if [[ "$TRAVIS_PULL_REQUEST" == "false" ]]; then docker push $docker_tag; fi
10-
docker run --rm -v `pwd`:/io $docker_tag /io/ci/travis/build-wheels.sh
11+
docker run -e TRAVIS_TAG="$TRAVIS_TAG" --rm -v `pwd`:/io $docker_tag /io/ci/travis/build-wheels.sh
1112
ls wheelhouse/

ci/travis/build-wheels.sh

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#!/bin/bash -xe
22

3+
echo "Travis tag: $TRAVIS_TAG"
4+
35
# Compile wheels
6+
# For testing
7+
# for PYBIN in `ls -1d /opt/python/cp27-cp27m/bin | grep -v cpython`; do
48
for PYBIN in `ls -1d /opt/python/*/bin | grep -v cpython`; do
59
"${PYBIN}/pip" wheel /io/ -w wheelhouse/
610
done
@@ -11,7 +15,9 @@ for whl in wheelhouse/*.whl; do
1115
done
1216

1317
# Install packages and test
14-
for PYBIN in `ls -1d /opt/python/*/bin | grep -v cpython`; do
15-
"${PYBIN}/pip" install ssh2-python --no-index -f /io/wheelhouse
16-
(cd "$HOME"; "${PYBIN}/python" -c 'from ssh2.session import Session; Session()')
17-
done
18+
if [[ ! -z "$TRAVIS_TAG" ]]; then
19+
for PYBIN in `ls -1d /opt/python/*/bin | grep -v cpython`; do
20+
"${PYBIN}/pip" install ssh2-python --no-index -f /io/wheelhouse
21+
(cd "$HOME"; "${PYBIN}/python" -c 'from ssh2.session import Session; Session()')
22+
done
23+
fi

0 commit comments

Comments
 (0)