From: david-sarah Date: Mon, 1 Nov 2010 00:33:16 +0000 (-0700) Subject: allmydata/__init__.py: move the call to require_auto_deps() to the top again, since... X-Git-Tag: trac-4800~4 X-Git-Url: https://git.rkrishnan.org/%5B/%5D%20/uri/frontends/FTP-and-SFTP.rst?a=commitdiff_plain;h=b8905fc766d05ce4a679355be686c79f9a12fdb6;p=tahoe-lafs%2Ftahoe-lafs.git allmydata/__init__.py: move the call to require_auto_deps() to the top again, since the [4784] patch turned out not to be the cause of the failure on the 'mm netbsd5' buildslave. --- diff --git a/src/allmydata/__init__.py b/src/allmydata/__init__.py index 03b86cf1..886fd4e0 100644 --- a/src/allmydata/__init__.py +++ b/src/allmydata/__init__.py @@ -4,6 +4,16 @@ Decentralized storage grid. community web site: U{http://tahoe-lafs.org/} """ +# We want to call require_auto_deps() before other imports, because the setuptools +# docs claim that if a distribution is installed with --multi-version, it might not +# be importable until after pkg_resources.require() has been called for it. We don't +# have an example of this happening at this time. It is possible that require() isn't +# actually needed because we set __requires__ in the generated startup script, but +# that would be an undocumented property of the setuptools implementation. + +from allmydata import _auto_deps +_auto_deps.require_auto_deps() + # This is just to suppress DeprecationWarnings from nevow and twisted. # See http://allmydata.org/trac/tahoe/ticket/859 and # http://divmod.org/trac/ticket/2994 . @@ -66,19 +76,6 @@ except ImportError: # http://allmydata.org/trac/tahoe/wiki/Versioning __full_version__ = __appname__ + '/' + str(__version__) -# Ideally we would call require_auto_deps() before importing nevow and twisted, but -# that causes midnightmagic's NetBSD buildslave to be unable to import allmydata.test, -# for reasons that are not understood. We want to call require_auto_deps() before other -# imports because the setuptools docs claim that if a distribution is installed with -# --multi-version, it might not importable until after pkg_resources.require() -# has been called for it. We don't have an example of this happening at this time. -# It is possible that require() isn't actually needed because we set __requires__ -# in the generated startup script, but that would be an undocumented property of the -# setuptools implementation. - -from allmydata import _auto_deps -_auto_deps.require_auto_deps() - import os, platform, re, subprocess, sys _distributor_id_cmdline_re = re.compile("(?:Distributor ID:)\s*(.*)", re.I) _release_cmdline_re = re.compile("(?:Release:)\s*(.*)", re.I)