4Suite API Documentation

Module Ft.Lib.DistExt.Dist

Classes:
Globals:

Classes

class Dist(distutils.dist.Distribution)
An enhanced version of core Distutils' Distribution class.
Currently supported features, for *all* Python (2.2+) versions:
(from Python 2.3+)
download_url, classifiers - PEP 314 metadata fields

(from Python 2.5+)
install_egg_info command - for setuptools
requires, provides, obsoletes - PEP 314 metadata fields

(only available in 4Suite)
requires_python - [PEP 345] a list of version restrictions for Python
requires_external - [PEP 345] a list of external requirements
command_mapping - maps command names to a module/class name that differs
                  from the actual command name

Methods

__init__(self, attrs)
Overrides: __init__ from class Distribution
announce(self, msg, level=1)
If the current verbosity level is of greater than or equal to 'level' print 'msg' to stdout.
Overrides: announce from class Distribution
finalize_options(self)
Overrides: finalize_options from class Distribution
get_allfiles(self)
get_command_class(self, command)
Extends Distribution.get_command_class() to search 'command_mapping' for modules that implement that requested command.
Overrides: get_command_class from class Distribution
get_command_list(self)
Overridden to add the commands defined by 'command_mapping' to the list of (command, description) tuples.
Overrides: get_command_list from class Distribution
get_source_files(self)
has_bgen(self)
has_devel(self)
has_docs(self)
has_l10n(self)
has_localstate(self)
has_sysconf(self)
has_text(self)
parse_command_line(self)
Parse the setup script's command line, taken from the 'script_args' instance attribute (which defaults to 'sys.argv[1:]' -- see 'setup()' in core.py). This list is first processed for "global options" -- options that set attributes of the Distribution instance. Then, it is alternately scanned for Distutils commands and options for that command. Each new command terminates the options for the previous command. The allowed options for a command are determined by the 'user_options' attribute of the command class -- thus, we have to be able to load command classes in order to parse the command line. Any error in that 'options' attribute raises DistutilsGetoptError; any error on the command-line raises DistutilsArgError. If no Distutils commands were found on the command line, raises DistutilsArgError. Return true if command-line was successfully parsed and we should carry on with executing commands; false if no errors but we shouldn't execute commands (currently, this only happens if user asks for help).
Overrides: parse_command_line from class Distribution
parse_config_files(self, filenames=None)
Overrides: parse_config_files from class Distribution
print_commands(self)
Overridden to add the commands defined by 'command_mapping' to the list of "standard commands".
Overrides: print_commands from class Distribution
print_option_list(self, options, header, max_length)

Methods inherited from class distutils.dist.Distribution

dump_option_dicts, find_config_files, get_command_obj, get_option_dict, handle_display_options, has_c_libraries, has_data_files, has_ext_modules, has_headers, has_modules, has_pure_modules, has_scripts, is_pure, print_command_list, reinitialize_command, run_command, run_commands

Members

command_aliases = {'bdist_wininst': 'bdist_inno', 'install_docs': 'install_html'}
command_mapping = {'bdist': 'BDist', 'bdist_dumb': None, 'bdist_egg': 'BDistEgg', 'bdist_inno': 'BDistInno', 'bdist_msi': None, 'bdist_rpm': 'BDistRpm', 'build': 'Build', 'build_clib': None, 'build_docs': 'BuildDocs', 'build_ext': 'BuildExt', ...}
source_package = False
standard_commands = ['config', 'build', 'clean', 'install', 'sdist', 'register', 'bdist', 'generate']
toplevel_options = [('source-package', 's', 'run as if from a source dist (developer testing)')]

Members inherited from class distutils.dist.Distribution

display_option_names, display_options, global_options, negative_opt
class DistributionMetadata(distutils.dist.DistributionMetadata)

Methods

from_filename(...)
classmethod(function) -> method
Convert a function to be a class method.

A class method receives the class as implicit first argument,
just like an instance method receives the instance.
To declare a class method, use this idiom:

  class C:
      def f(cls, arg1, arg2, ...): ...
      f = classmethod(f)

It can be called either on the class (e.g. C.f()) or on an instance
(e.g. C().f()).  The instance is ignored except for its class.
If a class method is called for a derived class, the derived class
object is passed as the implied first argument.

Class methods are different than C++ or Java static methods.
If you want those, see the staticmethod builtin.
from_stream(...)
classmethod(function) -> method
Convert a function to be a class method.

A class method receives the class as implicit first argument,
just like an instance method receives the instance.
To declare a class method, use this idiom:

  class C:
      def f(cls, arg1, arg2, ...): ...
      f = classmethod(f)

It can be called either on the class (e.g. C.f()) or on an instance
(e.g. C().f()).  The instance is ignored except for its class.
If a class method is called for a derived class, the derived class
object is passed as the implied first argument.

Class methods are different than C++ or Java static methods.
If you want those, see the staticmethod builtin.
from_string(...)
classmethod(function) -> method
Convert a function to be a class method.

A class method receives the class as implicit first argument,
just like an instance method receives the instance.
To declare a class method, use this idiom:

  class C:
      def f(cls, arg1, arg2, ...): ...
      f = classmethod(f)

It can be called either on the class (e.g. C.f()) or on an instance
(e.g. C().f()).  The instance is ignored except for its class.
If a class method is called for a derived class, the derived class
object is passed as the implied first argument.

Class methods are different than C++ or Java static methods.
If you want those, see the staticmethod builtin.
get_obsoletes(self)
get_provides(self)
get_requires(self)
get_requires_external(self)
get_requires_python(self)
set_obsoletes(self, value)
set_provides(self, value)
set_requires(self, value)
set_requires_external(self, value)
set_requires_python(self, value)
write_pkg_file(self, file)
Write the PKG-INFO format data to a file object.
Supports metadata version 1.2 (PEP 345), 1.1 (PEP 314) and
1.0 (PEP 241) in a lowest common denominator fashion.
write_pkg_info(self, base_dir)
Write the PKG-INFO file into the release tree.
Overrides: write_pkg_info from class DistributionMetadata

Methods inherited from class distutils.dist.DistributionMetadata

__init__, get_author, get_author_email, get_classifiers, get_contact, get_contact_email, get_description, get_download_url, get_fullname, get_keywords, get_licence, get_license, get_long_description, get_maintainer, get_maintainer_email, get_name, get_platforms, get_url, get_version

Members

copyright = None
obsoletes = None
provides = None
requires = None
requires_external = None
requires_python = None

Globals

DEBUG = None