Skip to content

Commit

Permalink
Merge 12dfb06 into 0797df9
Browse files Browse the repository at this point in the history
  • Loading branch information
itziakos committed May 9, 2015
2 parents 0797df9 + 12dfb06 commit db5e98f
Show file tree
Hide file tree
Showing 9 changed files with 71 additions and 47 deletions.
34 changes: 17 additions & 17 deletions .travis.yml
Expand Up @@ -2,32 +2,32 @@ language: python
python:
- '2.7_with_system_site_packages'
- 2.6
env:
- ETS_TOOLKIT=wx REQUIREMENTS=dev_requirements_pillow.txt
- ETS_TOOLKIT=qt4 REQUIREMENTS=dev_requirements_pillow.txt
- ETS_TOOLKIT=null.image REQUIREMENTS=dev_requirements_pillow.txt
- ETS_TOOLKIT=null.image REQUIREMENTS=dev_requirements_pil.txt
matrix:
exclude:
- python: 2.6
env: ETS_TOOLKIT=qt4 REQUIREMENTS=dev_requirements_pillow.txt
- python: 2.6
env: ETS_TOOLKIT=wx REQUIREMENTS=dev_requirements_pillow.txt
before_install:
- sudo apt-get update
# For Python 2.7, install PyQt4 and cairo
- if [[ $TRAVIS_PYTHON_VERSION == '2.7_with_system_site_packages' ]]; then source .travis_before_install; fi
# PyQt and cairo can't be installed on 2.6; run the tests without Qt
- if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then source .travis_before_install_noqt; fi
- sudo apt-get install swig
# Simlinks for PIL compilation
- sudo ln -s /usr/lib/`uname -i`-linux-gnu/libfreetype.so /usr/lib/
- sudo ln -s /usr/lib/`uname -i`-linux-gnu/libjpeg.so /usr/lib/
- sudo ln -s /usr/lib/`uname -i`-linux-gnu/libpng.so /usr/lib/
- sudo ln -s /usr/lib/`uname -i`-linux-gnu/libz.so /usr/lib/
- sh ./travis_setup.sh
# setup X11 for the tests
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
install:
# nose is already installed
# numpy is already installed
- pip install -r dev_requirements.txt
- if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then pip install -r requirements-2.6.txt; fi
- pip install -r $REQUIREMENTS
- pip install coveralls
- python setup.py develop
script:
- coverage run -m nose.core -v enable/tests
- coverage run -a -m nose.core -v enable/savage/svg/tests
- coverage run -a -m nose.core -v kiva/tests
- coverage run -a -m unittest2 discover -v -p *test_* kiva/tests
- coverage run -a -m nose.core -v kiva/agg/tests
notifications:
email:
- travis-ci@enthought.com
after_success:
coveralls
20 changes: 0 additions & 20 deletions .travis_before_install

This file was deleted.

6 changes: 0 additions & 6 deletions .travis_before_install_noqt

This file was deleted.

2 changes: 1 addition & 1 deletion README.rst
Expand Up @@ -81,7 +81,7 @@ Enable/Kiva also have the following requirements:
.. rubric:: Runtime:

- `Numpy <http://pypi.python.org/pypi/numpy>`_
- `PIL <http://www.pythonware.com/products/pil>`_
- `PIL <http://www.pythonware.com/products/pil>`_ or preferably `pillow <https://pypi.python.org/pypi/Pillow/2.8.1>`_
- `traits 4.5.0 <https://pypi.python.org/pypi/traits>`_
- `traitsui 4.4.0 <https://pypi.python.org/pypi/traitsui>`_
- `pyface 4.5.0 <https://pypi.python.org/pypi/pyface>`_
Expand Down
1 change: 1 addition & 0 deletions dev_requirements.txt → dev_requirements_pil.txt
Expand Up @@ -13,3 +13,4 @@ git+http://github.com/enthought/traits.git#egg=traits
git+http://github.com/enthought/pyface.git#egg=pyface
git+http://github.com/enthought/traitsui.git#egg=traitsui
git+http://github.com/enthought/apptools.git#egg=apptools
unittest2
14 changes: 14 additions & 0 deletions dev_requirements_pillow.txt
@@ -0,0 +1,14 @@
numpy
coverage
pillow
pyparsing
PyPDF2
https://bitbucket.org/pyglet/pyglet/get/pyglet-1.1.4.zip
pygarrayimage
reportlab<=3.1
kiwisolver
git+http://github.com/enthought/traits.git#egg=traits
git+http://github.com/enthought/pyface.git#egg=pyface
git+http://github.com/enthought/traitsui.git#egg=traitsui
git+http://github.com/enthought/apptools.git#egg=apptools
unittest2
7 changes: 6 additions & 1 deletion enable/__init__.py
Expand Up @@ -9,6 +9,11 @@
'numpy',
'traits',
'traitsui',
'PIL',
'pyface',
]

# Do not force installation of pillow if PIL is already available.
try:
import PIL
except ImportError:
__requires__.append('pillow')
4 changes: 2 additions & 2 deletions kiva/tests/basecore2d_test_case.py
Expand Up @@ -19,15 +19,15 @@
from kiva import constants


class test_is_fully_transparent(unittest.TestCase):
class TestIsFullyTransparent(unittest.TestCase):

def test_simple(self):
self.assert_(basecore2d.is_fully_transparent([1, 1, 1, 0]))
self.assert_(not basecore2d.is_fully_transparent([0, 0, 0, 1]))
self.assert_(not basecore2d.is_fully_transparent([0, 0, 0, .5]))


class test_fill_equal(unittest.TestCase):
class TestFillEqual(unittest.TestCase):

def test_simple(self):
self.assert_(basecore2d.fill_equal(array([0, 0, 0, 0]),
Expand Down
30 changes: 30 additions & 0 deletions travis_setup.sh
@@ -0,0 +1,30 @@
#! /bin/sh
set -e

sudo apt-get update

# Install swig for agg
sudo apt-get install swig

# Simlinks for PIL compilation
sudo ln -s /usr/lib/`uname -i`-linux-gnu/libfreetype.so /usr/lib/
sudo ln -s /usr/lib/`uname -i`-linux-gnu/libjpeg.so /usr/lib/
sudo ln -s /usr/lib/`uname -i`-linux-gnu/libpng.so /usr/lib/
sudo ln -s /usr/lib/`uname -i`-linux-gnu/libz.so /usr/lib/

# setup gui
if [ "$ETS_TOOLKIT" = "wx" ]; then
echo "HERE"
sudo apt-get install python-wxtools python-wxgtk2.8-dbg
elif [ "$ETS_TOOLKIT" = "qt4" ]; then
sudo apt-get install python-qt4 python-qt4-dev python-sip python-qt4-gl libqt4-scripttools
fi

# compile cairo
wget -nv http://cairographics.org/releases/py2cairo-1.10.0.tar.bz2
tar -xf py2cairo-1.10.0.tar.bz2
cd py2cairo-1.10.0
./waf configure
./waf build
sudo ./waf install
cd ..

0 comments on commit db5e98f

Please sign in to comment.