diff options
author | phillip.eby <phillip.eby@6015fed2-1504-0410-9fe1-9d1591cc4771> | 2006-04-18 15:27:06 +0000 |
---|---|---|
committer | phillip.eby <phillip.eby@6015fed2-1504-0410-9fe1-9d1591cc4771> | 2006-04-18 15:27:06 +0000 |
commit | dd11e1835e2293767a6e4c48d232d352ca5466ae (patch) | |
tree | d73c0d6fddc63bc421e96162a2b38734c7e733af /pkg_resources.txt | |
parent | a4f1d2197d714de62f9460f4722f24be8c8dc2b9 (diff) | |
download | python-setuptools-dd11e1835e2293767a6e4c48d232d352ca5466ae.tar.gz |
Split ``get_platform()`` into ``get_supported_platform()`` and
``get_build_platform()`` to work around a Mac versioning problem that caused
the behavior of ``compatible_platforms()`` to be platform specific.
git-svn-id: http://svn.python.org/projects/sandbox/trunk/setuptools@45536 6015fed2-1504-0410-9fe1-9d1591cc4771
Diffstat (limited to 'pkg_resources.txt')
-rwxr-xr-x | pkg_resources.txt | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/pkg_resources.txt b/pkg_resources.txt index f788516..4641c72 100755 --- a/pkg_resources.txt +++ b/pkg_resources.txt @@ -447,7 +447,7 @@ that are present and potentially importable on the current platform. ``Environment`` objects are used by ``pkg_resources`` to index available distributions during dependency resolution. -``Environment(search_path=None, platform=get_platform(), python=PY_MAJOR)`` +``Environment(search_path=None, platform=get_supported_platform(), python=PY_MAJOR)`` Create an environment snapshot by scanning `search_path` for distributions compatible with `platform` and `python`. `search_path` should be a sequence of strings such as might be used on ``sys.path``. If a @@ -1596,11 +1596,21 @@ Parsing Utilities Platform Utilities ------------------ -``get_platform()`` +``get_build_platform()`` Return this platform's identifier string. For Windows, the return value is ``"win32"``, and for Mac OS X it is a string of the form ``"macosx-10.4-ppc"``. All other platforms return the same uname-based string that the ``distutils.util.get_platform()`` function returns. + This string is the minimum platform version required by distributions built + on the local machine. (Backward compatibility note: setuptools versions + prior to 0.6b1 called this function ``get_platform()``, and the function is + still available under that name for backward compatibility reasons.) + +``get_supported_platform()`` (New in 0.6b1) + This is the similar to ``get_build_platform()``, but is the maximum + platform version that the local machine supports. You will usually want + to use this value as the ``provided`` argument to the + ``compatible_platforms()`` function. ``compatible_platforms(provided, required)`` Return true if a distribution built on the `provided` platform may be used @@ -1665,3 +1675,7 @@ Release Notes/Change History of a namespace package's ``__init__.py`` files must include a ``declare_namespace()`` call. + * Split ``get_platform()`` into ``get_supported_platform()`` and + ``get_build_platform()`` to work around a Mac versioning problem that caused + the behavior of ``compatible_platforms()`` to be platform specific. + |