2019-12-07 18:28:55 +01:00
|
|
|
#!/usr/bin/env python3
|
2019-02-13 16:54:02 +01:00
|
|
|
"""esphome setup script."""
|
2019-01-19 17:54:41 +01:00
|
|
|
import os
|
2018-04-07 01:23:03 +02:00
|
|
|
|
2020-07-15 13:51:48 +02:00
|
|
|
from setuptools import setup, find_packages
|
|
|
|
|
2019-02-13 16:54:02 +01:00
|
|
|
from esphome import const
|
2018-04-07 01:23:03 +02:00
|
|
|
|
2021-03-08 01:05:08 +01:00
|
|
|
PROJECT_NAME = "esphome"
|
|
|
|
PROJECT_PACKAGE_NAME = "esphome"
|
|
|
|
PROJECT_LICENSE = "MIT"
|
|
|
|
PROJECT_AUTHOR = "ESPHome"
|
|
|
|
PROJECT_COPYRIGHT = "2019, ESPHome"
|
|
|
|
PROJECT_URL = "https://esphome.io/"
|
2021-05-03 01:51:10 +02:00
|
|
|
PROJECT_EMAIL = "esphome@nabucasa.com"
|
2018-04-07 01:23:03 +02:00
|
|
|
|
2021-03-08 01:05:08 +01:00
|
|
|
PROJECT_GITHUB_USERNAME = "esphome"
|
|
|
|
PROJECT_GITHUB_REPOSITORY = "esphome"
|
2018-04-07 01:23:03 +02:00
|
|
|
|
2021-03-08 01:05:08 +01:00
|
|
|
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)
|
2018-04-07 01:23:03 +02:00
|
|
|
|
2021-08-18 05:39:57 +02:00
|
|
|
DOWNLOAD_URL = "{}/archive/{}.zip".format(GITHUB_URL, const.__version__)
|
2018-04-07 01:23:03 +02:00
|
|
|
|
2020-07-15 13:51:48 +02:00
|
|
|
here = os.path.abspath(os.path.dirname(__file__))
|
|
|
|
|
2021-03-08 01:05:08 +01:00
|
|
|
with open(os.path.join(here, "requirements.txt")) as requirements_txt:
|
2020-07-15 13:51:48 +02:00
|
|
|
REQUIRES = requirements_txt.read().splitlines()
|
2018-04-07 01:23:03 +02:00
|
|
|
|
2021-03-08 01:05:08 +01:00
|
|
|
with open(os.path.join(here, "README.md")) as readme:
|
2020-07-24 10:16:34 +02:00
|
|
|
LONG_DESCRIPTION = readme.read()
|
|
|
|
|
2019-01-19 17:54:41 +01:00
|
|
|
# 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.
|
2021-03-08 01:05:08 +01:00
|
|
|
if "ESPHOME_USE_SUBPROCESS" in os.environ:
|
2020-07-15 13:51:48 +02:00
|
|
|
# Remove platformio and esptool from requirements
|
|
|
|
REQUIRES = [
|
2021-03-08 01:05:08 +01:00
|
|
|
req
|
|
|
|
for req in REQUIRES
|
|
|
|
if not any(req.startswith(prefix) for prefix in ["platformio", "esptool"])
|
2020-07-15 13:51:48 +02:00
|
|
|
]
|
2019-01-19 17:54:41 +01:00
|
|
|
|
2018-04-07 01:23:03 +02:00
|
|
|
CLASSIFIERS = [
|
2021-03-08 01:05:08 +01:00
|
|
|
"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",
|
2018-04-07 01:23:03 +02:00
|
|
|
]
|
|
|
|
|
|
|
|
setup(
|
|
|
|
name=PROJECT_PACKAGE_NAME,
|
|
|
|
version=const.__version__,
|
|
|
|
license=PROJECT_LICENSE,
|
|
|
|
url=GITHUB_URL,
|
2020-07-24 10:35:07 +02:00
|
|
|
project_urls={
|
|
|
|
"Bug Tracker": "https://github.com/esphome/issues/issues",
|
|
|
|
"Feature Request Tracker": "https://github.com/esphome/feature-requests/issues",
|
|
|
|
"Source Code": "https://github.com/esphome/esphome",
|
|
|
|
"Documentation": "https://esphome.io",
|
|
|
|
"Twitter": "https://twitter.com/esphome_",
|
|
|
|
},
|
2018-04-07 01:23:03 +02:00
|
|
|
download_url=DOWNLOAD_URL,
|
|
|
|
author=PROJECT_AUTHOR,
|
|
|
|
author_email=PROJECT_EMAIL,
|
|
|
|
description="Make creating custom firmwares for ESP32/ESP8266 super easy.",
|
2020-07-24 10:16:34 +02:00
|
|
|
long_description=LONG_DESCRIPTION,
|
2021-03-08 01:05:08 +01:00
|
|
|
long_description_content_type="text/markdown",
|
2018-04-07 01:23:03 +02:00
|
|
|
include_package_data=True,
|
|
|
|
zip_safe=False,
|
2021-03-08 01:05:08 +01:00
|
|
|
platforms="any",
|
|
|
|
test_suite="tests",
|
2021-04-08 13:57:29 +02:00
|
|
|
python_requires=">=3.7,<4.0",
|
2018-04-07 01:23:03 +02:00
|
|
|
install_requires=REQUIRES,
|
2021-03-08 01:05:08 +01:00
|
|
|
keywords=["home", "automation"],
|
|
|
|
entry_points={"console_scripts": ["esphome = esphome.__main__:main"]},
|
|
|
|
packages=find_packages(include="esphome.*"),
|
2018-04-07 01:23:03 +02:00
|
|
|
)
|