Skip to content

Commit

Permalink
add travis ci support
Browse files Browse the repository at this point in the history
  • Loading branch information
windreamer committed Nov 18, 2016
1 parent 0ebd07d commit 1a083b0
Show file tree
Hide file tree
Showing 5 changed files with 93 additions and 3 deletions.
64 changes: 64 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
language: python
env:
global:
DOCKER_IMAGE=quay.io/pypa/manylinux1_x86_64
matrix:
include:
- os: linux
python: 3.5
services: docker
env: TOX_ENV=py35
PYENV=cp35
- os: linux
python: 2.7
services: docker
env: TOX_ENV=py27
PYENV=cp27
- os: linux
python: pypy
services: docker
env: TOX_ENV=pypy
PYENV=pypy
- os: osx
language: generic
env: TOX_ENV=py35
- os: osx
language: generic
env: TOX_ENV=py27
- os: osx
language: generic
env: TOX_ENV=pypy
sudo: required
cache:
directories: "$HOME/.cache/pip"
install: |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew update;
brew install python3 PyPy;
pip install twine
virtualenv venv -p python3;
source venv/bin/activate;
pip install -U pip setuptools
pip install tox Cython
else
docker pull $DOCKER_IMAGE
pip install -U pip setuptools
pip install tox Cython
fi
script: |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
tox -e $TOX_ENV
.tox/$TOX_ENV/bin/pip wheel . -w dist
else
tox -e $TOX_ENV
docker run --rm -v `pwd`:/io $DOCKER_IMAGE /io/.travis/build-wheels.sh pyquicklz $PYENV
fi
deploy:
provider: pypi
user: windreamer
password:
secure: EeANnstZ+FWmaqmyBQK47tRRy9/U3ZX9i6eTq+oBvg1714x5bR9H2bygs6c/O8LN/VxVismRMROIZQAGnInBEjzu5mM/lCJiObtLKEUkKrttgZQbs2wrW2K4PQHKeShuHXRW2Qf2DkQcEEpkY77Jx7O3m3YNIXox7xmSKh4shhR5W5hKpHY+7eWsTj9cr+/m3+A3CM49ljYhEFcfsLeDyZizMHjcEMb+rRma77tm2PTpKskcsA0PFBSem7Z8/h6DcxOUS/xsaMVYYyRusK2ceT/If3EfejVhyehOiQHDJTs6EvHgRRmFgFO9x7Fn4Zkm4y68DYlMvN4gSioBofHo4Ik9SrMiCx0JOAmH6Az/k31HwX0SSJ6CkJqhpkHk+lSEaLTTVosFjBzRKBW+s+WVbhtHnpwV26QeIyK7LpwDZlIYtFz3SrDGVGwJedoMLFurfX5ESj5k5+OxbS/pQUa7YDudQQC80NDtFac502Zyy9RhJY4vmLG7zQyJ3wxjyrzRKGvZkODFV3Tr5NAgCfqUwYBRPZtrG4MQD172HvUI42XaCriQgAz50CMLKyT0OT35YS1FQ6vtIp3bb+5VKS8a5J6f6nLXqftt1dLGdtf2bHDsCDYBga22lBTH82oYvkmxWBoxMvBPIHsy0YApR64yULx9YFdohXFSyXlgPtA3ulw=
distributions: sdist bdist_wheel
on:
tags: true
repo: windreamer/pyquicklz
26 changes: 26 additions & 0 deletions .travis/build-wheels.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash
set -e -x

PACKAGE=$1
PYENV=$2


# Install a system package required by our library
yum install -y atlas-devel

if [[ ${PYENV} = "pypy" ]]; then
mkdir -p /pypy
wget "https://bitbucket.org/squeaky/portable-pypy/downloads/pypy-5.6-linux_$(uname -m)-portable.tar.bz2" -qO - | tar xj -C /pypy
/pypy/pypy*/bin/virtualenv-pypy /opt/python/pypy
fi

# Compile wheels
for PYBIN in /opt/python/${PYENV}*/bin; do
${PYBIN}/pip install -r /io/requirements.txt
${PYBIN}/pip wheel /io/ -w wheelhouse/
done

# Bundle external shared libraries into the wheels
for whl in wheelhouse/*.whl; do
auditwheel repair $whl -w /io/dist/
done
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
include src/*.h
include *.pyx
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
Cython==0.24
setuptools-cython==0.2.1
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
import sys
from setuptools import setup, Extension
setup(
name='quicklz',
name='pyquicklz',
version='1.4.1',
description='python binding of quicklz',
setup_requires=['setuptools_cython', 'Cython >= 0.18'],
setup_requires=['Cython >= 0.18'],
ext_modules=[
Extension('quicklz', ['quicklz.pyx', 'src/quicklz.c']),
],
Expand Down

0 comments on commit 1a083b0

Please sign in to comment.