diff options
author | Hanno Schlichting <hanno@hannosch.eu> | 2009-07-17 14:03:44 +0200 |
---|---|---|
committer | Hanno Schlichting <hanno@hannosch.eu> | 2009-07-17 14:03:44 +0200 |
commit | 6d7c33f6c41f55472db71da84c98b1a60dd8c8b1 (patch) | |
tree | 03927c77d1aa6324da569097b00c6332b1c0c030 | |
parent | 02cebf77004be44568f347a78631f824296815b9 (diff) | |
download | external_python_setuptools-6d7c33f6c41f55472db71da84c98b1a60dd8c8b1.tar.gz external_python_setuptools-6d7c33f6c41f55472db71da84c98b1a60dd8c8b1.tar.bz2 external_python_setuptools-6d7c33f6c41f55472db71da84c98b1a60dd8c8b1.zip |
Cherry-picked documentation and style changes from setuptools trunk
--HG--
branch : distribute
extra : rebase_source : 90744e00df97b8b79c6780d7600f189bf2e39a6c
-rw-r--r-- | pkg_resources.py | 15 | ||||
-rwxr-xr-x | pkg_resources.txt | 5 | ||||
-rwxr-xr-x | setup.cfg | 12 | ||||
-rwxr-xr-x | setuptools.txt | 4 |
4 files changed, 11 insertions, 25 deletions
diff --git a/pkg_resources.py b/pkg_resources.py index ea01817b..b22aee74 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -123,7 +123,8 @@ __all__ = [ ] class ResolutionError(Exception): """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): """An already-installed version conflicts with the requested version""" @@ -134,6 +135,7 @@ class DistributionNotFound(ResolutionError): class UnknownExtra(ResolutionError): """Distribution doesn't have an "extra feature" of the given name""" _provider_factories = {} + PY_MAJOR = sys.version[:3] EGG_DIST = 3 BINARY_DIST = 2 @@ -201,8 +203,6 @@ macosVersionString = re.compile(r"macosx-(\d+)\.(\d+)-(.*)") darwinVersionString = re.compile(r"darwin-(\d+)\.(\d+)\.(\d+)-(.*)") get_platform = get_build_platform # XXX backward compat - - def compatible_platforms(provided,required): """Can code for the `provided` platform run on the `required` platform? @@ -317,15 +317,6 @@ class IMetadataProvider: - - - - - - - - - class IResourceProvider(IMetadataProvider): """An object that provides access to package resources""" diff --git a/pkg_resources.txt b/pkg_resources.txt index 08d6d4dd..a7463e23 100755 --- a/pkg_resources.txt +++ b/pkg_resources.txt @@ -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 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)`` 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 @@ -182,7 +185,7 @@ not provide any way to detect arbitrary changes to a list object like the constructor is called. 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 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. @@ -4,13 +4,5 @@ tag_svn_revision = 1 [aliases] release = egg_info -RDb '' -source = bdist_rpm register binary -binary = bdist_egg bdist_wininst - -[upload] -show_response = 1 - -[bdist_rpm] -source_only = 1 -doc_files = setuptools.txt EasyInstall.txt pkg_resources.txt -requires = python-devel +source = register sdist binary +binary = bdist_egg upload --show-response diff --git a/setuptools.txt b/setuptools.txt index efbef559..231ed340 100755 --- a/setuptools.txt +++ b/setuptools.txt @@ -338,8 +338,8 @@ unless you need the associated ``setuptools`` feature. 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 namespace package, and as long as the namespace package's ``__init__.py`` - does not contain any code. See the section below on `Namespace Packages`_ - for more information. + does not contain any code other than a namespace declaration. See the + section below on `Namespace Packages`_ for more information. ``test_suite`` A string naming a ``unittest.TestCase`` subclass (or a package or module |