Skip to content

Commit f74c8e7

Browse files
author
Pan
committed
Added linux python 3.7 wheels.
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.
1 parent 2e9668c commit f74c8e7

File tree

10 files changed

+135
-121
lines changed

10 files changed

+135
-121
lines changed

.appveyor.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ environment:
55
# See: http://stackoverflow.com/a/13751649/163740
66
CMD_IN_ENV: "cmd /E:ON /V:ON /C %APPVEYOR_BUILD_FOLDER%\\ci\\appveyor\\run_with_env.cmd"
77
PYTHONUNBUFFERED: 1
8-
OPENSSL_VER: 1.0.2l
8+
OPENSSL_VER: 1.0.2o
99
PYPI_USER:
1010
secure: 2m0jy6JD/R9RExIosOT6YA==
1111
PYPI_PASS:
@@ -81,18 +81,17 @@ install:
8181
- "python --version"
8282
- "python -c \"import struct; print(struct.calcsize('P') * 8)\""
8383

84-
# - "pip install --disable-pip-version-check --user --upgrade pip"
84+
- "python -m pip install -U pip"
85+
- "python -m pip install -U setuptools"
8586

8687
- git submodule update --init --recursive
87-
- appveyor DownloadFile http://zlib.net/zlib1211.zip
88-
- 7z x zlib1211.zip
89-
- appveyor DownloadFile https://indy.fulgan.com/SSL/openssl-%OPENSSL_VER%-%ARCH%-win%PYTHON_ARCH%.zip
90-
- 7z x openssl-%OPENSSL_VER%-%ARCH%-win%PYTHON_ARCH%.zip
88+
- 7z x ci\appveyor\zlib1211.zip
89+
- 7z x ci\appveyor\openssl-%OPENSSL_VER%-win%PYTHON_ARCH%.zip
9190
- cp ssleay32.dll pssh\native\
9291
- cp libeay32.dll pssh\native\
9392
- ps: ls pssh\native
9493
- "%CMD_IN_ENV% pip install -r requirements.txt"
95-
- "%CMD_IN_ENV% pip install -U wheel setuptools twine"
94+
- "%CMD_IN_ENV% pip install -U wheel twine"
9695

9796
build_script:
9897
- "%CMD_IN_ENV% ci\\appveyor\\build_zlib.bat"

.travis.yml

Lines changed: 58 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
language: python
2-
cache: pip
2+
cache:
3+
- pip
4+
- directories:
5+
- "$HOME/.pyenv"
36
sudo: required
47
notifications:
58
email: false
@@ -41,54 +44,29 @@ after_success:
4144
jobs:
4245
include:
4346

