Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docs] Clarify usage of include_package_data/package_data/exclude_package_data on package data files #4643

Merged
merged 21 commits into from
Sep 26, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions docs/userguide/datafiles.rst
Original file line number Diff line number Diff line change
Expand Up @@ -356,24 +356,21 @@ even if they were listed in ``package_data`` or were included as a result of usi
Interplay between these keywords
--------------------------------

TODO:
- better formatted logic expression
- check logic correctness (especially regarding parentheses)

Meanwhile, to further clarify the interplay between these three keywords,
to include certain data file into the source distribution, the following
logic condition has two be met::

m or (p and not (i or e)) # TODO: why not i?
m or (p and not e)
DanielYang59 marked this conversation as resolved.
Show resolved Hide resolved

In plain language, TODO:
In plain language, the file should be either: 1. included in ``MANIFEST.in``;
or 2. selected by ``package-data`` AND not excluded by ``exclude-package-data``.

To include some data file into the ``.whl``::

(not e) and ((i and m) or p)

In plain language, the file should not be excluded by ``exclude-package-data``
(highest priority), and should be either: 1. selected by ``package-data``;
(highest priority), and should be either: 1. selected by ``package-data``; or
2. selected by ``MANIFEST.in`` AND use ``include-package-data = true``.

Notation::
Expand Down