diff --git a/.gitignore b/.gitignore index d6cdf627..f8165eb4 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,4 @@ cram.egg-info tags cscope.* .idea +.tox diff --git a/MANIFEST.in b/MANIFEST.in index f4751b6e..f247062b 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,5 +1,6 @@ include .coveragerc .pylintrc .travis.yml Makefile MANIFEST.in include *.md *.rst *.txt contrib/* scripts/* exclude contrib/PKGBUILD +include tox.ini recursive-include examples *.t recursive-include tests *.py *.sh *.t diff --git a/requirements-ci.txt b/requirements-ci.txt new file mode 100644 index 00000000..053148f8 --- /dev/null +++ b/requirements-ci.txt @@ -0,0 +1 @@ +tox diff --git a/setup.cfg b/setup.cfg index 3abed0b8..23a979a6 100644 --- a/setup.cfg +++ b/setup.cfg @@ -7,3 +7,6 @@ universal = true # E301: expected blank line # E302: two new lines between functions/etc. ignore = E129,E261,E301,E302 + +[flake8] +ignore = E129,E261,E301,E302 diff --git a/setup.py b/setup.py index e02112a9..f65d60a4 100755 --- a/setup.py +++ b/setup.py @@ -19,6 +19,7 @@ def long_description(): """Get the long description from the README""" return open(os.path.join(sys.path[0], 'README.rst')).read() + setup( author='Brodie Rao', author_email='brodie@bitheap.org', diff --git a/tests/dist.t b/tests/dist.t deleted file mode 100644 index 2de920aa..00000000 --- a/tests/dist.t +++ /dev/null @@ -1,8 +0,0 @@ -Skip this test if check-manifest isn't available: - - $ command -v check-manifest > /dev/null || exit 80 - -Confirm that "make dist" isn't going to miss any files: - - $ check-manifest "$TESTDIR/.." - lists of files in version control and sdist match diff --git a/tests/pep8.t b/tests/pep8.t deleted file mode 100644 index e1c181cb..00000000 --- a/tests/pep8.t +++ /dev/null @@ -1,7 +0,0 @@ -Skip this test if pep8 isn't available: - - $ command -v pep8 > /dev/null || exit 80 - -Check that the Python source code style is PEP 8 compliant: - - $ pep8 --config="$TESTDIR/.."/setup.cfg --repeat "$TESTDIR/.." diff --git a/tests/pyflakes.t b/tests/pyflakes.t deleted file mode 100644 index 1a2a806b..00000000 --- a/tests/pyflakes.t +++ /dev/null @@ -1,7 +0,0 @@ -Skip this test if pyflakes isn't available: - - $ command -v pyflakes > /dev/null || exit 80 - -Check that there are no obvious Python source code errors: - - $ pyflakes "$TESTDIR/.." diff --git a/tox.ini b/tox.ini new file mode 100644 index 00000000..6610b749 --- /dev/null +++ b/tox.ini @@ -0,0 +1,34 @@ +[tox] +envlist = py27,py34,py35,py36,pypy,pypy3,flake8,manifest +minversion = 1.9.0 +skip-missing-interpreters = True + +[testenv] +deps = -rrequirements.txt +commands = + make test +whitelist_externals = make + +[testenv:flake8] +basepython = python3.4 +commands = + flake8 setup.py cram +deps = + flake8==3.3.0 +skip_install = True + +[testenv:manifest] +basepython = python3.4 +commands = + check-manifest +deps = + check-manifest==0.35 +skip_install = True + +[testenv:pep8] +basepython = python3.4 +commands = + pep8 --config=setup.cfg --repeat . +deps = + pep8==1.7.0 +skip_install = True