From 35a0142f9b1e7a9862737f78da9ac4438f61338e Mon Sep 17 00:00:00 2001 From: Lars Butler Date: Mon, 5 Oct 2015 12:03:46 +0200 Subject: [PATCH 1/3] setup.py, tox.ini: move nose/rednose from install deps to test deps Remove nose/rednose from `setup_requires` and instead declare them in `tests_require`. Also explicitly add `nose` and `rednose` to dependencies list in tox.ini (to avoid breaking test runs). `python setup.py nosetests` is the preferred way for running tests, and this works, except that placing test deps (nose/rednose) in the `setup_requires` also means that these dependencies are pulled in for installs of mongoengine. These deps are not actually be required just to run mongoengine, so setup.py should not force users to install these dependencies. This refactoring should not change any test run semantics. --- setup.py | 5 ++--- tox.ini | 2 ++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index f2afa8ee..7384e04d 100644 --- a/setup.py +++ b/setup.py @@ -52,13 +52,13 @@ CLASSIFIERS = [ extra_opts = {"packages": find_packages(exclude=["tests", "tests.*"])} if sys.version_info[0] == 3: extra_opts['use_2to3'] = True - extra_opts['tests_require'] = ['nose', 'coverage==3.7.1', 'blinker', 'Pillow>=2.0.0'] + extra_opts['tests_require'] = ['nose', 'rednose', 'coverage==3.7.1', 'blinker', 'Pillow>=2.0.0'] if "test" in sys.argv or "nosetests" in sys.argv: extra_opts['packages'] = find_packages() extra_opts['package_data'] = {"tests": ["fields/mongoengine.png", "fields/mongodb_leaf.png"]} else: # coverage 4 does not support Python 3.2 anymore - extra_opts['tests_require'] = ['nose', 'coverage==3.7.1', 'blinker', 'Pillow>=2.0.0', 'python-dateutil'] + extra_opts['tests_require'] = ['nose', 'rednose', 'coverage==3.7.1', 'blinker', 'Pillow>=2.0.0', 'python-dateutil'] if sys.version_info[0] == 2 and sys.version_info[1] == 6: extra_opts['tests_require'].append('unittest2') @@ -79,6 +79,5 @@ setup(name='mongoengine', classifiers=CLASSIFIERS, install_requires=['pymongo>=2.7.1'], test_suite='nose.collector', - setup_requires=['nose', 'rednose'], # Allow proper nose usage with setuptols and tox **extra_opts ) diff --git a/tox.ini b/tox.ini index 3f69b5e8..e6aa7c81 100644 --- a/tox.ini +++ b/tox.ini @@ -6,6 +6,8 @@ envlist = {py26,py27,py32,py33,py34,pypy,pypy3}-{mg27,mg28} commands = python setup.py nosetests {posargs} deps = + nose + rednose mg27: PyMongo<2.8 mg28: PyMongo>=2.8,<3.0 mg30: PyMongo>=3.0 From b52cae6575aa7da2a53a2478bb6e242b1b042dac Mon Sep 17 00:00:00 2001 From: Lars Butler Date: Mon, 5 Oct 2015 12:15:35 +0200 Subject: [PATCH 2/3] AUTHORS: Add Lars Butler (that's me!) --- AUTHORS | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS b/AUTHORS index a66bf7c0..4d5e69a3 100644 --- a/AUTHORS +++ b/AUTHORS @@ -228,3 +228,4 @@ that much better: * Vicki Donchenko (https://github.com/kivistein) * Emile Caron (https://github.com/emilecaron) * Amit Lichtenberg (https://github.com/amitlicht) + * Lars Butler (https://github.com/larsbutler) From 9b500cd867eb73111b4b1bf5d24a1fd6e898cb44 Mon Sep 17 00:00:00 2001 From: Lars Butler Date: Mon, 5 Oct 2015 12:16:12 +0200 Subject: [PATCH 3/3] docs/changelog.rst: fix #1079 to version 0.10.1 - DEV --- docs/changelog.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/changelog.rst b/docs/changelog.rst index 4e9dea58..b340aab0 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -10,6 +10,7 @@ Changes in 0.10.1 - DEV - Document save's save_condition error raises `SaveConditionError` exception #1070 - Fix Document.reload for DynamicDocument. #1050 - StrictDict & SemiStrictDict are shadowed at init time. #1105 +- Remove test dependencies (nose and rednose) from install dependencies list. #1079 Changes in 0.10.0 =================