setup: setup_require setuptools_trial only if one of the argv is 'trial'
authorzooko <zooko@zooko.com>
Wed, 2 Feb 2011 04:46:21 +0000 (10:16 +0530)
committerzooko <zooko@zooko.com>
Wed, 2 Feb 2011 04:46:21 +0000 (10:16 +0530)
Ignore-this: a154346b06a8305ef942ac664c6d85d5
This is to workaround the bugs in distribute's handling of plugins needed at setup time or test time. :-(

darcs-hash:f8fb6ccae5393d318e77f1927b97da7e2353a900

zfec/setup.py

index a000c82af0348cf4cb2738fa1e68b47185c5f971..ac7c3139d0bbe38b152e1257bf889061c87ddbb6 100755 (executable)
@@ -120,7 +120,11 @@ if False:
     setup_requires.append('setuptools_darcs >= 1.1.0')
 
 
-setup_requires.append('setuptools_trial >= 0.5')
+# setuptools_trial is needed if you want "./setup.py trial" or
+# "./setup.py test" to execute the tests.
+# http://pypi.python.org/pypi/setuptools_trial
+if 'trial' in sys.argv[1:]:
+    setup_requires.extend(['setuptools_trial >= 0.5'])
 
 # trialcoverage is required if you want the "trial" unit test runner to have a
 # "--reporter=bwverbose-coverage" option which produces code-coverage results.