summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2016-02-25 22:45:05 +0100
committerGiampaolo Rodola <g.rodola@gmail.com>2016-02-25 22:45:05 +0100
commite9f361b0f9b2cb677c58681d731626f2e729bcaa (patch)
treece48930f0c224f9bbec0b83f583305fed7adeb62
parentdad46ff637266f4efd300d456161ef8c12cf344b (diff)
downloadpysendfile-e9f361b0f9b2cb677c58681d731626f2e729bcaa.tar.gz
ad OSX travis integration
-rw-r--r--.ci/travis/README2
-rwxr-xr-x.ci/travis/install.sh45
-rwxr-xr-x.ci/travis/run.sh16
-rw-r--r--.travis.yml13
-rw-r--r--MANIFEST.in1
5 files changed, 66 insertions, 11 deletions
diff --git a/.ci/travis/README b/.ci/travis/README
new file mode 100644
index 0000000..a2179f0
--- /dev/null
+++ b/.ci/travis/README
@@ -0,0 +1,2 @@
+This directory contains support files for Travis, a continuous integration
+service which runs tests on Linux and OSX on every GIT commit.
diff --git a/.ci/travis/install.sh b/.ci/travis/install.sh
new file mode 100755
index 0000000..8f3ecc3
--- /dev/null
+++ b/.ci/travis/install.sh
@@ -0,0 +1,45 @@
+#!/bin/bash
+
+set -e
+set -x
+
+if [[ "$(uname -s)" == 'Darwin' ]]; then
+ brew update || brew update
+ brew outdated pyenv || brew upgrade pyenv
+ brew install pyenv-virtualenv
+
+ if which pyenv > /dev/null; then
+ eval "$(pyenv init -)"
+ fi
+
+ case "${PYVER}" in
+ py26)
+ pyenv install 2.6.9
+ pyenv virtualenv 2.6.9 psutil
+ ;;
+ py27)
+ pyenv install 2.7.10
+ pyenv virtualenv 2.7.10 psutil
+ ;;
+ py32)
+ pyenv install 3.2.6
+ pyenv virtualenv 3.2.6 psutil
+ ;;
+ py33)
+ pyenv install 3.3.6
+ pyenv virtualenv 3.3.6 psutil
+ ;;
+ py34)
+ pyenv install 3.4.3
+ pyenv virtualenv 3.4.3 psutil
+ ;;
+ esac
+ pyenv rehash
+ pyenv activate psutil
+fi
+
+if [[ $TRAVIS_PYTHON_VERSION == '2.5' ]]; then pip install unittest2; fi
+if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then pip install unittest2; fi
+pip install flake8
+python setup.py build
+python setup.py install
diff --git a/.ci/travis/run.sh b/.ci/travis/run.sh
new file mode 100755
index 0000000..53f3088
--- /dev/null
+++ b/.ci/travis/run.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+set -e
+set -x
+
+if [[ "$(uname -s)" == 'Darwin' ]]; then
+ if which pyenv > /dev/null; then
+ eval "$(pyenv init -)"
+ fi
+ pyenv activate psutil
+fi
+
+python setup.py build
+python setup.py develop
+python test/test_sendfile.py
+flake8
diff --git a/.travis.yml b/.travis.yml
index ca5695a..bd19a31 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -7,15 +7,6 @@ python:
- 3.4
- 3.5
install:
- - if [[ $TRAVIS_PYTHON_VERSION == '2.5' ]]; then pip install unittest2; fi
- - if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then pip install unittest2; fi
+ - ./.ci/travis/install.sh
script:
- - pip install flake8
- - python setup.py build
- - python setup.py install
- - python test/test_sendfile.py
- - make flake8
-os:
- - linux
- - osx
-
+ - ./.ci/travis/run.sh
diff --git a/MANIFEST.in b/MANIFEST.in
index b2ef742..884b6fb 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -7,3 +7,4 @@ include README.rst
include sendfilemodule.c
include setup.py
recursive-include test *.py
+recursive-include .ci *