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)

This commit is contained in:
Zooko O'Whielacronx 2010-11-18 23:40:43 -08:00
parent bc396b53ab
commit 50f8c37a2b

View File

@ -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)