Skip to content

Packaging data in a single-module distribution #4139

Answered by abravalheri
ericzolf asked this question in Q&A
Discussion options

You must be logged in to vote

Files that are not contained by a package folder are not considered package data (they are outside of any package after all).

To add a .pth file to a wheel it is necessary to customise the build steps (probably bdist_wheel and/or build_py, maybe others...).
That is done via setup.py. Reminder that setup.py is a perfect valid, non-deprecated1, configuration/customisation file that can be used alongside/complementary to pyproject.toml.

Footnotes

  1. The only thing that is deprecated is running this file as a CLI tool.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ericzolf
Comment options

Answer selected by ericzolf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants