-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added SFTP, scp tests. Updated channel, session tests. Updated sdist manifest. Added libssh python build script, added to setup.py for embedded build. Updated travis cfg. Added cython static C source files.
- Loading branch information
Showing
48 changed files
with
121,564 additions
and
404 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,4 @@ include ssh/*.pyx | |
include ssh/*.pxd | ||
recursive-include libssh * | ||
include ci/build_ssh.sh | ||
include _setup_libssh.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
from subprocess import check_call | ||
import os | ||
from glob import glob | ||
from shutil import copy2 | ||
from multiprocessing import cpu_count | ||
|
||
|
||
def build_ssh(): | ||
if os.path.exists('/usr/local/opt/openssl'): | ||
os.environ['OPENSSL_ROOT_DIR'] = '/usr/local/opt/openssl' | ||
|
||
if not os.path.exists('src'): | ||
os.mkdir('src') | ||
|
||
os.chdir('src') | ||
check_call('cmake -DCMAKE_BUILD_TYPE=Release ../libssh', | ||
shell=True, env=os.environ) | ||
check_call(['make', '-j%s' % (cpu_count(),)]) | ||
os.chdir('..') | ||
|
||
for src in glob('src/src/libssh.so*'): | ||
copy2(src, 'ssh/') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash -xe | ||
|
||
docker_tag="parallelssh/ssh-manylinux" | ||
|
||
rm -rf build dist | ||
|
||
docker pull $docker_tag || echo | ||
docker build --cache-from $docker_tag ci/docker/manylinux -t $docker_tag | ||
docker push $docker_tag | ||
docker run --rm -v `pwd`:/io $docker_tag /io/ci/travis/build-wheels.sh | ||
ls wheelhouse/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash -xe | ||
|
||
# Compile wheels | ||
for PYBIN in `ls -1d /opt/python/*/bin | grep -v cpython`; do | ||
"${PYBIN}/pip" wheel /io/ -w wheelhouse/ | ||
done | ||
|
||
# Bundle external shared libraries into the wheels | ||
for whl in wheelhouse/*.whl; do | ||
auditwheel repair "$whl" -w /io/wheelhouse/ | ||
done | ||
|
||
# Install packages and test | ||
for PYBIN in `ls -1d /opt/python/*/bin | grep -v cpython`; do | ||
"${PYBIN}/pip" install ssh-python --no-index -f /io/wheelhouse | ||
(cd "$HOME"; "${PYBIN}/python" -c 'from ssh.session import Session; Session()') | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/bin/bash -xe | ||
|
||
brew install pyenv || brew outdated pyenv || brew upgrade pyenv | ||
|
||
export PYENV_VERSION=${PYENV:-3.6.4} | ||
if [[ ! -d "$HOME/.pyenv/versions/$PYENV_VERSION" ]]; then | ||
pyenv install $PYENV_VERSION | ||
fi | ||
pyenv global $PYENV_VERSION | ||
pyenv versions | ||
|
||
set +x | ||
eval "$(pyenv init -)" | ||
set -x | ||
|
||
which python | ||
python -m pip install -U virtualenv | ||
python -m virtualenv -p "$(which python)" venv | ||
|
||
set +x | ||
source venv/bin/activate | ||
set -x | ||
|
||
python -V | ||
python -m pip install -U setuptools pip | ||
pip install -U delocate wheel | ||
pip wheel . | ||
delocate-listdeps --all *.whl | ||
delocate-wheel -v *.whl | ||
delocate-listdeps --all *.whl | ||
|
||
ls -l *.whl | ||
rm -f *.dylib | ||
pip install -v *.whl | ||
pwd; mkdir -p temp; cd temp; pwd | ||
python -c "from ssh.session import Session; Session()" | ||
cd ..; pwd | ||
set +x | ||
deactivate | ||
set -x | ||
|
||
mv -f *.whl wheels/ | ||
ls -lh wheels |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.