diff options
author | PJ Eby <distutils-sig@python.org> | 2005-06-12 15:49:54 +0000 |
---|---|---|
committer | PJ Eby <distutils-sig@python.org> | 2005-06-12 15:49:54 +0000 |
commit | 18b9ae1e5df8c0c141970c23c9aa0589928655c6 (patch) | |
tree | 6ee6ba9440e11e64e98b42d1b9846858f30eaf7c /setuptools/command/bdist_egg.py | |
parent | 8f64fbe5e5a016bd88f19d108e126be7c23e757a (diff) | |
download | external_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/command/bdist_egg.py')
-rw-r--r-- | setuptools/command/bdist_egg.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index ee6f2e80..18001eff 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -4,7 +4,7 @@ Build .egg distributions""" # This module should be kept compatible with Python 2.3 import os -from distutils.core import Command +from setuptools import Command from distutils.util import get_platform from distutils.dir_util import create_tree, remove_tree, ensure_relative,mkpath from distutils.sysconfig import get_python_version, get_python_lib @@ -234,16 +234,16 @@ class bdist_egg(Command): return match.group(1) def call_command(self,cmdname,**kw): - cmd = self.reinitialize_command(cmdname) + """Invoke reinitialized command `cmdname` with keyword args""" for dirname in INSTALL_DIRECTORY_ATTRS: - if dirname in cmd.__dict__: # don't overwrite methods! - setattr(cmd,dirname,self.bdist_dir) - cmd.skip_build = self.skip_build - for k,v in kw.items(): - setattr(cmd,k,v) + kw.setdefault(dirname,self.bdist_dir) + kw.setdefault('skip_build',self.skip_build) + + cmd = self.reinitialize_command(cmdname, **kw) self.run_command(cmdname) return cmd + # Attribute names of options for commands that might need to be convinced to # install to the egg build directory |