summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorAnderson Bravalheri <andersonbravalheri+github@gmail.com>2022-06-07 17:11:45 +0100
committerGitHub <noreply@github.com>2022-06-07 17:11:45 +0100
commitdfdc6d5f3788fcf91ae669be7367a8ddf9992ea2 (patch)
tree3bcec83bf5fafbe0604b2238752ed76a30f011cf /docs
parent3854a8ddf196f01376d2ed5df7466c4717b3bf54 (diff)
downloadpython-setuptools-git-dfdc6d5f3788fcf91ae669be7367a8ddf9992ea2.tar.gz
Apply suggestions from code review
Diffstat (limited to 'docs')
-rw-r--r--docs/userguide/datafiles.rst8
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/userguide/datafiles.rst b/docs/userguide/datafiles.rst
index e8b7505d..4bc2ad9c 100644
--- a/docs/userguide/datafiles.rst
+++ b/docs/userguide/datafiles.rst
@@ -141,7 +141,7 @@ data files:
[tool.setuptools.packages.find]
where = ["src"]
- [tool.setuptools.package_data]
+ [tool.setuptools.package-data]
mypkg = ["*.txt", "*.rst"]
The ``package_data`` argument is a dictionary that maps from package names to
@@ -314,7 +314,7 @@ Here, the ``.rst`` files are placed under a ``data`` subdirectory inside ``mypkg
while the ``.txt`` files are directly under ``mypkg``.
In this case, the recommended approach is to treat ``data`` as a namespace package
-(refer `PEP 420 <https://www.python.org/dev/peps/pep-0420/>`_). With ``package_data``,
+(refer :pep:`420`). With ``package_data``,
the configuration might look like this:
.. tab:: setup.cfg
@@ -357,7 +357,7 @@ the configuration might look like this:
[tool.setuptools.packages.find]
# scanning for namespace packages is true by default in pyproject.toml, so
- # you need NOT include the following line.
+ # you do NOT need to include the following line.
namespaces = true
where = ["src"]
@@ -471,7 +471,7 @@ Then, in ``mypkg/foo.py``, you may try something like this in order to access
with open(data_path, 'r') as data_file:
...
-However, this manipulation isn't compatible with PEP 302-based import hooks,
+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 :mod:`importlib.resources` to access them.
In this case, you would do something like this: