Skip to content

Commit

Permalink
Added python3 OSX wheels, all versions. Updated setup.py classifiers.
Browse files Browse the repository at this point in the history
  • Loading branch information
pkittenis committed Jul 12, 2018
1 parent 2f9d9d4 commit 1787f9d
Show file tree
Hide file tree
Showing 3 changed files with 102 additions and 62 deletions.
112 changes: 50 additions & 62 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,20 @@ script:
jobs:
include:

- stage: build packages
- &osx-10-10
stage: build packages
os: osx
osx_image: xcode6.4
env:
- PYENV: 3.6.4
before_install:
- brew update
install:
- brew upgrade openssl
- brew outdated openssl || brew upgrade openssl
- sudo ci/install-ssh2.sh
- cp /usr/local/lib/libssh2* .
- ls -lh
- mkdir -p wheels
install:
- python --version
- wget --no-check-certificate https://bootstrap.pypa.io/get-pip.py
- sudo python get-pip.py
Expand All @@ -59,23 +64,33 @@ jobs:
- pwd; mkdir temp; cd temp; pwd
- python -c "from ssh2.session import Session; Session()"
- 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 -u $PYPI_U -p $PYPI_P wheels/*.whl;
fi
language: generic
python: skip

- stage: build packages
- <<: *osx-10-10
env:
- PYENV: 3.7.0

- &osx-wheels
stage: build packages
os: osx
osx_image: xcode8.3
env:
- PYENV: 3.6.4
before_install:
- brew update
install:
- brew upgrade openssl
- brew outdated openssl || brew upgrade openssl
- sudo ci/install-ssh2.sh
- sudo -H pip2 install -U delocate twine wheel pip setuptools
- cp /usr/local/lib/libssh2* .
- mkdir -p wheels
install:
- sudo -H pip2 install -U delocate twine wheel pip setuptools
- ls -lh
- pip2 wheel .
script:
Expand All @@ -88,71 +103,44 @@ jobs:
- pwd; mkdir temp; cd temp; pwd
- python -c "from ssh2.session import Session; Session()"
- 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 -u $PYPI_U -p $PYPI_P wheels/*.whl;
fi
language: generic
python: skip

- stage: build packages
os: osx
- <<: *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 -H pip2 install -U delocate twine wheel pip setuptools
- cp /usr/local/lib/libssh2* .
- ls -lh
- pip2 wheel .

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

- <<: *osx-wheels
osx_image: xcode8
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 "from ssh2.session import Session; Session()"
- 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 wheel .
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 "from ssh2.session import Session; Session()"
- 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
env:
Expand Down
43 changes: 43 additions & 0 deletions ci/travis/pyenv-wheel.sh
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 .
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 "from ssh2.session import Session; Session()" && echo "Import successfull"
cd ..; pwd
set +x
deactivate
set -x

mv -f *.whl wheels/
9 changes: 9 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,11 @@
include_package_data=True,
platforms='any',
classifiers=[
'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',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
Expand All @@ -108,9 +110,16 @@
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Topic :: System :: Shells',
'Topic :: System :: Networking',
'Topic :: Software Development :: Libraries',
'Topic :: Software Development :: Libraries :: Python Modules',
'Operating System :: POSIX',
'Operating System :: POSIX :: Linux',
'Operating System :: POSIX :: BSD',
'Operating System :: Windows',
'Operating System :: MacOS :: MacOS X',
],
ext_modules=extensions,
package_data=package_data,
Expand Down

0 comments on commit 1787f9d

Please sign in to comment.