Skip to content

Commit 8f7607e

Browse files
author
Pan
committed
Build and use embedded libssh2 for osx.
1 parent 5a494f9 commit 8f7607e

File tree

4 files changed

+19
-17
lines changed

4 files changed

+19
-17
lines changed

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[submodule "libssh2"]
22
path = libssh2
3-
url = https://github.com/libssh2/libssh2.git
3+
url = https://github.com/pkittenis/libssh2.git

.travis.yml

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ python:
1414
addons:
1515
apt:
1616
packages:
17-
- libssh2-1-dev
1817
- openssh-server
1918
- rpm
2019
- dpkg
@@ -35,24 +34,22 @@ jobs:
3534
include:
3635
- stage: OSX wheel build
3736
os: osx
38-
# if: tag IS present
37+
if: tag IS present
3938
before_install:
4039
- brew update
4140
install:
42-
# - brew install libssh2
4341
- brew upgrade openssl
44-
- export PATH="/usr/local/opt/openssl/bin:$PATH"
45-
# - export OPENSSL_ROOT_DIR="/usr/local/opt/openssl"
46-
# - export OPENSSL_INCLUDE_DIR="/usr/local/opt/openssl/include"
4742
- sudo ci/install-ssh2.sh
4843
- sudo -H pip2 install -U delocate twine wheel pip setuptools
44+
- cp /usr/local/lib/libssh2* .
45+
- ls -lh
4946
- pip2 wheel .
5047
script:
5148
- delocate-listdeps --all *.whl
5249
- delocate-wheel -v *.whl
5350
- delocate-listdeps --all *.whl
5451
- ls -l *.whl
55-
- brew uninstall libssh2
52+
- rm -f *.dylib
5653
- pip2 install --user -v *.whl
5754
- pwd; mkdir temp; cd temp; pwd
5855
- python -c "from ssh2.session import Session; Session()"
@@ -66,22 +63,23 @@ jobs:
6663
- stage: OSX wheel build
6764
os: osx
6865
osx_image: xcode8
69-
# if: tag IS present
66+
if: tag IS present
7067
before_install:
7168
- brew update
7269
install:
73-
# - brew install libssh2
7470
- brew upgrade openssl
75-
- export PATH="/usr/local/opt/openssl/bin:$PATH"
7671
- sudo ci/install-ssh2.sh
72+
- sudo rm -f libssh2.1.dylib
7773
- sudo -H pip2 install -U delocate twine wheel pip setuptools
74+
- cp /usr/local/lib/libssh2* .
75+
- ls -lh
7876
- pip2 wheel .
7977
script:
8078
- delocate-listdeps --all *.whl
8179
- delocate-wheel -v *.whl
8280
- delocate-listdeps --all *.whl
8381
- ls -l *.whl
84-
- brew uninstall libssh2
82+
- rm -f *.dylib
8583
- pip2 install --user -v *.whl
8684
- pwd; mkdir temp; cd temp; pwd
8785
- python -c "from ssh2.session import Session; Session()"
@@ -95,26 +93,26 @@ jobs:
9593
- stage: OSX wheel build
9694
os: osx
9795
osx_image: xcode6.4
98-
# if: tag IS present
96+
if: tag IS present
9997
before_install:
10098
- brew update
10199
install:
102-
# - brew install libssh2
103100
- brew upgrade openssl
104-
- export PATH="/usr/local/opt/openssl/bin:$PATH"
105101
- sudo ci/install-ssh2.sh
102+
- ls -lh
106103
- python --version
107104
- wget --no-check-certificate https://bootstrap.pypa.io/get-pip.py
108105
- sudo python get-pip.py
109106
- sudo -H pip install -U pip
110107
- sudo -H pip install -U delocate twine wheel setuptools
108+
- cp /usr/local/lib/libssh2* .
111109
- pip wheel .
112110
script:
113111
- delocate-listdeps --all *.whl
114112
- delocate-wheel -v *.whl
115113
- delocate-listdeps --all *.whl
116114
- ls -l *.whl
117-
- brew uninstall libssh2
115+
- rm -f *.dylib
118116
- pip install --user -v *.whl
119117
- pwd; mkdir temp; cd temp; pwd
120118
- python -c "from ssh2.session import Session; Session()"

Changelog.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Change Log
77
Changes
88
---------
99

10-
* Upgrade embedded ``libssh2`` in binary wheels to latest master branch plus enhancements.
10+
* Upgrade embedded ``libssh2`` in binary wheels to latest version plus enhancements.
1111
* Adds support for ECDSA host and client keys.
1212
* Adds support for SHA-256 host key fingerprints.
1313
* Added SSH agent forwarding implementation.

ci/install-ssh2.sh

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

3+
if [ -d /usr/local/opt/openssl ]; then
4+
export OPENSSL_ROOT_DIR=/usr/local/opt/openssl
5+
fi
6+
37
mkdir -p src && cd src
48
cmake ../libssh2 -DBUILD_SHARED_LIBS=ON -DENABLE_ZLIB_COMPRESSION=ON \
59
-DENABLE_CRYPT_NONE=ON -DENABLE_MAC_NONE=ON -DCRYPTO_BACKEND=OpenSSL

0 commit comments

Comments
 (0)