Skip to content

Commit

Permalink
Add configurations to build binary wheels on GNU/Linux and Windows
Browse files Browse the repository at this point in the history
Thanks to cibuildwheel, now every commit will trigger a build of manylinux1
wheels for Python 3.4, 3.5 and 3.6, both on GNU/Linux (travis-ci.org) and
Windows (ci.appveyor.com). Each build will be followed by a run of the test
suite.

On tags, if everything is ok, the wheel will be eventually automatically
uploaded to PyPI.

This fixes issue #67.
  • Loading branch information
lelit committed Aug 12, 2017
1 parent 8a639d2 commit 1239cca
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 6 deletions.
34 changes: 28 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,29 @@
language: python
python:
- "3.4"
- "3.5"
- "3.6"
install: "pip install -r requirements-test.txt"
script: "py.test ./tests"
python: "3.6"

matrix:
include:
- sudo: required
services:
- docker
# - os: osx
# language: generic
# env:
# - PY_VERSION=3

env:
global:
- CIBW_TEST_REQUIRES="pytest pytest-benchmark pytz"
- CIBW_TEST_COMMAND="py.test {project}/tests"
- CIBW_SKIP="cp2* cp33*"
- TWINE_USERNAME=lelit
# Note: TWINE_PASSWORD is set in Travis settings

script:
- pip install cibuildwheel==0.4.0
- cibuildwheel --output-dir wheelhouse
- |
if [[ $TRAVIS_TAG ]]; then
pip install twine
twine upload wheelhouse/*.whl
fi
24 changes: 24 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
environment:
global:
CIBW_TEST_REQUIRES: "pytest pytest-benchmark pytz"
CIBW_TEST_COMMAND: "py.test {project}/tests"
CIBW_SKIP: "cp2* cp33*"
TWINE_USERNAME: lelit
# Note: TWINE_PASSWORD is set in Appveyor settings
matrix:
- PYTHON: "C:\\Python35-x64\\python.exe"

install: "git submodule update --init --recursive"

build_script:
- "%PYTHON% -m pip install cibuildwheel==0.4.0"
- "%PYTHON% -m cibuildwheel --output-dir wheelhouse"
- ps: >-
if ($env:APPVEYOR_REPO_TAG -eq "true") {
%PYTHON% -m pip install twine
%PYTHON% -m twine upload (resolve-path wheelhouse\*.whl)
}
artifacts:
- path: "wheelhouse\\*.whl"
name: Wheels

0 comments on commit 1239cca

Please sign in to comment.