Back to index

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

List of all members.

Public Member Functions

def initialize_options
def finalize_options
def run
def has_pure_modules
def has_c_libraries
def has_ext_modules
def has_scripts

Public Attributes

 build_base
 build_purelib
 build_platlib
 build_lib
 build_temp
 build_scripts
 compiler
 plat_name
 debug
 force
 executable

Static Public Attributes

string description = "build everything needed to install"
list user_options
list boolean_options = ['debug', 'force']
list help_options
list sub_commands

Detailed Description

Definition at line 16 of file build.py.


Member Function Documentation

Reimplemented in setup.DocBuild.

Definition at line 69 of file build.py.

00069 
00070     def finalize_options(self):
00071         if self.plat_name is None:
00072             self.plat_name = get_platform()
00073         else:
00074             # plat-name only supported for windows (other platforms are
00075             # supported via ./configure flags, if at all).  Avoid misleading
00076             # other platforms.
00077             if os.name != 'nt':
00078                 raise DistutilsOptionError(
00079                             "--plat-name only supported on Windows (try "
00080                             "using './configure --help' on your platform)")
00081 
00082         plat_specifier = ".%s-%s" % (self.plat_name, sys.version[0:3])
00083 
00084         # Make it so Python 2.x and Python 2.x with --with-pydebug don't
00085         # share the same build directories. Doing so confuses the build
00086         # process for C modules
00087         if hasattr(sys, 'gettotalrefcount'):
00088             plat_specifier += '-pydebug'
00089 
00090         # 'build_purelib' and 'build_platlib' just default to 'lib' and
00091         # 'lib.<plat>' under the base build directory.  We only use one of
00092         # them for a given distribution, though --
00093         if self.build_purelib is None:
00094             self.build_purelib = os.path.join(self.build_base, 'lib')
00095         if self.build_platlib is None:
00096             self.build_platlib = os.path.join(self.build_base,
00097                                               'lib' + plat_specifier)
00098 
00099         # 'build_lib' is the actual directory that we will use for this
00100         # particular module distribution -- if user didn't supply it, pick
00101         # one of 'build_purelib' or 'build_platlib'.
00102         if self.build_lib is None:
00103             if self.distribution.ext_modules:
00104                 self.build_lib = self.build_platlib
00105             else:
00106                 self.build_lib = self.build_purelib
00107 
00108         # 'build_temp' -- temporary directory for compiler turds,
00109         # "build/temp.<plat>"
00110         if self.build_temp is None:
00111             self.build_temp = os.path.join(self.build_base,
00112                                            'temp' + plat_specifier)
00113         if self.build_scripts is None:
00114             self.build_scripts = os.path.join(self.build_base,
00115                                               'scripts-' + sys.version[0:3])
00116 
00117         if self.executable is None:
00118             self.executable = os.path.normpath(sys.executable)

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 134 of file build.py.

00134 
00135     def has_c_libraries(self):
00136         return self.distribution.has_c_libraries()

Here is the caller graph for this function:

Definition at line 137 of file build.py.

00137 
00138     def has_ext_modules(self):
00139         return self.distribution.has_ext_modules()

Here is the caller graph for this function:

Definition at line 131 of file build.py.

00131 
00132     def has_pure_modules(self):
00133         return self.distribution.has_pure_modules()

Here is the caller graph for this function:

Definition at line 140 of file build.py.

00140 
00141     def has_scripts(self):
00142         return self.distribution.has_scripts()
00143 

Reimplemented in setup.DocBuild.

Definition at line 54 of file build.py.

00054 
00055     def initialize_options(self):
00056         self.build_base = 'build'
00057         # these are decided only after 'build_base' has its final value
00058         # (unless overridden by the user or client)
00059         self.build_purelib = None
00060         self.build_platlib = None
00061         self.build_lib = None
00062         self.build_temp = None
00063         self.build_scripts = None
00064         self.compiler = None
00065         self.plat_name = None
00066         self.debug = None
00067         self.force = 0
00068         self.executable = None

Definition at line 119 of file build.py.

00119 
00120     def run(self):
00121         # Run all relevant sub-commands.  This will be some subset of:
00122         #  - build_py      - pure Python modules
00123         #  - build_clib    - standalone C libraries
00124         #  - build_ext     - Python extensions
00125         #  - build_scripts - (Python) scripts
00126         for cmd_name in self.get_sub_commands():
00127             self.run_command(cmd_name)
00128 

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 47 of file build.py.

Definition at line 55 of file build.py.

Definition at line 60 of file build.py.

Definition at line 59 of file build.py.

Definition at line 58 of file build.py.

Definition at line 62 of file build.py.

Definition at line 61 of file build.py.

Definition at line 63 of file build.py.

Definition at line 65 of file build.py.

string distutils.command.build.build.description = "build everything needed to install" [static]

Definition at line 18 of file build.py.

Definition at line 67 of file build.py.

Definition at line 66 of file build.py.

Initial value:
[
        ('help-compiler', None,
         "list available compilers", show_compilers),
        ]

Definition at line 49 of file build.py.

Definition at line 64 of file build.py.

Initial value:
[('build_py',      has_pure_modules),
                    ('build_clib',    has_c_libraries),
                    ('build_ext',     has_ext_modules),
                    ('build_scripts', has_scripts),
                   ]

Definition at line 144 of file build.py.

Initial value:
[
        ('build-base=', 'b',
         "base directory for build library"),
        ('build-purelib=', None,
         "build directory for platform-neutral distributions"),
        ('build-platlib=', None,
         "build directory for platform-specific distributions"),
        ('build-lib=', None,
         "build directory for all distribution (defaults to either " +
         "build-purelib or build-platlib"),
        ('build-scripts=', None,
         "build directory for scripts"),
        ('build-temp=', 't',
         "temporary build directory"),
        ('plat-name=', 'p',
         "platform name to build for, if supported "
         "(default: %s)" % get_platform()),
        ('compiler=', 'c',
         "specify the compiler type"),
        ('debug', 'g',
         "compile extensions and libraries with debugging information"),
        ('force', 'f',
         "forcibly build everything (ignore file timestamps)"),
        ('executable=', 'e',
         "specify final destination interpreter path (build.py)"),
        ]

Definition at line 20 of file build.py.


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