From 3f1a7b6dcf5801093610c7a0ecae8f7115e706a7 Mon Sep 17 00:00:00 2001 From: Jason Madden Date: Tue, 9 May 2017 10:18:00 -0500 Subject: [PATCH] Add Python version classifiers. Also add setup.cfg to indicate that wheels are universal. Fix tests on Travis and enable coveralls. Add appropriate .coveragerc. --- .coveragerc | 6 ++++++ .gitignore | 2 ++ .travis.yml | 30 +++++++++++++++++++++--------- CHANGES.txt | 2 +- MANIFEST.in | 3 +++ setup.cfg | 2 ++ setup.py | 13 +++++++++++-- tox.ini | 6 +----- 8 files changed, 47 insertions(+), 17 deletions(-) create mode 100644 .coveragerc create mode 100644 setup.cfg diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 0000000..af40312 --- /dev/null +++ b/.coveragerc @@ -0,0 +1,6 @@ +[run] +source = src + +[report] +exclude_lines = + pragma: no cover diff --git a/.gitignore b/.gitignore index 5149542..6bacfe5 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,5 @@ build/ dist/ *.egg-info/ .tox/ +.coverage +htmlcov/ diff --git a/.travis.yml b/.travis.yml index f79369f..16cf6b4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,13 +1,25 @@ language: python sudo: false -env: - - TOXENV=py27 - - TOXENV=py35 - - TOXENV=py36 - - TOXENV=pypy -install: - - travis_retry pip install tox +python: + - 2.7 + - 3.5 + - 3.6 + - pypy-5.4.1 script: - - tox + - coverage run -m zope.testrunner --test-path=src --auto-color --auto-progress + +after_success: + - coveralls notifications: - email: false + email: false + +install: + - pip install -U pip setuptools + - pip install -U coveralls coverage + - pip install -U -e ".[test]" + + +cache: pip + +before_cache: + - rm -f $HOME/.cache/pip/log/debug.log diff --git a/CHANGES.txt b/CHANGES.txt index c146195..a865491 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -5,7 +5,7 @@ CHANGES 4.0.1 (unreleased) ------------------ -- Nothing changed yet. +- Packaging: Add the Python version and implementation classifiers. 4.0.0 (2017-04-17) diff --git a/MANIFEST.in b/MANIFEST.in index 96cf5eb..49188b7 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,6 +1,9 @@ include *.py include *.txt include buildout.cfg +include tox.ini +include .travis.yml +include .coveragerc recursive-include src *.cfg recursive-include src *.txt diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..2a9acf1 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,2 @@ +[bdist_wheel] +universal = 1 diff --git a/setup.py b/setup.py index b97cda7..9f742d8 100644 --- a/setup.py +++ b/setup.py @@ -25,6 +25,7 @@ def read(*rnames): return open(os.path.join(os.path.dirname(__file__), *rnames)).read() TESTS_REQUIRE = [ + 'zope.testrunner', ] setup(name='zope.app.schema', @@ -46,10 +47,18 @@ def read(*rnames): 'Intended Audience :: Developers', 'License :: OSI Approved :: Zope Public License', 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: Implementation :: CPython', + 'Programming Language :: Python :: Implementation :: PyPy', 'Natural Language :: English', 'Operating System :: OS Independent', 'Topic :: Internet :: WWW/HTTP', - 'Framework :: Zope3'], + 'Framework :: Zope3', + ], url='http://pypi.python.org/pypi/zope.app.schema', license='ZPL 2.1', packages=find_packages('src'), @@ -62,7 +71,7 @@ def read(*rnames): 'zope.component', 'zope.interface', 'zope.schema', - ], + ], include_package_data = True, tests_require=TESTS_REQUIRE, test_suite='zope.app.schema.tests.test_suite', diff --git a/tox.ini b/tox.ini index a7c3ef6..2cbdb94 100644 --- a/tox.ini +++ b/tox.ini @@ -2,11 +2,7 @@ envlist = py27,py35,py36,pypy [testenv] -usedevelop = true commands = - python setup.py -q test + zope-testrunner --test-path=src [] deps = - zope.component - zope.interface - zope.schema .[test]