Skip to content

Commit

Permalink
Build and use embedded libssh2 for osx.
Browse files Browse the repository at this point in the history
  • Loading branch information
pkittenis committed May 9, 2018
1 parent 5a494f9 commit 8f7607e
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "libssh2"]
path = libssh2
url = https://github.com/libssh2/libssh2.git
url = https://github.com/pkittenis/libssh2.git
28 changes: 13 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ python:
addons:
apt:
packages:
- libssh2-1-dev
- openssh-server
- rpm
- dpkg
Expand All @@ -35,24 +34,22 @@ jobs:
include:
- stage: OSX wheel build
os: osx
# if: tag IS present
if: tag IS present
before_install:
- brew update
install:
# - brew install libssh2
- brew upgrade openssl
- export PATH="/usr/local/opt/openssl/bin:$PATH"
# - export OPENSSL_ROOT_DIR="/usr/local/opt/openssl"
# - export OPENSSL_INCLUDE_DIR="/usr/local/opt/openssl/include"
- sudo ci/install-ssh2.sh
- sudo -H pip2 install -U delocate twine wheel pip setuptools
- cp /usr/local/lib/libssh2* .
- ls -lh
- pip2 wheel .
script:
- delocate-listdeps --all *.whl
- delocate-wheel -v *.whl
- delocate-listdeps --all *.whl
- ls -l *.whl
- brew uninstall libssh2
- rm -f *.dylib
- pip2 install --user -v *.whl
- pwd; mkdir temp; cd temp; pwd
- python -c "from ssh2.session import Session; Session()"
Expand All @@ -66,22 +63,23 @@ jobs:
- stage: OSX wheel build
os: osx
osx_image: xcode8
# if: tag IS present
if: tag IS present
before_install:
- brew update
install:
# - brew install libssh2
- brew upgrade openssl
- export PATH="/usr/local/opt/openssl/bin:$PATH"
- sudo ci/install-ssh2.sh
- sudo rm -f libssh2.1.dylib
- sudo -H pip2 install -U delocate twine wheel pip setuptools
- cp /usr/local/lib/libssh2* .
- ls -lh
- pip2 wheel .
script:
- delocate-listdeps --all *.whl
- delocate-wheel -v *.whl
- delocate-listdeps --all *.whl
- ls -l *.whl
- brew uninstall libssh2
- rm -f *.dylib
- pip2 install --user -v *.whl
- pwd; mkdir temp; cd temp; pwd
- python -c "from ssh2.session import Session; Session()"
Expand All @@ -95,26 +93,26 @@ jobs:
- stage: OSX wheel build
os: osx
osx_image: xcode6.4
# if: tag IS present
if: tag IS present
before_install:
- brew update
install:
# - brew install libssh2
- brew upgrade openssl
- export PATH="/usr/local/opt/openssl/bin:$PATH"
- sudo ci/install-ssh2.sh
- ls -lh
- python --version
- wget --no-check-certificate https://bootstrap.pypa.io/get-pip.py
- sudo python get-pip.py
- sudo -H pip install -U pip
- sudo -H pip install -U delocate twine wheel setuptools
- cp /usr/local/lib/libssh2* .
- pip wheel .
script:
- delocate-listdeps --all *.whl
- delocate-wheel -v *.whl
- delocate-listdeps --all *.whl
- ls -l *.whl
- brew uninstall libssh2
- rm -f *.dylib
- pip install --user -v *.whl
- pwd; mkdir temp; cd temp; pwd
- python -c "from ssh2.session import Session; Session()"
Expand Down
2 changes: 1 addition & 1 deletion Changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Change Log
Changes
---------

* Upgrade embedded ``libssh2`` in binary wheels to latest master branch plus enhancements.
* Upgrade embedded ``libssh2`` in binary wheels to latest version plus enhancements.
* Adds support for ECDSA host and client keys.
* Adds support for SHA-256 host key fingerprints.
* Added SSH agent forwarding implementation.
Expand Down
4 changes: 4 additions & 0 deletions ci/install-ssh2.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/bin/bash -xe

if [ -d /usr/local/opt/openssl ]; then
export OPENSSL_ROOT_DIR=/usr/local/opt/openssl
fi

mkdir -p src && cd src
cmake ../libssh2 -DBUILD_SHARED_LIBS=ON -DENABLE_ZLIB_COMPRESSION=ON \
-DENABLE_CRYPT_NONE=ON -DENABLE_MAC_NONE=ON -DCRYPTO_BACKEND=OpenSSL
Expand Down

0 comments on commit 8f7607e

Please sign in to comment.