Use new project metadata format [PEP 621] #72422
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed change
Starting with
v61.0.0
, setuptools added support for the (new) project metadata format PEP 621. Although it's currently still experimental, all major features have been implemented and it's possible for us to move most project metadata fromsetup.cfg
topyproject.toml
.Some keys can't be moved quite yet:
version
andpython_requires
-> need to update actions and scripts first. Will follow laterinstall_requires
-> The field is dynamically written by thegen_requirements_all.py
script. Writingtoml
is more difficult than ini files. Will need to investigate options. For now settingdependencies
asdynamic
will allow us to fall back toinstall_requires
.url
-> intended to be merged with[project.urls]
. However, there is an open bug in pypa warehose regarding the sort order. To guarantee the Home-Page is listed first, we can continue usingurl
for now.Project Links in left navbar display in reverse order from setup.py project_urls pypi/warehouse#3097
The resulting metadata file is almost identical. The only exceptions:
Author-email
uses a new (autogenerated) format, I added the missing classifier for Python 3.10, and some trailing whitespace changes.Links
https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html
https://packaging.python.org/en/latest/specifications/declaring-project-metadata/
https://peps.python.org/pep-0621/
Type of change
Additional information
Checklist
black --fast homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.The integration reached or maintains the following Integration Quality Scale:
To help with the load of incoming pull requests: