summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/design/pep-0376.txt2
-rw-r--r--docs/source/distutils/apiref.rst6
-rw-r--r--docs/source/distutils/examples.rst8
-rw-r--r--docs/source/index.rst3
-rw-r--r--docs/source/library/distutils2.metadata.rst22
5 files changed, 22 insertions, 19 deletions
diff --git a/docs/design/pep-0376.txt b/docs/design/pep-0376.txt
index f7ccd14..9422e09 100644
--- a/docs/design/pep-0376.txt
+++ b/docs/design/pep-0376.txt
@@ -425,7 +425,7 @@ contained in `PKG-INFO` when it is instantiated.
- ``name``: The name of the distribution.
-- ``metadata``: A ``DistributionMetadata`` instance loaded with the
+- ``metadata``: A ``Metadata`` instance loaded with the
distribution's PKG-INFO file.
- ``requested``: A boolean that indicates whether the REQUESTED
diff --git a/docs/source/distutils/apiref.rst b/docs/source/distutils/apiref.rst
index c43ec2e..5349b2c 100644
--- a/docs/source/distutils/apiref.rst
+++ b/docs/source/distutils/apiref.rst
@@ -888,7 +888,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.
@@ -1060,7 +1060,9 @@ This module contains some utility functions for operating on individual files.
.. module:: distutils2.metadata
-.. autoclass:: distutils2.metadata.DistributionMetadata
+.. FIXME CPython/stdlib docs don't use autoclass, write doc manually here
+
+.. autoclass:: distutils2.metadata.Metadata
:members:
:mod:`distutils2.util` --- Miscellaneous other utility functions
diff --git a/docs/source/distutils/examples.rst b/docs/source/distutils/examples.rst
index fe6f482..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.metadata 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/index.rst b/docs/source/index.rst
index 91db2bd..8a3d63c 100644
--- a/docs/source/index.rst
+++ b/docs/source/index.rst
@@ -29,7 +29,7 @@ a library used to package, distribute, build and install Python projects.
.. __: http://bitbucket.org/tarek/distutils2/wiki/GSoC_2010_teams
If you’re looking for information on how to contribute, head to
-:doc:`devresources`.
+:doc:`devresources`, and be sure to have a look at :doc:`contributing`.
Documentation
@@ -76,6 +76,7 @@ The documentation is split in four sections, as in the standard Python docs:
distutils/index
library/distutils2
library/pkgutil
+ contributing
Indices and tables
diff --git a/docs/source/library/distutils2.metadata.rst b/docs/source/library/distutils2.metadata.rst
index c04dec5..6fe24c6 100644
--- a/docs/source/library/distutils2.metadata.rst
+++ b/docs/source/library/distutils2.metadata.rst
@@ -4,7 +4,7 @@ Metadata
.. module:: distutils2.metadata
-Distutils2 provides a :class:`~distutils2.metadata.DistributionMetadata` class that can read and
+Distutils2 provides a :class:`~distutils2.metadata.Metadata` class that can read and
write metadata files. This class is compatible with all metadata versions:
* 1.0: :PEP:`241`
@@ -19,11 +19,11 @@ markers, and displays warnings when versions that are supposed to be
Reading metadata
================
-The :class:`~distutils2.metadata.DistributionMetadata` class can be instantiated with the path of
+The :class:`~distutils2.metadata.Metadata` class can be instantiated with the path of
the metadata file, and provides a dict-like interface to the values::
- >>> from distutils2.metadata import DistributionMetadata
- >>> metadata = DistributionMetadata('PKG-INFO')
+ >>> from distutils2.metadata import Metadata
+ >>> metadata = Metadata('PKG-INFO')
>>> metadata.keys()[:5]
('Metadata-Version', 'Name', 'Version', 'Platform', 'Supported-Platform')
>>> metadata['Name']
@@ -35,13 +35,13 @@ the metadata file, and provides a dict-like interface to the values::
The fields that supports environment markers can be automatically ignored if
the object is instantiated using the ``platform_dependent`` option.
-:class:`~distutils2.metadata.DistributionMetadata` will interpret in the case the markers and will
+:class:`~distutils2.metadata.Metadata` will interpret in the case the markers and will
automatically remove the fields that are not compliant with the running
environment. Here's an example under Mac OS X. The win32 dependency
we saw earlier is ignored::
- >>> from distutils2.metadata import DistributionMetadata
- >>> metadata = DistributionMetadata('PKG-INFO', platform_dependent=True)
+ >>> from distutils2.metadata import Metadata
+ >>> metadata = Metadata('PKG-INFO', platform_dependent=True)
>>> metadata['Requires-Dist']
['bar']
@@ -53,9 +53,9 @@ expects.
Here's an example, simulating a win32 environment::
- >>> from distutils2.metadata import DistributionMetadata
+ >>> from distutils2.metadata import Metadata
>>> context = {'sys.platform': 'win32'}
- >>> metadata = DistributionMetadata('PKG-INFO', platform_dependent=True,
+ >>> metadata = Metadata('PKG-INFO', platform_dependent=True,
... execution_context=context)
...
>>> metadata['Requires-Dist'] = ["pywin32; sys.platform == 'win32'",
@@ -83,8 +83,8 @@ Conflict checking and best version
Some fields in :PEP:`345` have to follow a version scheme in their versions
predicate. When the scheme is violated, a warning is emitted::
- >>> from distutils2.metadata import DistributionMetadata
- >>> metadata = DistributionMetadata()
+ >>> from distutils2.metadata import Metadata
+ >>> metadata = Metadata()
>>> metadata['Requires-Dist'] = ['Funky (Groovie)']
"Funky (Groovie)" is not a valid predicate
>>> metadata['Requires-Dist'] = ['Funky (1.2)']