From: david-sarah Date: Tue, 18 Jan 2011 06:54:45 +0000 (-0800) Subject: setup: load the setuptools_darcs-1.2.12.egg that is bundled in the root of the source... X-Git-Url: https://git.rkrishnan.org/components/%22news.html/?a=commitdiff_plain;h=4cba75e000ba1b16355a33051fb882da38755813;p=tahoe-lafs%2Ftahoe-lafs.git setup: load the setuptools_darcs-1.2.12.egg that is bundled in the root of the source tree at setup.py time, and setup_require it. This is in order to make sure that its 'find all package data' plugin works to inform setuptools of all files which are under revision control, so that setuptools can include them in a distribution. By the way, this is ugly and horrible. refs #1054 --- diff --git a/setup.py b/setup.py index 32d2a501..65426e0e 100644 --- a/setup.py +++ b/setup.py @@ -78,6 +78,8 @@ egg = os.path.realpath(glob.glob('setuptools-*.egg')[0]) sys.path.insert(0, egg) egg = os.path.realpath(glob.glob('darcsver-*.egg')[0]) sys.path.insert(0, egg) +egg = os.path.realpath(glob.glob('setuptools_darcs-*.egg')[0]) +sys.path.insert(0, egg) import setuptools; setuptools.bootstrap_install_from = egg from setuptools import find_packages, setup @@ -149,12 +151,11 @@ setup_requires.append('darcsver >= 1.7.1') # 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 +# setuptools_darcs is required to produce complete distributions (such +# as with "sdist" or "bdist_egg"), unless there is a +# src/allmydata_tahoe.egg-info/SOURCE.txt file, which if present +# contains a complete list of files that should be included. +# 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