-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[FR] Automatically include setup.cfg file:
files into the sdist
#2821
Comments
👋🏻 Hey @abravalheri! Just saw there has been some discussion regarding the dynamic metadata directives ( |
Hi @Sinclert, the The description of how they are processed is given in https://setuptools.pypa.io/en/latest/userguide/declarative_config.html and https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html#dynamic-metadata. Setuptools basically resolve them when reading the configuration file and sets the corresponding attributes of a |
Thanks for working on this @abravalheri |
Thank you very much for the initial push @Sinclert, I used a lot of your code/ideas in the process of creating this PR. |
What's the problem this feature will solve?
When developers define a
setup.cfg
file instead of the classicsetup.py
file for setting the metadata for their packages, they have a small set of special directives (i.e.attr:
,file:
...) to take advantage of.These directives cover a standardized use case of metadata building, which involves reading values from specific files in order to construct the package overall metadata. An example would be:
All files being referenced with the
file:
directive are absolutely mandatory when building the package built distribution (as it includes the complete metadata), and still, they are not automatically included into the source distribution where they are supposed to be available for access.This lack of "automatic inclusion of
file:
referenced files in the source distribution" forces developers to include those files to their projectsMANIFEST.in
, when it could be easily avoidable with a bit of intelligence onsetuptools
side.Describe the solution you'd like
When defining a certain file within the
file:
setup.cfg directive, it should be automatically picked up when building the package's source distribution.Alternative Solutions
Due to the lack of this feature, developers need to include those files into the
MANIFEST.in
:Additional context
This issue comes from an internal conversation on the IRIS-HEP Slack channel, where @henryiii confirmed that what I just described is, indeed, a limitation, and that this was the correct repository to state the suggestion.
Code of Conduct
The text was updated successfully, but these errors were encountered: