diff --git a/.travis.yml b/.travis.yml index 25ceb782..6432bbd1 100644 --- a/.travis.yml +++ b/.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 \ No newline at end of file + - "flake8 --ignore=E501 ./fido" + # pep257: fido.py is WIP + - 'pep257 --match="(?!fido).*\.py" ./fido' + - "python setup.py test" diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 00000000..b7e47898 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,2 @@ +[aliases] +test=pytest diff --git a/setup.py b/setup.py index d1e238c6..18d3ed0d 100644 --- a/setup.py +++ b/setup.py @@ -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/*.*']},