diff options
author | PJ Eby <distutils-sig@python.org> | 2005-06-15 02:19:42 +0000 |
---|---|---|
committer | PJ Eby <distutils-sig@python.org> | 2005-06-15 02:19:42 +0000 |
commit | 5a9445cd57c60bb47451d8a88ec12a7a865013b7 (patch) | |
tree | 75dab611dd00efff933bad3fb579dadd37ddd7ef /setuptools/dist.py | |
parent | 13c8739a6b43cb59ad0dfbd7751148d427af6170 (diff) | |
download | external_python_setuptools-5a9445cd57c60bb47451d8a88ec12a7a865013b7.tar.gz external_python_setuptools-5a9445cd57c60bb47451d8a88ec12a7a865013b7.tar.bz2 external_python_setuptools-5a9445cd57c60bb47451d8a88ec12a7a865013b7.zip |
Add bootstrap installation support that "hitches a ride" on other packages
being installed via the normal distutils "setup.py install". Also, don't
repeatedly download the setuptools egg if it's already in the target
location.
--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041069
Diffstat (limited to 'setuptools/dist.py')
-rw-r--r-- | setuptools/dist.py | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/setuptools/dist.py b/setuptools/dist.py index a39b4a13..f46a02f8 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -8,6 +8,7 @@ from setuptools.command.install import install from setuptools.command.install_lib import install_lib from distutils.errors import DistutilsOptionError, DistutilsPlatformError from distutils.errors import DistutilsSetupError +import setuptools sequence = tuple, list @@ -38,7 +39,6 @@ sequence = tuple, list - class Distribution(_Distribution): """Distribution with support for features, tests, and package data @@ -348,18 +348,18 @@ class Distribution(_Distribution): return not not self.requires + def run_commands(self): + if setuptools.bootstrap_install_from and 'install' in self.commands: + # Bootstrap self-installation of setuptools + from easy_install import easy_install + cmd = easy_install( + self, args=[setuptools.bootstrap_install_from], zip_ok=1 + ) + cmd.ensure_finalized() + cmd.run() + setuptools.bootstrap_install_from = None - - - - - - - - - - - + _Distribution.run_commands(self) |