diff options
author | Saniya Maheshwari <saniya.mah@gmail.com> | 2022-05-31 13:51:24 +0530 |
---|---|---|
committer | Saniya Maheshwari <saniya.mah@gmail.com> | 2022-05-31 13:51:24 +0530 |
commit | 0f0836bed517321d503fdc33ae618d74561a2c7a (patch) | |
tree | e9a2a7d4786fb3ca86692f3e992d339c82bc145e /docs/userguide/datafiles.rst | |
parent | f2c5bd3cf6f670b94c582a852b6e85043d3779eb (diff) | |
download | python-setuptools-git-0f0836bed517321d503fdc33ae618d74561a2c7a.tar.gz |
Elaborated on example for `exclude_package_data`
Tried to make why this option is useful more clear.
Diffstat (limited to 'docs/userguide/datafiles.rst')
-rw-r--r-- | docs/userguide/datafiles.rst | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/docs/userguide/datafiles.rst b/docs/userguide/datafiles.rst index 5ff195a9..56492b0b 100644 --- a/docs/userguide/datafiles.rst +++ b/docs/userguide/datafiles.rst @@ -272,11 +272,12 @@ converts slashes to appropriate platform-specific separators at build time. .. https://docs.python.org/3/distutils/setupscript.html#installing-package-data Sometimes, the ``include_package_data`` or ``package_data`` options alone -aren't sufficient to precisely define what files you want included. For -example, you may want to include package README files in your revision control -system and source distributions, but exclude them from being installed. So, -setuptools offers an ``exclude_package_data`` option as well, that allows you -to do things like this: +aren't sufficient to precisely define what files you want included. For example, +consider a scenario where you have ``include_package_data=True``, and you are using +a revision control system with an appropriate plugin. Your README is probably being +tracked by the revision control system, and therefore by default it will be included +when your package is installed. Supposing you want to prevent this README from being +included in the installation, then you could use the ``exclude_package_data`` option: .. tab:: setup.cfg |