diff -rN -u old-tahoe-1.8.0c2/setup.py new-tahoe-1.8.0c2/setup.py
--- old-tahoe-1.8.0c2/setup.py	2010-08-11 02:04:02.900000000 +0100
+++ new-tahoe-1.8.0c2/setup.py	2010-08-11 02:04:09.117000000 +0100
@@ -11,6 +11,16 @@
 
 import glob, os, shutil, stat, subprocess, sys, zipfile, re
 
+# Set 'external_dependency_management' to True if dependencies should be satisfied by
+# some external package management system other than setuptools. In that case, set
+# 'setup_args' to any additional arguments to be passed to 'setup', if needed.
+# (Keep the blank lines around these definitions so that patches apply cleanly.)
+
+
+external_dependency_management = False
+setup_args = {}
+
+
 ##### sys.path management
 
 def pylibdir(prefixdir):
@@ -87,59 +97,6 @@
     "Topic :: System :: Archiving",
     ]
 
-
-setup_requires = []
-
-# The darcsver command from the darcsver plugin is needed to initialize the
-# distribution's .version attribute correctly. (It does this either by
-# examining darcs history, or if that fails by reading the
-# src/allmydata/_version.py file). darcsver will also write a new version
-# stamp in src/allmydata/_version.py, with a version number derived from
-# darcs history. Note that the setup.cfg file has an "[aliases]" section
-# which enumerates commands that you might run and specifies that it will run
-# darcsver before each one. If you add different commands (or if I forgot
-# some that are already in use), you may need to add it to setup.cfg and
-# configure it to run darcsver before your command, if you want the version
-# number to be correct when that command runs.
-# http://pypi.python.org/pypi/darcsver
-setup_requires.append('darcsver >= 1.2.0')
-
-# Nevow requires Twisted to setup, but doesn't declare that requirement in a
-# way that enables setuptools to satisfy that requirement before Nevow's
-# setup.py tried to "import twisted". Fortunately we require setuptools_trial
-# to setup and setuptools_trial requires Twisted to install, so hopefully
-# everything will work out until the Nevow issue is fixed:
-# http://divmod.org/trac/ticket/2629 setuptools_trial is needed if you want
-# "./setup.py trial" or "./setup.py test" to execute the tests (and in order
-# to make sure Twisted is installed early enough -- see the paragraph above).
-# http://pypi.python.org/pypi/setuptools_trial
-setup_requires.extend(['setuptools_trial >= 0.5'])
-
-# setuptools_darcs is required to produce complete distributions (such as
-# with "sdist" or "bdist_egg") (unless there is a PKG-INFO file present which
-# shows that this is itself a source distribution). For simplicity, and
-# because there is some unknown error with setuptools_darcs when building and
-# testing tahoe all in one python command on some platforms, we always add it
-# to setup_requires. http://pypi.python.org/pypi/setuptools_darcs
-setup_requires.append('setuptools_darcs >= 1.1.0')
-
-# trialcoverage is required if you want the "trial" unit test runner to have a
-# "--reporter=bwverbose-coverage" option which produces code-coverage results.
-# The required version is 0.3.3, because that is the latest version that only
-# depends on a version of pycoverage for which binary packages are available.
-if "--reporter=bwverbose-coverage" in sys.argv:
-    setup_requires.append('trialcoverage >= 0.3.3')
-
-# stdeb is required to produce Debian files with the "sdist_dsc" command.
-if "sdist_dsc" in sys.argv:
-    setup_requires.append('stdeb >= 0.3')
-
-tests_require=[
-    # Mock - Mocking and Testing Library
-    # http://www.voidspace.org.uk/python/mock/
-    "mock",
-    ]
-
 class ShowSupportLib(Command):
     user_options = []
     def initialize_options(self):
@@ -321,11 +278,6 @@
 
         return sdist.sdist.make_distribution(self)
 
-# Tahoe's dependencies are managed by the find_links= entry in setup.cfg and
-# the _auto_deps.install_requires list, which is used in the call to setup()
-# below.
-from _auto_deps import install_requires
-
 APPNAME='allmydata-tahoe'
 APPNAMEFILE = os.path.join('src', 'allmydata', '_appname.py')
 APPNAMEFILESTR = "__appname__ = '%s'" % (APPNAME,)
