Commit 6d7c33f6 authored by Hanno Schlichting's avatar Hanno Schlichting

Cherry-picked documentation and style changes from setuptools trunk

--HG--
branch : distribute
extra : rebase_source : 90744e00df97b8b79c6780d7600f189bf2e39a6c
parent 02cebf77
...@@ -123,7 +123,8 @@ __all__ = [ ...@@ -123,7 +123,8 @@ __all__ = [
] ]
class ResolutionError(Exception): class ResolutionError(Exception):
"""Abstract base for dependency resolution errors""" """Abstract base for dependency resolution errors"""
def __repr__(self): return self.__class__.__name__+repr(self.args) def __repr__(self):
return self.__class__.__name__+repr(self.args)
class VersionConflict(ResolutionError): class VersionConflict(ResolutionError):
"""An already-installed version conflicts with the requested version""" """An already-installed version conflicts with the requested version"""
...@@ -134,6 +135,7 @@ class DistributionNotFound(ResolutionError): ...@@ -134,6 +135,7 @@ class DistributionNotFound(ResolutionError):
class UnknownExtra(ResolutionError): class UnknownExtra(ResolutionError):
"""Distribution doesn't have an "extra feature" of the given name""" """Distribution doesn't have an "extra feature" of the given name"""
_provider_factories = {} _provider_factories = {}
PY_MAJOR = sys.version[:3] PY_MAJOR = sys.version[:3]
EGG_DIST = 3 EGG_DIST = 3
BINARY_DIST = 2 BINARY_DIST = 2
...@@ -201,8 +203,6 @@ macosVersionString = re.compile(r"macosx-(\d+)\.(\d+)-(.*)") ...@@ -201,8 +203,6 @@ macosVersionString = re.compile(r"macosx-(\d+)\.(\d+)-(.*)")
darwinVersionString = re.compile(r"darwin-(\d+)\.(\d+)\.(\d+)-(.*)") darwinVersionString = re.compile(r"darwin-(\d+)\.(\d+)\.(\d+)-(.*)")
get_platform = get_build_platform # XXX backward compat get_platform = get_build_platform # XXX backward compat
def compatible_platforms(provided,required): def compatible_platforms(provided,required):
"""Can code for the `provided` platform run on the `required` platform? """Can code for the `provided` platform run on the `required` platform?
...@@ -317,15 +317,6 @@ class IMetadataProvider: ...@@ -317,15 +317,6 @@ class IMetadataProvider:
class IResourceProvider(IMetadataProvider): class IResourceProvider(IMetadataProvider):
"""An object that provides access to package resources""" """An object that provides access to package resources"""
......
...@@ -140,6 +140,9 @@ directly alter ``sys.path`` at runtime, you may find these APIs useful: ...@@ -140,6 +140,9 @@ directly alter ``sys.path`` at runtime, you may find these APIs useful:
is invoked, it checks for the presence of namespace packages and updates is invoked, it checks for the presence of namespace packages and updates
their ``__path__`` contents accordingly. their ``__path__`` contents accordingly.
Applications that manipulate namespace packages or directly alter ``sys.path``
at runtime may also need to use this API function:
``fixup_namespace_packages(path_item)`` ``fixup_namespace_packages(path_item)``
Declare that `path_item` is a newly added item on ``sys.path`` that may Declare that `path_item` is a newly added item on ``sys.path`` that may
need to be used to update existing namespace packages. Ordinarily, this is need to be used to update existing namespace packages. Ordinarily, this is
...@@ -182,7 +185,7 @@ not provide any way to detect arbitrary changes to a list object like ...@@ -182,7 +185,7 @@ not provide any way to detect arbitrary changes to a list object like
the constructor is called. the constructor is called.
Note that you will not normally construct ``WorkingSet`` instances Note that you will not normally construct ``WorkingSet`` instances
yourbut instead you will implicitly or explicitly use the global yourself, but instead you will implicitly or explicitly use the global
``working_set`` instance. For the most part, the ``pkg_resources`` API ``working_set`` instance. For the most part, the ``pkg_resources`` API
is designed so that the ``working_set`` is used by default, such that you is designed so that the ``working_set`` is used by default, such that you
don't have to explicitly refer to it most of the time. don't have to explicitly refer to it most of the time.
......
...@@ -4,13 +4,5 @@ tag_svn_revision = 1 ...@@ -4,13 +4,5 @@ tag_svn_revision = 1
[aliases] [aliases]
release = egg_info -RDb '' release = egg_info -RDb ''
source = bdist_rpm register binary source = register sdist binary
binary = bdist_egg bdist_wininst binary = bdist_egg upload --show-response
[upload]
show_response = 1
[bdist_rpm]
source_only = 1
doc_files = setuptools.txt EasyInstall.txt pkg_resources.txt
requires = python-devel
...@@ -338,8 +338,8 @@ unless you need the associated ``setuptools`` feature. ...@@ -338,8 +338,8 @@ unless you need the associated ``setuptools`` feature.
merge such subpackages into a single parent package at runtime, as long merge such subpackages into a single parent package at runtime, as long
as you declare them in each project that contains any subpackages of the as you declare them in each project that contains any subpackages of the
namespace package, and as long as the namespace package's ``__init__.py`` namespace package, and as long as the namespace package's ``__init__.py``
does not contain any code. See the section below on `Namespace Packages`_ does not contain any code other than a namespace declaration. See the
for more information. section below on `Namespace Packages`_ for more information.
``test_suite`` ``test_suite``
A string naming a ``unittest.TestCase`` subclass (or a package or module A string naming a ``unittest.TestCase`` subclass (or a package or module
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment