-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build binary wheels for Windows using Appveyor.
- Loading branch information
1 parent
a6d24e5
commit ebb581e
Showing
5 changed files
with
117 additions
and
18 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
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,61 @@ | ||
# The template for this file was from https://packaging.python.org/appveyor/ | ||
|
||
environment: | ||
matrix: | ||
# For Python versions available on Appveyor, see | ||
# http://www.appveyor.com/docs/installed-software#python | ||
- PYTHON: "C:\\Python27" | ||
CMAKE_GENERATOR: "Visual Studio 9 2008" | ||
- PYTHON: "C:\\Python34" | ||
CMAKE_GENERATOR: "Visual Studio 10 2010" | ||
- PYTHON: "C:\\Python35" | ||
CMAKE_GENERATOR: "Visual Studio 14 2015" | ||
- PYTHON: "C:\\Python34-x64" | ||
CMAKE_GENERATOR: "Visual Studio 10 2010 Win64" | ||
DISTUTILS_USE_SDK: "1" | ||
- PYTHON: "C:\\Python35-x64" | ||
CMAKE_GENERATOR: "Visual Studio 14 2015 Win64" | ||
|
||
install: | ||
# We need wheel installed to build wheels | ||
- "%PYTHON%\\python.exe -m pip install wheel" | ||
# Visual Studio 9 2008 does not come with stdint.h, so we'll copy over a | ||
# different version. We only need to do it whenever we're building with | ||
# 2008, but it doesn't hurt to copy it unconditionally. The first copy is to | ||
# build nanomsg, the second is to build the extension. | ||
- ps: cp "C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\include\\stdint.h" | ||
"C:\\Program Files (x86)\\Microsoft Visual Studio 9.0\\VC\\include\\stdint.h" | ||
- ps: cp "C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\include\\stdint.h" | ||
"C:\\Users\\appveyor\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\include\\stdint.h" | ||
- git clone https://github.com/nanomsg/nanomsg.git nanomsg-src | ||
- pwd | ||
- ps: pushd nanomsg-src | ||
- git checkout 1.0.0 | ||
- ps: mkdir build | ||
- ps: cd build | ||
- cmake -DNN_STATIC_LIB=ON -G"%CMAKE_GENERATOR%" .. | ||
- cmake --build . | ||
- cmake --build . --target install | ||
- ps: cp Debug\nanomsg.lib ..\.. | ||
- ps: popd | ||
- pwd | ||
|
||
build_script: | ||
- "%PYTHON%\\python.exe setup.py install" | ||
|
||
test_script: | ||
- "build.cmd %PYTHON%\\python.exe setup.py test" | ||
|
||
after_test: | ||
# build the wheel. | ||
# build.cmd sets up necessary variables for 64-bit builds | ||
- "build.cmd %PYTHON%\\python.exe setup.py bdist_wheel" | ||
|
||
artifacts: | ||
# bdist_wheel puts your built wheel in the dist directory | ||
- path: dist\* | ||
|
||
#on_success: | ||
# You can use this step to upload your artifacts to a public website. | ||
# See Appveyor's documentation for more details. Or you can simply | ||
# access your wheels from the Appveyor "artifacts" tab for your build. |
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,21 @@ | ||
@echo off | ||
:: 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 | ||
:: | ||
:: More details at: | ||
:: https://github.com/cython/cython/wiki/64BitCythonExtensionsOnWindows | ||
|
||
IF "%DISTUTILS_USE_SDK%"=="1" ( | ||
ECHO Configuring environment to build with MSVC on a 64bit architecture | ||
ECHO Using Windows SDK 7.1 | ||
"C:\Program Files\Microsoft SDKs\Windows\v7.1\Setup\WindowsSdkVer.exe" -q -version:v7.1 | ||
CALL "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64 /release | ||
SET MSSdk=1 | ||
REM Need the following to allow tox to see the SDK compiler | ||
SET TOX_TESTENV_PASSENV=DISTUTILS_USE_SDK MSSdk INCLUDE LIB | ||
) ELSE ( | ||
ECHO Using default MSVC build environment | ||
) | ||
|
||
CALL %* |
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