From b6e43e851db3b5f6224ff1e66227f3bcfd7bb4e4 Mon Sep 17 00:00:00 2001 From: Andre Anjos <andre.anjos@idiap.ch> Date: Mon, 11 Feb 2013 17:36:02 +0100 Subject: [PATCH] Fix typo; Add new nosetests option --- README.rst | 7 ++++++- setup.py | 2 +- xbob/buildout/scripts.py | 4 ++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index ab45073..91ab98c 100644 --- a/README.rst +++ b/README.rst @@ -55,7 +55,7 @@ This recipe installs **all** most used scripts and interpreter proxies for your package. It will look at the ``buildout`` section entry called ``prefixes``, that potentially lists prefixes that should be **prepended** to the default python environment. In these prefixes, it will look for standard python -directories. If one or more are found found, these paths are **prepended** into +directories. If one or more are found, these paths are **prepended** into the resulting scripts generated by this recipe and eggs will be searched on those locations prioritarily. @@ -116,6 +116,11 @@ extra-paths Extra paths to be appended in a generated script. To prepend, using the ``prefixes`` entry. +nose-flags + These are extra flags that are **appended** to the given ``nosetests`` + command line, automatically. Use this to preset arguments you like running + all the time like ``-v``, for example. + Sphinx Recipe (Deprecated) -------------------------- diff --git a/setup.py b/setup.py index e57f4e1..462ca40 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ from setuptools import setup, find_packages setup( name='xbob.buildout', - version='0.2.2', + version='0.2.3', description="zc.buildout recipes to perform a variety of tasks required by Bob satellite packages", keywords=['buildout', 'sphinx', 'nose', 'recipe', 'eggs', 'bob'], url='http://github.com/bioidiap/xbob.buildout', diff --git a/xbob/buildout/scripts.py b/xbob/buildout/scripts.py index a4f56c3..e158dbe 100644 --- a/xbob/buildout/scripts.py +++ b/xbob/buildout/scripts.py @@ -83,6 +83,10 @@ class Recipe(object): nose_options = zc.buildout.buildout.Options(buildout, name + '+nosetests', options.copy()) if nose_options.has_key('interpreter'): del nose_options['interpreter'] + if nose_options.has_key('nose-flags'): + flags = tools.parse_list(nose_options['nose-flags']) + init_code = ['sys.argv.append(%r)' % k for k in flags] + nose_options['initialization'] = '\n'.join(init_code) nose_options['entry-points'] = 'nosetests=nose:run_exit' nose_options['scripts'] = 'nosetests' if 'nose' not in self.eggs: self.eggs.append('nose') -- GitLab