diff options
| author | Arc Riley <arcriley@gmail.com> | 2011-03-13 00:12:23 -0500 |
|---|---|---|
| committer | Arc Riley <arcriley@gmail.com> | 2011-03-13 00:12:23 -0500 |
| commit | efa667603bc41168dc547563fffef464b728adfa (patch) | |
| tree | 6b3f76ba3d107c984335253b3d42d9ab65cb7748 /docs/source/distutils | |
| parent | f3f78c2aca495aed87bc416e5f20134b9d0fc351 (diff) | |
| parent | e2d2d3d18380338920819d2bd0524f6629b1874b (diff) | |
| download | disutils2-efa667603bc41168dc547563fffef464b728adfa.tar.gz | |
Branch merge to trunk
Diffstat (limited to 'docs/source/distutils')
| -rw-r--r-- | docs/source/distutils/apiref.rst | 40 | ||||
| -rw-r--r-- | docs/source/distutils/examples.rst | 8 | ||||
| -rw-r--r-- | docs/source/distutils/sourcedist.rst | 7 |
3 files changed, 39 insertions, 16 deletions
diff --git a/docs/source/distutils/apiref.rst b/docs/source/distutils/apiref.rst index 02e4158..b01ba95 100644 --- a/docs/source/distutils/apiref.rst +++ b/docs/source/distutils/apiref.rst @@ -104,6 +104,26 @@ setup script). Indirectly provides the :class:`distutils2.dist.Distribution` and | *package_dir* | A mapping of package to | a dictionary | | | directory names | | +--------------------+--------------------------------+-------------------------------------------------------------+ + | *extra_path* | Information about an | a string, 1-tuple or 2-tuple | + | | intervening directory the | | + | | install directory and the | | + | | actual installation directory. | | + | | | | + | | If the value is a string is is | | + | | treated as a comma-separated | | + | | tuple. | | + | | | | + | | If the value is a 2-tuple, | | + | | the first element is the | | + | | ``.pth`` file and the second | | + | | is the name of the intervening | | + | | directory. | | + | | | | + | | If the value is a 1-tuple that | | + | | element is both the name of | | + | | the ``.pth`` file and the | | + | | intervening directory. | | + +--------------------+--------------------------------+-------------------------------------------------------------+ @@ -888,7 +908,7 @@ tarballs or zipfiles. .. function:: make_zipfile(base_name, base_dir[, verbose=0, dry_run=0]) Create a zip file from all files in and under *base_dir*. The output zip file - will be named *base_dir* + :file:`.zip`. Uses either the :mod:`zipfile` Python + will be named *base_name* + :file:`.zip`. Uses either the :mod:`zipfile` Python module (if available) or the InfoZIP :file:`zip` utility (if installed and found on the default search path). If neither tool is available, raises :exc:`DistutilsExecError`. Returns the name of the output zip file. @@ -1055,6 +1075,15 @@ This module contains some utility functions for operating on individual files. Create a file called *filename* and write *contents* (a sequence of strings without line terminators) to it. +:mod:`distutils2.metadata` --- Metadata handling +================================================================ + +.. module:: distutils2.metadata + +.. FIXME CPython/stdlib docs don't use autoclass, write doc manually here + +.. autoclass:: distutils2.metadata.Metadata + :members: :mod:`distutils2.util` --- Miscellaneous other utility functions ================================================================ @@ -1157,15 +1186,6 @@ other utility module. an underscore. No { } or ( ) style quoting is available. -.. function:: grok_environment_error(exc[, prefix='error: ']) - - Generate a useful error message from an :exc:`EnvironmentError` - (:exc:`IOError` or :exc:`OSError`) exception object. Does what it can to deal - with exception objects that don't have a filename (which happens when the - error is due to a two-file operation, such as :func:`rename` or - :func:`link`). Returns the error message as a string prefixed with *prefix*. - - .. function:: split_quoted(s) Split a string up according to Unix shell-like rules for quotes and diff --git a/docs/source/distutils/examples.rst b/docs/source/distutils/examples.rst index fb89dc9..796ecbb 100644 --- a/docs/source/distutils/examples.rst +++ b/docs/source/distutils/examples.rst @@ -298,11 +298,11 @@ in the Metadata, and ``pyX.X`` the major and minor version of Python like ``2.7`` or ``3.2``. You can read back this static file, by using the -:class:`distutils2.dist.DistributionMetadata` class and its +:class:`distutils2.dist.Metadata` class and its :func:`read_pkg_file` method:: - >>> from distutils2.dist import DistributionMetadata - >>> metadata = DistributionMetadata() + >>> from distutils2.metadata import Metadata + >>> metadata = Metadata() >>> metadata.read_pkg_file(open('distribute-0.6.8-py2.7.egg-info')) >>> metadata.name 'distribute' @@ -315,7 +315,7 @@ Notice that the class can also be instantiated with a metadata file path to loads its values:: >>> pkg_info_path = 'distribute-0.6.8-py2.7.egg-info' - >>> DistributionMetadata(pkg_info_path).name + >>> Metadata(pkg_info_path).name 'distribute' diff --git a/docs/source/distutils/sourcedist.rst b/docs/source/distutils/sourcedist.rst index 1aa722b..7ed9637 100644 --- a/docs/source/distutils/sourcedist.rst +++ b/docs/source/distutils/sourcedist.rst @@ -86,8 +86,7 @@ source distribution: distributions, but in the future there will be a standard for testing Python module distributions) -* :file:`README.txt` (or :file:`README`), :file:`setup.py` (or whatever you - called your setup script), and :file:`setup.cfg` +* The configuration file :file:`setup.cfg` * all files that matches the ``package_data`` metadata. See :ref:`distutils-installing-package-data`. @@ -95,6 +94,10 @@ source distribution: * all files that matches the ``data_files`` metadata. See :ref:`distutils-additional-files`. +.. Warning:: + In Distutils2, setup.py and README (or README.txt) files are not more + included in source distribution by default + Sometimes this is enough, but usually you will want to specify additional files to distribute. The typical way to do this is to write a *manifest template*, called :file:`MANIFEST.in` by default. The manifest template is just a list of |