@@ -339,10 +291,71 @@
         print "Error -- this setup.py file is configured with the 'application name' to be '%s', but there is already a file in place in '%s' which contains the contents '%s'.  If the file is wrong, please remove it and setup.py will regenerate it and write '%s' into it." % (APPNAME, APPNAMEFILE, curappnamefilestr, APPNAMEFILESTR)
         sys.exit(-1)
 
-setup_args = {}
 if version:
     setup_args["version"] = version
 
+if not external_dependency_management:
+    # Tahoe's dependencies are managed by the find_links= entry in setup.cfg and
+    # the _auto_deps.install_requires list, which is used in the call to setup()
+    # below.
+    from _auto_deps import install_requires
+
+    setup_requires = []
+
+    # The darcsver command from the darcsver plugin is needed to initialize the
+    # distribution's .version attribute correctly. (It does this either by
+    # examining darcs history, or if that fails by reading the
+    # src/allmydata/_version.py file). darcsver will also write a new version
+    # stamp in src/allmydata/_version.py, with a version number derived from
+    # darcs history. Note that the setup.cfg file has an "[aliases]" section
+    # which enumerates commands that you might run and specifies that it will run
+    # darcsver before each one. If you add different commands (or if I forgot
+    # some that are already in use), you may need to add it to setup.cfg and
+    # configure it to run darcsver before your command, if you want the version
+    # number to be correct when that command runs.
+    # http://pypi.python.org/pypi/darcsver
+    setup_requires.append('darcsver >= 1.2.0')
+
+    # Nevow requires Twisted to setup, but doesn't declare that requirement in a
+    # way that enables setuptools to satisfy that requirement before Nevow's
+    # setup.py tried to "import twisted". Fortunately we require setuptools_trial
+    # to setup and setuptools_trial requires Twisted to install, so hopefully
+    # everything will work out until the Nevow issue is fixed:
+    # http://divmod.org/trac/ticket/2629 setuptools_trial is needed if you want
+    # "./setup.py trial" or "./setup.py test" to execute the tests (and in order
+    # to make sure Twisted is installed early enough -- see the paragraph above).
+    # http://pypi.python.org/pypi/setuptools_trial
+    setup_requires.extend(['setuptools_trial >= 0.5'])
+
+    # setuptools_darcs is required to produce complete distributions (such as
+    # with "sdist" or "bdist_egg") (unless there is a PKG-INFO file present which
+    # shows that this is itself a source distribution). For simplicity, and
+    # because there is some unknown error with setuptools_darcs when building and
+    # testing tahoe all in one python command on some platforms, we always add it
+    # to setup_requires. http://pypi.python.org/pypi/setuptools_darcs
+    setup_requires.append('setuptools_darcs >= 1.1.0')
+
+    # trialcoverage is required if you want the "trial" unit test runner to have a
+    # "--reporter=bwverbose-coverage" option which produces code-coverage results.
+    # The required version is 0.3.3, because that is the latest version that only
+    # depends on a version of pycoverage for which binary packages are available.
+    if "--reporter=bwverbose-coverage" in sys.argv:
+        setup_requires.append('trialcoverage >= 0.3.3')
+
+    # stdeb is required to produce Debian files with the "sdist_dsc" command.
+    if "sdist_dsc" in sys.argv:
+        setup_requires.append('stdeb >= 0.3')
+
+    tests_require=[
+        # Mock - Mocking and Testing Library
+        # http://www.voidspace.org.uk/python/mock/
+        "mock",
+        ]
+
+    setup_args["install_requires"] = install_requires
+    setup_args["setup_requires"] = setup_requires
+    setup_args["tests_require"] = tests_require
+
 setup(name=APPNAME,
       description='secure, decentralized, fault-tolerant filesystem',
       long_description=open('README.txt', 'rU').read(),
@@ -362,10 +375,7 @@
       packages=find_packages("src"),
       classifiers=trove_classifiers,
       test_suite="allmydata.test",
-      install_requires=install_requires,
-      tests_require=tests_require,
       include_package_data=True,
-      setup_requires=setup_requires,
       entry_points = { 'console_scripts': [ 'tahoe = allmydata.scripts.runner:run' ] },
       zip_safe=False, # We prefer unzipped for easier access.
       **setup_args
