[Python-checkins] python/nondist/sandbox/setuptools/setuptools/command bdist_egg.py, 1.14, 1.15
pje@users.sourceforge.net
pje at users.sourceforge.net
Sun Jun 12 17:49:56 CEST 2005
Update of /cvsroot/python/python/nondist/sandbox/setuptools/setuptools/command
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7441/setuptools/command
Modified Files:
bdist_egg.py
Log Message:
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.
Index: bdist_egg.py
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/setuptools/setuptools/command/bdist_egg.py,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- bdist_egg.py 7 Jun 2005 04:41:51 -0000 1.14
+++ bdist_egg.py 12 Jun 2005 15:49:54 -0000 1.15
@@ -4,7 +4,7 @@
# 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 @@
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
More information about the Python-checkins
mailing list