[Python-checkins] python/nondist/sandbox/setuptools/setuptools/command __init__.py, 1.7, 1.8 install.py, 1.2, 1.3 depends.py, 1.4, NONE

pje@users.sourceforge.net pje at users.sourceforge.net
Sat Aug 6 21:29:51 CEST 2005


Update of /cvsroot/python/python/nondist/sandbox/setuptools/setuptools/command
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15840/setuptools/command

Modified Files:
	__init__.py install.py 
Removed Files:
	depends.py 
Log Message:
Got rid of the no-longer meaningful "depends" command.  Consolidated the
replacement of the "install" command so that installation is always via
easy_install, but doesn't use the previous kludgy intereception technique.
Allow ``extra_path`` to be set, but ignore it, so that when easy_install
wraps a package that uses it, there won't be any confusion as to the 
desired installation location.


Index: __init__.py
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/setuptools/setuptools/command/__init__.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- __init__.py	24 Jul 2005 22:47:06 -0000	1.7
+++ __init__.py	6 Aug 2005 19:29:49 -0000	1.8
@@ -1,5 +1,5 @@
 __all__ = [
-    'alias', 'bdist_egg', 'build_ext', 'build_py', 'depends', 'develop',
+    'alias', 'bdist_egg', 'build_ext', 'build_py', 'develop',
     'easy_install', 'egg_info', 'install', 'install_lib', 'rotate', 'saveopts',
     'sdist', 'setopt', 'test', 'upload',
 ]

Index: install.py
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/setuptools/setuptools/command/install.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- install.py	5 Apr 2004 20:02:45 -0000	1.2
+++ install.py	6 Aug 2005 19:29:49 -0000	1.3
@@ -1,9 +1,31 @@
+import setuptools
 from distutils.command.install import install as _install
 
 class install(_install):
     """Build dependencies before installation"""
 
-    def has_dependencies(self):
-        return self.distribution.has_dependencies()
+    def handle_extra_path(self):
+        # We always ignore extra_path, because we always install eggs
+        # (you can always use install_* commands directly if needed)
+        self.path_file = None
+        self.extra_dirs = ''
+
+    def run(self):
+        from setuptools.command.easy_install import easy_install
+        cmd = easy_install(
+            self.distribution, args="x", ignore_conflicts_at_my_risk=1
+        )
+        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]
+
+        if setuptools.bootstrap_install_from:
+            # Bootstrap self-installation of setuptools
+            args.insert(0, setuptools.bootstrap_install_from)
+
+        cmd.args = args
+        cmd.run()
+        setuptools.bootstrap_install_from = None
+
 
-    sub_commands = [('depends', has_dependencies)] + _install.sub_commands

--- depends.py DELETED ---



More information about the Python-checkins mailing list