From d0e226e2635e357b2925ee691563a8bb6937f0a1 Mon Sep 17 00:00:00 2001 From: Karl Kroening Date: Tue, 13 Jun 2017 23:18:19 -0600 Subject: [PATCH] Add tox support --- .gitignore | 1 + .python-version | 5 +++++ .travis.yml | 14 ++++++++++++-- requirements.txt | 2 ++ setup.py | 36 +++++++++++++++++++++++++----------- tox.ini | 13 +++++++++++++ 6 files changed, 58 insertions(+), 13 deletions(-) create mode 100644 .python-version create mode 100644 tox.ini diff --git a/.gitignore b/.gitignore index 567ce92..fe66d8d 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ dist/ ffmpeg/tests/sample_data/dummy2.mp4 venv* +.tox/ diff --git a/.python-version b/.python-version new file mode 100644 index 0000000..e2d8f77 --- /dev/null +++ b/.python-version @@ -0,0 +1,5 @@ +3.3.6 +3.4.6 +3.5.3 +3.6.1 +jython-2.7.0 diff --git a/.travis.yml b/.travis.yml index 4442bf1..12ea7bc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,8 +2,18 @@ language: python before_install: - curl -O https://johnvansickle.com/ffmpeg/releases/ffmpeg-3.3.1-64bit-static.tar.xz - tar Jxf ffmpeg-3.3.1-64bit-static.tar.xz +env: + - TOX_ENV=py27 + - TOX_ENV=py33 + - TOX_ENV=py34 + - TOX_ENV=py35 + - TOX_ENV=py36 + - TOX_ENV=pypy install: - - pip install -r requirements.txt + - pip install tox script: - export PATH=$(readlink -f ffmpeg-3.3.1-64bit-static):$PATH - - py.test + - tox -e $TOX_ENV +cache: + directories: + - .tox diff --git a/requirements.txt b/requirements.txt index 55ff9de..d7e2779 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,4 @@ +future pytest sphinx +tox diff --git a/setup.py b/setup.py index d8b6334..395acec 100644 --- a/setup.py +++ b/setup.py @@ -64,15 +64,29 @@ misc_keywords = [ keywords = misc_keywords + file_formats + filter_names setup( - name = 'ffmpeg-python', - packages = ['ffmpeg'], - version = '0.1.5', - description = 'Python bindings for FFmpeg - with support for complex filtering', - author = 'Karl Kroening', - author_email = 'karlk@kralnet.us', - url = 'https://github.com/kkroening/ffmpeg-python', - download_url = download_url, - classifiers = [], - keywords = keywords, - long_description = long_description, + name='ffmpeg-python', + packages=['ffmpeg'], + version='0.1.5', + description='Python bindings for FFmpeg - with support for complex filtering', + author='Karl Kroening', + author_email='karlk@kralnet.us', + url='https://github.com/kkroening/ffmpeg-python', + download_url=download_url, + keywords=keywords, + long_description=long_description, + install_requires=['future'], + classifiers=[ + 'Intended Audience :: Developers', + 'License :: OSI Approved :: Apache Software License', + 'Natural Language :: English', + 'Operating System :: OS Independent', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + ], ) diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..ed5c2e6 --- /dev/null +++ b/tox.ini @@ -0,0 +1,13 @@ +# Tox (https://tox.readthedocs.io/) is a tool for running tests +# in multiple virtualenvs. This configuration file will run the +# test suite on all supported python versions. To use it, "pip install tox" +# and then run "tox" from this directory. + +[tox] +envlist = py27, py33, py34, py35, py36, pypy + +[testenv] +commands = py.test +deps = + future + pytest