Skip to content

Commit c7cdee2

Browse files
authored
Move remaining keys to setup.cfg (home-assistant#65154)
* Move metadata keys * Move options * Delete setup.py * Remove unused constants * Remove deprecated test_suite key * Improve metadata * Only include homeassistant*, not script* * Add long_desc_content_type * Remove license file (auto-included by setuptools + wheels) * Add setup.py Pip 21.2 doesn't support editable installs without it.
1 parent 5e62ff9 commit c7cdee2

File tree

3 files changed

+21
-26
lines changed

3 files changed

+21
-26
lines changed

MANIFEST.in

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
include README.rst
2-
include LICENSE.md
32
graft homeassistant
43
recursive-exclude * *.py[co]

setup.cfg

+15-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
[metadata]
2+
name = homeassistant
23
version = 2022.3.0.dev0
4+
author = The Home Assistant Authors
5+
author_email = [email protected]
36
license = Apache-2.0
4-
license_file = LICENSE.md
57
platforms = any
68
description = Open-source home automation platform running on Python 3.
79
long_description = file: README.rst
10+
long_description_content_type = text/x-rst
811
keywords = home, automation
912
url = https://www.home-assistant.io/
1013
project_urls =
@@ -23,6 +26,9 @@ classifier =
2326
Topic :: Home Automation
2427

2528
[options]
29+
packages = find:
30+
zip_safe = False
31+
include_package_data = True
2632
python_requires = >=3.9.0
2733
install_requires =
2834
aiohttp==3.8.1
@@ -51,6 +57,14 @@ install_requires =
5157
voluptuous-serialize==2.5.0
5258
yarl==1.7.2
5359

60+
[options.packages.find]
61+
include =
62+
homeassistant*
63+
64+
[options.entry_points]
65+
console_scripts =
66+
hass = homeassistant.__main__:main
67+
5468
[flake8]
5569
exclude = .venv,.git,.tox,docs,venv,bin,lib,deps,build
5670
max-complexity = 25

setup.py

100755100644
+6-24
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,7 @@
1-
#!/usr/bin/env python3
2-
"""Home Assistant setup script."""
3-
from datetime import datetime as dt
1+
"""
2+
Entry point for setuptools. Required for editable installs.
3+
TODO: Remove file after updating to pip 21.3
4+
"""
5+
from setuptools import setup
46

5-
from setuptools import find_packages, setup
6-
7-
PROJECT_NAME = "Home Assistant"
8-
PROJECT_PACKAGE_NAME = "homeassistant"
9-
PROJECT_LICENSE = "Apache License 2.0"
10-
PROJECT_AUTHOR = "The Home Assistant Authors"
11-
PROJECT_COPYRIGHT = f" 2013-{dt.now().year}, {PROJECT_AUTHOR}"
12-
PROJECT_EMAIL = "[email protected]"
13-
14-
PACKAGES = find_packages(exclude=["tests", "tests.*"])
15-
16-
setup(
17-
name=PROJECT_PACKAGE_NAME,
18-
author=PROJECT_AUTHOR,
19-
author_email=PROJECT_EMAIL,
20-
packages=PACKAGES,
21-
include_package_data=True,
22-
zip_safe=False,
23-
test_suite="tests",
24-
entry_points={"console_scripts": ["hass = homeassistant.__main__:main"]},
25-
)
7+
setup()

0 commit comments

Comments
 (0)