Skip to content

OSX and Windows wheels #18

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 50 commits into from
Aug 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
5827280
Updated OSX build
Aug 18, 2020
4cf1568
Added version info to init
Aug 18, 2020
13d8c20
Updated manifest file
Aug 18, 2020
9e5175d
Updated macos cfg
Aug 18, 2020
b828ade
Update cfg
Aug 18, 2020
53bc489
Updated appveyor cfg
Aug 18, 2020
ffffdc7
Updated cfg
Aug 18, 2020
c69fd5e
Updated cfg
Aug 18, 2020
795ed35
Updated cfg
Aug 18, 2020
505ac24
Updated cfg
Aug 18, 2020
9d0f108
Updated cfg
Aug 18, 2020
6323ea6
Updated cfg
Aug 18, 2020
79a3d15
Updated cfg
Aug 18, 2020
8749d53
Updated cfg
Aug 18, 2020
9545ae0
Updated cfg
Aug 18, 2020
452412b
Updated cfgs. Removed debug code
Aug 18, 2020
2164197
Updated cfg
Aug 18, 2020
e3eef9e
Updated cfg
Aug 18, 2020
b6a7deb
Updated cfg
Aug 18, 2020
af4dfd9
Updated cfg
Aug 18, 2020
7f38213
Updated cfg
Aug 18, 2020
e5910c7
Updated cfg
Aug 18, 2020
4e62dbe
Updated appveyor cfg
Aug 18, 2020
8c94d5c
updated krb script
Aug 18, 2020
9a36d9c
Updated cfg
Aug 18, 2020
93bf04b
Updated appveyor
Aug 18, 2020
6f52860
Updated cfg
Aug 18, 2020
c10dc40
Updated cfg
Aug 18, 2020
28c5637
Updated cfg
Aug 19, 2020
86a73de
Updated cfg
Aug 19, 2020
84131af
Updated [ci skip]
Aug 19, 2020
d4ee79a
Updated
Aug 19, 2020
efb8cf7
Updated
Aug 19, 2020
de654b7
Updated
Aug 19, 2020
f148d80
Updated cfg
Aug 19, 2020
3d20084
Updated cfg
Aug 19, 2020
56acd7f
Updated cfg
Aug 19, 2020
8ce4a62
Updated cfg
Aug 19, 2020
72a362c
Updated cfg
Aug 19, 2020
d3578f0
Updated cfg
Aug 19, 2020
e9f6fc2
Updated cfg
Aug 19, 2020
52325fb
Updated cfg
Aug 19, 2020
fb065be
Removed unused CI files
Aug 19, 2020
deacdcc
Re-enable circle CI builds
Aug 19, 2020
8d11855
Updated cfg
Aug 19, 2020
5507ddd
Added windows py2 check
Aug 19, 2020
55d0b4b
Updated msvc package files
Aug 19, 2020
5ebdd04
Updated changelog
Aug 19, 2020
63a344e
Updated appveyor cfg
Aug 19, 2020
d3e917d
Updated readme
Aug 19, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 26 additions & 36 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
max_jobs: 5
build:
parallel: true
verbosity: minimal
skip_branch_with_pr: true

