mirror of
https://github.com/esphome/esphome.git
synced 2024-12-22 13:34:54 +01:00
Load setup.py requirements from requirements.txt (#1149)
This commit is contained in:
parent
1254ec2849
commit
a20e71b32a
1 changed files with 12 additions and 19 deletions
31
setup.py
31
setup.py
|
@ -1,8 +1,9 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
"""esphome setup script."""
|
"""esphome setup script."""
|
||||||
from setuptools import setup, find_packages
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
from setuptools import setup, find_packages
|
||||||
|
|
||||||
from esphome import const
|
from esphome import const
|
||||||
|
|
||||||
PROJECT_NAME = 'esphome'
|
PROJECT_NAME = 'esphome'
|
||||||
|
@ -22,28 +23,20 @@ GITHUB_URL = 'https://github.com/{}'.format(GITHUB_PATH)
|
||||||
|
|
||||||
DOWNLOAD_URL = '{}/archive/v{}.zip'.format(GITHUB_URL, const.__version__)
|
DOWNLOAD_URL = '{}/archive/v{}.zip'.format(GITHUB_URL, const.__version__)
|
||||||
|
|
||||||
REQUIRES = [
|
here = os.path.abspath(os.path.dirname(__file__))
|
||||||
'voluptuous==0.11.7',
|
|
||||||
'PyYAML==5.3.1',
|
with open(os.path.join(here, 'requirements.txt')) as requirements_txt:
|
||||||
'paho-mqtt==1.5.0',
|
REQUIRES = requirements_txt.read().splitlines()
|
||||||
'colorlog==4.1.0',
|
|
||||||
'tornado==6.0.4',
|
|
||||||
'protobuf==3.11.3',
|
|
||||||
'tzlocal==2.0.0',
|
|
||||||
'pytz==2020.1',
|
|
||||||
'pyserial==3.4',
|
|
||||||
'ifaddr==0.1.6',
|
|
||||||
'deepmerge==0.1.0'
|
|
||||||
]
|
|
||||||
|
|
||||||
# If you have problems importing platformio and esptool as modules you can set
|
# If you have problems importing platformio and esptool as modules you can set
|
||||||
# $ESPHOME_USE_SUBPROCESS to make ESPHome call their executables instead.
|
# $ESPHOME_USE_SUBPROCESS to make ESPHome call their executables instead.
|
||||||
# This means they have to be in your $PATH.
|
# This means they have to be in your $PATH.
|
||||||
if os.environ.get('ESPHOME_USE_SUBPROCESS') is None:
|
if 'ESPHOME_USE_SUBPROCESS' in os.environ:
|
||||||
REQUIRES.extend([
|
# Remove platformio and esptool from requirements
|
||||||
'platformio==4.3.4',
|
REQUIRES = [
|
||||||
'esptool==2.8',
|
req for req in REQUIRES
|
||||||
])
|
if not any(req.startswith(prefix) for prefix in ['platformio', 'esptool'])
|
||||||
|
]
|
||||||
|
|
||||||
CLASSIFIERS = [
|
CLASSIFIERS = [
|
||||||
'Environment :: Console',
|
'Environment :: Console',
|
||||||
|
|
Loading…
Reference in a new issue