Skip to content

Commit 1787f9d

Browse files
author
Pan
committed
Added python3 OSX wheels, all versions. Updated setup.py classifiers.
1 parent 2f9d9d4 commit 1787f9d

File tree

3 files changed

+102
-62
lines changed

3 files changed

+102
-62
lines changed

.travis.yml

Lines changed: 50 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,20 @@ script:
3333
jobs:
3434
include:
3535

36-
- stage: build packages
36+
- &osx-10-10
37+
stage: build packages
3738
os: osx
3839
osx_image: xcode6.4
40+
env:
41+
- PYENV: 3.6.4
3942
before_install:
4043
- brew update
41-
install:
42-
- brew upgrade openssl
44+
- brew outdated openssl || brew upgrade openssl
4345
- sudo ci/install-ssh2.sh
46+
- cp /usr/local/lib/libssh2* .
4447
- ls -lh
48+
- mkdir -p wheels
49+
install:
4550
- python --version
4651
- wget --no-check-certificate https://bootstrap.pypa.io/get-pip.py
4752
- sudo python get-pip.py
@@ -59,23 +64,33 @@ jobs:
5964
- pwd; mkdir temp; cd temp; pwd
6065
- python -c "from ssh2.session import Session; Session()"
6166
- cd ..; pwd
67+
- mv -f *.whl wheels/
68+
- ./ci/travis/pyenv-wheel.sh
6269
after_success:
6370
- if [[ ! -z "$TRAVIS_TAG" ]]; then
64-
twine upload -u $PYPI_U -p $PYPI_P *.whl;
71+
twine upload -u $PYPI_U -p $PYPI_P wheels/*.whl;
6572
fi
6673
language: generic
6774
python: skip
6875

69-
- stage: build packages
76+
- <<: *osx-10-10
77+
env:
78+
- PYENV: 3.7.0
79+
80+
- &osx-wheels
81+
stage: build packages
7082
os: osx
7183
osx_image: xcode8.3
84+
env:
85+
- PYENV: 3.6.4
7286
before_install:
7387
- brew update
74-
install:
75-
- brew upgrade openssl
88+
- brew outdated openssl || brew upgrade openssl
7689
- sudo ci/install-ssh2.sh
77-
- sudo -H pip2 install -U delocate twine wheel pip setuptools
7890
- cp /usr/local/lib/libssh2* .
91+
- mkdir -p wheels
92+
install:
93+
- sudo -H pip2 install -U delocate twine wheel pip setuptools
7994
- ls -lh
8095
- pip2 wheel .
8196
script:
@@ -88,71 +103,44 @@ jobs:
88103
- pwd; mkdir temp; cd temp; pwd
89104
- python -c "from ssh2.session import Session; Session()"
90105
- cd ..; pwd
106+
- mv -f *.whl wheels/
107+
- ./ci/travis/pyenv-wheel.sh
91108
after_success:
92109
- if [[ ! -z "$TRAVIS_TAG" ]]; then
93-
twine upload -u $PYPI_U -p $PYPI_P *.whl;
110+
twine upload -u $PYPI_U -p $PYPI_P wheels/*.whl;
94111
fi
95112
language: generic
96113
python: skip
97114

98-
- stage: build packages
99-
os: osx
115+
- <<: *osx-wheels
100116
osx_image: xcode8
101-
before_install:
102-
- brew update
103-
install:
104-
- brew upgrade openssl
105-
- sudo ci/install-ssh2.sh
106-
- sudo rm -f libssh2.1.dylib
107-
- sudo -H pip2 install -U delocate twine wheel pip setuptools
108-
- cp /usr/local/lib/libssh2* .
109-
- ls -lh
110-
- pip2 wheel .
117+
118+
- <<: *osx-wheels
119+
osx_image: xcode9.3
120+
121+
- <<: *osx-wheels
122+
osx_image: xcode8
123+
env:
124+
- PYENV: 3.7.0
125+
install: skip
111126
script:
112-
- delocate-listdeps --all *.whl
113-
- delocate-wheel -v *.whl
114-
- delocate-listdeps --all *.whl
115-
- ls -l *.whl
116-
- rm -f *.dylib
117-
- pip2 install --user -v *.whl
118-
- pwd; mkdir temp; cd temp; pwd
119-
- python -c "from ssh2.session import Session; Session()"
120-
- cd ..; pwd
121-
after_success:
122-
- if [[ ! -z "$TRAVIS_TAG" ]]; then
123-
twine upload -u $PYPI_U -p $PYPI_P *.whl;
124-
fi
125-
language: generic
126-
python: skip
127+
- ./ci/travis/pyenv-wheel.sh
127128

128-
- stage: build packages
129-
os: osx
129+
- <<: *osx-wheels
130+
osx_image: xcode8.3
131+
env:
132+
- PYENV: 3.7.0
133+
install: skip
134+
script:
135+
- ./ci/travis/pyenv-wheel.sh
136+
137+
- <<: *osx-wheels
130138
osx_image: xcode9.3
131-
before_install:
132-
- brew update
133-
install:
134-
- brew upgrade openssl
135-
- sudo ci/install-ssh2.sh
136-
- sudo -H pip2 install -U delocate twine wheel pip setuptools
137-
- cp /usr/local/lib/libssh2* .
138-
- ls -lh
139-
- pip2 wheel .
139+
env:
140+
- PYENV: 3.7.0
141+
install: skip
140142
script:
141-
- delocate-listdeps --all *.whl
142-
- delocate-wheel -v *.whl
143-
- delocate-listdeps --all *.whl
144-
- ls -l *.whl
145-
- rm -f *.dylib
146-
- pip2 install --user -v *.whl
147-
- pwd; mkdir temp; cd temp; pwd
148-
- python -c "from ssh2.session import Session; Session()"
149-
- cd ..; pwd
150-
after_success:
151-
- if [[ ! -z "$TRAVIS_TAG" ]]; then
152-
twine upload -u $PYPI_U -p $PYPI_P *.whl;
153-
fi
154-
language: generic
155-
python: skip
143+
- ./ci/travis/pyenv-wheel.sh
156144

157145
- stage: build packages
158146
env:

ci/travis/pyenv-wheel.sh

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
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 wheel .
28+
cp /usr/local/lib/libssh2* .
29+
delocate-listdeps --all *.whl
30+
delocate-wheel -v *.whl
31+
delocate-listdeps --all *.whl
32+
33+
ls -l *.whl
34+
rm -f *.dylib
35+
pip install -v *.whl
36+
pwd; mkdir -p temp; cd temp; pwd
37+
python -c "from ssh2.session import Session; Session()" && echo "Import successfull"
38+
cd ..; pwd
39+
set +x
40+
deactivate
41+
set -x
42+
43+
mv -f *.whl wheels/

setup.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,11 @@
9797
include_package_data=True,
9898
platforms='any',
9999
classifiers=[
100+
'Development Status :: 5 - Production/Stable',
100101
'License :: OSI Approved :: GNU Lesser General Public License v2 (LGPLv2)',
101102
'Intended Audience :: Developers',
102103
'Operating System :: OS Independent',
104+
'Programming Language :: C',
103105
'Programming Language :: Python',
104106
'Programming Language :: Python :: 2',
105107
'Programming Language :: Python :: 2.6',
@@ -108,9 +110,16 @@
108110
'Programming Language :: Python :: 3.4',
109111
'Programming Language :: Python :: 3.5',
110112
'Programming Language :: Python :: 3.6',
113+
'Programming Language :: Python :: 3.7',
114+
'Topic :: System :: Shells',
115+
'Topic :: System :: Networking',
116+
'Topic :: Software Development :: Libraries',
111117
'Topic :: Software Development :: Libraries :: Python Modules',
118+
'Operating System :: POSIX',
112119
'Operating System :: POSIX :: Linux',
113120
'Operating System :: POSIX :: BSD',
121+
'Operating System :: Windows',
122+
'Operating System :: MacOS :: MacOS X',
114123
],
115124
ext_modules=extensions,
116125
package_data=package_data,

0 commit comments

Comments
 (0)