Back to index

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

List of all members.

Public Member Functions

def initialize_options
def finalize_options
def run

Public Attributes


Static Public Attributes

string description = "create a built (binary) distribution"
list user_options
list boolean_options = ['skip-build']
list help_options
tuple no_format_option = ('bdist_rpm',)
dictionary default_format
list format_commands
dictionary format_command

Detailed Description

Definition at line 24 of file

Member Function Documentation

Definition at line 82 of file

00083     def finalize_options(self):
00084         # have to finalize 'plat_name' before 'bdist_base'
00085         if self.plat_name is None:
00086             if self.skip_build:
00087                 self.plat_name = get_platform()
00088             else:
00089                 self.plat_name = self.get_finalized_command('build').plat_name
00091         # 'bdist_base' -- parent of per-built-distribution-format
00092         # temporary directories (eg. we'll probably have
00093         # "build/bdist.<plat>/dumb", "build/bdist.<plat>/rpm", etc.)
00094         if self.bdist_base is None:
00095             build_base = self.get_finalized_command('build').build_base
00096             self.bdist_base = os.path.join(build_base,
00097                                            'bdist.' + self.plat_name)
00099         self.ensure_string_list('formats')
00100         if self.formats is None:
00101             try:
00102                 self.formats = [self.default_format[]]
00103             except KeyError:
00104                 raise DistutilsPlatformError(
00105                       "don't know how to create built distributions "
00106                       "on platform %s" %
00108         if self.dist_dir is None:
00109             self.dist_dir = "dist"

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 75 of file

00076     def initialize_options(self):
00077         self.bdist_base = None
00078         self.plat_name = None
00079         self.formats = None
00080         self.dist_dir = None
00081         self.skip_build = 0

Definition at line 110 of file

00111     def run(self):
00112         # Figure out which sub-commands we need to run.
00113         commands = []
00114         for format in self.formats:
00115             try:
00116                 commands.append(self.format_command[format][0])
00117             except KeyError:
00118                 raise DistutilsOptionError("invalid format '%s'" % format)
00120         # Reinitialize and run each command.
00121         for i in range(len(self.formats)):
00122             cmd_name = commands[i]
00123             sub_cmd = self.reinitialize_command(cmd_name)
00124             if cmd_name not in self.no_format_option:
00125                 sub_cmd.format = self.formats[i]
00127             # If we're going to need to run this command again, tell it to
00128             # keep its temporary files around so subsequent runs go faster.
00129             if cmd_name in commands[i+1:]:
00130                 sub_cmd.keep_temp = 1
00131             self.run_command(cmd_name)

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

Definition at line 76 of file

list distutils.command.bdist.bdist.boolean_options = ['skip-build'] [static]

Definition at line 42 of file

Initial value:
{'posix': 'gztar',
                      'nt': 'zip',
                      'os2': 'zip'}

Definition at line 54 of file

string distutils.command.bdist.bdist.description = "create a built (binary) distribution" [static]

Definition at line 26 of file

Definition at line 79 of file

Initial value:
{'rpm':   ('bdist_rpm',  "RPM distribution"),
                      'gztar': ('bdist_dumb', "gzip'ed tar file"),
                      'bztar': ('bdist_dumb', "bzip2'ed tar file"),
                      'ztar':  ('bdist_dumb', "compressed tar file"),
                      'tar':   ('bdist_dumb', "tar file"),
                      'wininst': ('bdist_wininst',
                                  "Windows executable installer"),
                      'zip':   ('bdist_dumb', "ZIP file"),
                      'msi':   ('bdist_msi',  "Microsoft Installer")

Definition at line 63 of file

Initial value:
['rpm', 'gztar', 'bztar', 'ztar', 'tar',
                       'wininst', 'zip', 'msi']

Definition at line 59 of file

Definition at line 78 of file

Initial value:
        ('help-formats', None,
         "lists available distribution formats", show_formats),

Definition at line 44 of file

tuple distutils.command.bdist.bdist.no_format_option = ('bdist_rpm',) [static]

Definition at line 50 of file

Definition at line 77 of file

Definition at line 80 of file

Initial value:
[('bdist-base=', 'b',
                     "temporary directory for creating built distributions"),
                    ('plat-name=', 'p',
                     "platform name to embed in generated filenames "
                     "(default: %s)" % get_platform()),
                    ('formats=', None,
                     "formats for distribution (comma-separated list)"),
                    ('dist-dir=', 'd',
                     "directory to put final built distributions in "
                     "[default: dist]"),
                    ('skip-build', None,
                     "skip rebuilding everything (for testing/debugging)"),

Definition at line 28 of file

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