Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes | Static Public Attributes
distutils.command.install_scripts.install_scripts Class Reference
Inheritance diagram for distutils.command.install_scripts.install_scripts:
Inheritance graph
[legend]
Collaboration diagram for distutils.command.install_scripts.install_scripts:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def initialize_options
def finalize_options
def run
def get_inputs
def get_outputs

Public Attributes

 install_dir
 force
 build_dir
 skip_build
 outfiles

Static Public Attributes

string description = "install scripts (Python or otherwise)"
list user_options
list boolean_options = ['force', 'skip-build']

Detailed Description

Definition at line 14 of file install_scripts.py.


Member Function Documentation

Definition at line 33 of file install_scripts.py.

00033 
00034     def finalize_options(self):
00035         self.set_undefined_options('build', ('build_scripts', 'build_dir'))
00036         self.set_undefined_options('install',
00037                                    ('install_scripts', 'install_dir'),
00038                                    ('force', 'force'),
00039                                    ('skip_build', 'skip_build'),
00040                                   )

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 56 of file install_scripts.py.

00056 
00057     def get_inputs(self):
00058         return self.distribution.scripts or []

Definition at line 59 of file install_scripts.py.

00059 
00060     def get_outputs(self):
00061         return self.outfiles or []

Definition at line 27 of file install_scripts.py.

00027 
00028     def initialize_options(self):
00029         self.install_dir = None
00030         self.force = 0
00031         self.build_dir = None
00032         self.skip_build = None

Definition at line 41 of file install_scripts.py.

00041 
00042     def run(self):
00043         if not self.skip_build:
00044             self.run_command('build_scripts')
00045         self.outfiles = self.copy_tree(self.build_dir, self.install_dir)
00046         if os.name == 'posix':
00047             # Set the executable bits (owner, group, and world) on
00048             # all the scripts we just installed.
00049             for file in self.get_outputs():
00050                 if self.dry_run:
00051                     log.info("changing mode of %s", file)
00052                 else:
00053                     mode = ((os.stat(file)[ST_MODE]) | 0o555) & 0o7777
00054                     log.info("changing mode of %s to %o", file, mode)
00055                     os.chmod(file, mode)

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 25 of file install_scripts.py.

Definition at line 30 of file install_scripts.py.

string distutils.command.install_scripts.install_scripts.description = "install scripts (Python or otherwise)" [static]

Definition at line 16 of file install_scripts.py.

Definition at line 29 of file install_scripts.py.

Definition at line 28 of file install_scripts.py.

Definition at line 44 of file install_scripts.py.

Definition at line 31 of file install_scripts.py.

Initial value:
[
        ('install-dir=', 'd', "directory to install scripts to"),
        ('build-dir=','b', "build directory (where to install from)"),
        ('force', 'f', "force installation (overwrite existing files)"),
        ('skip-build', None, "skip the build steps"),
    ]

Definition at line 18 of file install_scripts.py.


The documentation for this class was generated from the following file: