mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Specify the minimum python version in the setup.py. (#12144)
* Specify the minimum python version in the setup.py. * Used the minimum python version defined in homeassistant.const.
This commit is contained in:
parent
ea35ffbc81
commit
9d5dee574a
17
setup.py
17
setup.py
@ -2,14 +2,16 @@
|
|||||||
"""Home Assistant setup script."""
|
"""Home Assistant setup script."""
|
||||||
import os
|
import os
|
||||||
from setuptools import setup, find_packages
|
from setuptools import setup, find_packages
|
||||||
|
import sys
|
||||||
|
|
||||||
|
import homeassistant.const as hass_const
|
||||||
|
|
||||||
from homeassistant.const import __version__
|
|
||||||
|
|
||||||
PROJECT_NAME = 'Home Assistant'
|
PROJECT_NAME = 'Home Assistant'
|
||||||
PROJECT_PACKAGE_NAME = 'homeassistant'
|
PROJECT_PACKAGE_NAME = 'homeassistant'
|
||||||
PROJECT_LICENSE = 'Apache License 2.0'
|
PROJECT_LICENSE = 'Apache License 2.0'
|
||||||
PROJECT_AUTHOR = 'The Home Assistant Authors'
|
PROJECT_AUTHOR = 'The Home Assistant Authors'
|
||||||
PROJECT_COPYRIGHT = ' 2013-2017, {}'.format(PROJECT_AUTHOR)
|
PROJECT_COPYRIGHT = ' 2013-2018, {}'.format(PROJECT_AUTHOR)
|
||||||
PROJECT_URL = 'https://home-assistant.io/'
|
PROJECT_URL = 'https://home-assistant.io/'
|
||||||
PROJECT_EMAIL = 'hello@home-assistant.io'
|
PROJECT_EMAIL = 'hello@home-assistant.io'
|
||||||
PROJECT_DESCRIPTION = ('Open-source home automation platform '
|
PROJECT_DESCRIPTION = ('Open-source home automation platform '
|
||||||
@ -41,7 +43,7 @@ GITHUB_URL = 'https://github.com/{}'.format(GITHUB_PATH)
|
|||||||
|
|
||||||
|
|
||||||
HERE = os.path.abspath(os.path.dirname(__file__))
|
HERE = os.path.abspath(os.path.dirname(__file__))
|
||||||
DOWNLOAD_URL = '{}/archive/{}.zip'.format(GITHUB_URL, __version__)
|
DOWNLOAD_URL = '{}/archive/{}.zip'.format(GITHUB_URL, hass_const.__version__)
|
||||||
|
|
||||||
PACKAGES = find_packages(exclude=['tests', 'tests.*'])
|
PACKAGES = find_packages(exclude=['tests', 'tests.*'])
|
||||||
|
|
||||||
@ -61,9 +63,15 @@ REQUIRES = [
|
|||||||
'certifi>=2017.4.17',
|
'certifi>=2017.4.17',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
MIN_PY_VERSION = '.'.join(map(
|
||||||
|
str,
|
||||||
|
hass_const.REQUIRED_PYTHON_VER_WIN
|
||||||
|
if sys.platform.startswith('win')
|
||||||
|
else hass_const.REQUIRED_PYTHON_VER))
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name=PROJECT_PACKAGE_NAME,
|
name=PROJECT_PACKAGE_NAME,
|
||||||
version=__version__,
|
version=hass_const.__version__,
|
||||||
license=PROJECT_LICENSE,
|
license=PROJECT_LICENSE,
|
||||||
url=PROJECT_URL,
|
url=PROJECT_URL,
|
||||||
download_url=DOWNLOAD_URL,
|
download_url=DOWNLOAD_URL,
|
||||||
@ -75,6 +83,7 @@ setup(
|
|||||||
zip_safe=False,
|
zip_safe=False,
|
||||||
platforms='any',
|
platforms='any',
|
||||||
install_requires=REQUIRES,
|
install_requires=REQUIRES,
|
||||||
|
python_requires='>={}'.format(MIN_PY_VERSION),
|
||||||
test_suite='tests',
|
test_suite='tests',
|
||||||
keywords=['home', 'automation'],
|
keywords=['home', 'automation'],
|
||||||
entry_points={
|
entry_points={
|
||||||
|
Loading…
x
Reference in New Issue
Block a user