From 50f8c37a2b0049a5586431b88efb5639a87f77f9 Mon Sep 17 00:00:00 2001
From: Zooko O'Whielacronx <zooko@zooko.com>
Date: Thu, 18 Nov 2010 23:40:43 -0800
Subject: [PATCH] setup: when testing, set the __requires__ as precisely as
 possible even if the version of this particular build of Tahoe-LAFS is not
 yet known (addresses test failure ref #1190, #1233)

---
 setup.py | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/setup.py b/setup.py
index 0b35f73b..027427a0 100644
--- a/setup.py
+++ b/setup.py
@@ -63,8 +63,12 @@ adglobals = {}
 execfile('src/allmydata/_auto_deps.py', adglobals)
 install_requires = adglobals['install_requires']
 
-if ('trial' in sys.argv or 'test' in sys.argv) and version is not None:
-    __requires__ = [APPNAME + '==' + version] + install_requires
+__requires__ = install_requires[:]
+if 'trial' in sys.argv or 'test' in sys.argv:
+    if version is not None:
+        __requires__.append(APPNAME + '==' + version)
+    else:
+        __requires__.append(APPNAME)
 
 egg = os.path.realpath(glob.glob('setuptools-*.egg')[0])
 sys.path.insert(0, egg)
-- 
2.45.2