diff options
author | PJ Eby <distutils-sig@python.org> | 2005-12-14 18:10:11 +0000 |
---|---|---|
committer | PJ Eby <distutils-sig@python.org> | 2005-12-14 18:10:11 +0000 |
commit | 66d77b786bd16b4f186c37951f18edfc1c8dec00 (patch) | |
tree | 414d47374a7d6561b51d9f8817b84ac954db6fd1 /setuptools/command/install.py | |
parent | c7eeb6273fd7593d7bccfbe41f44b5aa2ab17c1d (diff) | |
download | python-setuptools-git-66d77b786bd16b4f186c37951f18edfc1c8dec00.tar.gz |
Added a ``--single-version-externally-managed`` option to the ``install``
command so that you can more easily wrap a "flat" egg in a system package.
Enhanced ``bdist_rpm`` so that it installs single-version eggs that
don't rely on a ``.pth`` file. The ``--no-egg`` option has been removed,
since all RPMs are now built in a more backwards-compatible format.
Some work is now needed for easy_install to recognize bdist_wininst
.exe's that wrap these new flat eggs, as currently the .egg-info will
not be recognized.
--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041673
Diffstat (limited to 'setuptools/command/install.py')
-rw-r--r-- | setuptools/command/install.py | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/setuptools/command/install.py b/setuptools/command/install.py index 51d4ffe0..77b97b67 100644 --- a/setuptools/command/install.py +++ b/setuptools/command/install.py @@ -1,29 +1,47 @@ import setuptools, sys from distutils.command.install import install as _install +from distutils.errors import DistutilsArgError 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!"), + ('single-version-externally-managed', None, + "used by system package builders to create 'flat' eggs"), ] - boolean_options = _install.boolean_options + ['old-and-unmanageable'] + boolean_options = _install.boolean_options + [ + 'old-and-unmanageable', 'single-version-externally-managed', + ] + + sub_commands = _install.sub_commands + [ + ('install_egg_info', lambda self: True), + ] def initialize_options(self): _install.initialize_options(self) self.old_and_unmanageable = None + self.single_version_externally_managed = None self.no_compile = None # make DISTUTILS_DEBUG work right! + def finalize_options(self): + _install.initialize_options(self) + if self.single_version_externally_managed: + if not self.root and not self.record: + raise DistutilsArgError( + "You must specify --record or --root when building system" + " packages" + ) + def handle_extra_path(self): - # We always ignore extra_path, because we always install eggs - # (you can always use install_* commands directly if needed) + # We always ignore extra_path, because we install as .egg or .egg-info self.path_file = None self.extra_dirs = '' def run(self): - if (self.old_and_unmanageable or - sys._getframe(1).f_globals.get('__name__','') != 'distutils.dist' + if (self.old_and_unmanageable or self.single_version_externally_managed + 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 @@ -50,24 +68,6 @@ class install(_install): cmd.run() setuptools.bootstrap_install_from = None - sub_commands = _install.sub_commands + [ - ('install_egg_info', lambda self: True), - ] - - - - - - - - - - - - - - - |