aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/__init__.py
diff options
context:
space:
mode:
authorPJ Eby <distutils-sig@python.org>2005-06-12 15:49:54 +0000
committerPJ Eby <distutils-sig@python.org>2005-06-12 15:49:54 +0000
commit18b9ae1e5df8c0c141970c23c9aa0589928655c6 (patch)
tree6ee6ba9440e11e64e98b42d1b9846858f30eaf7c /setuptools/__init__.py
parent8f64fbe5e5a016bd88f19d108e126be7c23e757a (diff)
downloadexternal_python_setuptools-18b9ae1e5df8c0c141970c23c9aa0589928655c6.tar.gz
external_python_setuptools-18b9ae1e5df8c0c141970c23c9aa0589928655c6.tar.bz2
external_python_setuptools-18b9ae1e5df8c0c141970c23c9aa0589928655c6.zip
Restructure easy_install as a distutils "Command" object, so that it can
access the distutils configuration and logging infrastructure, and can "inherit" options from a distutils setup script that wants to use it to install its own dependencies. --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041052
Diffstat (limited to 'setuptools/__init__.py')
-rw-r--r--setuptools/__init__.py35
1 files changed, 34 insertions, 1 deletions
diff --git a/setuptools/__init__.py b/setuptools/__init__.py
index 12850965..0523d160 100644
--- a/setuptools/__init__.py
+++ b/setuptools/__init__.py
@@ -4,7 +4,7 @@ import distutils.core, setuptools.command
from setuptools.dist import Distribution, Feature
from setuptools.extension import Extension
from setuptools.depends import Require
-from distutils.core import Command
+from distutils.core import Command as _Command
from distutils.util import convert_path
import os.path
@@ -37,6 +37,8 @@ def find_packages(where='.'):
return out
+
+
def setup(**attrs):
"""Do package setup
@@ -47,3 +49,34 @@ def setup(**attrs):
"""
attrs.setdefault("distclass",Distribution)
return distutils.core.setup(**attrs)
+
+
+class Command(_Command):
+ __doc__ = _Command.__doc__
+
+ command_consumes_arguments = False
+
+ def reinitialize_command(self, command, reinit_subcommands=0, **kw):
+ cmd = _Command.reinitialize_command(self, command, reinit_subcommands)
+ for k,v in kw.items():
+ setattr(cmd,k,v) # update command with keywords
+ return cmd
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+