Back to index

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

List of all members.

Public Member Functions

def initialize_options
def finalize_options
def run

Public Attributes

 bdist_dir
 plat_name
 format
 keep_temp
 dist_dir
 skip_build
 relative

Static Public Attributes

string description = "create a \"dumb\" built distribution"
list user_options
list boolean_options = ['keep-temp', 'skip-build', 'relative']
dictionary default_format

Detailed Description

Definition at line 15 of file bdist_dumb.py.


Member Function Documentation

Definition at line 53 of file bdist_dumb.py.

00053 
00054     def finalize_options(self):
00055         if self.bdist_dir is None:
00056             bdist_base = self.get_finalized_command('bdist').bdist_base
00057             self.bdist_dir = os.path.join(bdist_base, 'dumb')
00058 
00059         if self.format is None:
00060             try:
00061                 self.format = self.default_format[os.name]
00062             except KeyError:
00063                 raise DistutilsPlatformError(
00064                        "don't know how to create dumb built distributions "
00065                        "on platform %s" % os.name)
00066 
00067         self.set_undefined_options('bdist',
00068                                    ('dist_dir', 'dist_dir'),
00069                                    ('plat_name', 'plat_name'),
00070                                    ('skip_build', 'skip_build'))

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 44 of file bdist_dumb.py.

00044 
00045     def initialize_options(self):
00046         self.bdist_dir = None
00047         self.plat_name = None
00048         self.format = None
00049         self.keep_temp = 0
00050         self.dist_dir = None
00051         self.skip_build = None
00052         self.relative = 0

Definition at line 71 of file bdist_dumb.py.

00071 
00072     def run(self):
00073         if not self.skip_build:
00074             self.run_command('build')
00075 
00076         install = self.reinitialize_command('install', reinit_subcommands=1)
00077         install.root = self.bdist_dir
00078         install.skip_build = self.skip_build
00079         install.warn_dir = 0
00080 
00081         log.info("installing to %s" % self.bdist_dir)
00082         self.run_command('install')
00083 
00084         # And make an archive relative to the root of the
00085         # pseudo-installation tree.
00086         archive_basename = "%s.%s" % (self.distribution.get_fullname(),
00087                                       self.plat_name)
00088 
00089         # OS/2 objects to any ":" characters in a filename (such as when
00090         # a timestamp is used in a version) so change them to hyphens.
00091         if os.name == "os2":
00092             archive_basename = archive_basename.replace(":", "-")
00093 
00094         pseudoinstall_root = os.path.join(self.dist_dir, archive_basename)
00095         if not self.relative:
00096             archive_root = self.bdist_dir
00097         else:
00098             if (self.distribution.has_ext_modules() and
00099                 (install.install_base != install.install_platbase)):
00100                 raise DistutilsPlatformError(
00101                        "can't make a dumb built distribution where "
00102                        "base and platbase are different (%s, %s)"
00103                        % (repr(install.install_base),
00104                           repr(install.install_platbase)))
00105             else:
00106                 archive_root = os.path.join(self.bdist_dir,
00107                                    ensure_relative(install.install_base))
00108 
00109         # Make the archive
00110         filename = self.make_archive(pseudoinstall_root,
00111                                      self.format, root_dir=archive_root)
00112         if self.distribution.has_ext_modules():
00113             pyversion = get_python_version()
00114         else:
00115             pyversion = 'any'
00116         self.distribution.dist_files.append(('bdist_dumb', pyversion,
00117                                              filename))
00118 
00119         if not self.keep_temp:
00120             remove_tree(self.bdist_dir, dry_run=self.dry_run)

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 45 of file bdist_dumb.py.

list distutils.command.bdist_dumb.bdist_dumb.boolean_options = ['keep-temp', 'skip-build', 'relative'] [static]

Definition at line 38 of file bdist_dumb.py.

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

Definition at line 40 of file bdist_dumb.py.

string distutils.command.bdist_dumb.bdist_dumb.description = "create a \"dumb\" built distribution" [static]

Definition at line 17 of file bdist_dumb.py.

Definition at line 49 of file bdist_dumb.py.

Definition at line 47 of file bdist_dumb.py.

Definition at line 48 of file bdist_dumb.py.

Definition at line 46 of file bdist_dumb.py.

Definition at line 51 of file bdist_dumb.py.

Definition at line 50 of file bdist_dumb.py.

Initial value:
[('bdist-dir=', 'd',
                     "temporary directory for creating the distribution"),
                    ('plat-name=', 'p',
                     "platform name to embed in generated filenames "
                     "(default: %s)" % get_platform()),
                    ('format=', 'f',
                     "archive format to create (tar, ztar, gztar, zip)"),
                    ('keep-temp', 'k',
                     "keep the pseudo-installation tree around after " +
                     "creating the distribution archive"),
                    ('dist-dir=', 'd',
                     "directory to put final built distributions in"),
                    ('skip-build', None,
                     "skip rebuilding everything (for testing/debugging)"),
                    ('relative', None,
                     "build the archive using relative paths"
                     "(default: false)"),
                   ]

Definition at line 19 of file bdist_dumb.py.


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