44-
- stage: build packages
47+
- &osx-wheels
48+
stage: build packages
4549
os: osx
46-
osx_image: xcode6.4
50+
osx_image: xcode8
51+
env:
52+
- PYENV: 3.6.4
4753
before_install:
4854
- brew update
49-
install:
50-
- brew upgrade openssl
55+
- brew outdated openssl || brew upgrade openssl
56+
- brew link --overwrite python@2 || brew install python@2 || brew link --overwrite python@2
57+
- which python2
58+
- python2 -c "from __future__ import print_function; import ssl; from platform import python_version; print(ssl.OPENSSL_VERSION); print(python_version())"
59+
- sudo -H pip2 install twine
60+
- which twine
5161
- sudo ci/install-ssh2.sh
52-
- ls -lh
53-
- python --version
54-
- wget --no-check-certificate https://bootstrap.pypa.io/get-pip.py
55-
- sudo python get-pip.py
56-
- sudo -H pip install -U pip
57-
- sudo -H pip install -U delocate twine wheel pip setuptools
5862
- cp /usr/local/lib/libssh2* .
59-
- pip install --user -r requirements.txt
60-
- pip wheel --no-deps .
61-
script:
62-
- delocate-listdeps --all *.whl
63-
- delocate-wheel -v *.whl
64-
- delocate-listdeps --all *.whl
65-
- ls -l *.whl
66-
- rm -f *.dylib
67-
- pip install --user -v *.whl
68-
- pwd; mkdir temp; cd temp; pwd
69-
- python -c "import pssh.clients"
70-
- cd ..; pwd
71-
after_success:
72-
- if [[ ! -z "$TRAVIS_TAG" ]]; then
73-
twine upload -u $PYPI_U -p $PYPI_P *.whl;
74-
fi
75-
language: generic
76-
python: skip
77-
78-
- stage: build packages
79-
os: osx
80-
osx_image: xcode8.3
81-
before_install:
82-
- brew update
63+
- mkdir -p wheels
8364
install:
84-
- brew upgrade openssl
85-
- sudo ci/install-ssh2.sh
86-
- sudo -H pip2 install -U delocate twine wheel pip setuptools
87-
- cp /usr/local/lib/libssh2* .
65+
- sudo -H pip2 install -U delocate wheel pip setuptools
8866
- ls -lh
8967
- pip2 install --user -r requirements.txt
90-
- pip2 wheel --no-deps .
9168
script:
69+
- pip2 wheel --no-deps .
9270
- delocate-listdeps --all *.whl
9371
- delocate-wheel -v *.whl
9472
- delocate-listdeps --all *.whl
@@ -98,72 +76,55 @@ jobs:
9876
- pwd; mkdir temp; cd temp; pwd
9977
- python -c "import pssh.clients"
10078
- cd ..; pwd
79+
- mv -f *.whl wheels/
80+
- ./ci/travis/pyenv-wheel.sh
10181
after_success:
10282
- if [[ ! -z "$TRAVIS_TAG" ]]; then
103-
twine upload -u $PYPI_U -p $PYPI_P *.whl;
83+
twine upload --skip-existing -u $PYPI_U -p $PYPI_P wheels/*.whl;
10484
fi
10585
language: generic
10686
python: skip
10787

108-
- stage: build packages
109-
os: osx
88+
- <<: *osx-wheels
89+
osx_image: xcode6.4
90+
91+
- <<: *osx-wheels
92+
osx_image: xcode6.4
93+
env:
94+
- PYENV: 3.7.0
95+
install: skip
96+
script:
97+
- ./ci/travis/pyenv-wheel.sh
98+
99+
- <<: *osx-wheels
100+
osx_image: xcode8.3
101+
102+
- <<: *osx-wheels
103+
osx_image: xcode9.3
104+
105+
- <<: *osx-wheels
110106
osx_image: xcode8
111-
before_install:
112-
- brew update
113-
install:
114-
- brew upgrade openssl
115-
- sudo ci/install-ssh2.sh
116-
- sudo rm -f libssh2.1.dylib
117-
- sudo pip2 install -U delocate twine wheel pip setuptools
118-
- cp /usr/local/lib/libssh2* .
119-
- pip2 install --user -r requirements.txt
120-
- pip2 wheel --no-deps .
107+
env:
108+
- PYENV: 3.7.0
109+
install: skip
121110
script:
122-
- delocate-listdeps --all *.whl
123-
- delocate-wheel -v *.whl
124-
- delocate-listdeps --all *.whl
125-
- ls -l *.whl
126-
- rm -f *.dylib
127-
- pip2 install --user -v *.whl
128-
- pwd; mkdir temp; cd temp; pwd
129-
- python -c "import pssh.clients"
130-
- cd ..; pwd
131-
after_success:
132-
- if [[ ! -z "$TRAVIS_TAG" ]]; then
133-
twine upload -u $PYPI_U -p $PYPI_P *.whl;
134-
fi
135-
language: generic
136-
python: skip
111+
- ./ci/travis/pyenv-wheel.sh
137112

138-
- stage: build packages
139-
os: osx
113+
- <<: *osx-wheels
114+
osx_image: xcode8.3
115+
env:
116+
- PYENV: 3.7.0
117+
install: skip
118+
script:
119+
- ./ci/travis/pyenv-wheel.sh
120+
121+
- <<: *osx-wheels
140122
osx_image: xcode9.3
141-
before_install:
142-
- brew update
143-
install:
144-
- brew upgrade openssl
145-
- sudo ci/install-ssh2.sh
146-
- sudo -H pip2 install -U delocate twine wheel pip setuptools
147-
- cp /usr/local/lib/libssh2* .
148-
- ls -lh
149-
- pip2 install --user -r requirements.txt
150-
- pip2 wheel --no-deps .
123+
env:
124+
- PYENV: 3.7.0
125+
install: skip
151126
script:
152-
- delocate-listdeps --all *.whl
153-
- delocate-wheel -v *.whl
154-
- delocate-listdeps --all *.whl
155-
- ls -l *.whl
156-
- rm -f *.dylib
157-
- pip2 install --user -v *.whl
158-
- pwd; mkdir temp; cd temp; pwd
159-
- python -c "import pssh.clients"
160-
- cd ..; pwd
161-
after_success:
162-
- if [[ ! -z "$TRAVIS_TAG" ]]; then
163-
twine upload -u $PYPI_U -p $PYPI_P *.whl;
164-
fi
165-
language: generic
166-
python: skip
127+
- ./ci/travis/pyenv-wheel.sh
167128

168129
- os: linux
169130
stage: build packages
@@ -190,6 +151,7 @@ jobs:
190151
- stage: build packages
191152
env:
192153
- WHEELS=1
154+
- OPENSSL=openssl-1.0.2o
193155
os: linux
194156
python: 3.6
195157
before_install: skip
@@ -200,7 +162,7 @@ jobs:
200162
./ci/travis/build-manylinux.sh;
201163
after_success:
202164
- if [[ ! -z "$TRAVIS_TAG" ]]; then
203-
twine upload -u $PYPI_U -p $PYPI_P wheelhouse/*.whl;
165+
twine upload --skip-existing -u $PYPI_U -p $PYPI_P wheelhouse/*.whl;
204166
fi
205167
deploy:
206168
- provider: pypi

ci/appveyor/openssl-1.0.2o-win32.zip

1.61 MB
Binary file not shown.

ci/appveyor/openssl-1.0.2o-win64.zip

2.07 MB
Binary file not shown.

ci/appveyor/zlib1211.zip

730 KB
Binary file not shown.

ci/docker/manylinux/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FROM quay.io/pypa/manylinux1_x86_64
22

33
ENV CMAKE cmake-2.8.11.1-5.4.x86_64
4-
ENV OPENSSL openssl-1.0.2l
4+
ENV OPENSSL openssl-1.0.2o
55
ENV LIBSSH2_VER agent_fwd
66

77
RUN yum install zlib-devel -y

ci/travis/build-wheels.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
#!/bin/bash -xe
22

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

1514
# Install packages and test
16-
for PYBIN in `ls -1d /opt/python/*/bin | grep -v cpython | grep -v cp37`; do
15+
for PYBIN in `ls -1d /opt/python/cp*/bin`; do
1716
"${PYBIN}/pip" install parallel-ssh --no-index -f /io/wheelhouse
1817
(cd "$HOME"; "${PYBIN}/python" -c 'import pssh.native._ssh2')
1918
done

ci/travis/pyenv-wheel.sh

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
#!/bin/bash -xe
2+
3+
brew install pyenv || brew outdated pyenv || brew upgrade pyenv
4+
5+
export PYENV_VERSION=${PYENV:-3.6.4}
6+
if [[ ! -d "$HOME/.pyenv/versions/$PYENV_VERSION" ]]; then
7+
pyenv install $PYENV_VERSION
8+
fi
9+
pyenv global $PYENV_VERSION
10+
pyenv versions
11+
12+
set +x
13+
eval "$(pyenv init -)"
14+
set -x
15+
16+
which python
17+
python -m pip install -U virtualenv
18+
python -m virtualenv -p "$(which python)" venv
19+
20+
set +x
21+
source venv/bin/activate
22+
set -x
23+
24+
python -V
25+
python -m pip install -U setuptools pip
26+
pip install -U delocate wheel
27+
pip install -r requirements.txt
28+
pip wheel --no-deps .
29+
cp /usr/local/lib/libssh2* .
30+
delocate-listdeps --all *.whl
31+
delocate-wheel -v *.whl
32+
delocate-listdeps --all *.whl
33+
34+
ls -l *.whl
35+
rm -f *.dylib
36+
pip install -v *.whl
37+
pwd; mkdir -p temp; cd temp; pwd
38+
python -c "import pssh.clients" && echo "Import successfull"
39+
cd ..; pwd
40+
set +x
41+
deactivate
42+
set -x
43+
44+
mv -f *.whl wheels/
45+
ls -lh wheels/

pssh/clients/native/single.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,8 @@ def run_command(self, command, sudo=False, user=None,
398398
:param encoding: Encoding to use for output. Must be valid
399399
`Python codec <https://docs.python.org/2.7/library/codecs.html>`_
400400
:type encoding: str
401+
402+
:rtype: (channel, host, stdout, stderr, stdin) tuple.
401403
"""
402404
# Fast path for no command substitution needed
403405
if not sudo and not user and not shell:

setup.py

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -98,20 +98,27 @@
9898
),
9999
install_requires=['paramiko', gevent_req, 'ssh2-python>=0.15.0'],
100100
classifiers=[
101-
'License :: OSI Approved :: GNU Lesser General Public License v2 (LGPLv2)',
102-
'Intended Audience :: Developers',
103-
'Programming Language :: Python :: 2',
104-
'Programming Language :: Python :: 2.6',
105-
'Programming Language :: Python :: 2.7',
106-
'Programming Language :: Python :: 3',
107-
'Programming Language :: Python :: 3.4',
108-
'Programming Language :: Python :: 3.5',
109-
'Programming Language :: Python :: 3.6',
110-
'Topic :: Software Development :: Libraries :: Python Modules',
111-
'Operating System :: POSIX :: Linux',
112-
'Operating System :: POSIX :: BSD',
113-
'Operating System :: Microsoft :: Windows',
114-
],
101+
'Development Status :: 5 - Production/Stable',
102+
'License :: OSI Approved :: GNU Lesser General Public License v2 (LGPLv2)',
103+
'Intended Audience :: Developers',
104+
'Operating System :: OS Independent',
105+
'Programming Language :: C',
106+
'Programming Language :: Python :: 2',
107+
'Programming Language :: Python :: 2.6',
108+
'Programming Language :: Python :: 2.7',
109+
'Programming Language :: Python :: 3',
110+
'Programming Language :: Python :: 3.4',
111+
'Programming Language :: Python :: 3.5',
112+
'Programming Language :: Python :: 3.6',
113+
'Programming Language :: Python :: 3.7',
114+
'Topic :: System :: Networking',
115+
'Topic :: Software Development :: Libraries',
116+
'Topic :: Software Development :: Libraries :: Python Modules',
117+
'Operating System :: POSIX :: Linux',
118+
'Operating System :: POSIX :: BSD',
119+
'Operating System :: Microsoft :: Windows',
120+
'Operating System :: MacOS :: MacOS X',
121+
],
115122
ext_modules=extensions,
116123
package_data=package_data,
117124
)

0 commit comments

Comments
 (0)