-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Code changes for win32 build support.
Added appveyor CI config. Added conda CI recipe for Windows builds. Added appveyor and conda CI helper scripts. Updated readme.
- Loading branch information
Showing
27 changed files
with
1,724 additions
and
1,523 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
environment: | ||
matrix: | ||
- TARGET_ARCH: "x64" | ||
CONDA_PY: "27" | ||
PY_CONDITION: "python >=2.7,<3" | ||
CONDA_INSTALL_LOCN: "C:\\Miniconda-x64" | ||
- TARGET_ARCH: "x64" | ||
CONDA_PY: "35" | ||
PY_CONDITION: "python >=3.5,<3.6" | ||
CONDA_INSTALL_LOCN: "C:\\Miniconda35-x64" | ||
- TARGET_ARCH: "x64" | ||
CONDA_PY: "36" | ||
PY_CONDITION: "python >=3.6" | ||
CONDA_INSTALL_LOCN: "C:\\Miniconda36-x64" | ||
|
||
matrix: | ||
fast_finish: true | ||
|
||
cache: | ||
- "%TMP%\\py\\" | ||
|
||
build: false | ||
install: | ||
- set CONDA_NPY=19 | ||
# Remove cygwin (and therefore the git that comes with it). | ||
- rmdir C:\cygwin /s /q | ||
# Use the pre-installed Miniconda for the desired arch | ||
- set PATH=%CONDA_INSTALL_LOCN%/Library/bin;%CONDA_INSTALL_LOCN%/Scripts;%PATH% | ||
- conda update --yes --quiet conda | ||
- call %CONDA_INSTALL_LOCN%\Scripts\activate.bat | ||
- conda config --add channels conda-forge | ||
- conda config --set show_channel_urls true | ||
- conda install --yes --quiet conda-build-all | ||
- conda update --yes conda-build | ||
- conda install --yes --quiet conda-forge-build-setup | ||
- run_conda_forge_build_setup | ||
- conda build conda-recipe | ||
|
||
test_script: | ||
- python ci\move-conda-package.py | ||
|
||
platform: | ||
- x64 | ||
|
||
artifacts: | ||
- path: '*.tar.bz2' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
:: To build extensions for 64 bit Python 3, we need to configure environment | ||
:: variables to use the MSVC 2010 C++ compilers from GRMSDKX_EN_DVD.iso of: | ||
:: MS Windows SDK for Windows 7 and .NET Framework 4 (SDK v7.1) | ||
:: | ||
:: To build extensions for 64 bit Python 2, we need to configure environment | ||
:: variables to use the MSVC 2008 C++ compilers from GRMSDKX_EN_DVD.iso of: | ||
:: MS Windows SDK for Windows 7 and .NET Framework 3.5 (SDK v7.0) | ||
:: | ||
:: 32 bit builds do not require specific environment configurations. | ||
:: | ||
:: Note: this script needs to be run with the /E:ON and /V:ON flags for the | ||
:: cmd interpreter, at least for (SDK v7.0) | ||
:: | ||
:: More details at: | ||
:: https://github.com/cython/cython/wiki/64BitCythonExtensionsOnWindows | ||
:: http://stackoverflow.com/a/13751649/163740 | ||
:: | ||
:: Author: Olivier Grisel | ||
:: License: CC0 1.0 Universal: http://creativecommons.org/publicdomain/zero/1.0/ | ||
@ECHO OFF | ||
|
||
SET COMMAND_TO_RUN=%* | ||
SET WIN_SDK_ROOT=C:\Program Files\Microsoft SDKs\Windows | ||
|
||
SET MAJOR_PYTHON_VERSION="%PYTHON_VERSION:~0,1%" | ||
IF %MAJOR_PYTHON_VERSION% == "2" ( | ||
SET WINDOWS_SDK_VERSION="v7.0" | ||
) ELSE IF %MAJOR_PYTHON_VERSION% == "3" ( | ||
SET WINDOWS_SDK_VERSION="v7.1" | ||
) ELSE ( | ||
ECHO Unsupported Python version: "%MAJOR_PYTHON_VERSION%" | ||
EXIT 1 | ||
) | ||
|
||
IF "%PYTHON_ARCH%"=="64" ( | ||
ECHO Configuring Windows SDK %WINDOWS_SDK_VERSION% for Python %MAJOR_PYTHON_VERSION% on a 64 bit architecture | ||
SET DISTUTILS_USE_SDK=1 | ||
SET MSSdk=1 | ||
"%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Setup\WindowsSdkVer.exe" -q -version:%WINDOWS_SDK_VERSION% | ||
"%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Bin\SetEnv.cmd" /x64 /release | ||
ECHO Executing: %COMMAND_TO_RUN% | ||
call %COMMAND_TO_RUN% || EXIT 1 | ||
) ELSE ( | ||
ECHO Using default MSVC build environment for 32 bit architecture | ||
ECHO Executing: %COMMAND_TO_RUN% | ||
call %COMMAND_TO_RUN% || EXIT 1 | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import os | ||
import glob | ||
import subprocess | ||
import traceback | ||
|
||
token = os.environ['BINSTAR_TOKEN'] | ||
cmd = ['binstar', '-t', token, 'upload', '--force'] | ||
cmd.extend(glob.glob('*.tar.bz2')) | ||
try: | ||
subprocess.check_call(cmd) | ||
except subprocess.CalledProcessError: | ||
traceback.print_exc() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import os | ||
import glob | ||
import shutil | ||
from conda_build.config import Config | ||
|
||
binary_package_glob = os.path.join(Config().bldpkgs_dir, '*.tar.bz2') | ||
|
||
try: | ||
binary_package = glob.glob(binary_package_glob)[0] | ||
except IndexError: | ||
pass | ||
else: | ||
shutil.move(binary_package, '.') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
{% set name = "ssh2-python" %} | ||
{% set version = GIT_DESCRIBE_TAG %} | ||
# {% set sha256 = "e5e77801a7a0d49799e288ecbd189b4d1c23eeadcf9c6f4ce80b31b7d397babe" %} | ||
|
||
package: | ||
name: {{ name|lower }} | ||
version: {{ version }} | ||
|
||
source: | ||
path: ../ | ||
# fn: {{ name }}-{{ version }}.tar.gz | ||
# url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz | ||
# sha256: {{ sha256 }} | ||
|
||
build: | ||
features: | ||
- vc9 # [win and py27] | ||
- vc10 # [win and py34] | ||
- vc14 # [win and py35] | ||
# skip: true # [win] | ||
number: 0 | ||
script: | ||
- python setup.py install --single-version-externally-managed --record record.txt # [unix] | ||
- rm -f ssh2/*.c # [win] | ||
- python setup.py build_ext --compiler=msvc # [win] | ||
- python setup.py install --single-version-externally-managed --record record.txt # [win] | ||
|
||
requirements: | ||
build: | ||
- python | ||
- cython | ||
- setuptools | ||
- gcc # [unix] | ||
- libssh2 | ||
- openssl 1.0.* | ||
run: | ||
- python | ||
- libssh2 | ||
- gcc # [unix] | ||
- openssl 1.0.* | ||
|
||
test: | ||
imports: | ||
- ssh2.session | ||
|
||
about: | ||
home: http://github.com/ParallelSSH/ssh2-python | ||
license: LGPL-2.1 | ||
license_family: LGPL | ||
license_file: LICENSE | ||
summary: 'Super fact SSH library. Based on libssh2.' | ||
|
||
description: | | ||
Super fast SSH2 protocol library. | ||
ssh2-python provides Python bindings for libssh2. | ||
Its only dependency is the libssh2 library. | ||
dev_url: https://github.com/ParallelSSH/ssh2-python | ||
|
||
extra: | ||
recipe-maintainers: | ||
- pkittenis |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
from ssh2.session import Session | ||
from ssh2.channel import Channel | ||
s = Session() | ||
c = Channel(s) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# This file is part of ssh2-python. | ||
# Copyright (C) 2017 Panos Kittenis | ||
|
||
# This library is free software; you can redistribute it and/or | ||
# modify it under the terms of the GNU Lesser General Public | ||
# License as published by the Free Software Foundation, version 2.1. | ||
|
||
# This library is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
# Lesser General Public License for more details. | ||
|
||
# You should have received a copy of the GNU Lesser General Public | ||
# License along with this library; if not, write to the Free Software | ||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
|
||
from libc.time cimport time_t | ||
from posix.types cimport blkcnt_t, blksize_t, dev_t, gid_t, ino_t, \ | ||
nlink_t, off_t, time_t, uid_t, mode_t | ||
|
||
|
||
cdef extern from "<sys/stat.h>" nogil: | ||
cdef struct struct_stat "stat": | ||
dev_t st_dev | ||
ino_t st_ino | ||
mode_t st_mode | ||
nlink_t st_nlink | ||
uid_t st_uid | ||
gid_t st_gid | ||
dev_t st_rdev | ||
off_t st_size | ||
blksize_t st_blksize | ||
blkcnt_t st_blocks | ||
time_t st_atime | ||
time_t st_mtime | ||
time_t st_ctime |
Oops, something went wrong.