ASPN ActiveState Programmer Network
  ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups | Web Services
SEARCH
advanced | search help

Reference
ActivePython 2.4
Python Documentation
Distributing Python Modules
10. API Reference
10.1 distutils.core -- Core Distutils functionality
10.2 distutils.ccompiler -- CCompiler base class
10.3 distutils.unixccompiler -- Unix C Compiler
10.4 distutils.msvccompiler -- Microsoft Compiler
10.5 distutils.bcppcompiler -- Borland Compiler
10.6 distutils.cygwincompiler -- Cygwin Compiler
10.7 distutils.emxccompiler -- OS/2 EMX Compiler
10.8 distutils.mwerkscompiler -- Metrowerks CodeWarrior support
10.9 distutils.archive util -- Archiving utilities
10.10 distutils.dep util -- Dependency checking
10.11 distutils.dir util -- Directory tree operations
10.12 distutils.file util -- Single file operations
10.13 distutils.util -- Miscellaneous other utility functions
10.14 distutils.dist -- The Distribution class
10.15 distutils.extension -- The Extension class
10.16 distutils.debug -- Distutils debug mode
10.17 distutils.errors -- Distutils exceptions
10.18 distutils.fancy getopt -- Wrapper around the standard getopt module
10.19 distutils.filelist -- The FileList class
10.20 distutils.log -- Simple PEP 282-style logging
10.21 distutils.spawn -- Spawn a sub-process
10.22 distutils.sysconfig -- System configuration information
10.23 distutils.text file -- The TextFile class
10.24 distutils.version -- Version number classes
10.25 distutils.cmd -- Abstract base class for Distutils commands
10.26 distutils.command -- Individual Distutils commands
10.27 distutils.command.bdist -- Build a binary installer
10.28 distutils.command.bdist packager -- Abstract base class for packagers
10.29 distutils.command.bdist dumb -- Build a ``dumb'' installer
10.30 distutils.command.bdist rpm -- Build a binary distribution as a Redhat RPM and SRPM
10.31 distutils.command.bdist wininst -- Build a Windows installer
10.32 distutils.command.sdist -- Build a source distribution
10.33 distutils.command.build -- Build all files of a package
10.34 distutils.command.build clib -- Build any C libraries in a package
10.35 distutils.command.build ext -- Build any extensions in a package
10.36 distutils.command.build py -- Build the .py/.pyc files of a package
10.37 distutils.command.build scripts -- Build the scripts of a package
10.38 distutils.command.clean -- Clean a package build area
10.39 distutils.command.config -- Perform package configuration
10.40 distutils.command.install -- Install a package
10.41 distutils.command.install data -- Install data files from a package
10.42 distutils.command.install headers -- Install C/C++ header files from a package
10.43 distutils.command.install lib -- Install library files from a package
10.44 distutils.command.install scripts -- Install script files from a package
10.45 distutils.command.register -- Register a module with the Python Package Index
10.46 Creating a new Distutils command

MyASPN >> Reference >> ActivePython 2.4 >> Python Documentation >> Distributing Python Modules >> 10. API Reference
ActivePython 2.4 documentation

10.22 distutils.sysconfig -- System configuration information

The distutils.sysconfig module provides access to Python's low-level configuration information. The specific configuration variables available depend heavily on the platform and configuration. The specific variables depend on the build process for the specific version of Python being run; the variables are those found in the Makefile and configuration header that are installed with Python on Unix systems. The configuration header is called pyconfig.h for Python versions starting with 2.2, and config.h for earlier versions of Python.

Some additional functions are provided which perform some useful manipulations for other parts of the distutils package.

PREFIX
The result of os.path.normpath(sys.prefix).

EXEC_PREFIX
The result of os.path.normpath(sys.exec_prefix).

get_config_var( name)
Return the value of a single variable. This is equivalent to get_config_vars().get(name).

get_config_vars( ...)
Return a set of variable definitions. If there are no arguments, this returns a dictionary mapping names of configuration variables to values. If arguments are provided, they should be strings, and the return value will be a sequence giving the associated values. If a given name does not have a corresponding value, None will be included for that variable.

get_config_h_filename( )
Return the full path name of the configuration header. For Unix, this will be the header generated by the configure script; for other platforms the header will have been supplied directly by the Python source distribution. The file is a platform-specific text file.

get_makefile_filename( )
Return the full path name of the Makefile used to build Python. For Unix, this will be a file generated by the configure script; the meaning for other platforms will vary. The file is a platform-specific text file, if it exists. This function is only useful on POSIX platforms.

get_python_inc( [plat_specific[, prefix]])
Return the directory for either the general or platform-dependent C include files. If plat_specific is true, the platform-dependent include directory is returned; if false or omitted, the platform-independent directory is returned. If prefix is given, it is used as either the prefix instead of PREFIX, or as the exec-prefix instead of EXEC_PREFIX if plat_specific is true.

get_python_lib( [plat_specific[, standard_lib[, prefix]]])
Return the directory for either the general or platform-dependent library installation. If plat_specific is true, the platform-dependent include directory is returned; if false or omitted, the platform-independent directory is returned. If prefix is given, it is used as either the prefix instead of PREFIX, or as the exec-prefix instead of EXEC_PREFIX if plat_specific is true. If standard_lib is true, the directory for the standard library is returned rather than the directory for the installation of third-party extensions.

The following function is only intended for use within the distutils package.

customize_compiler( compiler)
Do any platform-specific customization of a distutils.ccompiler.CCompiler instance.

This function is only needed on Unix at this time, but should be called consistently to support forward-compatibility. It inserts the information that varies across Unix flavors and is stored in Python's Makefile. This information includes the selected compiler, compiler and linker options, and the extension used by the linker for shared objects.

This function is even more special-purpose, and should only be used from Python's own build procedures.

set_python_build( )
Inform the distutils.sysconfig module that it is being used as part of the build process for Python. This changes a lot of relative locations for files, allowing them to be located in the build area rather than in an installed Python.

See About this document... for information on suggesting changes.

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState 2004 All rights reserved