2015-12-15 20:47:32 +00:00
|
|
|
#!/usr/bin/env python3
|
2016-12-28 18:04:59 +00:00
|
|
|
"""Home Assistant setup script."""
|
2018-06-25 13:57:26 +00:00
|
|
|
from datetime import datetime as dt
|
2019-12-09 15:30:16 +00:00
|
|
|
|
|
|
|
from setuptools import find_packages, setup
|
2018-02-20 04:51:05 +00:00
|
|
|
|
2018-02-07 20:38:06 +00:00
|
|
|
import homeassistant.const as hass_const
|
2017-11-03 14:43:30 +00:00
|
|
|
|
2019-08-01 15:30:49 +00:00
|
|
|
PROJECT_NAME = "Home Assistant"
|
|
|
|
PROJECT_PACKAGE_NAME = "homeassistant"
|
|
|
|
PROJECT_LICENSE = "Apache License 2.0"
|
|
|
|
PROJECT_AUTHOR = "The Home Assistant Authors"
|
2020-04-04 18:17:11 +00:00
|
|
|
PROJECT_COPYRIGHT = f" 2013-{dt.now().year}, {PROJECT_AUTHOR}"
|
2020-02-22 00:10:02 +00:00
|
|
|
PROJECT_URL = "https://www.home-assistant.io/"
|
2019-08-01 15:30:49 +00:00
|
|
|
PROJECT_EMAIL = "hello@home-assistant.io"
|
2017-11-03 14:43:30 +00:00
|
|
|
|
2019-08-01 15:30:49 +00:00
|
|
|
PROJECT_GITHUB_USERNAME = "home-assistant"
|
2020-03-09 19:46:52 +00:00
|
|
|
PROJECT_GITHUB_REPOSITORY = "core"
|
2017-11-03 14:43:30 +00:00
|
|
|
|
2020-04-04 18:17:11 +00:00
|
|
|
PYPI_URL = f"https://pypi.python.org/pypi/{PROJECT_PACKAGE_NAME}"
|
|
|
|
GITHUB_PATH = f"{PROJECT_GITHUB_USERNAME}/{PROJECT_GITHUB_REPOSITORY}"
|
|
|
|
GITHUB_URL = f"https://github.com/{GITHUB_PATH}"
|
2017-11-03 14:43:30 +00:00
|
|
|
|
2020-04-04 18:17:11 +00:00
|
|
|
DOWNLOAD_URL = f"{GITHUB_URL}/archive/{hass_const.__version__}.zip"
|
2018-06-25 13:57:26 +00:00
|
|
|
PROJECT_URLS = {
|
2020-04-04 18:17:11 +00:00
|
|
|
"Bug Reports": f"{GITHUB_URL}/issues",
|
2019-08-01 15:30:49 +00:00
|
|
|
"Dev Docs": "https://developers.home-assistant.io/",
|
|
|
|
"Discord": "https://discordapp.com/invite/c5DvZ4e",
|
|
|
|
"Forum": "https://community.home-assistant.io/",
|
2018-06-25 13:57:26 +00:00
|
|
|
}
|
2015-08-29 22:59:05 +00:00
|
|
|
|
2019-08-01 15:30:49 +00:00
|
|
|
PACKAGES = find_packages(exclude=["tests", "tests.*"])
|
2018-07-01 15:48:54 +00:00
|
|
|
|
2015-09-01 08:56:13 +00:00
|
|
|
REQUIRES = [
|
2021-11-04 15:07:50 +00:00
|
|
|
"aiohttp==3.8.0",
|
2021-04-01 22:29:08 +00:00
|
|
|
"astral==2.2",
|
2021-11-13 07:47:39 +00:00
|
|
|
"async_timeout==4.0.0",
|
2021-05-09 20:13:09 +00:00
|
|
|
"attrs==21.2.0",
|
2021-11-15 10:19:31 +00:00
|
|
|
"atomicwrites==1.4.0",
|
2021-11-26 11:06:50 +00:00
|
|
|
"awesomeversion==21.11.0",
|
2021-05-10 15:32:29 +00:00
|
|
|
'backports.zoneinfo;python_version<"3.9"',
|
2019-08-01 15:30:49 +00:00
|
|
|
"bcrypt==3.1.7",
|
2021-09-27 02:19:30 +00:00
|
|
|
"certifi>=2021.5.30",
|
2021-09-26 12:47:29 +00:00
|
|
|
"ciso8601==2.2.0",
|
2021-11-18 10:11:46 +00:00
|
|
|
"httpx==0.21.0",
|
2021-11-15 17:18:57 +00:00
|
|
|
"ifaddr==0.1.7",
|
2021-11-10 10:04:42 +00:00
|
|
|
"jinja2==3.0.3",
|
2021-09-08 03:59:02 +00:00
|
|
|
"PyJWT==2.1.0",
|
2018-08-14 20:02:01 +00:00
|
|
|
# PyJWT has loose dependency. We want the latest one.
|
2021-11-11 17:27:22 +00:00
|
|
|
"cryptography==35.0.0",
|
2020-11-30 18:38:39 +00:00
|
|
|
"pip>=8.0.3,<20.3",
|
2020-07-24 14:55:54 +00:00
|
|
|
"python-slugify==4.0.1",
|
2021-10-14 07:29:31 +00:00
|
|
|
"pyyaml==6.0",
|
2021-09-27 02:44:28 +00:00
|
|
|
"requests==2.26.0",
|
2021-09-26 16:59:00 +00:00
|
|
|
"voluptuous==0.12.2",
|
2020-07-07 03:04:35 +00:00
|
|
|
"voluptuous-serialize==2.4.0",
|
2021-01-15 12:19:22 +00:00
|
|
|
"yarl==1.6.3",
|
2015-09-01 08:56:13 +00:00
|
|
|
]
|
2015-08-30 02:19:52 +00:00
|
|
|
|
2019-08-01 15:30:49 +00:00
|
|
|
MIN_PY_VERSION = ".".join(map(str, hass_const.REQUIRED_PYTHON_VER))
|
2018-02-07 20:38:06 +00:00
|
|
|
|
2015-08-29 22:59:05 +00:00
|
|
|
setup(
|
2016-09-05 10:31:48 +00:00
|
|
|
name=PROJECT_PACKAGE_NAME,
|
2018-02-07 20:38:06 +00:00
|
|
|
version=hass_const.__version__,
|
2016-09-05 10:31:48 +00:00
|
|
|
url=PROJECT_URL,
|
2015-08-30 02:19:52 +00:00
|
|
|
download_url=DOWNLOAD_URL,
|
2018-06-25 13:57:26 +00:00
|
|
|
project_urls=PROJECT_URLS,
|
2016-09-05 10:31:48 +00:00
|
|
|
author=PROJECT_AUTHOR,
|
|
|
|
author_email=PROJECT_EMAIL,
|
2018-07-01 15:48:54 +00:00
|
|
|
packages=PACKAGES,
|
|
|
|
include_package_data=True,
|
|
|
|
zip_safe=False,
|
2015-08-30 02:19:52 +00:00
|
|
|
install_requires=REQUIRES,
|
2020-04-04 18:17:11 +00:00
|
|
|
python_requires=f">={MIN_PY_VERSION}",
|
2019-08-01 15:30:49 +00:00
|
|
|
test_suite="tests",
|
|
|
|
entry_points={"console_scripts": ["hass = homeassistant.__main__:main"]},
|
2015-08-29 22:59:05 +00:00
|
|
|
)
|