Skip to content

Commit

Permalink
Travis: envs py{2,3}, flake8, pep257 and pytest
Browse files Browse the repository at this point in the history
  • Loading branch information
sevein committed May 9, 2016
1 parent 3d30f54 commit dbde222
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 10 deletions.
18 changes: 12 additions & 6 deletions .travis.yml
@@ -1,12 +1,18 @@
language: python
---
language: "python"
python:
- "2.7"
- "3.2"
- "3.3"
- "3.4"
- "3.5"

install:
- python setup.py bdist --formats=zip
- sudo python setup.py install
- "pip install -U pip flake8 pep257"
- "python setup.py build"
- "python setup.py bdist --formats=zip"
- "sudo python setup.py install"

script:
- python -m unittest discover
- "flake8 --ignore=E501 ./fido"
# pep257: fido.py is WIP
- 'pep257 --match="(?!fido).*\.py" ./fido'
- "python setup.py test"
2 changes: 2 additions & 0 deletions setup.cfg
@@ -0,0 +1,2 @@
[aliases]
test=pytest
14 changes: 10 additions & 4 deletions setup.py
Expand Up @@ -27,16 +27,22 @@ def find_version(*file_paths):
]


# Attempt automatic python2 to python3 conversion if using python3
extra = {}
if sys.version_info >= (3,):
extra['use_2to3'] = True
setup_requires = [
'pytest-runner',
]


tests_require = [
'pytest',
]


setup(
name='fido',
version=find_version('fido', '__init__.py'),
install_requires=install_requires,
setup_requires=setup_requires,
tests_require=tests_require,
description='Format Identification for Digital Objects (FIDO)',
packages=['fido'],
package_data={'fido': ['*.*', 'conf/*.*']},
Expand Down

0 comments on commit dbde222

Please sign in to comment.