diff options
author | Saniya Maheshwari <saniya.mah@gmail.com> | 2022-05-31 16:51:55 +0530 |
---|---|---|
committer | Saniya Maheshwari <saniya.mah@gmail.com> | 2022-05-31 17:05:06 +0530 |
commit | 9d47a8ff35ee3ee8db6578f48cd3b5834b5f7f3d (patch) | |
tree | 7a4c5c11e21f1b79de34f484b6f84b74fd23e95e /docs/userguide | |
parent | f0e4c8fd3d9b404d31c35a052ac08579f87c1714 (diff) | |
download | python-setuptools-git-9d47a8ff35ee3ee8db6578f48cd3b5834b5f7f3d.tar.gz |
Removed footnote
This footnote describes what Setuptools considers as a data file. This
note is important and may be missed by the reader if it is kept as a
footnote, hence I have copied its contents up ahead in the document,
just after the `include_package_data` example.
Diffstat (limited to 'docs/userguide')
-rw-r--r-- | docs/userguide/datafiles.rst | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/docs/userguide/datafiles.rst b/docs/userguide/datafiles.rst index 462b860b..b56319ca 100644 --- a/docs/userguide/datafiles.rst +++ b/docs/userguide/datafiles.rst @@ -8,7 +8,7 @@ for data files distributed with a package is for use *by* the package, usually by including the data files **inside the package directory**. Setuptools offers three ways to specify this most common type of data files to -be included in your package's [#datafiles]_. +be included in your packages. First, you can simply use the ``include_package_data`` keyword. For example, if the package tree looks like this:: @@ -77,6 +77,10 @@ your package, provided: (See the section below on :ref:`Adding Support for Revision Control Systems` for information on how to write such plugins.) +By default, ``include_package_data`` considers **all** non ``.py`` files found inside +the package directory (``src/mypkg`` in this case) as data files, and includes those that +satisfy (at least) one of the above two conditions into the source distribution, and +consequently in the installation of your package. If you want finer-grained control over what files are included, then you can also use the ``package_data`` keyword. For example, if the package tree looks like this:: @@ -466,10 +470,6 @@ run time be included **inside the package**. ``pyproject.toml`` is experimental and might change in the future. See :doc:`/userguide/pyproject_config`. -.. [#datafiles] ``setuptools`` consider a *package data file* any non-Python - file **inside the package directory** (i.e., that co-exists in the same - location as the regular ``.py`` files being distributed). - .. [#system-dirs] These locations can be discovered with the help of third-party libraries such as :pypi:`platformdirs`. |