diff --git a/.gitignore b/.gitignore index c92ab15..9eb7a7b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,7 @@ *.pyc *.DS_Store +.coverage +.tox *~ docs/_build *.egg-info diff --git a/.travis.yml b/.travis.yml index 3fd489d..8b78ef9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,13 @@ language: python - -python: - - 2.6 - - 2.7 - -install: pip install coveralls -script: coverage run --source=fitbit setup.py test +python: 3.3 +env: + - TOX_ENV=pypy + - TOX_ENV=py34 + - TOX_ENV=py33 + - TOX_ENV=py32 + - TOX_ENV=py27 + - TOX_ENV=py26 +install: + - pip install coveralls tox +script: tox -e $TOX_ENV after_success: coveralls diff --git a/MANIFEST.in b/MANIFEST.in index be18a84..8bd82f5 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1 +1 @@ -include LICENSE AUTHORS README.md requirements* docs/* +include LICENSE AUTHORS README.md requirements/* docs/* diff --git a/requirements.txt b/requirements/base.txt similarity index 100% rename from requirements.txt rename to requirements/base.txt diff --git a/requirements/dev.txt b/requirements/dev.txt new file mode 100644 index 0000000..5ad7c4b --- /dev/null +++ b/requirements/dev.txt @@ -0,0 +1,5 @@ +-r base.txt +-r test.txt + +Sphinx==1.2.2 +tox==1.7.1 diff --git a/requirements/test.txt b/requirements/test.txt new file mode 100644 index 0000000..969f7a2 --- /dev/null +++ b/requirements/test.txt @@ -0,0 +1,2 @@ +mock==1.0.1 +coverage==3.7.1 diff --git a/requirements_dev.txt b/requirements_dev.txt deleted file mode 100644 index 647fa3e..0000000 --- a/requirements_dev.txt +++ /dev/null @@ -1,4 +0,0 @@ --r requirements.txt --r requirements_test.txt - -Sphinx==1.2.2 diff --git a/requirements_test.txt b/requirements_test.txt deleted file mode 100644 index c78278b..0000000 --- a/requirements_test.txt +++ /dev/null @@ -1 +0,0 @@ -mock==1.0.1 diff --git a/setup.py b/setup.py index 79c3038..3145bfe 100644 --- a/setup.py +++ b/setup.py @@ -5,8 +5,8 @@ from setuptools import setup -required = [line for line in open('requirements.txt').read().split("\n")] -required_dev = [line for line in open('requirements_dev.txt').read().split("\n") if not line.startswith("-r")] +required = [line for line in open('requirements/base.txt').read().split("\n")] +required_test = [line for line in open('requirements/test.txt').read().split("\n") if not line.startswith("-r")] fbinit = open('fitbit/__init__.py').read() author = re.search("__author__ = '([^']+)'", fbinit).group(1) @@ -27,7 +27,7 @@ install_requires=["distribute"] + required, license='Apache 2.0', test_suite='fitbit_tests.all_tests', - tests_require=required_dev, + tests_require=required_test, classifiers=( 'Intended Audience :: Developers', 'Natural Language :: English', diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..e2f8462 --- /dev/null +++ b/tox.ini @@ -0,0 +1,24 @@ +[tox] +envlist = pypy,py34,py33,py32,py27,py26 + +[testenv] +commands = coverage run --source=fitbit setup.py test +deps = -r{toxinidir}/requirements/test.txt + +[testenv:pypy] +basepython = pypy + +[testenv:py34] +basepython = python3.4 + +[testenv:py33] +basepython = python3.3 + +[testenv:py32] +basepython = python3.2 + +[testenv:py27] +basepython = python2.7 + +[testenv:py26] +basepython = python2.6