environment:
global:
# SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the
# /E:ON and /V:ON options are not enabled in the batch script intepreter
# 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.1.0h
SYSTEM_LIBSSH: 1
PYPI_USER:
secure: 2m0jy6JD/R9RExIosOT6YA==
Expand Down Expand Up @@ -40,8 +41,12 @@ install:
https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | `
Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { `
throw "There are newer queued builds for this pull request, failing early." }
- ECHO "Installed SDKs:"
- ps: "ls \"C:/Program Files/Microsoft SDKs/Windows\""
- set OPENSSL_DIR="C:\OpenSSL-v11-Win%PYTHON_ARCH%"
- set VCLIBDIR=%WINDIR%\System32
- cp %VCLIBDIR%/vcruntime*.dll ssh/
- cp %VCLIBDIR%/msvcp*.dll ssh/
- cp %VCLIBDIR%/msvcr*.dll ssh/
- cp %OPENSSL_DIR%/bin/*.dll ssh/

# Prepend newly installed Python to the PATH of this build (this cannot be
# done from inside the powershell script as it would require to restart
Expand All @@ -51,57 +56,42 @@ install:
# Check that we have the expected version and architecture for Python
- "python --version"
- "python -c \"import struct; print(struct.calcsize('P') * 8)\""

# Upgrade to the latest version of pip to avoid it displaying warnings
# about it being out of date.
# - "pip install --disable-pip-version-check --user --upgrade pip"

# Install the build dependencies of the project. If some dependencies contain
# compiled extensions and are not provided as pre-built wheel packages,
# pip will build them from source using the MSVC compiler matching the
# target Python version and architecture
- "%CMD_IN_ENV% pip install -r requirements_dev.txt"
- "%CMD_IN_ENV% pip install -U wheel setuptools twine"
- pip install -U wheel setuptools twine cython

# .c files need to be generated on Windows to handle platform
# specific code.
# Fix version used by versioneer to current git tag so the generated .c files
# do not cause a version change.
- python ci/appveyor/fix_version.py .
- mv -f .git .git.bak
- IF NOT "%PYTHON_VERSION%" == "2.7" (
7z x ci\appveyor\zlib1211.zip
appveyor DownloadFile https://indy.fulgan.com/SSL/Archive/Experimental/openssl-%OPENSSL_VER%-x%PYTHON_ARCH%-VC2017.zip
appveyor DownloadFile https://web.mit.edu/kerberos/dist/kfw/4.1/kfw-4.1-src.zip
7z x ci\appveyor\kfw-4.1-src.zip
7z x openssl-%OPENSSL_VER%-x%PYTHON_ARCH%-VC2017.zip
cp openssl-%OPENSSL_VER%-x%PYTHON_ARCH%-VC2017\libssl-1_1-x%PYTHON_ARCH%.dll ssh\ || cp openssl-%OPENSSL_VER%-x%PYTHON_ARCH%-VC2017\libssl-1_1.dll ssh\
cp openssl-%OPENSSL_VER%-x%PYTHON_ARCH%-VC2017\libcrypto-1_1-x%PYTHON_ARCH%.dll ssh\ || cp openssl-%OPENSSL_VER%-x%PYTHON_ARCH%-VC2017\libcrypto-1_1.dll ssh\
)
- 7z x ci\appveyor\zlib1211.zip
# - appveyor DownloadFile https://web.mit.edu/kerberos/dist/kfw/4.1/kfw-4.1-src.zip
# - 7z x kfw-4.1-src.zip
- ps: ls ssh
- ps: ls

build_script:
- "%CMD_IN_ENV% ci\\appveyor\\build_krb.bat"
- "%CMD_IN_ENV% ci\\appveyor\\build_zlib.bat"
- "%CMD_IN_ENV% ci\\appveyor\\build_ssh.bat"
# - ci\\appveyor\\build_krb.bat
- ci\\appveyor\\build_zlib.bat
- ci\\appveyor\\build_ssh.bat
- ps: ls src/src/Release
- rm -f ssh/*.c
- "%CMD_IN_ENV% python setup.py build_ext -I ci/appveyor/include"
- "%CMD_IN_ENV% python setup.py build"
- "%CMD_IN_ENV% python setup.py install"
- python -V
- python setup.py build_ext
- python setup.py build
- python setup.py install
- ps: ls ssh

test_script:
- cd dist
- python ..\\ci\\appveyor\\import_test.py
- cd ..

after_test:
# If tests are successful, create binary packages for the project.
- "%CMD_IN_ENV% python setup.py bdist_wheel"
- python setup.py bdist_wheel
- mv dist/* .

artifacts:
# Archive the generated packages in the ci.appveyor.com build report.
- path: "*.whl"

deploy_script:
Expand Down
40 changes: 32 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,21 +38,36 @@ jobs:
python setup.py sdist
cd dist; pip install *; cd ..
name: Test

osx:
parameters:
xcode_ver:
type: string
default: "11.6.0"
macos:
xcode: 11.6.0
xcode: << parameters.xcode_ver >>
environment:
HOMEBREW_NO_AUTO_UPDATE: 1
PYENV: 3.6.11
SYSTEM_LIBSSH: 1
steps:
- checkout
- run:
name: deps
command: |
brew install cmake git-lfs
pip install twine
brew install cmake git-lfs krb5 python libssh
pip3 install twine
which twine
- run:
name: Build Wheel
command: |
./ci/osx-wheel.sh
- store_artifacts:
path: wheels
- run:
name: Upload Wheel
command: |
twine upload --skip-existing -u $PYPI_USER -p $PYPI_PASSWORD wheels/*

manylinux:
machine:
image: ubuntu-1604:201903-01
Expand Down Expand Up @@ -92,6 +107,7 @@ jobs:
name: Upload Wheels
command: |
twine upload --skip-existing -u $PYPI_USER -p $PYPI_PASSWORD dist/* wheelhouse/*

workflows:
version: 2.1
main:
Expand All @@ -113,7 +129,15 @@ workflows:
only: /.*/
branches:
ignore: /.*/
# - osx
# filters:
# tags:
# only: /.*/
- osx:
matrix:
parameters:
xcode_ver:
- "11.6.0"
- "11.1.0"
context: Docker
filters:
tags:
only: /.*/
branches:
ignore: /.*/
2 changes: 2 additions & 0 deletions Changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ Packaging
----------

