summaryrefslogtreecommitdiff
path: root/docs/userguide/datafiles.rst
Commit message (Collapse)AuthorAgeFilesLines
* Update docs/userguide/datafiles.rstAnderson Bravalheri2022-06-171-2/+1
|
* Reorder words in footnote to improve the meaningAnderson Bravalheri2022-06-171-1/+1
|
* Change wording from *experimental* to *beta*Anderson Bravalheri2022-06-161-10/+10
|
* Clarify glob pattern matching for dotfiles in User's Guide (#3350)Marco Weber2022-06-091-0/+5
|
* Replaced single backticks with double backticksSaniya Maheshwari2022-06-081-2/+2
| | | | | | For the `exclude_package_data` example added recently, there were single backticks around `.gitignore`, `.gitattributes` etc. which leads to the docs failing to build locally.
* Small changes avoiding mentioning distutils directlyAnderson Bravalheri2022-06-071-4/+8
|
* Add a more realistic example for exclude-package-dataAnderson Bravalheri2022-06-071-8/+13
|
* Apply suggestions from code reviewAnderson Bravalheri2022-06-071-4/+4
|
* Added an `include_package_data` snippet to the subdirectory exampleSaniya Maheshwari2022-05-311-2/+46
| | | | | Just to make it clear that we can use either one of `package_data` or `include_package_data` and not just the former.
* Added sectionsSaniya Maheshwari2022-05-311-82/+98
| | | | | | | | | | | | | | - Added `include_package_data`, `package_data` and `exclude_package_data` sections to make clear the three options provided by Setuptools to manage data files. - Added a separate section illustrating the use of a `data` subdirectory, after these three sections. - Placed the summary of the three options under a Summary section. - Changed the levels of the last two sections to match the level of the five sections added. - Small changes. Changed the wording where appropriate to suit the new flow. Changed a paragraph on path separators in glob patterns to a Note.
* Removed footnoteSaniya Maheshwari2022-05-311-5/+5
| | | | | | | 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.
* Added `packages`, `package_dir` and `where` options in all examplesSaniya Maheshwari2022-05-311-3/+29
| | | | For consistency.
* Removed footnoteSaniya Maheshwari2022-05-311-6/+1
| | | | | I believe this footnote is outdated and not required in lieu of the added notes describing compatibility with different Python versions
* Elaborated on usage of `importlib.resources`Saniya Maheshwari2022-05-311-6/+50
| | | | | | | | | | | - Added example package tree - Added snippet on how typically the `__file__` attribute would be used - Added snippet showing usage of `importlib.resources` with the `files()` API - Added notes on compatibility of this code with different Python versions along with references - Added snippet to show usage of `importlib_resources` backport
* Added note to `package_data` optionSaniya Maheshwari2022-05-311-1/+3
| | | | | | | | | In the end of the document, in the summary section, there is a line stating that the files matched by `package_data` do not require a corresponding `MANIFEST.in` or a revision control system plugin. Have included this note higher up in the document because I felt it may be of interest to users and they might miss this line so far down the document.
* Modified code snippets for `exclude_package_data` exampleSaniya Maheshwari2022-05-311-10/+7
| | | | | | Made them consistent with the snippets given on the Package Discovery page. The changes made here are similar to the changes made to the previous example.
* Elaborated on example for `exclude_package_data`Saniya Maheshwari2022-05-311-5/+6
| | | | Tried to make why this option is useful more clear.
* Modified code snippets for multiple top-level packages exampleSaniya Maheshwari2022-05-311-20/+20
| | | | | | | | | | | | | | Made them consistent with the snippets given on the Package Discovery page. - Instead of enumerating a list of all the packages in `packages`, using `find_packages` or `find:` instead. The `find_packages` call in `setup.py` contains a `where` argument. In `setup.cfg`, included the section `options.packages.find` with a `where` option. - Instead of supplying the same `package_dir` for each package, using an empty string to indicate a `package_dir` for all packages. - In `pyproject.toml`, using the `where` option instead of `package-dir`. - Textual changes.
* Treating data subdirectories as namespace packagesSaniya Maheshwari2022-05-311-21/+35
| | | | | | Modified code snippets for `package_data` example with `data` subdirectory to treat the `data` subdirectory as a namespace package. Also modified a paragraph below these snippets.
* Small changeSaniya Maheshwari2022-05-311-3/+2
| | | | | | | | Removed the statement within the parentheses, since the example which follows does not illustrate this specific example (of having documentation files that you may not want to include in the installation). Besides the `exclude_package_data` option covers this exact use case in a later example.
* Elaborated on first example involving `include_package_data`Saniya Maheshwari2022-05-251-7/+27
| | | | | | | | | | Have tried to make the working of the `include_package_data` option as clear as possible. - Added a package tree - Tried to clearly state that the data files must be either included in `MANIFEST.in`, or tracked by a VCS, in order for them to be included in the installation of the package, when `include_package_data=True`. - Added a `MANIFEST.in` snippet to make things more clear.
* Changes to the User Guide's Data Files pageSaniya Maheshwari2022-05-241-73/+251
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - All code snippets were given for `setup.py`. Have added corresponding snippets for `setup.cfg` and `pyproject.toml`. - To avoid incentivizing multiple top-level packages, have modified all the package trees and code snippets to include only a single package `mypkg`. Have added a separate example to illustrate the functionality of using the empty string `""` / the asterisk `*` for capturing data files from multiple packages. Have also modified the `setup.py` code snippets and removed the `find_packages("src")` since there is only a single package in each case (except one); have opted to explicitly name the package instead. - Have added a package tree example for the first `package_data` snippet. Have also added a package tree / code snippet example to show how `package_data` patterns should include subdirectories, separating it from the example showing the empty string `""` / asterisk `*` functionality. - Tried to have consistent naming for all directories and data files used in the package trees and code snippets. All directories have been named `mypkg` and data files have been named `data1.txt`, `data2.rst` etc. - Have reformatted package tree examples. Reformatting has been done by replacing the only-indentation based directory structure diagram with a line-based tree layout; I think this looks neater. - Have added `.. note::` blocks for paragraphs that would be more appropriately phased as a Note. Other minor changes to text content have been made.
* Apply suggestions from code reviewAnderson Bravalheri2022-03-041-2/+2
| | | Co-authored-by: Steven Silvester <steven.silvester@ieee.org>
* Emphasize data files should be included inside the packageAnderson Bravalheri2022-03-031-1/+1
|
* Avoid using a same set of words repeatedly too closeAnderson Bravalheri2022-03-031-1/+1
|
* Add another missing link to PyPUGAnderson Bravalheri2022-03-031-1/+1
|
* Modify datafiles docs to emphasize importlib.resources over pkg_resoruecesAnderson Bravalheri2022-03-031-12/+12
|
* Add a note about data files being read-onlyAnderson Bravalheri2022-03-031-0/+16
|
* Add links to MANIFEST.in docs and clarify data files inclusionAnderson Bravalheri2022-03-031-14/+27
|
* 📝 Recover interdoc links & correct broken syntaxSviatoslav Sydorenko2020-10-161-3/+6
|
* Use canonical extension for docs.Jason R. Coombs2020-09-231-0/+174