Skip to content

Commit

Permalink
Merge pull request #133 from flokli/travis
Browse files Browse the repository at this point in the history
add .travis.yml
  • Loading branch information
GuillaumeSeren committed May 24, 2017
2 parents d1cf5f6 + c27bff3 commit bbbaa55
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 5 deletions.
23 changes: 23 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
dist: trusty
language: python
python:
- "2.7"
- "3.4"
- "3.5"
- "3.6"

addons:
apt:
packages:
- notmuch
- python-notmuch
- python3-notmuch

install:
- ln -s /usr/lib/python3/dist-packages/notmuch ${VIRTUAL_ENV}/lib/python*/site-packages
- pip install codeclimate-test-reporter
- python setup.py install
script:
- coverage run --source=afew setup.py test
after_success:
- codeclimate-test-reporter
12 changes: 7 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,16 @@
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#

import os
from setuptools import setup, find_packages
from sys import version_info

def get_requires():
if version_info >= (3, 0):
return ['notmuch', 'chardet']
else:
return ['notmuch', 'subprocess32', 'chardet']
if os.environ.get('TRAVIS') != 'true':
yield 'notmuch'
yield 'chardet'
if version_info < (3, 0):
yield 'subprocess32'

setup(
name='afew',
Expand All @@ -51,7 +53,7 @@ def get_requires():
'SpamFilter = afew.filters.SpamFilter:SpamFilter',
],
},
install_requires=get_requires(),
install_requires=list(get_requires()),
provides=['afew'],
classifiers=[
'Development Status :: 4 - Beta',
Expand Down

0 comments on commit bbbaa55

Please sign in to comment.