From 867ac59e6873b8385cd30b7b0b308fc3bc8aa756 Mon Sep 17 00:00:00 2001
From: zooko <zooko@zooko.com>
Date: Wed, 2 Feb 2011 10:16:21 +0530
Subject: [PATCH] setup: setup_require setuptools_trial only if one of the argv
 is 'trial'

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 | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/zfec/setup.py b/zfec/setup.py
index a000c82..ac7c313 100755
--- a/zfec/setup.py
+++ b/zfec/setup.py
@@ -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.
-- 
2.45.2