Move version metadata key to setup.cfg (#65091)

* Move version to setup.cfg
* Move python_requires to setup.cfg
* Add script to validate project metadata
* Add dedicated pre-commit hook
This commit is contained in:
Marc Mueller 2022-01-28 13:36:20 +01:00 committed by GitHub
parent a9cc35d6b6
commit 75f39f9ca2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 55 additions and 5 deletions

View file

@ -31,11 +31,8 @@ PROJECT_URLS = {
PACKAGES = find_packages(exclude=["tests", "tests.*"])
MIN_PY_VERSION = ".".join(map(str, hass_const.REQUIRED_PYTHON_VER))
setup(
name=PROJECT_PACKAGE_NAME,
version=hass_const.__version__,
url=PROJECT_URL,
download_url=DOWNLOAD_URL,
project_urls=PROJECT_URLS,
@ -44,7 +41,6 @@ setup(
packages=PACKAGES,
include_package_data=True,
zip_safe=False,
python_requires=f">={MIN_PY_VERSION}",
test_suite="tests",
entry_points={"console_scripts": ["hass = homeassistant.__main__:main"]},
)