mirror of
https://github.com/esphome/esphome.git
synced 2024-12-20 16:18:49 +01:00
30ecb58e06
* Correct implementation of comparisons to be Pythonic If a comparison cannot be made return NotImplemented, this allows the Python interpreter to try other comparisons (eg __ieq__) and either return False (in the case of __eq__) or raise a TypeError exception (eg in the case of __lt__). * Python 3 updates * Add a more helpful message in exception if platform is not defined * Added a basic pre-commit check
80 lines
2.2 KiB
Python
Executable File
80 lines
2.2 KiB
Python
Executable File
#!/usr/bin/env python3
|
|
"""esphome setup script."""
|
|
from setuptools import setup, find_packages
|
|
import os
|
|
|
|
from esphome import const
|
|
|
|
PROJECT_NAME = 'esphome'
|
|
PROJECT_PACKAGE_NAME = 'esphome'
|
|
PROJECT_LICENSE = 'MIT'
|
|
PROJECT_AUTHOR = 'ESPHome'
|
|
PROJECT_COPYRIGHT = '2019, ESPHome'
|
|
PROJECT_URL = 'https://esphome.io/'
|
|
PROJECT_EMAIL = 'contact@esphome.io'
|
|
|
|
PROJECT_GITHUB_USERNAME = 'esphome'
|
|
PROJECT_GITHUB_REPOSITORY = 'esphome'
|
|
|
|
PYPI_URL = 'https://pypi.python.org/pypi/{}'.format(PROJECT_PACKAGE_NAME)
|
|
GITHUB_PATH = '{}/{}'.format(PROJECT_GITHUB_USERNAME, PROJECT_GITHUB_REPOSITORY)
|
|
GITHUB_URL = 'https://github.com/{}'.format(GITHUB_PATH)
|
|
|
|
DOWNLOAD_URL = '{}/archive/v{}.zip'.format(GITHUB_URL, const.__version__)
|
|
|
|
REQUIRES = [
|
|
'voluptuous==0.11.7',
|
|
'PyYAML==5.2',
|
|
'paho-mqtt==1.5.0',
|
|
'colorlog==4.0.2',
|
|
'tornado==5.1.1',
|
|
'protobuf==3.11.1',
|
|
'tzlocal==2.0.0',
|
|
'pytz==2019.3',
|
|
'pyserial==3.4',
|
|
'ifaddr==0.1.6',
|
|
]
|
|
|
|
# If you have problems importing platformio and esptool as modules you can set
|
|
# $ESPHOME_USE_SUBPROCESS to make ESPHome call their executables instead.
|
|
# This means they have to be in your $PATH.
|
|
if os.environ.get('ESPHOME_USE_SUBPROCESS') is None:
|
|
REQUIRES.extend([
|
|
'platformio==4.1.0',
|
|
'esptool==2.7',
|
|
])
|
|
|
|
CLASSIFIERS = [
|
|
'Environment :: Console',
|
|
'Intended Audience :: Developers',
|
|
'Intended Audience :: End Users/Desktop',
|
|
'License :: OSI Approved :: MIT License',
|
|
'Programming Language :: C++',
|
|
'Programming Language :: Python :: 3',
|
|
'Topic :: Home Automation',
|
|
]
|
|
|
|
setup(
|
|
name=PROJECT_PACKAGE_NAME,
|
|
version=const.__version__,
|
|
license=PROJECT_LICENSE,
|
|
url=GITHUB_URL,
|
|
download_url=DOWNLOAD_URL,
|
|
author=PROJECT_AUTHOR,
|
|
author_email=PROJECT_EMAIL,
|
|
description="Make creating custom firmwares for ESP32/ESP8266 super easy.",
|
|
include_package_data=True,
|
|
zip_safe=False,
|
|
platforms='any',
|
|
test_suite='tests',
|
|
python_requires='>=3.6,<4.0',
|
|
install_requires=REQUIRES,
|
|
keywords=['home', 'automation'],
|
|
entry_points={
|
|
'console_scripts': [
|
|
'esphome = esphome.__main__:main'
|
|
]
|
|
},
|
|
packages=find_packages()
|
|
)
|