aboutsummaryrefslogtreecommitdiffstats
path: root/docs/setuptools.txt
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2017-02-02 13:09:27 -0500
committerGitHub <noreply@github.com>2017-02-02 13:09:27 -0500
commit90419ce42bc728e2ad4f773dd3e1346c263ad207 (patch)
tree3d569f57b6bb26448b0044c88faa75bcb8fad8ce /docs/setuptools.txt
parente65c45538fab94008b8066edd134725be8f9c400 (diff)
parente83845ac9b23d3e6e397263aa933372148fc5fee (diff)
downloadexternal_python_setuptools-90419ce42bc728e2ad4f773dd3e1346c263ad207.tar.gz
external_python_setuptools-90419ce42bc728e2ad4f773dd3e1346c263ad207.tar.bz2
external_python_setuptools-90419ce42bc728e2ad4f773dd3e1346c263ad207.zip
Merge pull request #957 from smheidrich/fix_hardlinks_via_autosectionlabel
Fix hard link to URLs that should have been internal (method 2: via autosectionlabel Sphinx extension)
Diffstat (limited to 'docs/setuptools.txt')
-rw-r--r--docs/setuptools.txt7
1 files changed, 3 insertions, 4 deletions
diff --git a/docs/setuptools.txt b/docs/setuptools.txt
index 2a494fca..2c197d98 100644
--- a/docs/setuptools.txt
+++ b/docs/setuptools.txt
@@ -940,14 +940,13 @@ Typically, existing programs manipulate a package's ``__file__`` attribute in
order to find the location of data files. However, this manipulation isn't
compatible with PEP 302-based import hooks, including importing from zip files
and Python Eggs. It is strongly recommended that, if you are using data files,
-you should use the `Resource Management API`_ of ``pkg_resources`` to access
+you should use the :ref:`ResourceManager API` of ``pkg_resources`` to access
them. The ``pkg_resources`` module is distributed as part of setuptools, so if
you're using setuptools to distribute your package, there is no reason not to
use its resource management API. See also `Accessing Package Resources`_ for
a quick example of converting code that uses ``__file__`` to use
``pkg_resources`` instead.
-.. _Resource Management API: http://peak.telecommunity.com/DevCenter/PkgResources#resourcemanager-api
.. _Accessing Package Resources: http://peak.telecommunity.com/DevCenter/PythonEggs#accessing-package-resources
@@ -959,8 +958,8 @@ location (e.g. ``/usr/share``). This feature intended to be used for things
like documentation, example configuration files, and the like. ``setuptools``
does not install these data files in a separate location, however. They are
bundled inside the egg file or directory, alongside the Python modules and
-packages. The data files can also be accessed using the `Resource Management
-API`_, by specifying a ``Requirement`` instead of a package name::
+packages. The data files can also be accessed using the :ref:`ResourceManager
+API`, by specifying a ``Requirement`` instead of a package name::
from pkg_resources import Requirement, resource_filename
filename = resource_filename(Requirement.parse("MyProject"),"sample.conf")