diff options
| author | Anderson Bravalheri <andersonbravalheri@gmail.com> | 2022-06-07 18:11:00 +0100 |
|---|---|---|
| committer | Anderson Bravalheri <andersonbravalheri@gmail.com> | 2022-06-16 21:29:34 +0100 |
| commit | 61b941337ece67ef766b549c4147137988c4cdb7 (patch) | |
| tree | eb39d0af6323f48941df70edb3abe88313ca80fe /setuptools | |
| parent | d9e23903c9b97492db21f42beccf76bd287c1e05 (diff) | |
| download | python-setuptools-git-61b941337ece67ef766b549c4147137988c4cdb7.tar.gz | |
Warn about 'tool.setuptool' instead of project metadata in pyproject.toml
Diffstat (limited to 'setuptools')
| -rw-r--r-- | setuptools/config/pyprojecttoml.py | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/setuptools/config/pyprojecttoml.py b/setuptools/config/pyprojecttoml.py index 976eb063..ce5ad04d 100644 --- a/setuptools/config/pyprojecttoml.py +++ b/setuptools/config/pyprojecttoml.py @@ -94,12 +94,13 @@ def read_configuration( if not asdict or not (project_table or setuptools_table): return {} # User is not using pyproject to configure setuptools - # TODO: Remove the following once the feature stabilizes: - msg = ( - "Support for project metadata in `pyproject.toml` is still experimental " - "and may be removed (or change) in future releases." - ) - warnings.warn(msg, _ExperimentalProjectMetadata) + if setuptools_table: + # TODO: Remove the following once the feature stabilizes: + msg = ( + "Support for configuring `[tool.setuptools]` in `pyproject.toml` is still " + "experimental and may change in future releases." + ) + warnings.warn(msg, _ExperimentalConfiguration) # There is an overall sense in the community that making include_package_data=True # the default would be an improvement. @@ -413,7 +414,7 @@ class _EnsurePackagesDiscovered(_expand.EnsurePackagesDiscovered): return super().__exit__(exc_type, exc_value, traceback) -class _ExperimentalProjectMetadata(UserWarning): +class _ExperimentalConfiguration(UserWarning): """Explicitly inform users that `pyproject.toml` configuration is experimental""" |
