diff options
| author | Alexis Metaireau <ametaireau@gmail.com> | 2010-10-17 05:15:00 +0100 |
|---|---|---|
| committer | Alexis Metaireau <ametaireau@gmail.com> | 2010-10-17 05:15:00 +0100 |
| commit | 0b392808d7f29f3005f2abd9a31bae427ecedac5 (patch) | |
| tree | de4629e75c9b1b235289d34652e9213d42574cfc /distutils2 | |
| parent | 6cbe6383303fb03e89e399b2c68289779cdd75be (diff) | |
| download | disutils2-0b392808d7f29f3005f2abd9a31bae427ecedac5.tar.gz | |
Rename the install command from "install" to "instal_dist", to avoid any
collision with the distutils2 installer (working with dependencies).
Diffstat (limited to 'distutils2')
| -rw-r--r-- | distutils2/command/bdist_dumb.py | 4 | ||||
| -rw-r--r-- | distutils2/command/bdist_msi.py | 2 | ||||
| -rw-r--r-- | distutils2/command/cmd.py | 6 | ||||
| -rw-r--r-- | distutils2/command/install_data.py | 2 | ||||
| -rw-r--r-- | distutils2/command/install_dist.py (renamed from distutils2/command/install.py) | 6 | ||||
| -rw-r--r-- | distutils2/command/install_distinfo.py | 6 | ||||
| -rw-r--r-- | distutils2/command/install_headers.py | 2 | ||||
| -rw-r--r-- | distutils2/command/install_lib.py | 10 | ||||
| -rw-r--r-- | distutils2/command/install_scripts.py | 2 | ||||
| -rw-r--r-- | distutils2/dist.py | 2 | ||||
| -rw-r--r-- | distutils2/tests/test_command_check.py | 2 | ||||
| -rw-r--r-- | distutils2/tests/test_command_install.py | 2 | ||||
| -rw-r--r-- | distutils2/tests/test_command_install_distinfo.py | 10 | ||||
| -rw-r--r-- | distutils2/tests/test_command_install_scripts.py | 4 |
14 files changed, 30 insertions, 30 deletions
diff --git a/distutils2/command/bdist_dumb.py b/distutils2/command/bdist_dumb.py index c02d6e0..25d0f4f 100644 --- a/distutils2/command/bdist_dumb.py +++ b/distutils2/command/bdist_dumb.py @@ -82,13 +82,13 @@ class bdist_dumb (Command): if not self.skip_build: self.run_command('build') - install = self.get_reinitialized_command('install', reinit_subcommands=1) + install = self.get_reinitialized_command('install_dist', reinit_subcommands=1) install.root = self.bdist_dir install.skip_build = self.skip_build install.warn_dir = 0 log.info("installing to %s" % self.bdist_dir) - self.run_command('install') + self.run_command('install_dist') # And make an archive relative to the root of the # pseudo-installation tree. diff --git a/distutils2/command/bdist_msi.py b/distutils2/command/bdist_msi.py index 3728fe5..e2176a7 100644 --- a/distutils2/command/bdist_msi.py +++ b/distutils2/command/bdist_msi.py @@ -174,7 +174,7 @@ class bdist_msi (Command): if not self.skip_build: self.run_command('build') - install = self.get_reinitialized_command('install', reinit_subcommands=1) + install = self.get_reinitialized_command('install_dist', reinit_subcommands=1) install.prefix = self.bdist_dir install.skip_build = self.skip_build install.warn_dir = 0 diff --git a/distutils2/command/cmd.py b/distutils2/command/cmd.py index 4dd825f..2bc5546 100644 --- a/distutils2/command/cmd.py +++ b/distutils2/command/cmd.py @@ -35,7 +35,7 @@ class Command(object): """ # 'sub_commands' formalizes the notion of a "family" of commands, - # eg. "install" as the parent with sub-commands "install_lib", + # eg. "install_dist" as the parent with sub-commands "install_lib", # "install_headers", etc. The parent of a family of commands # defines 'sub_commands' as a class attribute; it's a list of # (command_name : string, predicate : unbound_method | string | None) @@ -47,7 +47,7 @@ class Command(object): # # 'sub_commands' is usually defined at the *end* of a class, because # predicates can be unbound methods, so they must already have been - # defined. The canonical example is the "install" command. + # defined. The canonical example is the "install_dist" command. sub_commands = [] # Pre and post command hooks are run just before or just after the command @@ -478,7 +478,7 @@ class install_misc(Command): self.outfiles = [] def _install_dir_from(self, dirname): - self.set_undefined_options('install', (dirname, 'install_dir')) + self.set_undefined_options('install_dist', (dirname, 'install_dir')) def _copy_files(self, filelist): self.outfiles = [] diff --git a/distutils2/command/install_data.py b/distutils2/command/install_data.py index 1d5828f..910c80f 100644 --- a/distutils2/command/install_data.py +++ b/distutils2/command/install_data.py @@ -34,7 +34,7 @@ class install_data(Command): self.warn_dir = 1 def finalize_options(self): - self.set_undefined_options('install', + self.set_undefined_options('install_dist', ('install_data', 'install_dir'), 'root', 'force') diff --git a/distutils2/command/install.py b/distutils2/command/install_dist.py index b059fd9..12d160f 100644 --- a/distutils2/command/install.py +++ b/distutils2/command/install_dist.py @@ -1,6 +1,6 @@ """distutils.command.install -Implements the Distutils 'install' command.""" +Implements the Distutils 'install_dist' command.""" import sys @@ -24,7 +24,7 @@ else: HAS_USER_SITE = True -class install(Command): +class install_dist(Command): description = "install everything from build directory" @@ -513,7 +513,7 @@ class install(Command): self.run_command('build') # If we built for any other platform, we can't install. build_plat = self.distribution.get_command_obj('build').plat_name - # check warn_dir - it is a clue that the 'install' is happening + # check warn_dir - it is a clue that the 'install_dist' is happening # internally, and not to sys.path, so we don't check the platform # matches what we are running. if self.warn_dir and build_plat != get_platform(): diff --git a/distutils2/command/install_distinfo.py b/distutils2/command/install_distinfo.py index 64174dd..46dfaa8 100644 --- a/distutils2/command/install_distinfo.py +++ b/distutils2/command/install_distinfo.py @@ -7,7 +7,7 @@ distutils.command.install_distinfo This module implements the ``install_distinfo`` command that creates the ``.dist-info`` directory for the distribution, as specified in :pep:`376`. Usually, you do not have to call this command directly, it gets called -automatically by the ``install`` command. +automatically by the ``install_dist`` command. """ # This file was created from the code for the former command install_egg_info @@ -52,7 +52,7 @@ class install_distinfo(Command): self.no_record = None def finalize_options(self): - self.set_undefined_options('install', + self.set_undefined_options('install_dist', 'installer', 'requested', 'no_record') self.set_undefined_options('install_lib', @@ -122,7 +122,7 @@ class install_distinfo(Command): lineterminator=os.linesep, quotechar='"') - install = self.get_finalized_command('install') + install = self.get_finalized_command('install_dist') for fpath in install.get_outputs(): if fpath.endswith('.pyc') or fpath.endswith('.pyo'): diff --git a/distutils2/command/install_headers.py b/distutils2/command/install_headers.py index bece686..a305203 100644 --- a/distutils2/command/install_headers.py +++ b/distutils2/command/install_headers.py @@ -26,7 +26,7 @@ class install_headers(Command): self.outfiles = [] def finalize_options(self): - self.set_undefined_options('install', + self.set_undefined_options('install_dist', ('install_headers', 'install_dir'), 'force') diff --git a/distutils2/command/install_lib.py b/distutils2/command/install_lib.py index 223205e..d6fa1be 100644 --- a/distutils2/command/install_lib.py +++ b/distutils2/command/install_lib.py @@ -52,7 +52,7 @@ class install_lib(Command): negative_opt = {'no-compile' : 'compile'} def initialize_options(self): - # let the 'install' command dictate our installation directory + # let the 'install_dist' command dictate our installation directory self.install_dir = None self.build_dir = None self.force = 0 @@ -62,9 +62,9 @@ class install_lib(Command): def finalize_options(self): # Get all the information we need to install pure Python modules - # from the umbrella 'install' command -- build (source) directory, + # from the umbrella 'install_dist' command -- build (source) directory, # install (target) directory, and whether to compile .py files. - self.set_undefined_options('install', + self.set_undefined_options('install_dist', ('build_lib', 'build_dir'), ('install_lib', 'install_dir'), 'force', 'compile', 'optimize', 'skip_build') @@ -121,11 +121,11 @@ class install_lib(Command): from distutils2.util import byte_compile - # Get the "--root" directory supplied to the "install" command, + # Get the "--root" directory supplied to the "install_dist" command, # and use it as a prefix to strip off the purported filename # encoded in bytecode files. This is far from complete, but it # should at least generate usable bytecode in RPM distributions. - install_root = self.get_finalized_command('install').root + install_root = self.get_finalized_command('install_dist').root if self.compile: byte_compile(files, optimize=0, diff --git a/distutils2/command/install_scripts.py b/distutils2/command/install_scripts.py index 3fe6f9b..b5bb897 100644 --- a/distutils2/command/install_scripts.py +++ b/distutils2/command/install_scripts.py @@ -33,7 +33,7 @@ class install_scripts (Command): def finalize_options (self): self.set_undefined_options('build', ('build_scripts', 'build_dir')) - self.set_undefined_options('install', + self.set_undefined_options('install_dist', ('install_scripts', 'install_dir'), 'force', 'skip_build') diff --git a/distutils2/dist.py b/distutils2/dist.py index d2820b3..33dd7c7 100644 --- a/distutils2/dist.py +++ b/distutils2/dist.py @@ -813,7 +813,7 @@ Common commands: (see '--help-commands' for more) 'command' should be a command name (string) or command object. If 'reinit_subcommands' is true, also reinitializes the command's sub-commands, as declared by the 'sub_commands' class attribute (if - it has one). See the "install" command for an example. Only + it has one). See the "install_dist" command for an example. Only reinitializes the sub-commands that actually matter, ie. those whose test predicates return true. diff --git a/distutils2/tests/test_command_check.py b/distutils2/tests/test_command_check.py index 93da1f2..60ed4cb 100644 --- a/distutils2/tests/test_command_check.py +++ b/distutils2/tests/test_command_check.py @@ -69,7 +69,7 @@ class CheckTestCase(support.LoggingCatcher, def test_check_hooks(self): pkg_info, dist = self.create_dist() - dist.command_options['install'] = { + dist.command_options['install_dist'] = { 'pre_hook': ('file', {"a": 'some.nonextistant.hook.ghrrraarrhll'}), } cmd = check(dist) diff --git a/distutils2/tests/test_command_install.py b/distutils2/tests/test_command_install.py index 87e3e80..7238644 100644 --- a/distutils2/tests/test_command_install.py +++ b/distutils2/tests/test_command_install.py @@ -184,7 +184,7 @@ class InstallTestCase(support.TempdirManager, dist = Distribution() cmd = install(dist) - dist.command_obj['install'] = cmd + dist.command_obj['install_dist'] = cmd cmd.root = install_dir cmd.record = os.path.join(pkgdir, 'RECORD') cmd.ensure_finalized() diff --git a/distutils2/tests/test_command_install_distinfo.py b/distutils2/tests/test_command_install_distinfo.py index 07f8b1f..3732f31 100644 --- a/distutils2/tests/test_command_install_distinfo.py +++ b/distutils2/tests/test_command_install_distinfo.py @@ -45,7 +45,7 @@ class InstallDistinfoTestCase(support.TempdirManager, install_dir = self.mkdtemp() install = DummyInstallCmd(dist) - dist.command_obj['install'] = install + dist.command_obj['install_dist'] = install cmd = install_distinfo(dist) dist.command_obj['install_distinfo'] = cmd @@ -73,7 +73,7 @@ class InstallDistinfoTestCase(support.TempdirManager, install_dir = self.mkdtemp() install = DummyInstallCmd(dist) - dist.command_obj['install'] = install + dist.command_obj['install_dist'] = install cmd = install_distinfo(dist) dist.command_obj['install_distinfo'] = cmd @@ -94,7 +94,7 @@ class InstallDistinfoTestCase(support.TempdirManager, install_dir = self.mkdtemp() install = DummyInstallCmd(dist) - dist.command_obj['install'] = install + dist.command_obj['install_dist'] = install cmd = install_distinfo(dist) dist.command_obj['install_distinfo'] = cmd @@ -115,7 +115,7 @@ class InstallDistinfoTestCase(support.TempdirManager, install_dir = self.mkdtemp() install = DummyInstallCmd(dist) - dist.command_obj['install'] = install + dist.command_obj['install_dist'] = install cmd = install_distinfo(dist) dist.command_obj['install_distinfo'] = cmd @@ -136,7 +136,7 @@ class InstallDistinfoTestCase(support.TempdirManager, install_dir = self.mkdtemp() install = DummyInstallCmd(dist) - dist.command_obj['install'] = install + dist.command_obj['install_dist'] = install fake_dists = os.path.join(os.path.dirname(__file__), '..', '_backport', 'tests', 'fake_dists') diff --git a/distutils2/tests/test_command_install_scripts.py b/distutils2/tests/test_command_install_scripts.py index 89184e5..e04b3f5 100644 --- a/distutils2/tests/test_command_install_scripts.py +++ b/distutils2/tests/test_command_install_scripts.py @@ -16,7 +16,7 @@ class InstallScriptsTestCase(support.TempdirManager, dist = Distribution() dist.command_obj["build"] = support.DummyCommand( build_scripts="/foo/bar") - dist.command_obj["install"] = support.DummyCommand( + dist.command_obj["install_dist"] = support.DummyCommand( install_scripts="/splat/funk", force=1, skip_build=1, @@ -59,7 +59,7 @@ class InstallScriptsTestCase(support.TempdirManager, target = self.mkdtemp() dist = Distribution() dist.command_obj["build"] = support.DummyCommand(build_scripts=source) - dist.command_obj["install"] = support.DummyCommand( + dist.command_obj["install_dist"] = support.DummyCommand( install_scripts=target, force=1, skip_build=1, |
