summaryrefslogtreecommitdiff
path: root/setuptools/command/install.py
diff options
context:
space:
mode:
Diffstat (limited to 'setuptools/command/install.py')
-rw-r--r--setuptools/command/install.py46
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),
- ]
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-