diff --git a/.importanizerc b/.importanizerc new file mode 100644 index 0000000..fb3ad82 --- /dev/null +++ b/.importanizerc @@ -0,0 +1,23 @@ +{ + "exclude": [ + "*/docs/conf.py", + "*/.tox" + ], + "groups": [ + { + "type": "stdlib" + }, + { + "type": "remainder" + }, + { + "type": "packages", + "packages": [ + "skipnose" + ] + }, + { + "type": "local" + } + ] +} diff --git a/.travis.yml b/.travis.yml index bf3b0ee..e181da4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,7 @@ language: python python: - - "3.4" + - "3.6" - "2.7" - "pypy" diff --git a/HISTORY.rst b/HISTORY.rst index 4684188..2752405 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -3,11 +3,18 @@ History ------- +0.3.1 (2017-07-28) +~~~~~~~~~~~~~~~~~~ + +* Using wheels for distribution +* Excluding tests from being installed +* Added importanize as CI step + 0.3.0 (2017-02-18) ~~~~~~~~~~~~~~~~~~ * **New** ``--skipnose-include`` clauses now can either be ANDed or ORed. - + ANDed example:: --skipnose-include=foo --skipnose-include=bar diff --git a/Makefile b/Makefile index 8fffe0b..7899c22 100644 --- a/Makefile +++ b/Makefile @@ -44,6 +44,7 @@ clean-test-all: clean-test lint: flake8 . + importanize --ci test: nosetests ${NOSE_FLAGS} tests/ @@ -58,7 +59,9 @@ check: clean-build clean-pyc clean-test lint test-coverage release: clean python setup.py sdist upload + python setup.py bdist_wheel upload dist: clean python setup.py sdist + python setup.py bdist_wheel ls -l dist diff --git a/requirements-dev.txt b/requirements-dev.txt index 8bee753..5c5901e 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,6 +1,7 @@ -r requirements.txt coverage flake8 +importanize mock rednose tox diff --git a/setup.cfg b/setup.cfg index 347c9ca..83f5090 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,2 +1,5 @@ +[bdist_wheel] +universal=1 + [flake8] -exclude = .tox +exclude=.tox diff --git a/setup.py b/setup.py index 40b5d81..ed4decc 100644 --- a/setup.py +++ b/setup.py @@ -1,14 +1,16 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -from __future__ import unicode_literals, print_function +from __future__ import print_function, unicode_literals import os -import re -from setuptools import setup, find_packages + +from setuptools import find_packages, setup + +from skipnose import __author__, __version__ def read(fname): - return (open(os.path.join(os.path.dirname(__file__), fname), 'rb') - .read().decode('utf-8')) + with open(os.path.join(os.path.dirname(__file__), fname), 'rb') as fid: + return fid.read().decode('utf-8') authors = read('AUTHORS.rst') @@ -17,10 +19,6 @@ def read(fname): readme = read('README.rst') -module_file = read("skipnose/__init__.py") -metadata = dict(re.findall("__([a-z]+)__\s*=\s*'([^']+)'", module_file)) - - requirements = read('requirements.txt').splitlines() + [ 'setuptools', ] @@ -34,13 +32,13 @@ def read(fname): setup( name='skipnose', - version=metadata['version'], - author=metadata['author'], + version=__version__, + author=__author__, description='Nose plugin which allows to include/exclude directories ' 'for testing by their glob pattern.', long_description='\n\n'.join([readme, history, authors, licence]), url='https://github.com/Dealertrack/skipnose', - packages=find_packages(exclude=['test', 'test.*']), + packages=find_packages(exclude=['tests', 'tests.*']), install_requires=requirements, test_suite='tests', tests_require=test_requirements, diff --git a/skipnose/__init__.py b/skipnose/__init__.py index 1e3e991..09d8b3d 100644 --- a/skipnose/__init__.py +++ b/skipnose/__init__.py @@ -1,9 +1,13 @@ # -*- coding: utf-8 -*- -from __future__ import unicode_literals, print_function - -from .skipnose import SkipNose # noqa +from __future__ import print_function, unicode_literals __author__ = 'Miroslav Shubernetskiy' __email__ = 'miroslav@miki725.com' -__version__ = '0.3.0' +__version__ = '0.3.1' + + +try: + from .skipnose import SkipNose # noqa +except ImportError: + pass # probably during install diff --git a/tests/tests_skipnose.py b/tests/tests_skipnose.py index eaa548c..d0d7dd5 100644 --- a/tests/tests_skipnose.py +++ b/tests/tests_skipnose.py @@ -4,6 +4,7 @@ import mock from nose.case import FunctionTestCase from nose.plugins.skip import SkipTest + from skipnose.skipnose import SkipNose, walk_subfolders diff --git a/tox.ini b/tox.ini index 94b23c2..f9a6f30 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py27, py34, pypy +envlist = py27, py36, pypy [testenv] setenv =