Use new project metadata format [PEP 621]#72422
Merged
balloob merged 3 commits intohome-assistant:devfrom May 25, 2022
Merged
Conversation
balloob
reviewed
May 24, 2022
frenck
reviewed
May 24, 2022
pyproject.toml
Outdated
| ] | ||
| keywords = ["home", "automation"] | ||
| classifiers = [ | ||
| "Development Status :: 4 - Beta", |
Member
There was a problem hiding this comment.
It might be time to remove beta from this? 😬
Member
Author
There was a problem hiding this comment.
Thought so too, just wasn't sure. I changed it to Development Status :: 5 - Production/Stable.
I can revert it if that's not what you were going for.
This was referenced May 24, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.cfgtopyproject.toml.Some keys can't be moved quite yet:
versionandpython_requires-> need to update actions and scripts first. Will follow laterinstall_requires-> The field is dynamically written by thegen_requirements_all.pyscript. Writingtomlis more difficult than ini files. Will need to investigate options. For now settingdependenciesasdynamicwill 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 usingurlfor 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-emailuses 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: