Skip to content

Commit

Permalink
Added linux python 3.7 wheels.
Browse files Browse the repository at this point in the history
Added OSX python 3.6 and 3.7 wheels, all OSX versions on travis-ci.
Updated docstrings for single client.
Updated classifiers.
Updated appveyor cfg.
Updated embedded openssl version.
  • Loading branch information
pkittenis committed Jul 18, 2018
1 parent 2e9668c commit f74c8e7
Show file tree
Hide file tree
Showing 10 changed files with 135 additions and 121 deletions.
13 changes: 6 additions & 7 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ environment:
# See: http://stackoverflow.com/a/13751649/163740
CMD_IN_ENV: "cmd /E:ON /V:ON /C %APPVEYOR_BUILD_FOLDER%\\ci\\appveyor\\run_with_env.cmd"
PYTHONUNBUFFERED: 1
OPENSSL_VER: 1.0.2l
OPENSSL_VER: 1.0.2o
PYPI_USER:
secure: 2m0jy6JD/R9RExIosOT6YA==
PYPI_PASS:
Expand Down Expand Up @@ -81,18 +81,17 @@ install:
- "python --version"
- "python -c \"import struct; print(struct.calcsize('P') * 8)\""

# - "pip install --disable-pip-version-check --user --upgrade pip"
- "python -m pip install -U pip"
- "python -m pip install -U setuptools"

- git submodule update --init --recursive
- appveyor DownloadFile http://zlib.net/zlib1211.zip
- 7z x zlib1211.zip
- appveyor DownloadFile https://indy.fulgan.com/SSL/openssl-%OPENSSL_VER%-%ARCH%-win%PYTHON_ARCH%.zip
- 7z x openssl-%OPENSSL_VER%-%ARCH%-win%PYTHON_ARCH%.zip
- 7z x ci\appveyor\zlib1211.zip
- 7z x ci\appveyor\openssl-%OPENSSL_VER%-win%PYTHON_ARCH%.zip
- cp ssleay32.dll pssh\native\
- cp libeay32.dll pssh\native\
- ps: ls pssh\native
- "%CMD_IN_ENV% pip install -r requirements.txt"
- "%CMD_IN_ENV% pip install -U wheel setuptools twine"
- "%CMD_IN_ENV% pip install -U wheel twine"

build_script:
- "%CMD_IN_ENV% ci\\appveyor\\build_zlib.bat"
Expand Down
154 changes: 58 additions & 96 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
language: python
cache: pip
cache:
- pip
- directories:
- "$HOME/.pyenv"
sudo: required
notifications:
email: false
Expand Down Expand Up @@ -41,54 +44,29 @@ after_success:
jobs:
include:

- stage: build packages
- &osx-wheels
stage: build packages
os: osx
osx_image: xcode6.4
osx_image: xcode8
env:
- PYENV: 3.6.4
before_install:
- brew update
install:
- brew upgrade openssl
- brew outdated openssl || brew upgrade openssl
- brew link --overwrite python@2 || brew install python@2 || brew link --overwrite python@2
- which python2
- python2 -c "from __future__ import print_function; import ssl; from platform import python_version; print(ssl.OPENSSL_VERSION); print(python_version())"
- sudo -H pip2 install twine
- which twine
- 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 pip setuptools
- cp /usr/local/lib/libssh2* .
- pip install --user -r requirements.txt
- pip wheel --no-deps .
script:
- delocate-listdeps --all *.whl
- delocate-wheel -v *.whl
- delocate-listdeps --all *.whl
- ls -l *.whl
- rm -f *.dylib
- pip install --user -v *.whl
- pwd; mkdir temp; cd temp; pwd
- python -c "import pssh.clients"
- cd ..; pwd
after_success:
- if [[ ! -z "$TRAVIS_TAG" ]]; then
twine upload -u $PYPI_U -p $PYPI_P *.whl;
fi
language: generic
python: skip

- stage: build packages
os: osx
osx_image: xcode8.3
before_install:
- brew update
- mkdir -p wheels
install:
- brew upgrade openssl
- sudo ci/install-ssh2.sh
- sudo -H pip2 install -U delocate twine wheel pip setuptools
- cp /usr/local/lib/libssh2* .
- sudo -H pip2 install -U delocate wheel pip setuptools
- ls -lh
- pip2 install --user -r requirements.txt
- pip2 wheel --no-deps .
script:
- pip2 wheel --no-deps .
- delocate-listdeps --all *.whl
- delocate-wheel -v *.whl
- delocate-listdeps --all *.whl
Expand All @@ -98,72 +76,55 @@ jobs:
- pwd; mkdir temp; cd temp; pwd
- python -c "import pssh.clients"
- cd ..; pwd
- mv -f *.whl wheels/
- ./ci/travis/pyenv-wheel.sh
after_success:
- if [[ ! -z "$TRAVIS_TAG" ]]; then
twine upload -u $PYPI_U -p $PYPI_P *.whl;
twine upload --skip-existing -u $PYPI_U -p $PYPI_P wheels/*.whl;
fi
language: generic
python: skip

- stage: build packages
os: osx
- <<: *osx-wheels
osx_image: xcode6.4

- <<: *osx-wheels
osx_image: xcode6.4
env:
- PYENV: 3.7.0
install: skip
script:
- ./ci/travis/pyenv-wheel.sh

- <<: *osx-wheels
osx_image: xcode8.3

- <<: *osx-wheels
osx_image: xcode9.3

- <<: *osx-wheels
osx_image: xcode8
before_install:
- brew update
install:
- brew upgrade openssl
- sudo ci/install-ssh2.sh
- sudo rm -f libssh2.1.dylib
- sudo pip2 install -U delocate twine wheel pip setuptools
- cp /usr/local/lib/libssh2* .
- pip2 install --user -r requirements.txt
- pip2 wheel --no-deps .
env:
- PYENV: 3.7.0
install: skip
script:
- delocate-listdeps --all *.whl
- delocate-wheel -v *.whl
- delocate-listdeps --all *.whl
- ls -l *.whl
- rm -f *.dylib
- pip2 install --user -v *.whl
- pwd; mkdir temp; cd temp; pwd
- python -c "import pssh.clients"
- cd ..; pwd
after_success:
- if [[ ! -z "$TRAVIS_TAG" ]]; then
twine upload -u $PYPI_U -p $PYPI_P *.whl;
fi
language: generic
python: skip
- ./ci/travis/pyenv-wheel.sh

- stage: build packages
os: osx
- <<: *osx-wheels
osx_image: xcode8.3
env:
- PYENV: 3.7.0
install: skip
script:
- ./ci/travis/pyenv-wheel.sh

- <<: *osx-wheels
osx_image: xcode9.3
before_install:
- brew update
install:
- brew upgrade openssl
- sudo ci/install-ssh2.sh
- sudo -H pip2 install -U delocate twine wheel pip setuptools
- cp /usr/local/lib/libssh2* .
- ls -lh
- pip2 install --user -r requirements.txt
- pip2 wheel --no-deps .
env:
- PYENV: 3.7.0
install: skip
script:
- delocate-listdeps --all *.whl
- delocate-wheel -v *.whl
- delocate-listdeps --all *.whl
- ls -l *.whl
- rm -f *.dylib
- pip2 install --user -v *.whl
- pwd; mkdir temp; cd temp; pwd
- python -c "import pssh.clients"
- cd ..; pwd
after_success:
- if [[ ! -z "$TRAVIS_TAG" ]]; then
twine upload -u $PYPI_U -p $PYPI_P *.whl;
fi
language: generic
python: skip
- ./ci/travis/pyenv-wheel.sh

- os: linux
stage: build packages
Expand All @@ -190,6 +151,7 @@ jobs:
- stage: build packages
env:
- WHEELS=1
- OPENSSL=openssl-1.0.2o
os: linux
python: 3.6
before_install: skip
Expand All @@ -200,7 +162,7 @@ jobs:
./ci/travis/build-manylinux.sh;
after_success:
- if [[ ! -z "$TRAVIS_TAG" ]]; then
twine upload -u $PYPI_U -p $PYPI_P wheelhouse/*.whl;
twine upload --skip-existing -u $PYPI_U -p $PYPI_P wheelhouse/*.whl;
fi
deploy:
- provider: pypi
Expand Down
Binary file added ci/appveyor/openssl-1.0.2o-win32.zip
Binary file not shown.
Binary file added ci/appveyor/openssl-1.0.2o-win64.zip
Binary file not shown.
Binary file added ci/appveyor/zlib1211.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion ci/docker/manylinux/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM quay.io/pypa/manylinux1_x86_64

ENV CMAKE cmake-2.8.11.1-5.4.x86_64
ENV OPENSSL openssl-1.0.2l
ENV OPENSSL openssl-1.0.2o
ENV LIBSSH2_VER agent_fwd

RUN yum install zlib-devel -y
Expand Down
5 changes: 2 additions & 3 deletions ci/travis/build-wheels.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#!/bin/bash -xe

# Compile wheels
for PYBIN in `ls -1d /opt/python/*/bin | grep -v cpython | grep -v cp37`; do
"${PYBIN}/pip" install gevent==1.1
for PYBIN in `ls -1d /opt/python/cp*/bin`; do
"${PYBIN}/pip" install -r /io/requirements.txt
"${PYBIN}/pip" wheel --no-deps /io/ -w wheelhouse/
done
Expand All @@ -13,7 +12,7 @@ for whl in wheelhouse/*.whl; do
done

# Install packages and test
for PYBIN in `ls -1d /opt/python/*/bin | grep -v cpython | grep -v cp37`; do
for PYBIN in `ls -1d /opt/python/cp*/bin`; do
"${PYBIN}/pip" install parallel-ssh --no-index -f /io/wheelhouse
(cd "$HOME"; "${PYBIN}/python" -c 'import pssh.native._ssh2')
done
45 changes: 45 additions & 0 deletions ci/travis/pyenv-wheel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/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 install -r requirements.txt
pip wheel --no-deps .
cp /usr/local/lib/libssh2* .
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 "import pssh.clients" && echo "Import successfull"
cd ..; pwd
set +x
deactivate
set -x

mv -f *.whl wheels/
ls -lh wheels/
2 changes: 2 additions & 0 deletions pssh/clients/native/single.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,8 @@ def run_command(self, command, sudo=False, user=None,
:param encoding: Encoding to use for output. Must be valid
`Python codec <https://docs.python.org/2.7/library/codecs.html>`_
:type encoding: str
:rtype: (channel, host, stdout, stderr, stdin) tuple.
"""
# Fast path for no command substitution needed
if not sudo and not user and not shell:
Expand Down
35 changes: 21 additions & 14 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,20 +98,27 @@
),
install_requires=['paramiko', gevent_req, 'ssh2-python>=0.15.0'],
classifiers=[
'License :: OSI Approved :: GNU Lesser General Public License v2 (LGPLv2)',
'Intended Audience :: Developers',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Topic :: Software Development :: Libraries :: Python Modules',
'Operating System :: POSIX :: Linux',
'Operating System :: POSIX :: BSD',
'Operating System :: Microsoft :: Windows',
],
'Development Status :: 5 - Production/Stable',
'License :: OSI Approved :: GNU Lesser General Public License v2 (LGPLv2)',
'Intended Audience :: Developers',
'Operating System :: OS Independent',
'Programming Language :: C',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Topic :: System :: Networking',
'Topic :: Software Development :: Libraries',
'Topic :: Software Development :: Libraries :: Python Modules',
'Operating System :: POSIX :: Linux',
'Operating System :: POSIX :: BSD',
'Operating System :: Microsoft :: Windows',
'Operating System :: MacOS :: MacOS X',
],
ext_modules=extensions,
package_data=package_data,
)

0 comments on commit f74c8e7

Please sign in to comment.