From: Zooko O'Whielacronx Date: Mon, 1 Dec 2008 18:48:04 +0000 (-0700) Subject: setup: integrate the bundled setuptools_trial plugin with Chris Galvan's patch to... X-Git-Tag: allmydata-tahoe-1.3.0~225 X-Git-Url: https://git.rkrishnan.org/simplejson/encoder.py.html?a=commitdiff_plain;h=fcd4d4d2e9b1a0c9d28d408da8eccc90185e33fa;p=tahoe-lafs%2Ftahoe-lafs.git setup: integrate the bundled setuptools_trial plugin with Chris Galvan's patch to use that plugin --- diff --git a/setup.py b/setup.py index 07c9e348..534feed6 100644 --- a/setup.py +++ b/setup.py @@ -121,6 +121,9 @@ else: from setuptools import find_packages, setup from setuptools.command import sdist from distutils.core import Command + +import pkg_resources +pkg_resources.require('setuptools_trial') from setuptools_trial.setuptools_trial import TrialTest # Make the dependency-version-requirement, which is used by the Makefile at @@ -202,6 +205,11 @@ setup_requires.extend(['Twisted >= 2.4.0', 'setuptools_trial']) if 'darcsver' in sys.argv[1:]: setup_requires.append('darcsver >= 1.1.5') +# setuptools_trial is needed only if you want "./setup.py trial" to execute the tests. +# http://pypi.python.org/pypi/setuptools_trial +if 'trial' in sys.argv[1:]: + setup_requires.append('setuptools_trial >= 0.2') + # setuptools_darcs is required to produce complete distributions (such as with # "sdist" or "bdist_egg"), unless there is a PKG-INFO file present which shows # that this is itself a source distribution.