aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/command/install.py
diff options
context:
space:
mode:
authorPJ Eby <distutils-sig@python.org>2005-09-03 04:51:27 +0000
committerPJ Eby <distutils-sig@python.org>2005-09-03 04:51:27 +0000
commit78e2272d52969e26af767e0cbfadeaefebe84657 (patch)
treeb113c723681c76bfe28c9686d76aae34d333fd19 /setuptools/command/install.py
parent66e825818b0c13c0ef28008df1dd6fa0477b2bb5 (diff)
downloadexternal_python_setuptools-78e2272d52969e26af767e0cbfadeaefebe84657.tar.gz
external_python_setuptools-78e2272d52969e26af767e0cbfadeaefebe84657.tar.bz2
external_python_setuptools-78e2272d52969e26af767e0cbfadeaefebe84657.zip
Added support for old-style RPMs (i.e. non-egg RPMs)
--HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041238
Diffstat (limited to 'setuptools/command/install.py')
-rw-r--r--setuptools/command/install.py57
1 files changed, 49 insertions, 8 deletions
diff --git a/setuptools/command/install.py b/setuptools/command/install.py
index c555e7e0..78d32bef 100644
--- a/setuptools/command/install.py
+++ b/setuptools/command/install.py
@@ -4,6 +4,16 @@ from distutils.command.install import install as _install
class install(_install):
"""Use easy_install to install the package, w/dependencies"""
+ user_options = _install.user_options + [
+ ('old-and-unmanageable', None, "Try not to use this!"),
+ ]
+
+ boolean_options = _install.boolean_options + ['old-and-unmanageable']
+
+ def initialize_options(self):
+ _install.initialize_options(self)
+ self.old_and_unmanageable = None
+
def handle_extra_path(self):
# We always ignore extra_path, because we always install eggs
# (you can always use install_* commands directly if needed)
@@ -11,23 +21,24 @@ class install(_install):
self.extra_dirs = ''
def run(self):
- calling_module = sys._getframe(1).f_globals.get('__name__','')
- if calling_module != 'distutils.dist':
- # We're not being run from the command line, so use old-style
- # behavior. This is a bit kludgy, because a command might use
- # dist.run_command() to run 'install', but bdist_dumb and
- # bdist_wininst both call run directly at the moment.
- # When this is part of the distutils, the old install behavior
- # should probably be requested with a flag, or a different method.
+ if (self.old_and_unmanageable or
+ sys._getframe(1).f_globals.get('__name__','') != 'distutils.dist'
+ ):
+ # Either we were asked for the old behavior, or we're not being
+ # run from the command line. This is a bit kludgy, because a
+ # command might use dist.run_command() to run 'install', but
+ # bdist_dumb and bdist_wininst both call run() directly right now.
return _install.run(self)
from setuptools.command.easy_install import easy_install
+
cmd = easy_install(
self.distribution, args="x", ignore_conflicts_at_my_risk=1,
root=self.root
)
cmd.ensure_finalized() # finalize before bdist_egg munges install cmd
+
self.run_command('bdist_egg')
args = [self.distribution.get_command_obj('bdist_egg').egg_output]
@@ -39,3 +50,33 @@ class install(_install):
cmd.run()
setuptools.bootstrap_install_from = None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+