diff options
| author | ?ric Araujo <merwok@netwok.org> | 2011-11-12 05:08:01 +0100 |
|---|---|---|
| committer | ?ric Araujo <merwok@netwok.org> | 2011-11-12 05:08:01 +0100 |
| commit | 123c3e80926d8ae17cb9c21b5b85db821f671563 (patch) | |
| tree | 85f25323ad48fa8a2dce043e0719adc025be5ee3 /distutils2/command | |
| parent | 37cc8079333cd92ae07a969acbcd8978c14b776a (diff) | |
| download | disutils2-123c3e80926d8ae17cb9c21b5b85db821f671563.tar.gz | |
Undo potentially confusing name change.
This method was named reinitialize_command in distutils and accompanied
by a comment suggesting to change it to get_reinitialized_command.
Following that, I did the change for distutils2, but it proved
confusing: The Distribution object has an internal cache of command
objects, to make sure only one instance is ever used, and the name
get_reinitialized_command could suggest that the object returned was
independent of that cache, which it was not. I?m reverting the name
change to make code clearer.
Diffstat (limited to 'distutils2/command')
| -rw-r--r-- | distutils2/command/bdist.py | 2 | ||||
| -rw-r--r-- | distutils2/command/bdist_dumb.py | 4 | ||||
| -rw-r--r-- | distutils2/command/bdist_msi.py | 6 | ||||
| -rw-r--r-- | distutils2/command/bdist_wininst.py | 5 | ||||
| -rw-r--r-- | distutils2/command/cmd.py | 4 | ||||
| -rw-r--r-- | distutils2/command/test.py | 2 |
6 files changed, 11 insertions, 12 deletions
diff --git a/distutils2/command/bdist.py b/distutils2/command/bdist.py index 0a39fb1..583041e 100644 --- a/distutils2/command/bdist.py +++ b/distutils2/command/bdist.py @@ -126,7 +126,7 @@ class bdist(Command): # Reinitialize and run each command. for i in range(len(self.formats)): cmd_name = commands[i] - sub_cmd = self.get_reinitialized_command(cmd_name) + sub_cmd = self.reinitialize_command(cmd_name) sub_cmd.format = self.formats[i] # passing the owner and group names for tar archiving diff --git a/distutils2/command/bdist_dumb.py b/distutils2/command/bdist_dumb.py index 677deb9..dfe80b9 100644 --- a/distutils2/command/bdist_dumb.py +++ b/distutils2/command/bdist_dumb.py @@ -80,8 +80,8 @@ class bdist_dumb(Command): if not self.skip_build: self.run_command('build') - install = self.get_reinitialized_command('install_dist', - reinit_subcommands=True) + install = self.reinitialize_command('install_dist', + reinit_subcommands=True) install.root = self.bdist_dir install.skip_build = self.skip_build install.warn_dir = False diff --git a/distutils2/command/bdist_msi.py b/distutils2/command/bdist_msi.py index 78060dc..ff4bbeb 100644 --- a/distutils2/command/bdist_msi.py +++ b/distutils2/command/bdist_msi.py @@ -183,13 +183,13 @@ class bdist_msi(Command): if not self.skip_build: self.run_command('build') - install = self.get_reinitialized_command('install_dist', - reinit_subcommands=True) + install = self.reinitialize_command('install_dist', + reinit_subcommands=True) install.prefix = self.bdist_dir install.skip_build = self.skip_build install.warn_dir = False - install_lib = self.get_reinitialized_command('install_lib') + install_lib = self.reinitialize_command('install_lib') # we do not want to include pyc or pyo files install_lib.compile = False install_lib.optimize = 0 diff --git a/distutils2/command/bdist_wininst.py b/distutils2/command/bdist_wininst.py index 3df272b..e5ffae6 100644 --- a/distutils2/command/bdist_wininst.py +++ b/distutils2/command/bdist_wininst.py @@ -117,14 +117,13 @@ class bdist_wininst(Command): if not self.skip_build: self.run_command('build') - install = self.get_reinitialized_command('install', - reinit_subcommands=True) + install = self.reinitialize_command('install', reinit_subcommands=True) install.root = self.bdist_dir install.skip_build = self.skip_build install.warn_dir = False install.plat_name = self.plat_name - install_lib = self.get_reinitialized_command('install_lib') + install_lib = self.reinitialize_command('install_lib') # we do not want to include pyc or pyo files install_lib.compile = False install_lib.optimize = 0 diff --git a/distutils2/command/cmd.py b/distutils2/command/cmd.py index b1bb6f2..5992187 100644 --- a/distutils2/command/cmd.py +++ b/distutils2/command/cmd.py @@ -318,8 +318,8 @@ class Command(object): cmd_obj.ensure_finalized() return cmd_obj - def get_reinitialized_command(self, command, reinit_subcommands=False): - return self.distribution.get_reinitialized_command( + def reinitialize_command(self, command, reinit_subcommands=False): + return self.distribution.reinitialize_command( command, reinit_subcommands) def run_command(self, command): diff --git a/distutils2/command/test.py b/distutils2/command/test.py index da5d141..09af3b6 100644 --- a/distutils2/command/test.py +++ b/distutils2/command/test.py @@ -56,7 +56,7 @@ class test(Command): prev_syspath = sys.path[:] try: # build release - build = self.get_reinitialized_command('build') + build = self.reinitialize_command('build') self.run_command('build') sys.path.insert(0, build.build_lib) |