* Added manylinux 2010 binary wheels.
* Added OSX 10.14 and 10.15 binary wheels for Python 3.8
* Added Windows 64-bit binary wheels for Python 3.6/3.7/3.8

0.3.0
++++++++
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ include versioneer.py
include ssh/_version.py
exclude .travis.yml
include LICENSE
include COPYING
include ssh/*.pyx
include ssh/*.pxd
recursive-include libssh *
Expand Down
3 changes: 3 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ Bindings for libssh_ C library.
:target: https://pypi.python.org/pypi/ssh-python
.. image:: https://img.shields.io/pypi/pyversions/ssh-python.svg
:target: https://pypi.python.org/pypi/ssh-python
.. image:: https://ci.appveyor.com/api/projects/status/2t4bmmtjvfy5s1in/branch/master?svg=true
:target: https://ci.appveyor.com/project/pkittenis/ssh-python


Installation
_____________
Expand Down
2 changes: 1 addition & 1 deletion _setup_libssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def build_ssh():
os.mkdir('src')

os.chdir('src')
check_call('cmake -DCMAKE_BUILD_TYPE=Release ../libssh',
check_call('cmake -DCMAKE_BUILD_TYPE=Release -DWITH_GSS_API=ON ../libssh',
shell=True, env=os.environ)
check_call(['make', '-j%s' % (cpu_count(),)])
os.chdir('..')
Expand Down
6 changes: 4 additions & 2 deletions ci/appveyor/build_krb.bat
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
refreshenv
set KRB_INSTALL_DIR=%APPVEYOR_HOME_DIR%/src/lib
set CPU=AMD64
setenv /x64 /release
cd kfw-4.1/src
nmake
nmake install
make -f Makefile.in prep-windows
make
make install
cd ../..
25 changes: 3 additions & 22 deletions ci/appveyor/build_ssh.bat
Original file line number Diff line number Diff line change
@@ -1,30 +1,15 @@
IF "%PYTHON_VERSION%" == "2.7" (exit 0)

cp ci\appveyor\include\stdint.h libssh/include

mkdir src
cd src

set OPENSSL_DIR="C:\OpenSSL-v11-Win%PYTHON_ARCH%"

ls %OPENSSL_DIR%
ls %OPENSSL_DIR%\lib\VC
ls %OPENSSL_DIR%\lib\VC\static

IF "%MSVC%" == "Visual Studio 9" (
ECHO "Building without platform set"
set CMAKE_PLATFORM="NMake Makefiles"
) ELSE (
ECHO "Building with platform %MSVC%"
set CMAKE_PLATFORM="%MSVC%"
)
set CMAKE_PLATFORM="%MSVC%"

cmake ..\libssh -G %CMAKE_PLATFORM% ^
-DCMAKE_BUILD_TYPE=Release ^
-DZLIB_LIBRARY=C:/zlib/lib/zlibstatic.lib ^
-DZLIB_INCLUDE_DIR=C:/zlib/include ^
-DWITH_GSSAPI=ON ^
-DWITH_STATIC_LIB=ON ^
-DOPENSSL_ROOT_DIR=%OPENSSL_DIR%


Expand All @@ -34,9 +19,5 @@ cp %OPENSSL_DIR%\lib\VC\libssl%PYTHON_ARCH%MD.lib %APPVEYOR_BUILD_FOLDER%
cmake --build . --config Release

cd ..
ls
ls src/src/Release
cp src/src/static/Release/ssh.lib %PYTHON%/libs/
# cp src/src/Release/ssh.dll ssh/
ls %PYTHON%/libs/
ls ssh/
cp src/src/Release/ssh.lib %PYTHON%/libs/
cp src/src/Release/ssh.dll ssh/
2 changes: 2 additions & 0 deletions ci/appveyor/import_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@
sys.exit(0)
print("{} {}".format(system(), python_version_tuple()[0]))
raise
else:
print("Import successful")
Loading